[SCSI] libsas: Handle SCSI commands that complete with failure codes
authorDarrick J. Wong <djwong@us.ibm.com>
Fri, 26 Jan 2007 22:08:52 +0000 (14:08 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 27 Jan 2007 16:06:51 +0000 (10:06 -0600)
commitad689233bee854dced741c91aff12a8771a22f6f
treeae1a786c97c779c16d5e10ac17efdb24c72aa5ae
parentdca84e4694419adf61ad052b1e5a50ac82726597
[SCSI] libsas: Handle SCSI commands that complete with failure codes

This patch moves the code that handles SAS failures out of the main EH
function and into a separate function.  It also detects commands that have
no sas_task (i.e. they completed, but with error data) and sends them into
scsi_error for processing.  This allows us to handle SCSI errors (and
enables auto-spinup as a side effect) instead of dropping them on the
floor and falling into an infinite loop.  It also requires the
implementation of a device reset function, which the SAS failure code has
been modified to employ for REQ_DEVICE_RESET.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/libsas/sas_scsi_host.c
include/scsi/libsas.h