All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mpt2sas: WarpDrive Infinite command retries due to wrong scsi command entry in MPI message
@ 2011-07-05  7:10 Kashyap, Desai
  0 siblings, 0 replies; only message in thread
From: Kashyap, Desai @ 2011-07-05  7:10 UTC (permalink / raw)
  To: linux-scsi; +Cc: JBottomley, Eric.Moore, Sathya.Prakash

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>
---
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 939f283..6abd2fc 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)
 	u32 log_info;
 	struct MPT2SAS_DEVICE *sas_device_priv_data;
 	u32 response_code = 0;
+	unsigned long flags;
 
 	mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply);
 	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)
 	 * the failed direct I/O should be redirected to volume
 	 */
 	if (_scsih_scsi_direct_io_get(ioc, smid)) {
+		spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
+		ioc->scsi_lookup[smid - 1].scmd = scmd;
+		spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
 		_scsih_scsi_direct_io_set(ioc, smid, 0);
 		memcpy(mpi_request->CDB.CDB32, scmd->cmnd, scmd->cmd_len);
 		mpi_request->DevHandle =

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-05  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05  7:10 [PATCH] mpt2sas: WarpDrive Infinite command retries due to wrong scsi command entry in MPI message Kashyap, Desai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.