summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aac_cam.c
Commit message (Collapse)AuthorAgeFilesLines
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+1
| | | | This means that their use is restricted to a single C file.
* Merge from r225950:marius2011-10-131-9/+11
| | | | | | Set the sense residual properly. Reviewed by: ken
* When masking direct and processor devices during an inquiry, properlyjhb2010-12-061-1/+2
| | | | | | | preserve the upper bits of the first data byte. Reviewed by: scottl MFC after: 1 week
* Previously, the aac driver did not handle enclosure management AIFs,emaste2010-09-291-0/+48
| | | | | | | 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>
* Use device_printf where possible, and otherwise at least include theemaste2010-09-161-1/+1
| | | | | | driver name in printf strings. Reported by: Mark Johnston
* Whitespace cleanup, in advance of next sync with Adaptec's driver. Noemaste2010-04-131-2/+2
| | | | functional change.
* Minor diff reduction with Adaptec's driver: in aac_release_command() setemaste2010-02-231-1/+0
| | | | | cm_queue to AAC_ADAP_NORM_CMD_QUEUE by default. In every place it was set, it was set to AAC_ADAP_NORM_CMD_QUEUE anyhow.
* Diff reduction with Adaptec's vendor driver.emaste2010-02-141-6/+6
| | | | | Driver version 2.1.9 chosen as that Adaptec version roughly corresponds with the current feature set merged to the in-tree driver.
* - Try pre-allocating all FIBs upfront. Previously we tried pre-allocatingjkim2009-12-081-2/+5
| | | | | | | | | | | 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
* Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver.emaste2009-10-291-3/+3
|
* Whitespace fixup: 8 spaces -> tabemaste2009-10-271-4/+4
|
* Diff reduction to Adaptec's driver (around build 15317): catch up with aemaste2008-03-241-7/+5
| | | | | | | change in debugging routines. The fwprintf macro in the AAC_DEBUG case (mapping to printf) isn't from the Adaptec driver.
* Merge from Adaptec a 64 bit fix and a workaround for luns != 0 returningemaste2007-12-071-8/+13
| | | | | CAM_SEL_TIMEOUT on SAS controllers, which prevented passthrough devices from being created.
* Rework aac locking for MPSAFE CAM. This fixes a Giant mutex assertionemaste2007-11-011-17/+17
| | | | | | | | | | | | reported on freebsd-current [1]. Also dequeue all events in aac_release_command (instead of just one) so that there's no risk of them getting stranded. Reported by: Steven Brown [1] Submitted by: scottl@ [1] http://lists.freebsd.org/pipermail/freebsd-current/2007-October/077928.html
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-1/+1
| | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-1/+1
| | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
* Add a missing mutex unlock to an error path.scottl2007-01-151-0/+1
| | | | | Submitted by: Yuxiang Luo PR: 107943
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-7/+0
| | | | | | as the default. Reviewed by multitudes.
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-1/+23
| | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders
* Unlock aac_io_lock before returning, thus eliminates a mutexdelphij2006-07-141-0/+1
| | | | | | | | leak. Submitted by: Beyond Luo <fedora ercist iscas ac cn> PR: kern/100046 Reviewed by: scottl
* Mega Update to the aac driver to support a whole new family of cards andscottl2005-10-081-65/+42
| | | | | | | | | | | | | | | | | | | | | 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.
* Bring aac_cam into line with using time_uptime instead of time_second.scottl2005-09-141-1/+1
|
* Remove the messy locking dance around xpt_done()scottl2005-02-091-5/+0
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Complete the repo-copy of aac_ioctl.h from sys/dev/aac/to sys/sys.scottl2004-12-091-1/+1
|
* Remove the AAC_LOCK macros. They no longer abstract anything and onlyscottl2004-08-121-5/+5
| | | | obfuscate the code. No functional differences.
* Collapse sync fib locking into normal i/o locking. The former didn'tscottl2004-06-021-2/+2
| | | | | | | | 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.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Temporary workaround for aac_cam to deal with CAM requiring Giant. Thisscottl2003-12-031-1/+9
| | | | | | should fix the panics on boot with newer Adaptec RAID cards. Approved by: re (rwatson)
* Use __FBSDID().obrien2003-08-241-2/+3
| | | | Also some minor style cleanups.
* Make aac(4) compile cleanly on 64-bit machines. The code was already 64-bitscottl2003-08-191-1/+6
| | | | | safe, but some (unneeded and/or harmless) downcasts were generating warnings. The driver still is not endian-clean.
* Begin support for 64-bit address support and workarounds for newer cards:scottl2003-03-261-3/+3
| | | | | | | | | | | | | | | | | - 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
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-1/+0
| | | | | | | | 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.
* The aac driver has evolved enough over the last few months that it noscottl2003-03-011-1/+0
| | | | | longer resembles the 4.x version very much. Garbage collect the legacy bits.
* Bring aac out from under Giant:scottl2003-02-261-0/+4
| | | | | | | | | | | | | | - 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.
* Teach the CAM module how to deregister itself so it can be unloaded.scottl2003-02-061-2/+9
|
* Various cleanups:scottl2003-02-051-5/+5
| | | | | | | | | | | - 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.
* Since reseting the SCSI busses via the passthrough interface usuallyscottl2003-01-131-7/+12
| | | | | | | | | confuses the controller, tell CAM not to do it. Also report the correct error condition to CAM when it tries to probe a target that doesn't exists. This should make the CAM interface less risky to use. MFC After: 3 days
* Fix GET_TRAN_SETTINGS to be more correct.scottl2002-08-101-8/+7
| | | | | | | | Don't allow SCSI resets on the 5400S card, it seems to cause problems with certain backplanes. Submitted by: lnb@freebsdsystems.com MFC after: 3 days
* bzero out the sync command buffer when sending commands. This was causingscottl2002-05-031-0/+3
| | | | | | problems when enumerating multiple arrays. This is an MFC candidate.
* Fix a bug where the aacp device would only talk to bus 0 on thescottl2002-04-301-7/+5
| | | | controller.
* Add a CAM interface to the aac driver. This is useful in case you shouldscottl2002-04-271-0/+591
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
OpenPOWER on IntegriCloud