Commit Graph

187 Commits

Author SHA1 Message Date
Scott Long
552d343294 Bring aac_cam into line with using time_uptime instead of time_second. 2005-09-14 05:49:34 +00:00
Scott Long
2b3b0f1721 Use time_uptime for timing commands instead of time_second. This is a bit
risky because the "current time" is supposed to be fed to the card during
initialization, and the current time is supposed to be put into each command
that is sent to the card.  Hopefully either the card doesn't actually care
about the timestamps, or it doesn't care about the absolute values so long
and the relative values are consistent.  Not an MFC candidate until more
thorough testing can be done.
2005-09-14 05:46:28 +00:00
Paul Saab
16ee26fd9b Add support for HP branded 2610SA
MFC after:	3 days
Approved by:	scottl
2005-08-08 19:39:58 +00:00
Scott Long
64682a68e2 Retire the FreeBSD 4.x compat code and __FreeBSD_version checks from the aac
driver.
2005-08-08 12:19:19 +00:00
Scott Long
1b3a4f4e7b Check the vendor and device, not subvendor and subdevice, when looking for
channel devices.  This should fix Dell 2450/2550/2650 systems that have RAID
enabled.  This will likely not fix 2400 systems though as I don't have the
appropriate PCI Id info for them.

MFC After: 3 day
2005-07-14 17:43:00 +00:00
Scott Long
b1c56c68b0 Add a text description for the Intel IOP302/303 processors. Be slightly
more verbose about the allocation of RAM on the controller.

Sbumitted by: Jeremy Chadwick
PR: kern/81259
MFC-After: 3 days
2005-06-01 07:11:17 +00:00
Yoshihiro Takahashi
d4fcf3cba5 Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64.  The optimization is a trivial on recent machines.

Reviewed by:	-arch (imp, marcel, dfr)
2005-05-29 04:42:30 +00:00
Scott Long
cbe4fd54ef Fix some busdma API violations in the dumpsys handler.
MFC After: 3 days
2005-05-02 22:56:52 +00:00
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