aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2011-06-14 01:27:08 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 17:16:21 -0400
commit7821578caa8cb831868989041112ab808029ca65 (patch)
treebe3fe92ec16d5c4142b0144718930ce6dab990cd /drivers/scsi/mpt2sas
parentf93213de5c28d4aeda51b3c03daf7e27f6dd2b7a (diff)
[SCSI] mpt2sas: Added DID_NO_CONNECT return when driver remove and avoid shutdown call
Driver should not call shutdown call from _scsih_remove otherwise, The scsi midlayer can be deadlocked when devices are removed from the driver pci_driver->shutdown handler. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index c20f590c77b3..939f283d0c28 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -3763,7 +3763,7 @@ _scsih_qcmd_lck(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *))
3763 return 0; 3763 return 0;
3764 } 3764 }
3765 3765
3766 if (ioc->pci_error_recovery) { 3766 if (ioc->pci_error_recovery || ioc->remove_host) {
3767 scmd->result = DID_NO_CONNECT << 16; 3767 scmd->result = DID_NO_CONNECT << 16;
3768 scmd->scsi_done(scmd); 3768 scmd->scsi_done(scmd);
3769 return 0; 3769 return 0;
@@ -7350,7 +7350,6 @@ _scsih_remove(struct pci_dev *pdev)
7350 } 7350 }
7351 7351
7352 sas_remove_host(shost); 7352 sas_remove_host(shost);
7353 _scsih_shutdown(pdev);
7354 list_del(&ioc->list); 7353 list_del(&ioc->list);
7355 scsi_remove_host(shost); 7354 scsi_remove_host(shost);
7356 scsi_host_put(shost); 7355 scsi_host_put(shost);