aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_scsih.c
diff options
context:
space:
mode:
authornagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>2011-11-30 21:23:02 -0500
committerJames Bottomley <JBottomley@Parallels.com>2011-12-15 01:57:39 -0500
commit4da7af9494b2f98a1503a2634059300c3e4615e6 (patch)
treef72a460e0c710c685aee3e18277b1bc6de4a11d7 /drivers/scsi/mpt2sas/mpt2sas_scsih.c
parent30c43282f3d347f47f9e05199d2b14f56f3f2837 (diff)
[SCSI] mpt2sas: Do not retry a timed out direct IO for warpdrive
When an I/O request to a WarpDrive is timed out by SML and if the I/O request to the WarpDrive is sent as direct I/O then the aborted direct I/O will be retried as normal Volume I/O and which results in failure of Target Reset and results in host reset. The fix is to not retry a failed IO to volume when the original IO was sent as direct IO with an ioc status MPI2_IOCSTATUS_SCSI_TASK_TERMINATED. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_scsih.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 8e2e9973df29..fd1ba744b423 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -4436,11 +4436,14 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
4436 scmd->result = DID_NO_CONNECT << 16; 4436 scmd->result = DID_NO_CONNECT << 16;
4437 goto out; 4437 goto out;
4438 } 4438 }
4439 ioc_status = le16_to_cpu(mpi_reply->IOCStatus);
4439 /* 4440 /*
4440 * WARPDRIVE: If direct_io is set then it is directIO, 4441 * WARPDRIVE: If direct_io is set then it is directIO,
4441 * the failed direct I/O should be redirected to volume 4442 * the failed direct I/O should be redirected to volume
4442 */ 4443 */
4443 if (_scsih_scsi_direct_io_get(ioc, smid)) { 4444 if (_scsih_scsi_direct_io_get(ioc, smid) &&
4445 ((ioc_status & MPI2_IOCSTATUS_MASK)
4446 != MPI2_IOCSTATUS_SCSI_TASK_TERMINATED)) {
4444 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); 4447 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
4445 ioc->scsi_lookup[smid - 1].scmd = scmd; 4448 ioc->scsi_lookup[smid - 1].scmd = scmd;
4446 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); 4449 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
@@ -4474,7 +4477,6 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
4474 4477
4475 xfer_cnt = le32_to_cpu(mpi_reply->TransferCount); 4478 xfer_cnt = le32_to_cpu(mpi_reply->TransferCount);
4476 scsi_set_resid(scmd, scsi_bufflen(scmd) - xfer_cnt); 4479 scsi_set_resid(scmd, scsi_bufflen(scmd) - xfer_cnt);
4477 ioc_status = le16_to_cpu(mpi_reply->IOCStatus);
4478 if (ioc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) 4480 if (ioc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE)
4479 log_info = le32_to_cpu(mpi_reply->IOCLogInfo); 4481 log_info = le32_to_cpu(mpi_reply->IOCLogInfo);
4480 else 4482 else