Commit Graph

8 Commits

Author SHA1 Message Date
Jim Harris
37274fc04c Create led(4) device nodes mapped to isci(4) SGPIO locate LEDs.
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
2012-09-26 16:46:44 +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
dd92530581 Wait until completion context unwinds before retrying CCBs that have been
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
2012-05-21 22:54:33 +00:00
Jim Harris
cb77f0da67 Queue CCBs internally instead of using CAM_REQUEUE_REQ status. This fixes
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
2012-04-10 16:33:19 +00:00
Jim Harris
47c3b89324 Ensure consistent target IDs for direct-attached devices.
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
2012-03-28 18:38:13 +00:00
Jim Harris
7ccd203639 Call xpt_bus_register during attach context, then freeze and do not release
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
2012-03-23 16:28:11 +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
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