Commit Graph

179 Commits

Author SHA1 Message Date
Sam Leffler
83888a7f30 purge dead code
Noticed by:	Coverity Prevent analysis tool
2005-03-26 23:37:54 +00:00
Scott Long
b5f516cdaf Handle failures better in the passthrough bus creation code.
Submitted by: Coverity Prevent analysis tool
2005-03-19 06:29:32 +00:00
Warner Losh
494f3ca182 Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 19:24:22 +00:00
Scott Long
29c711f038 Remove the messy locking dance around xpt_done() 2005-02-09 11:50:16 +00:00
Scott Long
d563f671c3 Fix whitespace 2005-01-23 16:13:10 +00:00
Scott Long
608d7ac260 Add a default driver to attach to the "hidden" scsi channels of the Dell
PERC 3 controllers.  This is needed to keep the PM code from powering them
down.
2005-01-07 05:59:45 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Scott Long
ecefe5717e Add the PCI ID for the Adaptec 2230SLP card.
Submitted by: Ray Gilstrap
2004-12-15 07:03:21 +00:00
Scott Long
0b0594cd4f Complete the repo-copy of aac_ioctl.h from sys/dev/aac/to sys/sys. 2004-12-09 22:20:25 +00:00
Scott Long
1248408df3 Don't force busdma to pre-allocate bounce pages for static allocations. 2004-11-21 04:03:29 +00:00
Scott Long
b1e56e58c5 Add support for the 21610SA 16-channel SATA card. Thanks to Adaptec for
providing hardware for testing.
2004-10-21 19:14:32 +00:00
Scott Long
15c37be013 If the timeout handler runs and notices that commands are timed out, check
the firmware status register on the card to see if the firmware is still
running.  There is no way to recover from this, but at least it can give
a hint as whether the car has crashed (which happens all too often).

MFC after: 3 days
2004-09-16 02:37:40 +00:00
Scott Long
bd971c4961 Put some of the probe messages under bootverbose so to lessen the noise. 2004-09-12 03:19:32 +00:00
Scott Long
4afedc314e Add support for the Adaptec RAID-On-Chip architecture. This in turn
provides support for the Adaptec 2130S adapter.  Thanks to Adaptec for
providing hardware for this.
2004-08-13 01:44:09 +00:00
Scott Long
dc9efde5b7 Destroy mutexes on detach. 2004-08-12 05:31:17 +00:00
Scott Long
ba1d57e7d9 Change FREE() to free() 2004-08-12 05:09:17 +00:00
Scott Long
bb6fe253cc Remove the AAC_LOCK macros. They no longer abstract anything and only
obfuscate the code.  No functional differences.
2004-08-12 05:05:06 +00:00
Scott Long
3576af8fd7 Release the sync fib after the controller has been shut down. This also
releases the I/O lock instead of just leaking it.
2004-08-12 04:47:32 +00:00
Alexander Kabaev
eec256de79 Avoid casts as lvalues. 2004-07-28 06:21:53 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
David E. O'Brien
13709702ba Cast printf'ed values to intmax_t. 2004-06-13 17:57:15 +00:00
Scott Long
03b5fe51bf Collapse sync fib locking into normal i/o locking. The former didn't
protect the registers so it was trivially possible for a sync command and
i/o command to fight each other and confuse the controller.  Make the
sync fib alloc/release functions inline and remove the somewhat worthless
AAC_SYNC_LOCK_FORCE flag.  Thanks to Adil Katchi for helping me to track
this down in RELENG_4.
2004-06-02 18:15:48 +00:00
Scott Long
614c22b2a2 Commit the correct version of the patch from last night. This fixes an
immediate panic when doing any i/o, and it closes a completion race.
2004-06-01 15:50:11 +00:00
Scott Long
397fa34f51 Collapse aac_map_command() into aac_startio(). Check the AAC_QUEUE_FRZN in
every iteration of aac_startio().  This ensures that a command that is
deferred for lack of resources doesn't immediately get retried in the
aac_startio() loop.  This avoids an almost certain livelock.
2004-06-01 05:32:26 +00:00
Scott Long
2c81db6cb5 Turn down the queue size by 8 until I can figure out why the 512th command
keeps on getting lost.
2004-05-30 22:40:28 +00:00
Poul-Henning Kamp
fe12f24bb0 Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
Dag-Erling Smørgrav
7cec30e791 Unbreak the build. 2004-05-13 19:15:21 +00:00
Scott Long
d7f2f66e08 Enable INTR_ENTROPY if the interrupt is not set to INTR_FAST. Remove the
testing and setting of the INTR_ENTROPY macro as it is not needed in
FreeBSD 5.x.

Submitted by:	Alex Vasylenko
2004-05-13 16:02:18 +00:00
Scott Long
d8a0a47347 Remove the 'timeout' argument from aac_wait_command() as it isn't used and
never will be.  Update the XXX comment for this function to accurately reflect
why things are the way they are.
2004-04-14 19:11:29 +00:00
Scott Long
ad452e6553 Don peril-sensitive sunglasses and add PCI Id's for two new cards. I've
only done minimal testing on one of these cards and the firmware folks
have been extremely uncooperative in answering my qeustions about them, so
hopefully they will work ok for everyone.
2004-03-20 21:07:36 +00:00
Nate Lawson
5f96beb9e0 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
John Baldwin
6074439965 kthread_exit() no longer requires Giant, so don't force callers to acquire
Giant just to call kthread_exit().

