aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-09-23 08:03:14 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-10-29 13:03:14 -0400
commite4e7c7ed3485bc530499158e28539e00d47f9ef2 (patch)
treee272b3bc2a42cdc3eeca1a87cd61f08f13a69e61 /drivers/scsi/mpt2sas
parent96b681c6ad3f2f5013c0ffc558969ee6ac8c450b (diff)
[SCSI] mpt2sas: Return DID_TRANSPORT_DISRUPTED in nexus loss,SCSI_MLQUEUE_DEVICE_BUSY if device is busy
1 Its observed that the OS was sending request to the driver after it had been put into blocking state, so the driver was modified to return SCSI_MLQUEUE_DEVICE_BUSY. 2. Driver will return DID_TRANSPORT_DISRUPTED when sdev is haivng nexus loss. This occurrs when sdev is blocked, between the MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING and MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING events. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index c20c1e8cb8a7..b5531a251be9 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2885,7 +2885,7 @@ _scsih_qcmd(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *))
2885 } 2885 }
2886 2886
2887 /* see if we are busy with task managment stuff */ 2887 /* see if we are busy with task managment stuff */
2888 if (sas_target_priv_data->tm_busy) 2888 if (sas_device_priv_data->block || sas_target_priv_data->tm_busy)
2889 return SCSI_MLQUEUE_DEVICE_BUSY; 2889 return SCSI_MLQUEUE_DEVICE_BUSY;
2890 else if (ioc->shost_recovery || ioc->ioc_link_reset_in_progress) 2890 else if (ioc->shost_recovery || ioc->ioc_link_reset_in_progress)
2891 return SCSI_MLQUEUE_HOST_BUSY; 2891 return SCSI_MLQUEUE_HOST_BUSY;
@@ -3351,10 +3351,9 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
3351 3351
3352 case MPI2_IOCSTATUS_SCSI_IOC_TERMINATED: 3352 case MPI2_IOCSTATUS_SCSI_IOC_TERMINATED:
3353 if (sas_device_priv_data->block) { 3353 if (sas_device_priv_data->block) {
3354 scmd->result = (DID_BUS_BUSY << 16); 3354 scmd->result = DID_TRANSPORT_DISRUPTED << 16;
3355 break; 3355 goto out;
3356 } 3356 }
3357
3358 case MPI2_IOCSTATUS_SCSI_TASK_TERMINATED: 3357 case MPI2_IOCSTATUS_SCSI_TASK_TERMINATED:
3359 case MPI2_IOCSTATUS_SCSI_EXT_TERMINATED: 3358 case MPI2_IOCSTATUS_SCSI_EXT_TERMINATED:
3360 scmd->result = DID_RESET << 16; 3359 scmd->result = DID_RESET << 16;