#
285830 |
|
23-Jul-2015 |
gjb |
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1 builds. - Update newvers.sh to reflect RC1. - Update __FreeBSD_version to reflect 10.2. - Update default pkg(8) configuration to use the quarterly branch.[1]
Discussed with: re, portmgr [1] Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
261455 |
|
04-Feb-2014 |
eadler |
MFC r258779,r258780,r258787,r258822:
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.
Similar to the (1 << 31) case it is not defined to do (2 << 30).
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.
|
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
254004 |
|
06-Aug-2013 |
marius |
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
|
#
251116 |
|
30-May-2013 |
marius |
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.
|
#
251115 |
|
30-May-2013 |
marius |
- Remove pointless returns. - Make cm_data a void pointer and cm_flags unsigned as appropriate.
MFC after: 3 days
|
#
247570 |
|
01-Mar-2013 |
marius |
- 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
|
#
222951 |
|
10-Jun-2011 |
attilio |
- 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
|
#
218280 |
|
04-Feb-2011 |
emaste |
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
|
#
218208 |
|
03-Feb-2011 |
emaste |
Include driver name in panic string, to make it easier to find these should the panic ever occur.
|
#
213272 |
|
29-Sep-2010 |
emaste |
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>
|
#
212661 |
|
15-Sep-2010 |
attilio |
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
|
#
206534 |
|
13-Apr-2010 |
emaste |
Whitespace cleanup, in advance of next sync with Adaptec's driver. No functional change.
|
#
203885 |
|
14-Feb-2010 |
emaste |
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.
|
#
203801 |
|
12-Feb-2010 |
emaste |
Garbage collect Falcon/PPC support that has not been used in released products, based on discussion with Adaptec.
|
#
200251 |
|
08-Dec-2009 |
jkim |
- 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
|
#
198593 |
|
29-Oct-2009 |
emaste |
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
|
#
197011 |
|
09-Sep-2009 |
emaste |
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.
|
#
188896 |
|
21-Feb-2009 |
attilio |
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.
|
#
177619 |
|
25-Mar-2008 |
emaste |
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
|
#
177567 |
|
24-Mar-2008 |
emaste |
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.
|
#
174385 |
|
07-Dec-2007 |
emaste |
Allow simultaneous opens of the device for issuing commands to the controller. This is merged from Adaptec driver build 11669.
|
#
166901 |
|
23-Feb-2007 |
piso |
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@
|
#
151086 |
|
08-Oct-2005 |
scottl |
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.
|
#
133606 |
|
13-Aug-2004 |
scottl |
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.
|
#
133540 |
|
12-Aug-2004 |
scottl |
Remove the AAC_LOCK macros. They no longer abstract anything and only obfuscate the code. No functional differences.
|
#
130585 |
|
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
#
130006 |
|
02-Jun-2004 |
scottl |
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.
|
#
129884 |
|
30-May-2004 |
scottl |
Turn down the queue size by 8 until I can figure out why the 512th command keeps on getting lost.
|
#
125975 |
|
18-Feb-2004 |
phk |
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.
|
#
125574 |
|
07-Feb-2004 |
scottl |
Do some small cleanups to comments and remove AACQ_COMPLETE definitions since the completion queue is long-gone.
|
#
125560 |
|
07-Feb-2004 |
scottl |
Remove the hack of lowering AAC_MAX_FIB now that the root cause of the problem was found.
|
#
125543 |
|
07-Feb-2004 |
scottl |
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.
|
#
125225 |
|
30-Jan-2004 |
scottl |
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.
|
#
118607 |
|
07-Aug-2003 |
jhb |
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)
|
#
117363 |
|
09-Jul-2003 |
scottl |
Handle the EINPROGRESS case of bus_dmamap_load() for data buffers.
|
#
117361 |
|
09-Jul-2003 |
scottl |
Add a new quirk for cards that incorrectly interpret the amount of memory in the system. This might also have a small performance gain.
|
#
112946 |
|
01-Apr-2003 |
phk |
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.
|
#
112679 |
|
26-Mar-2003 |
scottl |
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
|
#
111979 |
|
08-Mar-2003 |
phk |
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.
|
#
111691 |
|
01-Mar-2003 |
scottl |
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.
|
#
111532 |
|
26-Feb-2003 |
scottl |
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.
|
#
111525 |
|
26-Feb-2003 |
scottl |
Move to 'struct disk*' API
Submitted by: phk
|
#
111172 |
|
20-Feb-2003 |
scottl |
The completion queue is no longer used, so nuke its associated code and data structures.
|
#
111152 |
|
19-Feb-2003 |
scottl |
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.
|
#
111141 |
|
19-Feb-2003 |
scottl |
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
|
#
110604 |
|
10-Feb-2003 |
scottl |
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.
|
#
110427 |
|
06-Feb-2003 |
scottl |
Don't include aac_cam.h, since it was nuked in the last commit. Deregister the shutdown eventhandler on unload.
|
#
110426 |
|
05-Feb-2003 |
scottl |
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.
|
#
103675 |
|
20-Sep-2002 |
phk |
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.
|
#
97214 |
|
24-May-2002 |
peter |
Constify a debug function arg that we pass __func__ to in order to pacify gcc-3.1's 'const char *__func__;'
|
#
95536 |
|
27-Apr-2002 |
scottl |
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
|
#
95350 |
|
24-Apr-2002 |
scottl |
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
|
#
93818 |
|
04-Apr-2002 |
jhb |
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
|
#
90275 |
|
06-Feb-2002 |
scottl |
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
|
#
89112 |
|
09-Jan-2002 |
msmith |
Staticise the aac devclass.
|
#
87605 |
|
10-Dec-2001 |
obrien |
I missed a string concatenation.
|
#
87599 |
|
10-Dec-2001 |
obrien |
Update to C99, s/__FUNCTION__/__func__/, also don't use ANSI string concatenation.
|
#
87329 |
|
04-Dec-2001 |
scottl |
BAH! Missed another change to this file.
|
#
87326 |
|
04-Dec-2001 |
scottl |
Bah, I missed this file on the last commit
|
#
87183 |
|
02-Dec-2001 |
scottl |
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
|
#
83114 |
|
05-Sep-2001 |
scottl |
Bring the aac driver *much* closer to style(9).
Reviewed by: ken
|
#
82527 |
|
29-Aug-2001 |
scottl |
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
|
#
81151 |
|
05-Aug-2001 |
scottl |
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
|
#
81082 |
|
03-Aug-2001 |
scottl |
Reformat for 80 columns. Sorry, but I had to do it.
|
#
74374 |
|
17-Mar-2001 |
gibbs |
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
|
#
70393 |
|
27-Dec-2000 |
msmith |
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.
|
#
67708 |
|
27-Oct-2000 |
phk |
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
|
#
67428 |
|
22-Oct-2000 |
scottl |
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.
|
#
65793 |
|
13-Sep-2000 |
msmith |
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.
|