From bf6504c1e44138fb909fa1f5fc495be3c45f52e5 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Mon, 8 Aug 2022 18:46:06 +0300 Subject: [PATCH] qla2x00t-32gbit: edif: Fix n2n discovery issue with secure target User failed to see disk via n2n topology. Driver used up all login retries before authentication application started. When authentication application started, driver did not have enough login retries to connect securely. On app_start, driver will reset the login retry attempt count. Link: https://lore.kernel.org/r/20220607044627.19563-10-njavali@marvell.com Fixes: 4de067e5df12 ("scsi: qla2xxx: edif: Add N2N support for EDIF") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen [ commit 789d54a41786 upstream ] --- qla2x00t-32gbit/qla_edif.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qla2x00t-32gbit/qla_edif.c b/qla2x00t-32gbit/qla_edif.c index 2d7feec0a..c1bfb030d 100644 --- a/qla2x00t-32gbit/qla_edif.c +++ b/qla2x00t-32gbit/qla_edif.c @@ -515,6 +515,9 @@ qla_edif_app_start(scsi_qla_host_t *vha, BSG_JOB_TYPE *bsg_job) } if (N2N_TOPO(vha->hw)) { + list_for_each_entry_safe(fcport, tf, &vha->vp_fcports, list) + fcport->n2n_link_reset_cnt = 0; + if (vha->hw->flags.n2n_fw_acc_sec) set_bit(N2N_LINK_RESET, &vha->dpc_flags); else