Skip to content

Commit

Permalink
[SCSI] mpt2sas: Added DID_NO_CONNECT return when driver remove and av…
Browse files Browse the repository at this point in the history
…oid 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>
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Jun 29, 2011
1 parent f93213d commit 7821578
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/mpt2sas/mpt2sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -3763,7 +3763,7 @@ _scsih_qcmd_lck(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *))
return 0;
}

if (ioc->pci_error_recovery) {
if (ioc->pci_error_recovery || ioc->remove_host) {
scmd->result = DID_NO_CONNECT << 16;
scmd->scsi_done(scmd);
return 0;
Expand Down Expand Up @@ -7350,7 +7350,6 @@ _scsih_remove(struct pci_dev *pdev)
}

sas_remove_host(shost);
_scsih_shutdown(pdev);
list_del(&ioc->list);
scsi_remove_host(shost);
scsi_host_put(shost);
Expand Down

0 comments on commit 7821578

Please sign in to comment.