[SRU] [Focal] [PATCH v3 3/4] scsi: qla2xxx: Fix point-to-point (N2N) device discovery issue
Nilesh Javali
njavali at marvell.com
Wed Jun 2 09:25:07 UTC 2021
From: Arun Easi <aeasi at marvell.com>
BugLink: https://bugs.launchpad.net/bugs/1860724
Driver was using a shorter timeout waiting for PLOGI from the peer in
point-to-point configurations. Some devices takes some time (~4
seconds) to initiate the PLOGI. This peer initiating PLOGI is
when the peer has a higher P-WWN.
Increase the wait time based on N2N R_A_TOV.
Link: https://lore.kernel.org/r/20200929102152.32278-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani at oracle.com>
Signed-off-by: Arun Easi <aeasi at marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen at oracle.com>
(backported from commit 94eda2717826015a80ca271394c4378747de8936)
Signed-off-by: Nilesh Javali <njavali at marvell.com>
---
drivers/scsi/qla2xxx/qla_def.h | 2 ++
drivers/scsi/qla2xxx/qla_mbx.c | 3 ++-
drivers/scsi/qla2xxx/qla_os.c | 5 ++++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index c57b95a20688..c60b183aac29 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -4823,6 +4823,8 @@ struct sff_8247_a0 {
ha->current_topology == ISP_CFG_N || \
!ha->current_topology)
+#define QLA_N2N_WAIT_TIME 5 /* 2 * ra_tov(n2n) + 1 */
+
#define PRLI_PHASE(_cls) \
((_cls == DSC_LS_PRLI_PEND) || (_cls == DSC_LS_PRLI_COMP))
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 1ec16d9f6d4a..9a64057c7d06 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -3905,7 +3905,8 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
if (fcport) {
fcport->plogi_nack_done_deadline = jiffies + HZ;
- fcport->dm_login_expire = jiffies + 2*HZ;
+ fcport->dm_login_expire = jiffies +
+ QLA_N2N_WAIT_TIME * HZ;
fcport->scan_state = QLA_FCPORT_FOUND;
fcport->n2n_flag = 1;
fcport->keep_nport_handle = 1;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 2cfcc309dec8..2436fc2082ba 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -5066,8 +5066,11 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
memcpy(fcport->port_name, e->u.new_sess.port_name,
WWN_SIZE);
- if (e->u.new_sess.fc4_type & FS_FCP_IS_N2N)
+ if (e->u.new_sess.fc4_type & FS_FCP_IS_N2N) {
+ fcport->dm_login_expire = jiffies +
+ QLA_N2N_WAIT_TIME * HZ;
fcport->n2n_flag = 1;
+ }
} else {
ql_dbg(ql_dbg_disc, vha, 0xffff,
--
2.18.1
More information about the kernel-team
mailing list