Blame SOURCES/0020-scsi-scsi-qla2xxx-Prevent-multiple-ADISC-commands-pe.patch

3d7c23
From cdbe9c4cd49b9cfb71aaea4031e9642155d5a9b9 Mon Sep 17 00:00:00 2001
3d7c23
From: Himanshu Madhani <hmadhani@redhat.com>
3d7c23
Date: Thu, 1 Aug 2019 15:54:40 -0400
3d7c23
Subject: [PATCH 020/124] [scsi] scsi: qla2xxx: Prevent multiple ADISC commands
3d7c23
 per session
3d7c23
3d7c23
Message-id: <20190801155618.12650-21-hmadhani@redhat.com>
3d7c23
Patchwork-id: 267793
3d7c23
O-Subject: [RHEL 7.8 e-stor PATCH 020/118] scsi: qla2xxx: Prevent multiple ADISC commands per session
3d7c23
Bugzilla: 1729270
3d7c23
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
3d7c23
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
3d7c23
3d7c23
From: Quinn Tran <qtran@marvell.com>
3d7c23
3d7c23
Bugzilla 1729270
3d7c23
3d7c23
Add check to allow 1 discovery command per session to be sent.
3d7c23
3d7c23
Signed-off-by: Quinn Tran <qtran@marvell.com>
3d7c23
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
3d7c23
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3d7c23
(cherry picked from commit 192c4e9b9322ae445fa12914941e2278c7d4829f)
3d7c23
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
3d7c23
Signed-off-by: Jan Stancek <jstancek@redhat.com>
3d7c23
---
3d7c23
 drivers/scsi/qla2xxx/qla_init.c | 6 ++++--
3d7c23
 1 file changed, 4 insertions(+), 2 deletions(-)
3d7c23
3d7c23
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
3d7c23
index 3a79abe8e658..63b035882651 100644
3d7c23
--- a/drivers/scsi/qla2xxx/qla_init.c
3d7c23
+++ b/drivers/scsi/qla2xxx/qla_init.c
3d7c23
@@ -473,9 +473,11 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport,
3d7c23
 {
3d7c23
 	srb_t *sp;
3d7c23
 	struct srb_iocb *lio;
3d7c23
-	int rval;
3d7c23
+	int rval = QLA_FUNCTION_FAILED;
3d7c23
+
3d7c23
+	if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT))
3d7c23
+		return rval;
3d7c23
 
3d7c23
-	rval = QLA_FUNCTION_FAILED;
3d7c23
 	fcport->flags |= FCF_ASYNC_SENT;
3d7c23
 	sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
3d7c23
 	if (!sp)
3d7c23
-- 
3d7c23
2.13.6
3d7c23