History log of /freebsd-current/sys/dev/aac/aacvar.h
Revision Date Author Comments
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 718cf2cc 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# 7a22215c 30-Nov-2013 Eitan Adler <eadler@FreeBSD.org>

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.

Discussed with: -arch, rdivacky
Reviewed by: cperciva


# 21e5a222 06-Aug-2013 Marius Strobl <marius@FreeBSD.org>

As it turns out, MSIs are broken with 2820SA so introduce an AAC_FLAGS_NOMSI
quirk and apply it to these controllers [1]. The same problem was reported
for 2230S, in which case it wasn't actually clear whether the culprit is the
controller or the mainboard, though. In order to be on the safe side, flag
MSIs as being broken with the latter type of controller as well. Given that
these are the only reports of MSI-related breakage with aac(4) so far and
OSes like OpenSolaris unconditionally employ MSIs for all adapters of this
family, however, it doesn't seem warranted to generally disable the use of
MSIs in aac(4).
While it, simplify the MSI allocation logic a bit; there's no need to check
for the presence of the MSI capability on our own as pci_alloc_msi(9) will
just fail when these kind of interrupts are not available.
Reported and tested by: David Boyd [1]

MFC after: 3 days


# 8fce673c 29-May-2013 Marius Strobl <marius@FreeBSD.org>

Allow unmapped I/O via aacd(4). It shouldn't be too hard to add the
same support for aacp(4), I'm lacking the necessary hardware for
testing, though.


# 5ba8a38e 29-May-2013 Marius Strobl <marius@FreeBSD.org>

- Remove pointless returns.
- Make cm_data a void pointer and cm_flags unsigned as appropriate.

MFC after: 3 days


# da4882c2 01-Mar-2013 Marius Strobl <marius@FreeBSD.org>

- Make tables, device ID strings etc const. This includes #ifdef'ing 0
aac_command_status_table, which is actually unused since r111532.
While at it, make aac_if a pointer to the now const interface tables
instead of copying them over to the softc (this alone already reduces the
size of aac.ko on amd64 by ~1 KiB).
- Remove redundant softc members.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Remove redundant bzero(9)'ing of the softc.
- Use pci_enable_busmaster(9) instead of duplicating it.
- Remove redundant checking for PCIM_CMD_MEMEN (resource allocation will
just fail).
- Canonicalize the error messages in case of resource allocation failures.
- Add support for using MSI instead of INTx, controllable via the tunable
hw.aac.enable_msi (defaulting to on).

MFC after: 1 month


# 1bd320ec 10-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

- Fix races on detach handling of AAC_IFFLAGS_* mask
- Fix races on setting AAC_AIFFLAGS_ALLOCFIBS
- Remove some unused AAC_IFFLAGS_* bits.
Please note that the kthread still makes a difference between the
total mask and AAC_AIFFLAGS_ALLOCFIBS because more flags may be
added in the future to aifflags.

Sponsored by: Sandvine Incorporated
Reported and reviewed by: emaste
MFC after: 2 weeks


# 729e10b9 04-Feb-2011 Ed Maste <emaste@FreeBSD.org>

We can pass a format string and args to panic(), so instead of using
printf() to output some information before a panic, just include that
information in the panic.

Submitted by: bde
Reviewed by: bde


# 7f6563d1 02-Feb-2011 Ed Maste <emaste@FreeBSD.org>

Include driver name in panic string, to make it easier to find these should
the panic ever occur.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 851f59d7 29-Sep-2010 Ed Maste <emaste@FreeBSD.org>

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>


# 04f798ec 15-Sep-2010 Attilio Rao <attilio@FreeBSD.org>

Fix bogus busying mechanism from cdevsw callbacks:
- D_TRACKCLOSE may be used there as d_close() are expected to match up
d_open() calls
- Replace the hand-crafted counter and flag with the
device_busy()/device_unbusy() proper usage.

Sponsored by: Sandvine Incorporated
Reported by: Mark Johnston <mjohnston at sandvine dot com>
Tested by: Mark Johnston
Reviewed by: emaste

MFC after: 10 days


# 94c0fd90 12-Apr-2010 Ed Maste <emaste@FreeBSD.org>

Whitespace cleanup, in advance of next sync with Adaptec's driver. No
functional change.


# 171dfe11 28-Mar-2010 Ed Maste <emaste@FreeBSD.org>

MFC aac(4) driver changes

r204019:

Include command type in COMMAND TIMEOUT messages to aid in debugging.

r203885:

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.

r203801:

Garbage collect Falcon/PPC support that has not been used in released
products, based on discussion with Adaptec.

