Commit Graph

15 Commits

Author SHA1 Message Date
Jim Harris
666b0fab76 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
2013-06-26 22:08:45 +00:00
Eitan Adler
7a2b450ff8 Fxi a bunch of typos.
PR:	misc/174625
Submitted by:	Jeremy Chadwick <jdc@koitsu.org>
2013-05-10 16:41:26 +00:00
Gabor Kovesdan
b78540b1c7 - Correct mispellings of word resource
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2013-04-17 11:47:32 +00:00
Kevin Lo
26f370d011 Fix typo: s/protocl/protocol 2012-09-20 10:07:31 +00:00
Eitan Adler
0af1b47258 s/ is is / is /g
s/ a a / a /g

Approved by:	cperciva
MFC after:	3 days
2012-09-14 22:00:03 +00:00
Eitan Adler
582212fa04 s/teh/the/g
Approved by:	cperciva
MFC after:	3 days
2012-09-14 21:59:55 +00:00
Eitan Adler
96240c89f0 Correct double "the the"
Approved by:	cperciva
MFC after:	3 days
2012-09-14 21:28:56 +00:00
Jim Harris
cc31866200 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
2012-09-14 20:05:38 +00:00
Jim Harris
a099c5cca0 Do not call sati_check_data_io() for SATI_UNMAP sequences.
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
2012-08-30 00:43:14 +00:00
Jim Harris
3e0a9f1ff2 Fix/add support for SCSI UNMAP to ATA DSM translation.
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
2012-08-21 22:28:14 +00:00
Jim Harris
e0e3e85dc0 Fix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would
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
2012-05-04 23:45:34 +00:00
Jim Harris
8e0f1d18c8 Fix bug where isci(4) would report only 15 bytes of returned data on a
READ_CAP_16 command to a SATA target.

Sponsored by: Intel
Reviewed by: sbruno
Approved by: sbruno
MFC after: 3 days
2012-03-29 15:43:07 +00:00
Jim Harris
0f2a8452df Remove explicit CC assignment in isci(4) Makefile to allow for building
with clang.  Also fix a number of warnings uncovered when building with
clang around some implicit enum conversions.

Sponsored by: Intel
Approved by: scottl
2012-02-09 17:50:24 +00:00
Jim Harris
2d57bb86ed Fix Coverity defects in isci(4) driver.
Sponsored by: Intel
Approved by: scottl
2012-02-07 17:45:11 +00:00
Jim Harris
f11c7f6305 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
2012-01-31 19:38:18 +00:00