Commit Graph

83 Commits

Author SHA1 Message Date
imp
387b96fb2c Simplify aha resource management, and fix a few bugs in unwinding
error cases.
2005-01-19 06:54:10 +00:00
imp
e3c9facbe6 Use the standard FreeBSD license 2005-01-11 06:24:40 +00:00
imp
3ebd1d745d nits 2005-01-11 06:22:48 +00:00
imp
3fba2d8bb3 Final attempt to make aha 1542A working. If not, oh well, I don't
have the card and no way to reproduce problems.  We do this by
applying the workaround to firmware revsion 0.

PR: 14334
2005-01-11 01:17:07 +00:00
imp
4b319958e7 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
imp
54bb856be5 Various whitespace nits.
Noticed by: njl
2004-11-12 02:18:42 +00:00
imp
4527d16373 Don't use aha after calling aha_free. 2004-11-12 00:46:52 +00:00
phk
a93766638a #include <isa/isavar.h> instead of <i386/isa/isa_dma.h> 2004-09-15 11:58:34 +00:00
njl
05a1f56fc9 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
imp
5b063056ef Save the device so we can do a device_printf.
Use this in preference to aha_name.
Remove aha_name function and #define it to device_get_unitname()
Minor indentation tweaks resulting therefrom
2003-11-13 04:14:53 +00:00
imp
929577982d Minor diff reduction with p4 2003-11-12 05:44:44 +00:00
imp
0139b2158b Move 'guessing' code from the probe into the identify routine where it more
properly belongs.
2003-11-10 02:47:11 +00:00
imp
87bc402cf2 Tweak the front end driver file list
Also some minor whitespace nits.
2003-11-09 20:02:47 +00:00
imp
4e71bf2bbd Add my copyright to aha_isa.c to make it crystal clear its license 2003-11-09 20:01:36 +00:00
imp
e060a36d77 Let bus space manage softc. 2003-11-09 19:51:16 +00:00
imp
9189a12295 Minor tweaks to make it behave better:
o When we're resetting the board, make sure that we error out the pending
  CCBs first.  Otherwise the aha_cmd won't accept further commands, such
  as those that are used to reset the card (AOP_INITIALIZE_MBOX).  This
  appears to cause a cascade failure where no more commands are possible
  to the card.
o Reduce from 10s down to 1s the amount of time we're willing to tolerate
  the card being awol.  This helps the above case.
o Add some error checking to two commands issued in the probe.

I have a dim memory of gibbs@ trying to tell me about this problem a
few years ago, so pointy hat to imp@ for sitting on it so long.
2003-11-09 17:16:39 +00:00
imp
1480b8c587 Minor comment smithing 2003-11-09 17:05:55 +00:00
imp
2d5987075a Make this driver a little more style(9) compliant 2003-11-09 00:51:52 +00:00
obrien
c63dab466c Use __FBSDID().
Also some minor style cleanups.
2003-08-24 17:55:58 +00:00
scottl
4d495abb9d Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma.  At the moment, this is used for the
asynchronous busdma_swi and callback mechanism.  Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg.  dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create().  The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.

sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms.  The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.

If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.

Reviewed by:	tmm, gibbs
2003-07-01 15:52:06 +00:00
scottl
f26aca7b71 Bring back bus_dmasync_op_t. It is now a typedef to an int, though the
BUS_DMASYNC_ definitions remain as before.  The does not change the ABI,
and reverts the API to be a bit more compatible and flexible.  This has
survived a full 'make universe'.

Approved by:	re (bmah)
2003-05-27 04:59:59 +00:00
mux
37f577805d I deserve a big pointy hat for having missed all those references
to bus_dmasync_op_t in my last commit.
2003-04-10 23:50:06 +00:00
mdodd
04e6064fe9 Clean up argument comments for bus_dma_tag_create() calls. 2003-03-29 09:46:10 +00:00
alfred
b5c0015ac9 Consolidate MIN/MAX macros into one place (param.h).
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
2003-02-02 13:17:30 +00:00
schweikh
d3367c5f5d Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
peter
36126b0ba6 Fix build on alpha. It used to case an int to a pointer in order to do
pointer arithmetic.  Detour via uintptr_t, since we're generating an
offset not dereferencing them.
2002-10-09 09:30:57 +00:00
peter
9a5a0eace4 Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in the
'int nsegments' argument to bus_dma_tag_create().  ~0ul does not fit in
an int on machines with 64 bit longs.
2002-10-09 08:54:32 +00:00
peter
0f2b8a126a Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly
again.
2002-05-24 05:21:36 +00:00
markm
36b9aabb47 Turn on interrupt-entropy harvesting for all/any mass storage devices
I could find. I have no doubt missed a couple.

