summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorManish Rangankar <mrangankar@marvell.com>2020-09-08 12:56:51 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-09-09 05:40:21 +0300
commit5c35e46465665e2864b2f76675306bf06e0b8703 (patch)
tree5c3eacef10fb5225f61fe3a6a0b2e770905700ca /drivers
parent3f8ad0072bf73f3555cd04b7ee7ac09034d9ee18 (diff)
downloadlinux-5c35e46465665e2864b2f76675306bf06e0b8703.tar.xz
scsi: qedi: Skip firmware connection termination for PCI shutdown handler
In boot from SAN scenario when qedi PCI shutdown handler is called with active iSCSI sessions, sometimes target takes too long time to respond to firmware connection termination request. Instead skip sending termination ramrod and progress with unload path. Link: https://lore.kernel.org/r/20200908095657.26821-3-mrangankar@marvell.com Signed-off-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qedi/qedi_iscsi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index c14ac7882afa..f815845fc568 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -1069,6 +1069,10 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep)
wait_delay += qedi->pf_params.iscsi_pf_params.two_msl_timer;
qedi_ep->state = EP_STATE_DISCONN_START;
+
+ if (test_bit(QEDI_IN_SHUTDOWN, &qedi->flags))
+ goto ep_release_conn;
+
ret = qedi_ops->destroy_conn(qedi->cdev, qedi_ep->handle, abrt_conn);
if (ret) {
QEDI_WARN(&qedi->dbg_ctx,