Commit Graph

34 Commits

Author SHA1 Message Date
Ed Maste
851f59d7e2 Previously, the aac driver did not handle enclosure management AIFs,
which were raised during hot-swap events. Now such events trigger cam
rescans, as is done in the mps driver.

Submitted by:	Mark Johnston <mjohnston at sandvine dot com>
2010-09-29 14:22:00 +00:00
Ed Maste
435c8a15cf Add some enums and constants from Adaptec's latest driver
(build 17911).
2010-09-15 01:19:11 +00:00
Ed Maste
e71d3b9c19 Sync some minor items with the upstream driver. Should have no functional
change.
2010-04-13 01:16:15 +00:00
Ed Maste
94c0fd90f2 Whitespace cleanup, in advance of next sync with Adaptec's driver. No
functional change.
2010-04-13 00:33:07 +00:00
Ed Maste
8e7e6335bc Diff reduction with Adaptec's vendor driver.
Driver version 2.1.9 chosen as that Adaptec version roughly corresponds
with the current feature set merged to the in-tree driver.
2010-02-14 17:14:11 +00:00
Ed Maste
2134e2ef57 Garbage collect Falcon/PPC support that has not been used in released
products, based on discussion with Adaptec.
2010-02-12 18:48:18 +00:00
Ed Maste
c89d07b9f5 Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver. 2009-10-29 17:14:18 +00:00
Attilio Rao
ff0991c4e9 Sync with the official Adaptec vendor driver:
[1]	Add the support for the NARK controller which seems a variant of
	the i960Rx.
[2]	Split up memory regions and other resources in 2 different parts
	as long as NARK uses them separately (it is not clear to me
	why though as long as there are no more informations available
	on this controller). Please note that in all the other cases,
	the regions overlaps leaving the default behaviour for all the
	other controllers.
[3]	Implement a clock daemon responsible for maintain updated the
	wall clock time of the controller (run any 30 minutes)*.

Submitted by:	Adaptec (driver build 15317 [1, 2] and 15727 [3])
Reviewed by:	emaste
Tested by:	emaste
Sponsored by:	Sandvine Incorporated

* Please note that originally, in the Adaptec driver, the clock daemon
  is not implemented with callouts as in our in-tree driver.
2009-02-21 15:40:03 +00:00
Ed Maste
8d5b55c37f Use outbound message register 0 instead of mailbox 7 in
aac_{rx,rkt}_get_fwstatus, as done in Adaptec's vendor driver as well as
the Linux drivers.

Submitted by:   jkim, from Adaptec's driver
2009-02-18 01:36:20 +00:00
Ed Maste
523da39bcc Add 64-bit array support for RAIDs > 2TB. This corresponds to ~ Adaptec
driver build 15317.

Tested on:
Adaptec 2230S, Firmware 4.2-0 (8205)
ICP ICP5085BL, Firmware 5.2-0 (12814)

Submitted by:	Adaptec
2008-03-25 21:39:06 +00:00
Ed Maste
7ea2d5586c Add family support to allow the driver to attach to new devices that
share the same interface.

Submitted by:	Achim Leubner at Adaptec
2007-12-07 18:05:41 +00:00
Scott Long
a441b3fc97 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
Scott Long
7cb209f5d0 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
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
Scott Long
d563f671c3 Fix whitespace 2005-01-23 16:13:10 +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
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
3df780cf76 Fix a couple of bugs with AIF handling:
- Correct the logic for the AIF array index pointers so that correct slot is
   always looked at.
 - Copy the full FIB payload size when copying AIF's, not just the first 64
   bytes.

Thanks to Mirapoint, Inc, for pointing these problems out and offering a
solution.
2003-10-17 21:44:06 +00:00
Scott Long
a6d35632f5 Begin support for 64-bit address support and workarounds for newer cards:
- Add data structuress for doing 64-bit scatter/gather
	- Move busdma tag creations around so that only the parent is
	  created in aac_pci.c.
	- Retrieve the capabilities word from the firmware before setting
	  up command structures and tags. This allows the driver to decide
	  whether to do 64-bit commands, and if work-arounds are needed for
	  systems with >2GB of RAM.
	- Only enable the SCSI passthrough if it's enabled in the capabilities
	  word in the firmware.

This should fix problems with the 2120S and 2200S cards in systems with more
than 2GB of RAM.  Full 64-bit support is forthcoming.

MFC-After:	1 week
2003-03-26 17:50:11 +00:00
Scott Long
f30ac74cb0 Major bugfixes for large memory and fast systems.
aac.c:
        Re-arrange the interrupt handler to optimize the common case of
        the adapter interrupting us because one or more commands are complete,
        and do a read across the pci bus to ensure that all posted status
        writes are flushed.  This should close a race that could cause command
        completion interrupts to be lost.
        Follow the spec a bit closer when filling out command structures.
        Enable the Fast Response feature to eliminate the need for the card
        to DMA successfull command completions back into host memory.
        Tell the controller how much physical memory we have.  Without this
        there was a chance that our DMA regions would collide with the
        memory window used by the cache on the controller.  The result would
        be massive data corruption.  This seemed to mainly affect systems with
        >2GB of memory.
        Fix a few whitespace problems.

