* [PATCH 05/07] mpt2sas: Added DID_NO_CONNECT return when driver remove and avoid shutdown call
@ 2011-06-14 5:27 Kashyap, Desai
0 siblings, 0 replies; only message in thread
From: Kashyap, Desai @ 2011-06-14 5:27 UTC (permalink / raw)
To: linux-scsi; +Cc: JBottomley, Eric.Moore, Sathya.Prakash
>From scsih_qcmd, we add checkfor the ioc->remove_host flag, and return DID_NO_CONNECT.
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>
---
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 30f77dd..55b9632 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -3766,7 +3766,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;
@@ -7314,7 +7314,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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-14 5:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 5:27 [PATCH 05/07] mpt2sas: Added DID_NO_CONNECT return when driver remove and avoid shutdown call Kashyap, Desai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.