summaryrefslogtreecommitdiffstats
path: root/sys/dev/isci
Commit message (Collapse)AuthorAgeFilesLines
* MFC r287564:jimharris2015-09-111-2/+2
| | | | | | | | | | | isci: check return value of pci_alloc_msix() Certain VM guest types (VMware, Xen) do not support MSI, so pci_alloc_msix() always fails. isci(4) was not properly detecting the allocation failure, and would try to proceed with MSIx resource initialization rather than reverting to INTx. Sponsored by: Intel
* MFC r287563:jimharris2015-09-111-0/+2
| | | | | | | | | | | isci: explicitly enable/disable PCI busmaster BIOS always enables PCI busmaster on the isci device, which effectively worked around this omission. But when passing the isci device through to a guest VM, the hypervisor will disable busmaster and isci will not work without calling pci_enable_busmaster(). Sponsored by: Intel
* MFC 276174:scottl2014-12-262-2/+5
| | | | | | | Fix tunable and sysctl handling of the fail_on_task_timeout knob. Reviewed by: emax Obtained from: Netflix, Inc.
* MFC r274819:smh2014-12-212-6/+8
| | | | | | | | | Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay
* Merge r268024, 268025:scottl2014-07-015-3/+41
| | | | | | | | | | | | | | | | | | Fix a case in ndling ATA_PASSTHROUGH commands that have an unaligned buffer. This impacts some home-rolled SMART tools. In rare cases, a SATA drive can stop responding to commands and trigger a reset device task request from the driver. If the drive fails to respond with a signature FIS, the driver would previously get into an endless retry loop, stalling all I/O to the drive and keeping user processes stranded. Instead, fail the i/o and invalidate the device if the task management command times out. This is controllable with the sysctl and tunable hw.isci.fail_on_task_timeout dev.isci.0.fail_on_task_timeout The default for these is 1. Obtained from: Netflix, Inc.
* MFC r263276:jimharris2014-05-074-19/+14
| | | | Base the max number of SG elements on MAXPHYS.
* MFC r263275:jimharris2014-05-071-2/+10
| | | | | isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set translate their response.
* Improve logging around some of the isci(4) reset and recovery paths.jimharris2013-10-093-4/+52
| | | | | | | Sponsored by: Intel Discussed with: scottl Approved by: re (marius) MFC after: 1 week
* Make isci(4) loadable.kib2013-10-071-0/+1
| | | | | | | Reviewed by: jimharris Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (gjb)
* For ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMAjimharris2013-06-261-4/+45
| | | | | | | | | | | | | | | | | | | | | | | by treating it as UDMA. This fixes a problem introduced in r249933/r249939, where CAM sends ATA_DSM_TRIM to SATA devices using ATA_PASSTHROUGH_16. scsi_ata_trim() sets protocol as DMA (not UDMA) which is for multi-word DMA, even though no such mode is selected for the device. isci(4) would fail these commands which is the correct behavior but not consistent with other HBAs, namely LSI's. smh@ did some further testing on an LSI controller, which rejected ATA_PASSTHROUGH_16 commands with mode=UDMA_OUT, even though only a UDMA mode was selected on the device. So this precludes adding any kind of mode detection in CAM to determine which mode to use on a per-device basis. Sponsored by: Intel Discussed with: scottl, smh Reported by: scottl Tested by: scottl MFC after: 3 days
* Fxi a bunch of typos.eadler2013-05-101-2/+2
| | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* - Correct mispellings of word resourcegabor2013-04-173-3/+3
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* MFprojects/camlock r248982:mav2013-04-143-5/+5
| | | | | | | | 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.
* Panic should the SCI framework ever request a pointer into the ccb'sjimharris2013-03-271-3/+24
| | | | | | | | | | | data buffer for a ccb that is unmapped. This case is currently not possible, since the SCI framework only requests these pointers for doing SCSI/ATA translation of non- READ/WRITE commands. The panic is more to protect against the unlikely future scenario where additional commands could be unmapped. Sponsored by: Intel
* Report support for unmapped I/O by adding PIM_UNMAPPED flag.jimharris2013-03-262-5/+2
| | | | Submitted by: jhb, scottl
* Reform the busdma API so that new types may be added without modifyingkib2013-02-121-22/+13
| | | | | | | | | | | | | | | | | | | | | 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>)
* Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothingjimharris2012-12-051-13/+15
| | | | | | | | | | | | | | | | | | to map, and technically this isn't allowed. Functionally, it works OK (at least on x86) to call bus_dmamap_load with a NULL data pointer and zero length, so this is primarily for correctness and consistency with other drivers. While here, remove check in isci_io_request_construct for nseg==0. Previously, bus_dmamap_load would pass nseg==1, even for case where buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs to get processed. This check is not correct though, and needed to be removed both for the changes elsewhere in this patch, as well as jeff's preliminary bus_dmamap_load_ccb patch (which uncovered all of this in the first place). MFC after: 3 days
* Add support for locate LED.jimharris2012-10-103-15/+42
| | | | | | | | While here, change ISCI_LED to ISCI_PHY since conceptually the hardware ties the LEDs to a phy and the LEDs for a given phy cannot be controlled independently. Submitted by: Paul Maulberger <Paul.Maulberger at gmx.de> (with modifications)
* Create led(4) device nodes mapped to isci(4) SGPIO locate LEDs.jimharris2012-09-263-1/+37
| | | | | | | | Device nodes are in the format /dev/led/isci.busX.portY.locate. Sponsored by: Intel Requested by: Paul Maulberger <paul dot maulberger at gmx dot de> MFC after: 1 week
* Fix typo: s/protocl/protocolkevlo2012-09-201-1/+1
|
* s/ is is / is /geadler2012-09-141-1/+1
| | | | | | | s/ a a / a /g Approved by: cperciva MFC after: 3 days
* s/teh/the/geadler2012-09-141-1/+1
| | | | | Approved by: cperciva MFC after: 3 days
* Correct double "the the"eadler2012-09-1412-16/+16
| | | | | Approved by: cperciva MFC after: 3 days
* isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7jimharris2012-09-142-7/+14
| | | | | | | | | | | | | | (download microcode with offsets, save, and activate). SATI translation layer was incorrectly using allocation length instead of blocks, and was constructing the ATA command incorrectly. Also change #define to specify that the 512 block size here is specific for DOWNLOAD_MICROCODE, and does not relate to the device's logical block size. Submitted by: scottl (with small modifications) MFC after: 3 days
* Do not call sati_check_data_io() for SATI_UNMAP sequences.jimharris2012-08-301-4/+0
| | | | | | | | | | | | This routine is intended only for commands such as INQUIRY where the controller may fill out a smaller amount of data than allocated by the host. The end result of this bug was that isci(4) would report non-zero resid for successful SCSI_UNMAP commands. Sponsored by: Intel MFC after: 3 days
* Clear freeze bit before calling xpt_release_devq.jimharris2012-08-241-1/+1
| | | | | | | | This ensures that any ccbs which immediately start during the call to xpt_release_devq see an accurate picture of the frozen_lun_mask. Sponsored by: Intel MFC after: 3 days
* Fix/add support for SCSI UNMAP to ATA DSM translation.jimharris2012-08-216-11/+56
| | | | | | | | | | | | | | | | | | This addresses kernel panic observed when sending SCSI UNMAP commands to SATA disks attached to isci(4). 1) Flesh out callback routines to allocate/free buffers needed for translating SCSI UNMAP data to ATA DSM data. 2) Add controller-level pool for storing buffers previously allocated for UNMAP translation, to lessen chance of no buffer available under memory pressure. 3) Ensure driver properly handles case where buffer pool is empty and contigmalloc returns NULL. Sponsored by: Intel Reported by: Maksim Yevmenkin <max at netflix dot com> Discussed with: scottl MFC after: 3 days
* Wait until completion context unwinds before retrying CCBs that have beenjimharris2012-05-215-15/+147
| | | | | | | | | | | | | | | | | | | queued internally. This works around issue in the isci HAL where it cannot accept new I/O to a device after a resetting->ready state transition until the completion context has unwound. This issue was found by submitting non-tagged CCBs through pass(4) interface to a SATA disk with an extremely small timeout value (5ms). This would trigger internal resets with I/O in the isci(4) internal queues. The small timeout value had not been intentional (and original reporter has since changed his test to use 5sec instead), but it did uncover this corner case that would result in a hung disk. Sponsored by: Intel Reported and tested by: Ravi Pokala <rpokala at panasas dot com> Reviewed by: scottl (earlier version) MFC after: 1 week
* Fix off-by-one error in sati_inquiry_block_device_translate_data(). Bug wouldjimharris2012-05-041-1/+1
| | | | | | | | | result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data instead of 64 during SCSI/ATA translation. Sponsored by: Intel Approved by: scottl MFC after: 1 week
* Queue CCBs internally instead of using CAM_REQUEUE_REQ status. This fixesjimharris2012-04-104-29/+56
| | | | | | | | | | | | problem where userspace apps such as smartctl fail due to CAM_REQUEUE_REQ status getting returned when tagged commands are outstanding when smartctl sends its I/O using the pass(4) interface. Sponsored by: Intel Found and tested by: Ravi Pokala <rpokala at panasas dot com> Reviewed by: scottl Approved by: scottl MFC after: 1 week
* Fix the following compilation warning with clang trunk in isci(4):dim2012-03-301-1/+1
| | | | | | | | | | | | | | | | sys/dev/isci/isci_task_request.c:198:7: error: case value not in enumerated type 'SCI_TASK_STATUS' (aka 'enum _SCI_TASK_STATUS') [-Werror,-Wswitch] case SCI_FAILURE_TIMEOUT: ^ This is because the switch is done on a SCI_TASK_STATUS enum type, but the SCI_FAILURE_TIMEOUT value belongs to SCI_STATUS instead. Because the list of SCI_TASK_STATUS values cannot be modified at this time, use the simplest way to get rid of this warning, which is to cast the switch argument to int. No functional change. Reviewed by: jimharris MFC after: 3 days
* Fix bug where isci(4) would report only 15 bytes of returned data on ajimharris2012-03-291-0/+4
| | | | | | | | | READ_CAP_16 command to a SATA target. Sponsored by: Intel Reviewed by: sbruno Approved by: sbruno MFC after: 3 days
* Ensure consistent target IDs for direct-attached devices.jimharris2012-03-283-9/+32
| | | | | | | | | Sponsored by: Intel Reported by: sbruno, <rpokala at panasas dot com> Tested by: <rpokala at panasas dot com> Reviewed by: scottl Approved by: scottl MFC after: 3 days
* Call xpt_bus_register during attach context, then freeze and do not releasejimharris2012-03-233-12/+43
| | | | | | | | | | until domain discovery is complete. This fixes an isci(4) bug on FreeBSD 7.x where devices weren't always appearing after boot without an explicit rescan. Sponsored by: Intel Reported and tested by: <rpokala at panasas dot com> Reviewed by: scottl Approved by: scottl
* Update PCI-IDs with devices found on Intel SDPsbruno2012-02-271-2/+6
| | | | | | | | Return BUS_PROBE_DEFAULT so that non-default drivers may be loaded Reviewed by: jharris@ Obtained from: Yahoo! Inc. and Intel MFC after: 3 days
* During work to port isci(4) to stable/7 I noted that the maxio portion ofsbruno2012-02-171-1/+1
| | | | | | | | | | struct ccb_pathinq from sys/cam/cam_ccb.h wasn't added to stable/7 at all and didn't appear in stable/8 until svn R195534. Since __FreeBSD_version did not get bumped until svn R195634, assume that maxio is valid at 800102 or higher. Obtained from: Yahoo! Inc. MFC after: 0 days
* Remove explicit CC assignment in isci(4) Makefile to allow for buildingjimharris2012-02-0912-31/+36
| | | | | | | | with clang. Also fix a number of warnings uncovered when building with clang around some implicit enum conversions. Sponsored by: Intel Approved by: scottl
* Fix Coverity defects in isci(4) driver.jimharris2012-02-076-61/+50
| | | | | Sponsored by: Intel Approved by: scottl
* Fix ATAPI code path to ensure bus_dma_segment structures are only usedjimharris2012-01-302-2/+4
| | | | | | | within bus_dmamap_load context. Sponsored by: Intel Reported by: Sohaib Ahsan <sohaib dot ahsan intel com>
* Add all isci driver source code to sys/dev/isci for the Intel C600jimharris2012-01-25255-0/+111908
| | | | | | | | | | | (Patsburg) integrated SAS controller. sys/dev/isci contains all files specific to FreeBSD. sys/dev/isci/scil contains OS-agnostic library maintained by Intel and modified to best integrate into FreeBSD kernel build environment. Sponsored by: Intel Reviewed by: scottl
* Modify GENERIC, files and options for isci (Intel C600 SAS controller) driver.jimharris2012-01-061-0/+14
Also add brief README and cleanup Makefile. Reviewed by: scottl sbruno
OpenPOWER on IntegriCloud