r198617:

Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver.


# 8e7e6335 14-Feb-2010 Ed Maste <emaste@FreeBSD.org>

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.


# 2134e2ef 12-Feb-2010 Ed Maste <emaste@FreeBSD.org>

Garbage collect Falcon/PPC support that has not been used in released
products, based on discussion with Adaptec.


# 207a2ae0 09-Feb-2010 Ed Maste <emaste@FreeBSD.org>

MFC r198593:

Rename aac_fast_intr to aac_filter to reflect its current use. Eliminate
the fallback of using the filter as an interrupt handler, as it is no
longer needed.

Discussed with: scottl, jhb


# a0a23c97 06-Jan-2010 Jung-uk Kim <jkim@FreeBSD.org>

MFC: r200251

- Try pre-allocating all FIBs upfront. Previously we tried pre-allocating
128 FIBs first and allocated more later if necessary. Remove now unused
definitions from the header file[1].
- Force sequential bus scanning. It seems parallel scanning is in fact
slower and causes more harm than good[1]. Adjust a comment to reflect that.


# 23e876b1 07-Dec-2009 Jung-uk Kim <jkim@FreeBSD.org>

- Try pre-allocating all FIBs upfront. Previously we tried pre-allocating
128 FIBs first and allocated more later if necessary. Remove now unused
definitions from the header file[1].
- Force sequential bus scanning. It seems parallel scanning is in fact
slower and causes more harm than good[1]. Adjust a comment to reflect that.

PR: kern/141269
Submitted by: Alexander Sack (asack at niksun dot com)[1]
Reviewed by: scottl


# 55dd54d7 02-Nov-2009 Ed Maste <emaste@FreeBSD.org>

MFC r197011:

Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious
"COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands
that get truly stuck will still trigger the warning and the hardware
health check, just a little bit later.


# e46b9eea 29-Oct-2009 Ed Maste <emaste@FreeBSD.org>

Rename aac_fast_intr to aac_filter to reflect its current use. Eliminate
the fallback of using the filter as an interrupt handler, as it is no
longer needed.

Discussed with: scottl, jhb


# 4a42b061 08-Sep-2009 Ed Maste <emaste@FreeBSD.org>

Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious
"COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands
that get truly stuck will still trigger the warning and the hardware
health check, just a little bit later.


# ff0991c4 21-Feb-2009 Attilio Rao <attilio@FreeBSD.org>

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.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 523da39b 25-Mar-2008 Ed Maste <emaste@FreeBSD.org>

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


# 31a0399e 24-Mar-2008 Ed Maste <emaste@FreeBSD.org>

Diff reduction to Adaptec's driver (around build 15317): catch up with a
change in debugging routines.

The fwprintf macro in the AAC_DEBUG case (mapping to printf) isn't from the
Adaptec driver.


# a723a548 06-Dec-2007 Ed Maste <emaste@FreeBSD.org>

Allow simultaneous opens of the device for issuing commands to the
controller. This is merged from Adaptec driver build 11669.


# ef544f63 22-Feb-2007 Paolo Pisati <piso@FreeBSD.org>

o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


# 7cb209f5 08-Oct-2005 Scott Long <scottl@FreeBSD.org>

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.


# 4afedc31 12-Aug-2004 Scott Long <scottl@FreeBSD.org>

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.


# bb6fe253 11-Aug-2004 Scott Long <scottl@FreeBSD.org>

Remove the AAC_LOCK macros. They no longer abstract anything and only
obfuscate the code. No functional differences.


# 89c9c53d 16-Jun-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.


# 03b5fe51 02-Jun-2004 Scott Long <scottl@FreeBSD.org>

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.


# 2c81db6c 30-May-2004 Scott Long <scottl@FreeBSD.org>

Turn down the queue size by 8 until I can figure out why the 512th command
keeps on getting lost.


# 0b7ed341 18-Feb-2004 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# ecd1c51f 07-Feb-2004 Scott Long <scottl@FreeBSD.org>

Do some small cleanups to comments and remove AACQ_COMPLETE definitions since
the completion queue is long-gone.


# d85f27ce 07-Feb-2004 Scott Long <scottl@FreeBSD.org>

Remove the hack of lowering AAC_MAX_FIB now that the root cause of the
problem was found.


# 8f6a5435 06-Feb-2004 Scott Long <scottl@FreeBSD.org>

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.


# 9148fa21 30-Jan-2004 Scott Long <scottl@FreeBSD.org>

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.


# 8b149b51 07-Aug-2003 John Baldwin <jhb@FreeBSD.org>

