Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Kashyap, Desai and committed by
James Bottomley
82a45258 b2a554ff

+4
+4
drivers/scsi/mpt2sas/mpt2sas_scsih.c
··· 4258 4258 u32 log_info; 4259 4259 struct MPT2SAS_DEVICE *sas_device_priv_data; 4260 4260 u32 response_code = 0; 4261 + unsigned long flags; 4261 4262 4262 4263 mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); 4263 4264 scmd = _scsih_scsi_lookup_get_clear(ioc, smid); ··· 4283 4282 * the failed direct I/O should be redirected to volume 4284 4283 */ 4285 4284 if (_scsih_scsi_direct_io_get(ioc, smid)) { 4285 + spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); 4286 + ioc->scsi_lookup[smid - 1].scmd = scmd; 4287 + spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); 4286 4288 _scsih_scsi_direct_io_set(ioc, smid, 0); 4287 4289 memcpy(mpi_request->CDB.CDB32, scmd->cmnd, scmd->cmd_len); 4288 4290 mpi_request->DevHandle =