Requested by:	many
2004-03-05 22:42:17 +00:00
Scott Long
75fba44b93 Revert the last commit. I don't know what I was thinking, but this change
definitely doesn't help any thing.
2004-02-25 05:41:44 +00:00
Poul-Henning Kamp
dc08ffec87 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
Scott Long
41a1325df9 Fix a major brain-o. If the command needs to be put on the deferred queue,
take it off of the busy queue first.  This should fix the 'command is on
another queue' panic that showed up recently.
2004-02-21 05:32:40 +00:00
Poul-Henning Kamp
0b7ed341e1 Change the disk(9) API in order to make device removal more robust.
Previously the "struct disk" were owned by the device driver and this
gave us problems when the device disappared and the users of that device
were not immediately disappearing.

Now the struct disk is allocate with a new call, disk_alloc() and owned
by geom_disk and just abandonned by the device driver when disk_create()
is called.

Unfortunately, this results in a ton of "s/\./->/" changes to device
drivers.

Since I'm doing the sweep anyway, a couple of other API improvements
have been carried out at the same time:

The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to
DISKFLAG_NEEDSGIANT

A version number have been added to disk_create() so that we can detect,
report and ignore binary drivers with old ABI in the future.

Manual page update to follow shortly.
2004-02-18 21:36:53 +00:00
Scott Long
f893fdd54e Fall back to INTR_MPSAFE if INTR_FAST registration fails.
PR:	kern/62276
2004-02-09 05:29:05 +00:00
Scott Long
8b60cc16ab Remove the use of AACQ_COMPLETE here since there is no longer a completion
queue.
2004-02-07 20:54:29 +00:00
Scott Long
ecd1c51f92 Do some small cleanups to comments and remove AACQ_COMPLETE definitions since
the completion queue is long-gone.
2004-02-07 17:40:38 +00:00
Scott Long
d85f27ce7f Remove the hack of lowering AAC_MAX_FIB now that the root cause of the
problem was found.
2004-02-07 10:30:59 +00:00
Scott Long
4102d44b77 If a command has to be deferred because there are no more resources for it
on the card, unmap it first.  This allows it to be picked up properly when
the queue gets kicked again.  This was the root problem for the lost command
(i.e. stuck in getblk/vinvalb) problem.  While here, panic if commands don't
map correctly instead of just silently ignoring the problem and dropping
command.  Also slow down the dynamic allocation of new commands.

It should be safe to go back into the aac waters.  Thanks to everyone who
suffered through this and provided good feedback.
2004-02-07 10:30:22 +00:00
Scott Long
8f6a5435e7 Reduce AAC_MAX_FIBS to work around some yet-unidentified bugs in the
handling of resources shortages.  The driver is now so fast that it can
completely fill all 512 slots on the card, but for some reason only 511
slots are being allocated.  Anything that tries to go into the 512th
slot gets silently lost.   Both bugs need to be fixed at a later date,
but this should fix the reports of hangs in getblk and vinvalb.
2004-02-07 03:30:32 +00:00
Scott Long
a32a982d4a - Broaden the scope of locking in aac_command_thread() again to catch some
edge cases in the loop.

- Try to grab a command before dequeueing the bio from the bioq.  The old
  behaviour of requeuing deferred bios to the end of the bioq is arguably
  wrong.  This should be fixed in the future to check the bioq head without
  automatically dequeueing the bio.
2004-02-07 03:26:38 +00:00
Scott Long
9768efef88 Add an #ifdef _KERNEL so that this file can be used from userland. 2004-02-07 03:20:07 +00:00
Peter Wemm
786f2a4079 Make LINT compile on amd64 2004-02-06 01:47:52 +00:00
Scott Long
9148fa21dd Take the plunge and make this driver be INTR_FAST. This re-arranges the
interrupt handler so that no locks are needed, and schedules the
command completion routine with a taskqueue_fast.  This also corrects the
locking in the command thread and removes the need for operation flags.

Simple load tests show that this is now considerably faster than FreeBSD 4.x
in the SMP case when multiple i/o tasks are running.
2004-01-30 07:04:39 +00:00
Scott Long
c5a8036c3d Temporary workaround for aac_cam to deal with CAM requiring Giant. This
should fix the panics on boot with newer Adaptec RAID cards.

Approved by:	re (rwatson)
2003-12-03 15:42:12 +00:00
Seigo Tanimura
512824f8f7 - Implement selwakeuppri() which allows raising the priority of a
thread being waken up.  The thread waken up can run at a priority as
  high as after tsleep().

- Replace selwakeup()s with selwakeuppri()s and pass appropriate
  priorities.

- Add cv_broadcastpri() which raises the priority of the broadcast
  threads.  Used by selwakeuppri() if collision occurs.

Not objected in:	-arch, -current
2003-11-09 09:17:26 +00:00
Scott Long
f29f42fce7 Remove a bogus PCI ID entry. 2003-11-01 00:13:43 +00:00
Mike Silbersack
184dcdc7c8 Change all SYSCTLS which are readonly and have a related TUNABLE
from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide
more useful error messages.
2003-10-21 18:28:36 +00:00