Consistently use the BSD u_int and u_short instead of the SYSV uint and
ushort. In most of these files, there was a mixture of both styles and
this change just makes them self-consistent.

Requested by: bde (kern_ktrace.c)


# cd481291 09-Jul-2003 Scott Long <scottl@FreeBSD.org>

Handle the EINPROGRESS case of bus_dmamap_load() for data buffers.


# 4b00f859 09-Jul-2003 Scott Long <scottl@FreeBSD.org>

Add a new quirk for cards that incorrectly interpret the amount of memory
in the system. This might also have a small performance gain.


# 891619a6 01-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.

Spell bioq_disksort() consistently with the remaining bioq_*().

#include <geom/geom_disk.h> where this is more appropriate.


# a6d35632 26-Mar-2003 Scott Long <scottl@FreeBSD.org>

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


# 60794e04 08-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Centralize the devstat handling for all GEOM disk device drivers
in geom_disk.c.

As a side effect this makes a lot of #include <sys/devicestat.h>
lines not needed and some biofinish() calls can be reduced to
biodone() again.


# 9e2e96d8 28-Feb-2003 Scott Long <scottl@FreeBSD.org>

The aac driver has evolved enough over the last few months that it no
longer resembles the 4.x version very much. Garbage collect the legacy
bits.


# ae543596 25-Feb-2003 Scott Long <scottl@FreeBSD.org>

Bring aac out from under Giant:
- the mutex aac_io_lock protects the main codepaths which handle queues and
hardware registers. Only one acquire/release is done in the top-half and
the taskqueue. This mutex also applies to the userland command path and
CAM data path.
- Move the taskqueue to the new Giant-free version.
- Register the disk device with DISKFLAG_NOGIANT so the top-half processing
runs without Giant.
- Move the dynamic command allocator to the worker thread to avoid locking
issues with bus_dmamem_alloc().

This gives about 20% improvement in most of my benchmarks.


# 7540e65e 25-Feb-2003 Scott Long <scottl@FreeBSD.org>

Move to 'struct disk*' API

Submitted by: phk


# 3cbd08b8 20-Feb-2003 Scott Long <scottl@FreeBSD.org>

The completion queue is no longer used, so nuke its associated code
and data structures.


# cb0d64b9 19-Feb-2003 Scott Long <scottl@FreeBSD.org>

Fix a 64-bit bogon. The hardware command structure only has one 32 bit
field for holding driver-dependant data. Instead of putting the pointer
to the driver command struct in there, take advantage of these structs
being a (virtually) contiguous array and just put the array index in the
field.


# 8480cc63 19-Feb-2003 Scott Long <scottl@FreeBSD.org>

o Move the cleanup of the fib maps into aac_free_commands() so as to
retain symetry with aac_alloc_commans(). Since aac_alloc_commands()
allocates fib maps and places them onto the fib lists, aac_free_commands()
should reverse those operations.

o Combine two ifs with the same body with an ||.

o Switch from uintptr_t to uint32_t for fib map load operations.
The target is a uint32_t so using this type for the map load call
avoids an extra cast. uintptr_t should only be used when you need
an "int sized the same as the machine's poitner size" which is not
the case here.

o Removed the commented out M_WAITOK flag in the allocation in
aac_alloc_commands(). The kernel will only block in the allocator
if it can grow the size of the kernel. This usually results in a
page-out which could involve this aac device. Thus, sleeping here
could deadlock the machine. Assuming this operation is occurring outside
of attach time, we have enough fibs to operate anyway, so waiting for
fibs to free up is okay if not optimal.

o In aac_alloc_commands(), if we cannot dmamem_alloc additional fib
space, free the fib map.

o In aac_alloc_commands(), if we cannot create per-command dmamaps, don't
lose track of the fib map that is mapping all of the commands that we
have already released into the free pool. Instead, just cut out of
the loop and modify aac_free_commands to not attempt to free maps that
have not been allocated.

o Don't use a magic number when pre-allocating fibs.

o Use PAGE_SIZE to allocate in page sized chunks instead of an
architecture specific constant.

Submitted by: gibbs


# ffb37f33 09-Feb-2003 Scott Long <scottl@FreeBSD.org>

Implement a new dynamic command allocator. FIBs are allocated in 1 page
blocks now, which should eliminate problems with the driver failing to
attach due to insufficient contiguous RAM. Allow the FIB pool to grow
from the default of 128 to the max of 512 as demand grows. Also pad the
adapter init struct to work around the 2120/2200 DMA bug now that there
is no longer a FIB slab.


# 5f54d522 05-Feb-2003 Scott Long <scottl@FreeBSD.org>

