]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[SCSI] mpt2sas: Added DID_NO_CONNECT return when driver remove and avoid shutdown...
authorKashyap, Desai <kashyap.desai@lsi.com>
Tue, 14 Jun 2011 05:27:08 +0000 (10:57 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 29 Jun 2011 21:16:21 +0000 (16:16 -0500)
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>
drivers/scsi/mpt2sas/mpt2sas_scsih.c

index c20f590c77b30ec0878f1151a28b7621a5db8aa0..939f283d0c28c3e83fa6d5cfc3e2bab00505a0f3 100644 (file)
@@ -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;
@@ -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);