aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2011-07-05 03:10:23 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-26 05:56:27 -0400
commit82a452581230b3ffc9d6475dffdb2568497b5fec (patch)
tree4a46487a0d0c9053688a192a297ddd6496aa7f6c
parentb2a554ff9ad5cdd8d00dac168f2bb3db7ccedb61 (diff)
[SCSI] mpt2sas: WarpDrive Infinite command retries due to wrong scsi command entry in MPI message
Issue: This issue is seen on LSI H/W WarpDrive SSS6200 When filed direct I/O is tried as volume I/O the scmd field in internal lookup table get cleared and because of that the retried volume I/O never gets reported as completed to SML. Result: I/O timeout and Error handling thread will kicking off Fix: Setting back the scmd in the lookup table before retrying the failed direct i/o Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 939f283d0c28..6abd2fcc43e2 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -4258,6 +4258,7 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
4258 u32 log_info; 4258 u32 log_info;
4259 struct MPT2SAS_DEVICE *sas_device_priv_data; 4259 struct MPT2SAS_DEVICE *sas_device_priv_data;
4260 u32 response_code = 0; 4260 u32 response_code = 0;
4261 unsigned long flags;
4261 4262
4262 mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); 4263 mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply);
4263 scmd = _scsih_scsi_lookup_get_clear(ioc, smid); 4264 scmd = _scsih_scsi_lookup_get_clear(ioc, smid);
@@ -4282,6 +4283,9 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
4282 * the failed direct I/O should be redirected to volume 4283 * the failed direct I/O should be redirected to volume
4283 */ 4284 */
4284 if (_scsih_scsi_direct_io_get(ioc, smid)) { 4285 if (_scsih_scsi_direct_io_get(ioc, smid)) {
4286 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
4287 ioc->scsi_lookup[smid - 1].scmd = scmd;
4288 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
4285 _scsih_scsi_direct_io_set(ioc, smid, 0); 4289 _scsih_scsi_direct_io_set(ioc, smid, 0);
4286 memcpy(mpi_request->CDB.CDB32, scmd->cmnd, scmd->cmd_len); 4290 memcpy(mpi_request->CDB.CDB32, scmd->cmnd, scmd->cmd_len);
4287 mpi_request->DevHandle = 4291 mpi_request->DevHandle =