[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>
This commit is contained in:
Kashyap, Desai 2011-06-14 10:57:08 +05:30 committed by James Bottomley
parent f93213de5c
commit 7821578caa
1 changed files with 1 additions and 2 deletions

View File

@ -3763,7 +3763,7 @@ _scsih_qcmd_lck(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *))
return 0; return 0;
} }
if (ioc->pci_error_recovery) { if (ioc->pci_error_recovery || ioc->remove_host) {
scmd->result = DID_NO_CONNECT << 16; scmd->result = DID_NO_CONNECT << 16;
scmd->scsi_done(scmd); scmd->scsi_done(scmd);
return 0; return 0;
@ -7350,7 +7350,6 @@ _scsih_remove(struct pci_dev *pdev)
} }
sas_remove_host(shost); sas_remove_host(shost);
_scsih_shutdown(pdev);
list_del(&ioc->list); list_del(&ioc->list);
scsi_remove_host(shost); scsi_remove_host(shost);
scsi_host_put(shost); scsi_host_put(shost);