Interrupt entropy harvesting is still conditional on the
kern.random.sys.harvest_interrupt sysctl.
2001-03-01 17:09:09 +00:00
imp
8195cce261 Remove NAHA, NAHATOT and aha_softcs and related code. It was unused
except for setting it.  Also remove count from aha and replace it with
optional.

Also add commented out pccard lines for all the old card drivers.
They have to be commented out until they are converted because it
causes problems in NEWCARD.
2001-02-04 16:45:39 +00:00
imp
a55b1689ee Remove unnecessary includes found by phk's script a long time ago. 2000-12-13 06:25:22 +00:00
dwmalone
1978e2e6ea Make a few more mallocs use M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	imp
2000-10-29 16:29:05 +00:00
phk
beadbd4365 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
alex
ac720dace0 Fix typo (accessable --> accessible).
PR:		18588
Submitted by:	Anatoly Vorobey <mellon@pobox.com>
Reviewed by:	asmodai
2000-06-14 17:53:40 +00:00
jake
961b97d434 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
jake
d93fbc9916 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
phk
75e82c815e Remove unneeded <sys/buf.h> includes.
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks
by 924 bytes.
2000-04-18 15:15:39 +00:00
imp
5c3edf7db4 More pnpids. 2000-03-25 03:24:43 +00:00
imp
739bfd2efc Fix plug and play support:
o Cut out the probed stuff.  We no longer need it since newbus implicitly
  checks for this (likely bt can be changed as well in this way).
o Add preliminary support for unload.  Untested because aha doesn't yet
  support identify and there are some interactions with PnP that I've
  not yet worked out.

With this I can boot the AHA-1542CP FW F.0.  All the aha resources
appear to be picked up via pnp now.
2000-01-24 07:08:40 +00:00
imp
10abd67792 MIN unused, so kill it 1999-10-25 04:28:53 +00:00
dfr
229cdb9144 * Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
  layout of ivars.

* Move set_resource, get_resource and delete_resource from
  isa_if.m to bus_if.m.

* Simplify driver code by providing wrappers to those methods:

     bus_set_resource(dev, type, rid, start, count);
     bus_get_resource(dev, type, rid, startp, countp);
     bus_get_resource_start(dev, type, rid);
     bus_get_resource_count(dev, type, rid);
     bus_delete_resource(dev, type, rid);

* Delete isa_get_rsrc and use bus_get_resource_start instead.

* Fix a stupid typo in isa_alloc_resource reported by Takahashi
  Yoshihiro <nyan@FreeBSD.org>.

* Print a diagnostic message if we can't assign resources to a PnP
  device.

* Change device_print_prettyname() so that it doesn't print
  "(no driver assigned)-1" for anonymous devices.
1999-10-12 21:35:51 +00:00
imp
883ff994af Kill unused includes 1999-10-11 19:05:21 +00:00
mdodd
bbea2fab83 Use the PRVERB() macro instead of 'if (bootverbose) printf()...
Add debuging for all failure cases in aha_cmd().

Always check DATAIN_REG_READY even if we're ready to exit the
read loop.

The last fix allows the AHA-1640 MCA SCSI adapter to operate
correctly and likely fixes problems on a few other oddball
adapters. (I suspect my Dell Drive Array in 1540 mode needs this.)

Reviewed by:	Warner Losh
1999-10-02 17:40:07 +00:00
mdodd
59dde7eac2 Add support for the AHA-1640 SCSI adapter.
The changes to sys/dev/aha/aha.c that allow these
cards to function properly will be here in a day
or 2.
1999-10-01 03:12:15 +00:00
imp
199022b994 Use rmand_get_bus{tag,handle} rather than hard wiring things to
I386_BUS_SPACE_IO.  Compiles now on the Alpha, but likely will not
work due to bus space address <-> virtual address mapping bogons that
work for i386 but not alpha.
1999-09-28 19:59:41 +00:00
imp
6565c98a63 Newbusification of aha. dfr sent me the first cut, and I made it
work.  Be more verbose when one cannot allocate IRQ, et al since this
is a common configuration problem.  The cards have the IRQ soft wired
into their BIOS and do not try to do collision detection.  This can
cause problems when this IRQ is the same as another card/device.

The PNP hasn't been tested.  My PNP board is in a deployed system.
I'll sneak in testing of it sometime later.  I've been able to mount
the 3.3R cdrom that arrived today and access files off it.

Submitted by: dfr
1999-09-28 02:39:45 +00:00
dfr
20d6eca4a7 Remove vestiges of old pnp code. 1999-09-03 20:11:25 +00:00
peter
ac5f1ad134 Missed this use of the old pnp includes. I don't think this is meant to
be here though.
1999-09-02 05:59:20 +00:00
peter
fa03011329 Stub out the old pnp code till these are converted so GENERIC builds again. 1999-09-02 04:37:07 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00