Don't include aac_cam.h, since it was nuked in the last commit.
Deregister the shutdown eventhandler on unload.


# 70545d1a 05-Feb-2003 Scott Long <scottl@FreeBSD.org>

Various cleanups:
- Move the command timeout check from a separate repeating timeout to the
kthread since the kthread is already running periodically.
- Move printing the hardware print buffer to the kthread.
- Properly shut down the kernel thread on detach.
- Detach the child array devices on detach.
- Don't issue a controller halt command on detach. Doing so requires a PCI
reset to wake the controller back up. The driver can now be unloaded as
long as CAM support is not enabled.


# f90c382c 19-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Make FreeBSD "struct disklabel" agnostic, step 311 of 723:

Rename diskerr() to disk_err() for naming consistency.

Drop the by now entirely useless struct disklabel argument.

Add a flag argument for new-line termination.

Fix a couple of printf-format-casts to %j instead of %l.

Correctly print the name of all bio commands.

Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.

Use the new disk_err() throughout, #include <sys/disk.h> as needed.

Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.

Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.

Sponsored by: DARPA & NAI Labs.


# 70148712 23-May-2002 Peter Wemm <peter@FreeBSD.org>

Constify a debug function arg that we pass __func__ to in order to pacify
gcc-3.1's 'const char *__func__;'


# fe3cb0e1 26-Apr-2002 Scott Long <scottl@FreeBSD.org>

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


# cbfd045b 23-Apr-2002 Scott Long <scottl@FreeBSD.org>

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


# 6008862b 04-Apr-2002 John Baldwin <jhb@FreeBSD.org>

Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on: i386, alpha, sparc64


# fe94b852 05-Feb-2002 Scott Long <scottl@FreeBSD.org>

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


# e45bef2a 08-Jan-2002 Mike Smith <msmith@FreeBSD.org>

Staticise the aac devclass.


# 956d569b 10-Dec-2001 David E. O'Brien <obrien@FreeBSD.org>

I missed a string concatenation.


# 6e551fb6 10-Dec-2001 David E. O'Brien <obrien@FreeBSD.org>

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


# 1c4c2258 03-Dec-2001 Scott Long <scottl@FreeBSD.org>

BAH! Missed another change to this file.


# a1078af4 03-Dec-2001 Scott Long <scottl@FreeBSD.org>

Bah, I missed this file on the last commit


# b3457b51 01-Dec-2001 Scott Long <scottl@FreeBSD.org>

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


# 914da7d0 05-Sep-2001 Scott Long <scottl@FreeBSD.org>

Bring the aac driver *much* closer to style(9).

Reviewed by: ken


# 36e0bf6e 29-Aug-2001 Scott Long <scottl@FreeBSD.org>

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


# f6c4dd3f 05-Aug-2001 Scott Long <scottl@FreeBSD.org>

Bugfixes. Close a race and logic bug in the timeout handling, don't call the
interrupt handler from the upper half, etc. This fixes some serious stability
problems that we were seeing on our production server. These patches have
been tested for almost 6 months and are a highly recommended MFC candidate.

Reviewed by: gibbs, merry, msmith
MFC after: 4 days


# c6eafcf2 02-Aug-2001 Scott Long <scottl@FreeBSD.org>

Reformat for 80 columns. Sorry, but I had to do it.


# da4c1ce3 16-Mar-2001 Justin T. Gibbs <gibbs@FreeBSD.org>

This is an MFC candidate.

Add the AAC_DEBUG option to enable debugging in the aac driver.

Correct a race condition in the interrupt handler where the
controller may queue a fib to a response queue after the driver
has serviced the queue but before the interrupt is cleared.
This could leave a completed fib stranded in the response queue
unless another I/O completed and generated another interrupt.

Reviewed by: msmith


# 0b94a66e 27-Dec-2000 Mike Smith <msmith@FreeBSD.org>

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.


# 46aa3347 27-Oct-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Convert all users of fldoff() to offsetof(). fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.

Define __offsetof() in <machine/ansi.h>

Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>

Remove myriad of local offsetof() definitions.

Remove includes of <stddef.h> in kernel code.

NB: Kernelcode should *never* include from /usr/include !

Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.

Deprecate <struct.h> with a warning. The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.

Paritials reviews by: various.
Significant brucifications by: bde


# f38211c7 22-Oct-2000 Scott Long <scottl@FreeBSD.org>

First attempt at timeouts for bio commands sent to the controller. No retry is
attempted right now; the failure is merely passed up. This may help with the
mysterious lockups seen by some with Pablano controllers.


# 35863739 12-Sep-2000 Mike Smith <msmith@FreeBSD.org>

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.