summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/ciss.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r300551sbruno2016-07-221-14/+15
| | | | | Update some of the TBD entries in ciss(4) to match what's in the pci IDS data.
* MFC r298931, r298981, r299375:pfg2016-05-171-3/+3
| | | | | | | Minor spelling fixes in: sys/dev, sys/sys Many of these have user-visible strings.
* MFC r298670:ngie2016-05-131-2/+2
| | | | | | | | | | | | r298670 (by cem): ciss(4): Fix overrun of array The softc member 'ciss_logical' is an array of 'ciss_max_logical_bus' members. Most of the time it is iterated correctly. This patch fixes the two instances where the driver iterated off the end of the array. CID: 1305492
* MFC r287437sbruno2015-09-081-5/+3
| | | | | | | | | | | | | r249170 was just plain wrong. The effect of the change is to always delete a logic volume on status change which is NOT what we want here. The original code is correct in that when the volume changes status the driver will only delete the volume if the status is one of the fatal errors. A drive failure in a mirrored volume is NOT a situtation where the volume should dissapear. Reported on freebsd-scsi@: https://lists.freebsd.org/pipermail/freebsd-scsi/2015-September/006800.html
* MFC r280347: Remove MAXBSIZE use from drivers where it has nothing to do.mav2015-04-211-2/+3
| | | | | In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead.
* MFC r274819:smh2014-12-211-1/+2
| | | | | | | | | Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay
* MFC r268017 and r268018sbruno2014-07-211-22/+33
| | | | | | | | 268017: Check return of cam_periph_find() before using it in a printf. 268018: Add detection for ciss(4) controllers that are set to non-raid JBOD mode.
* MFC r264127sbruno2014-04-211-0/+15
| | | | | | | Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4) Submitted by: Benesh, Scott <scott.benesh@hp.com> Sponsored by: Yahoo! Inc.
* MFC r264354sbruno2014-04-151-24/+11
| | | | | | | Fix insta-panic on assert of unlocked periph mtx in ciss(4) when logical volume state changes. Sponsored by: Yahoo! Inc.
* Update ciss(4) with new models of raid controllers from HPsbruno2013-08-061-0/+9
| | | | | | Submitted by: scott.benesh@hp.com MFC after: 2 weeks Sponsored by: Hewlett Packard
* update ciss debugger command to iterate over multiple raid controllers up tosbruno2013-07-271-4/+10
| | | | | | | | | max controllers supported PR: kern/179932 Reviewed by: Markus Gebert <markus.gebert@hostpoint.ch> MFC after: 2 weeks Sponsored by: Yahoo! Inc.
* The controller does not zero this data structure, ever.sbruno2013-04-281-0/+1
| | | | | | | Zero it out here so we do not misinterpret the data error. Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Let's align correctly by setting to 17.sbruno2013-04-281-1/+1
| | | | | | | | | | OpenCISS states that if the value is 0, then the driver should try a value of 31. That's just silly. Set to 17 so that the subtraction for maxio becomes 16 and aligns nicely. Reviewed by: scottl Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Its time to retire COMPAQ. I don't think that its coming back. :-)sbruno2013-04-281-1/+1
| | | | | Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Change maxio to reflect variable hardware configurations.sbruno2013-04-271-1/+17
| | | | | | | | | | | | | | | | | If max_sg_length is 0, then we default to 16 If max_sg_length is less than CISS_MAX_SG_ELEMENTS, then we will set round the value of max_sg_length to the nearest power of 2 and use it to align maxio. Else, we will use CISS_MAX_SG_ELEMENTS for our calculations. Thanks to scottl for working me through the history and providing the basis for this patch. Submitted by: scott Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Adjust the min comparison to look at the adjust value after subtraction, don'tsbruno2013-04-261-1/+1
| | | | | | | subtract 1 from the chosen value if we are going to use the configued value. Obtained from: Yahoo! Inc. MFC after: 2 weeks
* In the case where the controller supports an sg_list LESS than our predefinedsbruno2013-04-251-1/+1
| | | | | | | | | | | and tuned value, we would advertise the unsupported value to CAM and it would merrily destroy the controller with way too many IO operations. This manifests itself in a Zero Memory RAID configuration for a P410 and possibly other controllers. Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Return a lun count of 1 and a lun id of 0 when CAM attempts a REPORT_LUNSsbruno2013-04-231-0/+13
| | | | | | | | command on a disk device. This quieseces some noise on the console that recently appeared. Obtained from: Yahoo! Inc. MFC after: 2 weeks
* MFprojects/camlock r248982:mav2013-04-141-1/+1
| | | | | | | | Stop abusing xpt_periph in random plases that really have no periph related to CCB, for example, bus scanning. NULL value is fine in such cases and it is correctly logged in debug messages as "noperiph". If at some point we need some real XPT periphs (alike to pmpX now), quite likely they will be per-bus, and not a single global instance as xpt_periph now.
* While investigating a p/r I noted that the camcontrol devlist output forsbruno2013-04-101-3/+8
| | | | | | | | | | | | | volumes behind a ciss(4) controller were being reported with malformeed names and identifiers. Repair that reporting by using the CAM values for the three SCSI indents reported via camcontrol devlist PR: kern/171650 Reviewed by: scottl Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Notify CAM on state* change to a logical volume not status. This resolvessbruno2013-04-051-3/+5
| | | | | | | | | | the issues reported regarding camcontrol devlist not showing the rebuild states of volumes unless an explicit camcontrol rescan was executed. PR: kern/171650 Reviewed by: scottl@freebsd.org Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Restore DB_COMMAND capabilities of ciss(4) for debugging and diagnosticssbruno2013-03-281-2/+5
| | | | | Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Fix compile of ciss(4) with CISS_DEBUG definedsbruno2013-03-281-1/+1
| | | | | Obtained from: Yahoo! Inc. MFC after: 2 weeks
* The 5300 series ciss(4) board does not work in performant mode with oursbruno2013-02-251-3/+12
| | | | | | | | | | | | | currnet initialization sequence. Set it to simple mode only so that systems can be updated from stable/7 to newer installations. At some point, we should figure out why we cannot initialize performant mode on this board. PR: kern/153361 Reviewed by: scottl Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Reform the busdma API so that new types may be added without modifyingkib2013-02-121-18/+12
| | | | | | | | | | | | | | | | | | | | | every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback. The cam changes unify the bus_dmamap_load* handling in cam drivers. The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map. Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
* Satisfy the intent of kern/151564: [ciss] ciss(4) should increasesbruno2013-01-151-17/+29
| | | | | | | | | | | | | | | | | | | | | | CISS_MAX_LOGICAL to 107 Submitter wanted to increase the number of logical disks supported by ciss(4) by simply raising the CISS_MAX_LOGICAL value even higher. Instead, consult the documentation for the raid controller (OPENCISS) and poke the controller bits to ask it for how many logical/physical disks it can handle. Revert svn R242089 that raised CISS_MAX_LOGICAL to 64 for all controllers. For older controllers that don't support this mechanism, fallback to the old value of 16 logical disks. Tested on P420, P410, P400 and 6i model ciss(4) controllers. This should will be MFC'd back to stable/9 stable/8 and stable/7 after the MFC period. PR: kern/151564 Reviewed by: scottl@freebsd.org MFC after: 2 weeks
* Convert a number of drivers to obtaining their parent DMA tag from theirscottl2012-03-121-1/+1
| | | | PCI device attachment.
* Update PCI IDs for ciss controllers that are supported by this driver.sbruno2012-01-261-2/+9
| | | | | | Submitted by: scott.benesh@hp.com Obtained from: Yahoo! Inc and HP MFC after: 1 week
* Add support for HP P420 to ciss(4)sbruno2012-01-181-0/+1
| | | | | | | | | Tested on upcoming Gen 8 releases of hardware from HP. MFC to all supported releases. Obtained from: Yahoo! Inc. MFC after: 2 weeks
* Add the CAM Target Layer (CTL).ken2012-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CTL is a disk and processor device emulation subsystem originally written for Copan Systems under Linux starting in 2003. It has been shipping in Copan (now SGI) products since 2005. It was ported to FreeBSD in 2008, and thanks to an agreement between SGI (who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is available under a BSD-style license. The intent behind the agreement was that Spectra would work to get CTL into the FreeBSD tree. Some CTL features: - Disk and processor device emulation. - Tagged queueing - SCSI task attribute support (ordered, head of queue, simple tags) - SCSI implicit command ordering support. (e.g. if a read follows a mode select, the read will be blocked until the mode select completes.) - Full task management support (abort, LUN reset, target reset, etc.) - Support for multiple ports - Support for multiple simultaneous initiators - Support for multiple simultaneous backing stores - Persistent reservation support - Mode sense/select support - Error injection support - High Availability support (1) - All I/O handled in-kernel, no userland context switch overhead. (1) HA Support is just an API stub, and needs much more to be fully functional. ctl.c: The core of CTL. Command handlers and processing, character driver, and HA support are here. ctl.h: Basic function declarations and data structures. ctl_backend.c, ctl_backend.h: The basic CTL backend API. ctl_backend_block.c, ctl_backend_block.h: The block and file backend. This allows for using a disk or a file as the backing store for a LUN. Multiple threads are started to do I/O to the backing device, primarily because the VFS API requires that to get any concurrency. ctl_backend_ramdisk.c: A "fake" ramdisk backend. It only allocates a small amount of memory to act as a source and sink for reads and writes from an initiator. Therefore it cannot be used for any real data, but it can be used to test for throughput. It can also be used to test initiators' support for extremely large LUNs. ctl_cmd_table.c: This is a table with all 256 possible SCSI opcodes, and command handler functions defined for supported opcodes. ctl_debug.h: Debugging support. ctl_error.c, ctl_error.h: CTL-specific wrappers around the CAM sense building functions. ctl_frontend.c, ctl_frontend.h: These files define the basic CTL frontend port API. ctl_frontend_cam_sim.c: This is a CTL frontend port that is also a CAM SIM. This frontend allows for using CTL without any target-capable hardware. So any LUNs you create in CTL are visible in CAM via this port. ctl_frontend_internal.c, ctl_frontend_internal.h: This is a frontend port written for Copan to do some system-specific tasks that required sending commands into CTL from inside the kernel. This isn't entirely relevant to FreeBSD in general, but can perhaps be repurposed. ctl_ha.h: This is a stubbed-out High Availability API. Much more is needed for full HA support. See the comments in the header and the description of what is needed in the README.ctl.txt file for more details. ctl_io.h: This defines most of the core CTL I/O structures. union ctl_io is conceptually very similar to CAM's union ccb. ctl_ioctl.h: This defines all ioctls available through the CTL character device, and the data structures needed for those ioctls. ctl_mem_pool.c, ctl_mem_pool.h: Generic memory pool implementation used by the internal frontend. ctl_private.h: Private data structres (e.g. CTL softc) and function prototypes. This also includes the SCSI vendor and product names used by CTL. ctl_scsi_all.c, ctl_scsi_all.h: CTL wrappers around CAM sense printing functions. ctl_ser_table.c: Command serialization table. This defines what happens when one type of command is followed by another type of command. ctl_util.c, ctl_util.h: CTL utility functions, primarily designed to be used from userland. See ctladm for the primary consumer of these functions. These include CDB building functions. scsi_ctl.c: CAM target peripheral driver and CTL frontend port. This is the path into CTL for commands from target-capable hardware/SIMs. README.ctl.txt: CTL code features, roadmap, to-do list. usr.sbin/Makefile: Add ctladm. ctladm/Makefile, ctladm/ctladm.8, ctladm/ctladm.c, ctladm/ctladm.h, ctladm/util.c: ctladm(8) is the CTL management utility. It fills a role similar to camcontrol(8). It allow configuring LUNs, issuing commands, injecting errors and various other control functions. usr.bin/Makefile: Add ctlstat. ctlstat/Makefile ctlstat/ctlstat.8, ctlstat/ctlstat.c: ctlstat(8) fills a role similar to iostat(8). It reports I/O statistics for CTL. sys/conf/files: Add CTL files. sys/conf/NOTES: Add device ctl. sys/cam/scsi_all.h: To conform to more recent specs, the inquiry CDB length field is now 2 bytes long. Add several mode page definitions for CTL. sys/cam/scsi_all.c: Handle the new 2 byte inquiry length. sys/dev/ciss/ciss.c, sys/dev/ata/atapi-cam.c, sys/cam/scsi/scsi_targ_bh.c, scsi_target/scsi_cmds.c, mlxcontrol/interface.c: Update for 2 byte inquiry length field. scsi_da.h: Add versions of the format and rigid disk pages that are in a more reasonable format for CTL. amd64/conf/GENERIC, i386/conf/GENERIC, ia64/conf/GENERIC, sparc64/conf/GENERIC: Add device ctl. i386/conf/PAE: The CTL frontend SIM at least does not compile cleanly on PAE. Sponsored by: Copan Systems, SGI and Spectra Logic MFC after: 1 month
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+2
| | | | This means that their use is restricted to a single C file.
* Add descriptor sense support to CAM, and honor sense residuals properly inken2011-10-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CAM. Desriptor sense is a new sense data format that originated in SPC-3. Among other things, it allows for an 8-byte info field, which is necessary to pass back block numbers larger than 4 bytes. This change adds a number of new functions to scsi_all.c (and therefore libcam) that abstract out most access to sense data. This includes a bump of CAM_VERSION, because the CCB ABI has changed. Userland programs that use the CAM pass(4) driver will need to be recompiled. camcontrol.c: Change uses of scsi_extract_sense() to use scsi_extract_sense_len(). Use scsi_get_sks() instead of accessing sense key specific data directly. scsi_modes: Update the control mode page to the latest version (SPC-4). scsi_cmds.c, scsi_target.c: Change references to struct scsi_sense_data to struct scsi_sense_data_fixed. This should be changed to allow the user to specify fixed or descriptor sense, and then use scsi_set_sense_data() to build the sense data. ps3cdrom.c: Use scsi_set_sense_data() instead of setting sense data manually. cam_periph.c: Use scsi_extract_sense_len() instead of using scsi_extract_sense() or accessing sense data directly. cam_ccb.h: Bump the CAM_VERSION from 0x15 to 0x16. The change of struct scsi_sense_data from 32 to 252 bytes changes the size of struct ccb_scsiio, but not the size of union ccb. So the version must be bumped to prevent structure mis-matches. scsi_all.h: Lots of updated SCSI sense data and other structures. Add function prototypes for the new sense data functions. Take out the inline implementation of scsi_extract_sense(). It is now too large to put in a header file. Add macros to calculate whether fields are present and filled in fixed and descriptor sense data scsi_all.c: In scsi_op_desc(), allow the user to pass in NULL inquiry data, and we'll assume a direct access device in that case. Changed the SCSI RESERVED sense key name and description to COMPLETED, as it is now defined in the spec. Change the error recovery action for a number of read errors to prevent lots of retries when the drive has said that the block isn't accessible. This speeds up reconstruction of the block by any RAID software running on top of the drive (e.g. ZFS). In scsi_sense_desc(), allow for invalid sense key numbers. This allows calling this routine without checking the input values first. Change scsi_error_action() to use scsi_extract_sense_len(), and handle things when invalid asc/ascq values are encountered. Add a new routine, scsi_desc_iterate(), that will call the supplied function for every descriptor in descriptor format sense data. Add scsi_set_sense_data(), and scsi_set_sense_data_va(), which build descriptor and fixed format sense data. They currently default to fixed format sense data. Add a number of scsi_get_*() functions, which get different types of sense data fields from either fixed or descriptor format sense data, if the data is present. Add a number of scsi_*_sbuf() functions, which print formatted versions of various sense data fields. These functions work for either fixed or descriptor sense. Add a number of scsi_sense_*_sbuf() functions, which have a standard calling interface and print the indicated field. These functions take descriptors only. Add scsi_sense_desc_sbuf(), which will print a formatted version of the given sense descriptor. Pull out a majority of the scsi_sense_sbuf() function and put it into scsi_sense_only_sbuf(). This allows callers that don't use struct ccb_scsiio to easily utilize the printing routines. Revamp that function to handle descriptor sense and use the new sense fetching and printing routines. Move scsi_extract_sense() into scsi_all.c, and implement it in terms of the new function, scsi_extract_sense_len(). The _len() version takes a length (which should be the sense length - residual) and can indicate which fields are present and valid in the sense data. Add a couple of new scsi_get_*() routines to get the sense key, asc, and ascq only. mly.c: Rename struct scsi_sense_data to struct scsi_sense_data_fixed. sbp_targ.c: Use the new sense fetching routines to get sense data instead of accessing it directly. sbp.c: Change the firewire/SCSI sense data transformation code to use struct scsi_sense_data_fixed instead of struct scsi_sense_data. This should be changed later to use scsi_set_sense_data(). ciss.c: Calculate the sense residual properly. Use scsi_get_sense_key() to fetch the sense key. mps_sas.c, mpt_cam.c: Set the sense residual properly. iir.c: Use scsi_set_sense_data() instead of building sense data by hand. iscsi_subr.c: Use scsi_extract_sense_len() instead of grabbing sense data directly. umass.c: Use scsi_set_sense_data() to build sense data. Grab the sense key using scsi_get_sense_key(). Calculate the sense residual properly. isp_freebsd.h: Use scsi_get_*() routines to grab asc, ascq, and sense key values. Calculate and set the sense residual. MFC after: 3 days Sponsored by: Spectra Logic Corporation
* 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-031-3/+10
| | | | | | - 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-161-49/+63
| | | | | | | - 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-161-3/+11
| | | | | | | 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.
* Fix an apparently harmless typo.scottl2009-07-201-1/+1
| | | | Approved by: re
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-24/+30
| | | | | | | 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-021-4/+0
| | | | | | 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-111-93/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
OpenPOWER on IntegriCloud