aac_debug.c:
        Add an extra diagnostic when printing out commands.

aac_disk.c:
        Add extra sanity checks.

aacreg.h:
        Prepare for making this 64-bit clean by reducing the use of enumeration
        types in structures.

Many thanks to Justin Gibbs for helping track these down.
2003-01-11 01:59:21 +00:00
Alfred Perlstein
4f492bfab5 use __packed. 2002-09-23 18:54:32 +00:00
Tom Rhodes
d394511de3 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
Scott Long
fe3cb0e1ec Add a CAM interface to the aac driver. This is useful in case you should
ever connect a SCSI Cdrom/Tape/Jukebox/Scanner/Printer/kitty-litter-scooper
to your high-end RAID controller.  The interface to the arrays is still
via the block interface; this merely provides a way to circumvent the
RAID functionality and access the SCSI buses directly.  Note that for
somewhat obvious reasons, hard drives are not exposed to the da driver
through this interface, though you can still talk to them via the pass
driver.  Be the first on your block to low-level format unsuspecting
drives that are part of an array!

To enable this, add the 'aacp' device to your kernel config.

MFC after:	3 days
2002-04-27 01:31:17 +00:00
Scott Long
cbfd045b10 Prepare for a major update to the aac driver:
Update the aac driver with the new crashdump api.
	Protect sync fibs with a mutex.
	Align all DMA buffers on a PAGE_SIZE boundary.

MFC after:	3 days
2002-04-24 05:12:50 +00:00
Scott Long
fe94b852b3 Don't attach to Dell PERC2/QC cards that have a firmware rev of 1.x. This
check is complicated by the fact that the Adaptec 5400S cards claim to use
1.x firmware also.  PERC2/QC 1.x firmware is not compatible with this driver
and will cause a system hang.

MFC after:	3 days
2002-02-06 01:34:09 +00:00
Scott Long
b3457b5173 Add functionality and fix bugs so the driver will work with soon-to-be
released management apps.

1.  Implement poll().  This will check for queued aif's so that a
    subsequent ioctl call to retrieve the next aif will not block.
2.  Don't catch signals when sleeping on a fib sent from userland.  This
    causes a race and panic due to the pthread context switcher waking
    up the tsleep at inopportune times.
3.  Fix some whitespace nits.

MFC after:	3 days
2001-12-02 03:47:33 +00:00
Scott Long
914da7d0d3 Bring the aac driver *much* closer to style(9).
Reviewed by:	ken
2001-09-05 20:43:02 +00:00
Scott Long
36e0bf6e9c Mega update to the aac driver.
1.  Correctly handle commands initiated by the adapter.  These commands
    are defered to a kthread responsible for their processing, then are
    properly returned to the controller.
2.  Add/remove disk devices when notified by the card that a container was
    created/deleted/offline.
3.  Implement crashdump functionality.
4.  Support all ioctls needed for the management CLI to work.  The linux
    version of this app can be found at the Dell or HP website.  A native
    version will be forthcoming.

MFC-after:	4.4-RELEASE
2001-08-29 23:34:05 +00:00
Scott Long
fadfef893f Fix a couple of copyright issues and an 80 column nit that I missed before 2001-08-05 06:15:00 +00:00
Scott Long
c6eafcf2c5 Reformat for 80 columns. Sorry, but I had to do it. 2001-08-03 00:50:30 +00:00
Mike Smith
0b94a66e3f Major bugfix and minor update. This should resolve the current issues
with the driver locking up under load.

 - Restructure so that we use a static pool of commands/FIBs, rather than
   allocating them in clusters.  The cluster allocation just made things
   more complicated, and allowed us to waste more memory in peak load
   situations.
 - Make queueing macros more like my other drivers.  This adds queue stats
   for free.  Add some debugging to take advantage of this.
 - Reimplement the periodic timeout scan.  Kick the interrupt handler
   and the start routine every scan as well, just to be safe.  Track busy
   commands properly.
 - Bring resource cleanup into line with resource allocation.  We should
   now clean up correctly after a failed probe/unload/etc.
 - Try to start new commands when old ones are completed.  We weren't doing
   this before, which could lead to deadlock when the controller was full.
 - Don't try to build a new command if we have found a deferred command.
   This could cause us to lose the deferred command.
 - Use diskerr() to report I/O errors.
 - Don't bail if the AdapterInfo structure is the wrong size.  Some variation
   seems to be normal.  We need to improve our handing of 2.x firmware sets.
 - Improve some comments in an attempt to try to make things clearer.
 - Restructure to avoid some warnings.
2000-12-27 13:14:56 +00:00
Mike Smith
84ad14e4a6 Fix up some more comments that were reversed.
Submitted by:	Niklas Hallqvist <niklas@appli.se>
2000-10-03 10:26:29 +00:00
Mike Smith
0791663f57 Fix reversed comments re: OISR/OIMR
Submitted by:	Niklas Hallqvist <niklas@appli.se>
2000-10-03 08:28:04 +00:00
Mike Smith
358637397e A new driver for PCI:SCSI RAID controllers based on the Adaptec FSA
design.  This includes integrated Dell RAID controllers, the Dell
PERC 2/QC and the HP NetRAID-4M.
2000-09-13 03:20:35 +00:00