[SCSI] mpt2sas: Reworked scmd->result priority for _scsih_qcmd.
commit130b958a5dbf0fca361beef5713715a2eba6529f
authorKashyap, Desai <kashyap.desai@lsi.com>
Thu, 8 Apr 2010 12:24:32 +0000 (8 17:54 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 11 Apr 2010 19:00:30 +0000 (11 14:00 -0500)
treefa48bcdd2b9487d0703056073b8cd688b55b3cf9
parenta1172ca2f20074626d7aa77e747824757673cf22
[SCSI] mpt2sas: Reworked scmd->result priority for _scsih_qcmd.

we added support to set the deleted flag prior to device scan,
then clear the flag for responding devices, leaving the deleted flag only
set for missing devices.  The problem is for internal generated host resets,
IO queues are not blocked at scsi mid layer level.  IO will be continued
sent to driver, and driver  will return SCSI_MLQUEUE_HOST_BUSY.  The problem
is the driver checks for the deleted flag before it checks for the
controller being in reset, so there is a window where the driver would be
returning DID_NO_CONNECT for responding devices.  This occurs during  the
time between calling  _scsih_prep_device_scan, and
_scsih_mark_responding_sas_device & _scsih_mark_responding_raid_device.

Fix the queuecommand entry point so ioc->shost_recovery flag sanity check is
given higher presidence then the device "deleted flag" check.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/mpt2sas/mpt2sas_scsih.c