Commit Graph

197 Commits

Author SHA1 Message Date
scottl
d86bd61d0c Rearrange locking in the alloc_commands and ioctl paths to avoid problems. 2006-04-08 06:05:29 +00:00
scottl
10c2623c78 Initialize the event tailq.
Submitted by: Frank Mayhar
PR: kern/90882
MFC After: 1 day
2005-12-28 21:18:55 +00:00
schweikh
83fc9c483a Remove the unused AAC_DRIVER_BUILD_DATE macro.
Nuke whitespace at EOL while I'm here.

Approved by:	scottl (MAINTAINER)
2005-11-13 17:26:36 +00:00
scottl
f3c8cac1a2 Refactor the PCI probe code a bit. 2005-11-06 22:52:52 +00:00
csjp
0dd5d190ee Pickup I/O lock in aac_get_bus_info, as this code will call
aac_alloc_sync_fib(). aac_alloc_sync_fib() will assert that the I/O locks
are held. This fixes a panic on system boot up  when the aac(4) device's
bus_generic_attach() routine is called.

Reviewed by:	scottl
2005-10-31 00:12:19 +00:00
scottl
a62fee5da2 Fix a regression that prevented PERC3 hardware from working. Apparently they
do not support the GETINFO immediate command, unlike just about every other
variant of the hardware.  Also document some magic values and fix some minor
nearby whitespace.

MFC After: 3 days
2005-10-14 16:22:45 +00:00
scottl
2dc99f1bfb Fix a missing set of lock operations.
Submitted by: green
PR: 87191
2005-10-10 20:13:31 +00:00
scottl
7057d08069 Ue a better msleep identifier. Fix some whitespace. 2005-10-08 22:41:57 +00:00
scottl
802eb36578 aac_intr0 rotted long ago, remove it. 2005-10-08 22:36:54 +00:00
scottl
5374999d01 Mega Update to the aac driver to support a whole new family of cards and
the modified interface that they use.  Changes include:

- Register a different interrupt handler for the new interface.  This one is
  INTR_MPSAFE, not INTR_FAST, and directly processes completions and AIFs.
- Add an event registration and callback mechanism for the ioctl and CAM
  modules can know when a resource shortage clears.  This condition was
  previously fatal in CAM due to programming oversights.
- Fix locking to play better with newbus.
- Provide access methods for talking to cards with the NEWCOMM interface.
- Fix up the CAM module to be better suited for dealing with newer firmware
  on the PERC Si/Di series that requires talking to plain SCSI via aac.
- Add a whole slew of new PCI Id's.

Thanks to Adaptec for providing an initial version of this work and for
answering countless questions about it.  There are still some rough edges in
this, but it works well enough to commit and test for now.

Obtained from: Adaptec, Inc.
2005-10-08 15:55:09 +00:00
scottl
5778f4c576 Bring aac_cam into line with using time_uptime instead of time_second. 2005-09-14 05:49:34 +00:00
scottl
f33b11ee78 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
ps
25b64347ef Add support for HP branded 2610SA
MFC after:	3 days
Approved by:	scottl
2005-08-08 19:39:58 +00:00
scottl
483ce6fe55 Retire the FreeBSD 4.x compat code and __FreeBSD_version checks from the aac
driver.
2005-08-08 12:19:19 +00:00
scottl
389f3fcd45 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
scottl
5ebeded6fe 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
nyan
0fce92f5c4 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
scottl
5c8c9a1aa0 Fix some busdma API violations in the dumpsys handler.
MFC After: 3 days
2005-05-02 22:56:52 +00:00
sam
e0b3db1059 purge dead code
Noticed by:	Coverity Prevent analysis tool
2005-03-26 23:37:54 +00:00
scottl
d2396e762a Handle failures better in the passthrough bus creation code.
Submitted by: Coverity Prevent analysis tool
2005-03-19 06:29:32 +00:00
imp
9f6d060385 Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 19:24:22 +00:00
scottl
1858067a9d Remove the messy locking dance around xpt_done() 2005-02-09 11:50:16 +00:00
scottl
837efbda5b Fix whitespace 2005-01-23 16:13:10 +00:00
scottl
061dd4dce8 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
imp
4b319958e7 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
scottl
e3b5eed2fd Add the PCI ID for the Adaptec 2230SLP card.
Submitted by: Ray Gilstrap
2004-12-15 07:03:21 +00:00
scottl
08399c7f98 Complete the repo-copy of aac_ioctl.h from sys/dev/aac/to sys/sys. 2004-12-09 22:20:25 +00:00
scottl
0b30660485 Don't force busdma to pre-allocate bounce pages for static allocations. 2004-11-21 04:03:29 +00:00
scottl
eb9e7f47d6 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
scottl
ab1b0390a3 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
scottl
1f627cbc78 Put some of the probe messages under bootverbose so to lessen the noise. 2004-09-12 03:19:32 +00:00
scottl
212c84b1a5 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
scottl
6a255763d7 Destroy mutexes on detach. 2004-08-12 05:31:17 +00:00
scottl
6c91b9a2fa Change FREE() to free() 2004-08-12 05:09:17 +00:00
scottl
1db9aa9537 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
scottl
1904a6897a 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
kan
4caefcbb3e Avoid casts as lvalues. 2004-07-28 06:21:53 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
obrien
96506200e2 Cast printf'ed values to intmax_t. 2004-06-13 17:57:15 +00:00
scottl
b367b3b6f6 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
scottl
0fae2f30f5 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
scottl
bee5c9d805 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
scottl
167bbf13a5 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
phk
9d102d7d5a Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
des
6d37395025 Unbreak the build. 2004-05-13 19:15:21 +00:00
scottl
ef5c6b69e0 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
scottl
f80c402a7a 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
scottl
b4abefb315 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
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
jhb
2642ed4029 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