287564 |
08-Sep-2015 |
jimharris |
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.
Reported and tested by: Bradley W. Dutton (brad-fbsd-stable@duttonbros.com) MFC after: 3 days Sponsored by: Intel
|
287563 |
08-Sep-2015 |
jimharris |
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().
MFC after: 3 days Sponsored by: Intel
|
283291 |
22-May-2015 |
jkim |
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent.
Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
|
274819 |
21-Nov-2014 |
smh |
Prevent overflow issues in timeout processing
Previously, any timeout value for which (timeout * hz) will overflow the signed integer, will give weird results, since callout(9) routines will convert negative values of ticks to '1'. For unsigned integer overflow we will get sufficiently smaller timeout values than expected.
Switch from callout_reset, which requires conversion to int based ticks to callout_reset_sbt to avoid this.
Also correct isci to correctly resolve ccb timeout.
This was based on the original work done by Eygene Ryabinkin <rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid the overlow.
Differential Revision: https://reviews.freebsd.org/D1157 Reviewed by: mav, davide MFC after: 1 month Sponsored by: Multiplay
|
268025 |
30-Jun-2014 |
scottl |
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.
Reviewed by: jimharris Obtained from: Netflix, Inc. MFC after: 2 days
|
252262 |
26-Jun-2013 |
jimharris |
For ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMA 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
|
249468 |
14-Apr-2013 |
mav |
MFprojects/camlock r248982: 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.
|
246713 |
12-Feb-2013 |
kib |
Reform the busdma API so that new types may be added without modifying 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>)
|
243904 |
05-Dec-2012 |
jimharris |
Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing 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
|
240514 |
14-Sep-2012 |
jimharris |
isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7 (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
|
233710 |
30-Mar-2012 |
dim |
Fix the following compilation warning with clang trunk in isci(4):
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
|
230843 |
31-Jan-2012 |
jimharris |
Add isci(4) driver for amd64 and i386 targets.
The isci driver is for the integrated SAS controller in the Intel C600 (Patsburg) chipset. Source files in sys/dev/isci directory are FreeBSD-specific, and sys/dev/isci/scil subdirectory contains an OS-agnostic library (SCIL) published by Intel to control the SAS controller. This library is used primarily as-is in this driver, with some post-processing to better integrate into the kernel build environment.
isci.4 and a README in the sys/dev/isci directory contain a few additional details.
This driver is only built for amd64 and i386 targets.
Sponsored by: Intel Reviewed by: scottl Approved by: scottl
|