summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss
Commit message (Collapse)AuthorAgeFilesLines
* Cosmetic: make it less confusing when displaying RAID 1 level, that mightkib2010-10-021-1/+1
| | | | | | | be 1+0 as well. PR: kern/150936 MFC after: 2 weeks
* Initialize the callout structure earlier in attach before calling anyjhb2010-04-281-1/+1
| | | | | routines that can fail since ciss_free() always tries to stop and drain the callout.
* Several changes to fix livelock under high load, introduced by r203489:mav2010-03-032-4/+12
| | | | | | - change the way in which command queue overflow is handled; - do not expose to CAM two command slots, used for driver's internal purposes; - allow driver to use up to 1024 command slots, instead of 256 before.
* When hacking INQUIRY result, make sure that it is right INQUIRY and theremav2010-02-051-2/+7
| | | | is enough of result to hack.
* Return CAM_RELEASE_SIMQ flag only when it is needed, when SIM reallymav2010-02-041-12/+10
| | | | was frozen before and should be released.
* MFp4: Large set of CAM inprovements.mav2010-01-281-42/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many drivers. - Any bus, attached before CAM completed it's boot-time initialization, will equally join to the process, delaying boot if needed. - New kern.cam.boot_delay loader tunable should help controllers that are still unable to register their buses in time (such as slow USB/ PCCard/ CardBus devices), by adding one more event to wait on boot. - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. - Improve SCSI error recovery for devices on buses without automatic sense reporting, such as ATAPI or USB. For example, it allows CAM to wait, while CD drive loads disk, instead of immediately return error status. - Decapitalize diagnostic messages and make them more readable and sensible. - Teach PMP driver to limit maximum speed on fan-out ports. - Make boot wait for PMP scan completes, and make rescan more reliable. - Fix pass driver, to return CCB to user level in case of error. - Increase number of retries in cd driver, as device may return several UAs.
* Don't panic due to unlocking an unowned mutex if we fail during attach.gavin2009-12-171-2/+5
| | | | | | | PR: kern/139053 Reviewed by: scottl Approved by: ed (mentor) MFC after: 2 weeks
* Sync driver with Yahoo:scottl2009-09-163-74/+75
| | | | | | | - Implement MSI support (MSIX support was already there) - Use a table to drive MSI/MSIX exceptions - Pre-calculate the command address instead of wasting cycles doing the calculation on every i/o.
* Fix locking around copyout() operations.scottl2009-09-161-3/+9
|
* Make MSI and PERFORMANT interrupts work correctly. Only require the minimumscottl2009-09-162-4/+13
| | | | | | | number of MSIX interrupts that are needed, and don't strictly check for 4. Enable enough interrupt mask bits so that the controller will generate interrupts in PERFORMANT mode. This fixes the hang-on-boot issues that people were seeing with newer controllers.
* Increase CISS_MAX_PHYSTGT to 256 so that it matches what the controller mightscottl2009-09-161-1/+1
| | | | | give us. Without this, certain data structures get sized incorrectly, leading to a panic on certain cards that want to use high-value target numbers.
* Fix an apparently harmless typo.scottl2009-07-201-1/+1
| | | | Approved by: re
* Revert the CISS driver to 64K i/o, the previous change was in error andscottl2009-07-131-1/+1
| | | | | | missing a lot of needed infrastructure. Approved by: re
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-102-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
* We no longer need to use d_thread_t, migrate to struct thread *.imp2009-05-201-3/+3
|
* Updated PCI ID's from the vendorscottl2009-05-191-1/+4
|
* Tell CAM that CISS logical devices support tagged queueing. This fixesscottl2009-02-201-2/+5
| | | | | the low "max device openings" count that has led to poor performance in FreeBSD 7.0 and 7.1
* Work again to fix the interrupt masking problems. We now recognizescottl2008-08-292-37/+40
| | | | | | | that there are 3 different interrupt enable bits, 2 for different families of cards, and 1 for when MSI is used. Also apply a big hammer backstop for cards that aren't recognized. This should fix all of the interrupt issues at boot.
* Correctly set the interrupt enable and disable bits. The previousscottl2008-08-022-15/+11
| | | | | | code interfered with Performant mode and legacy interrupts. Also remove a register read operation on the Simplq code that was effectively a time-wasting no-op.
* A number of significant enhancements to the ciss driver:scottl2008-07-114-150/+494
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The FreeBSD driver was setting an interrupt coalesce delay of 1000us for reasons that I can only speculate on. This was hurting everything from lame sequential I/O "benchmarks" to legitimate filesystem metadata operations that relied on serialized barrier writes. One of my filesystem tests went from 35s to complete down to 6s. 2. Implemented the Performant transport method. Without the fix in (1), I saw almost no difference. With it, my filesystem tests showed another 5-10% improvement in speed. It was hard to measure CPU utilization in any meaningful way, so it's not clear if there was a benefit there, though there should have been since the interrupt handler was reduced from 2 or more PCI reads down to 1. 3. Implemented MSI-X. Without any docs on this, I was just taking a guess, and it appears to only work with the Performant method. This could be a programming or understanding mistake on my part. While this by itself made almost no difference to performance since the Performant method already eliminated most of the synchronous reads over the PCI bus, it did allow the CISS hardware to stop sharing its interrupt with the USB hardware, which in turn allowed the driver to become decoupled from the Giant-locked USB driver stack. This increased performance by almost 20%. The MSI-X setup was done with 4 vectors allocated, but only 1 vector used since the performant method was told to only use 1 of 4 queues. Fiddling with this might make it work with the simpleq method, not sure. I did not implement MSI since I have no MSI-specific hardware in my test lab. 4. Improved the locking in the driver, trimmed some data structures. This didn't improve test times in any measurable way, but it does look like it gave a minor improvement to CPU usage when many processes/threads were doing I/O in parallel. Again, this was hard to accurately test.
* Add support for the P212, P410, P410i, P411, and P812 HP Smart Arrayps2008-06-101-0/+5
| | | | | | controllers. Submitted by: Scott Benesh at HP
* Remove a check that didn't allow > 12 byte CDB's to be issued tops2008-05-161-6/+0
| | | | | | ciss. This should allow volumes > 2TB to work. Reported by: Emil Mikulic
* Add `hw.ciss.nop_message_heartbeat' tunable (default disabled) foriwasaki2008-02-101-1/+4
| | | | | | | | | | | NOP-message polling in ciss_periodic(). Note that setting the tunable to non-zero can be workaround only for `ADAPTER HEARTBEAT FAILED' problem, and may freeze the system w/o the problem. Reviewed by: scottl Reported by: Attila Nagy MFC after: 3 days
* Don't repeat error logging about NOP message sending ifiwasaki2008-01-281-1/+5
| | | | | | | | ciss_report_request() return an error (which is most likely data underrun). Noticed by: Mark Atkinson MFC after: 1 week
* Fix NOP message sending in ciss_periodic() which causes panic withiwasaki2007-11-051-3/+16
| | | | | | | | option INVARIANTS. Reviewed by: simokawa Tested by: noriyosi_kawano MFC after: 1 week
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-201-3/+3
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* Add NOP-message polling to ciss_periodic().iwasaki2007-10-131-1/+80
| | | | | | | | Disable adapter by detecting adapter is dead. Tested by: Masaki YATSU(on RELENG_6) Reviewed by: scottl MFC after: 1 week
* Fix a mistake made in the MPSAFE commit that caused CAM to serialize requestsscottl2007-10-121-1/+2
| | | | to the controller.
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-2/+2
| | | | | | | 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.
* Satisfy witness during shutdownscottl2007-06-051-0/+2
|
* Eliminate M_TEMP.scottl2007-05-141-3/+3
|
* Streamline locking in ciss_free()scottl2007-05-021-26/+27
|
* MPSAFE ciss driverscottl2007-05-012-20/+46
|
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-2/+2
| | | | | | | | | | | 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.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | 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@
* o ciss.ko depends on cam and pci.maxim2006-11-301-0/+2
| | | | | | PR: kern/105989 Submitted by: nork MFC after: 1 month
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-9/+0
| | | | | | as the default. Reviewed by multitudes.
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-3/+21
| | | | | | | | | | | | | | | | | | | | | 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
* Spin until a request structure is available in the ioctl path.ps2006-05-301-2/+2
|
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Free another memory leak when dealing with disk notification.ps2006-04-201-1/+4
|
* Free some previously leaked memory on module unload.ps2006-04-191-2/+9
|
* It seems ciss should ignore overrun and underrun on a SCSI INQUIRYps2005-12-161-1/+4
| | | | | | | command. This fixes some weird booting issues on newer versions of the firmware on the MSA20. Reported by: Philippe Pegon <Philippe dot Pegon at crc dot u-strasbg dot fr>
* Update PCI ids to add the E200, E200i, P400, and P400i storageps2005-11-111-3/+8
| | | | | | controllers. Remove the E400 since it is not a real product. Submitted by: HP
* There's no reason to check the valence. This allows ciss to workps2005-08-092-8/+0
| | | | on the P600.
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-1/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Support passthru ioctl commands from 32bit binaries.ps2005-05-182-1/+30
|
* Add support for the P600 and name the E400.ps2005-04-281-1/+2
|
* Provide a way to soft reset a proxy controller such as an MSA20 orps2005-04-193-0/+58
| | | | | MSA500. This is useful if you need to reset one of the storage arrays on reboot.
* handle ciss_lookup failuresam2005-03-291-0/+5
| | | | Noticed by: Coverity Prevent analysis tool
OpenPOWER on IntegriCloud