Blame SOURCES/0114-scsi-scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-sh.patch

3c6e85
From bc01bd437894fde056996a3dda1ea365b68ab942 Mon Sep 17 00:00:00 2001
3c6e85
From: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Date: Thu, 1 Aug 2019 15:56:14 -0400
3c6e85
Subject: [PATCH 114/124] [scsi] scsi: qla2xxx: Fix NVMe port discovery after a
3c6e85
 short device port loss
3c6e85
3c6e85
Message-id: <20190801155618.12650-115-hmadhani@redhat.com>
3c6e85
Patchwork-id: 267874
3c6e85
O-Subject: [RHEL 7.8 e-stor PATCH 114/118] scsi: qla2xxx: Fix NVMe port discovery after a short device port loss
3c6e85
Bugzilla: 1729270
3c6e85
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
3c6e85
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
3c6e85
3c6e85
From: Arun Easi <aeasi@marvell.com>
3c6e85
3c6e85
Bugzilla 1729270
3c6e85
3c6e85
The following sequence of event leads to NVME port disappearing:
3c6e85
3c6e85
    - device port shut
3c6e85
    - nvme_fc_unregister_remoteport
3c6e85
    - device port online
3c6e85
    - remote port delete completes
3c6e85
    - relogin is scheduled
3c6e85
    - "post gidpn" message appears due to rscn generation # mismatch
3c6e85
3c6e85
In short, if a device comes back online sooner than an unregister
3c6e85
completion, a mismatch in rscn generation number occurs, which is not
3c6e85
handled correctly during device relogin. Fix this by starting with a redo
3c6e85
of GNL.
3c6e85
3c6e85
When ql2xextended_error_logging is enabled, the re-plugged device's
3c6e85
discovery stops with the following messages printed:
3c6e85
3c6e85
--8<--
3c6e85
qla2xxx [0000:41:00.0]-480d:3: Relogin scheduled.
3c6e85
qla2xxx [0000:41:00.0]-4800:3: DPC handler sleeping.
3c6e85
qla2xxx [0000:41:00.0]-2902:3: qla24xx_handle_relogin_event 21:00:00:24:ff:17:9e:91 DS 0 LS 7 P 0 del 2 cnfl
3c6e85
   (null) rscn 1|2 login 1|2 fl 1
3c6e85
qla2xxx [0000:41:00.0]-28e9:3: qla24xx_handle_relogin_event 1666 21:00:00:24:ff:17:9e:91 post gidpn
3c6e85
qla2xxx [0000:41:00.0]-480e:3: Relogin end.
3c6e85
--8<--
3c6e85
3c6e85
Signed-off-by: Arun Easi <aeasi@marvell.com>
3c6e85
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
3c6e85
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3c6e85
(cherry picked from commit 2a00c4ebbbfd88f0754acb96cf402f323357384e)
3c6e85
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Signed-off-by: Jan Stancek <jstancek@redhat.com>
3c6e85
---
3c6e85
 drivers/scsi/qla2xxx/qla_init.c | 4 ++--
3c6e85
 1 file changed, 2 insertions(+), 2 deletions(-)
3c6e85
3c6e85
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
3c6e85
index fc8e886ebb43..22e3dcd3ab62 100644
3c6e85
--- a/drivers/scsi/qla2xxx/qla_init.c
3c6e85
+++ b/drivers/scsi/qla2xxx/qla_init.c
3c6e85
@@ -1587,9 +1587,9 @@ void qla24xx_handle_relogin_event(scsi_qla_host_t *vha,
3c6e85
 	}
3c6e85
 
3c6e85
 	if (fcport->last_rscn_gen != fcport->rscn_gen) {
3c6e85
-		ql_dbg(ql_dbg_disc, vha, 0x20e9, "%s %d %8phC post gidpn\n",
3c6e85
+		ql_dbg(ql_dbg_disc, vha, 0x20e9, "%s %d %8phC post gnl\n",
3c6e85
 		    __func__, __LINE__, fcport->port_name);
3c6e85
-
3c6e85
+		qla24xx_post_gnl_work(vha, fcport);
3c6e85
 		return;
3c6e85
 	}
3c6e85
 
3c6e85
-- 
3c6e85
2.13.6
3c6e85