From: James Smart <jsmart2021@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: James Smart <jsmart2021@gmail.com>, Justin Tee <justin.tee@broadcom.com>
Subject: [PATCH 08/12] lpfc: Revert RSCN_MEMENTO workaround for misbehaved configuration
Date: Fri, 1 Jul 2022 14:14:21 -0700 [thread overview]
Message-ID: <20220701211425.2708-9-jsmart2021@gmail.com> (raw)
In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com>
The RSCN_MEMENTO logic was to workaround a target that does not
register both FCP and NVME FC4 types at the same time. This caused
the configuration to not produce a second RSCN for the NVME FC4 type
registration in a timely manner. The intention of the RSCN_MEMENTO
flag was to always signal to try NVME PRLI.
However, there are other FCP-only target arrays in correctly behaved
configurations that reject the NVME PRLI followed by a LOGO leading
to never rediscovering the target after an issue_lip (as LOGO causes
a repeat of PLOGI/PRLIs).
Revert the RSCN_MEMENTO patch as it is causing correctly behaved
configs to fail while it exists only to succeed on a misbehaved
config.
Fixes: 1045592fc968 ("scsi: lpfc: Introduce FC_RSCN_MEMENTO flag for tracking post RSCN completion")
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
drivers/scsi/lpfc/lpfc.h | 1 -
drivers/scsi/lpfc/lpfc_els.c | 8 ++------
drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +--
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index da9070cdad91..212f9b962187 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -604,7 +604,6 @@ struct lpfc_vport {
#define FC_VFI_REGISTERED 0x800000 /* VFI is registered */
#define FC_FDISC_COMPLETED 0x1000000/* FDISC completed */
#define FC_DISC_DELAYED 0x2000000/* Delay NPort discovery */
-#define FC_RSCN_MEMENTO 0x4000000/* RSCN cmd processed */
uint32_t ct_flags;
#define FC_CT_RFF_ID 0x1 /* RFF_ID accepted by switch */
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 31fb2ee07bfa..9371829e11b2 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -1887,7 +1887,6 @@ lpfc_end_rscn(struct lpfc_vport *vport)
else {
spin_lock_irq(shost->host_lock);
vport->fc_flag &= ~FC_RSCN_MODE;
- vport->fc_flag |= FC_RSCN_MEMENTO;
spin_unlock_irq(shost->host_lock);
}
}
@@ -2435,14 +2434,13 @@ lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
u32 local_nlp_type, elscmd;
/*
- * If discovery was kicked off from RSCN mode,
- * the FC4 types supported from a
+ * If we are in RSCN mode, the FC4 types supported from a
* previous GFT_ID command may not be accurate. So, if we
* are a NVME Initiator, always look for the possibility of
* the remote NPort beng a NVME Target.
*/
if (phba->sli_rev == LPFC_SLI_REV4 &&
- vport->fc_flag & (FC_RSCN_MODE | FC_RSCN_MEMENTO) &&
+ vport->fc_flag & FC_RSCN_MODE &&
vport->nvmei_support)
ndlp->nlp_fc4_type |= NLP_FC4_NVME;
local_nlp_type = ndlp->nlp_fc4_type;
@@ -7916,7 +7914,6 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
if ((rscn_cnt < FC_MAX_HOLD_RSCN) &&
!(vport->fc_flag & FC_RSCN_DISCOVERY)) {
vport->fc_flag |= FC_RSCN_MODE;
- vport->fc_flag &= ~FC_RSCN_MEMENTO;
spin_unlock_irq(shost->host_lock);
if (rscn_cnt) {
cmd = vport->fc_rscn_id_list[rscn_cnt-1]->virt;
@@ -7966,7 +7963,6 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
spin_lock_irq(shost->host_lock);
vport->fc_flag |= FC_RSCN_MODE;
- vport->fc_flag &= ~FC_RSCN_MEMENTO;
spin_unlock_irq(shost->host_lock);
vport->fc_rscn_id_list[vport->fc_rscn_id_cnt++] = pcmd;
/* Indicate we are done walking fc_rscn_id_list on this vport */
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index fb36f26170e4..5cd838eac455 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -1354,8 +1354,7 @@ lpfc_linkup_port(struct lpfc_vport *vport)
spin_lock_irq(shost->host_lock);
vport->fc_flag &= ~(FC_PT2PT | FC_PT2PT_PLOGI | FC_ABORT_DISCOVERY |
- FC_RSCN_MEMENTO | FC_RSCN_MODE |
- FC_NLP_MORE | FC_RSCN_DISCOVERY);
+ FC_RSCN_MODE | FC_NLP_MORE | FC_RSCN_DISCOVERY);
vport->fc_flag |= FC_NDISC_ACTIVE;
vport->fc_ns_retry = 0;
spin_unlock_irq(shost->host_lock);
--
2.26.2
next prev parent reply other threads:[~2022-07-01 21:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 21:14 [PATCH 00/12] lpfc: Update lpfc to revision 14.2.0.5 James Smart
2022-07-01 21:14 ` [PATCH 01/12] lpfc: Fix uninitialized cqe field in lpfc_nvme_cancel_iocb James Smart
2022-07-01 21:14 ` [PATCH 02/12] lpfc: Prevent buffer overflow crashes in debugfs with malformed user input James Smart
2022-07-01 21:14 ` [PATCH 03/12] lpfc: Set PU field when providing D_ID in XMIT_ELS_RSP64_CX iocb James Smart
2022-07-01 21:14 ` [PATCH 04/12] lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID James Smart
2022-07-01 21:14 ` [PATCH 05/12] lpfc: Fix possible memory leak when failing to issue CMF WQE James Smart
2022-07-01 21:14 ` [PATCH 06/12] lpfc: Fix attempted FA-PWWN usage after feature disable James Smart
2022-07-01 21:14 ` [PATCH 07/12] lpfc: Fix lost NVME paths during LIF bounce stress test James Smart
2022-07-01 21:14 ` James Smart [this message]
2022-07-01 21:14 ` [PATCH 09/12] lpfc: Refactor lpfc_nvmet_prep_abort_wqe into lpfc_sli_prep_abort_xri James Smart
2022-07-01 21:14 ` [PATCH 10/12] lpfc: Remove Menlo/Hornet related code James Smart
2022-07-01 21:14 ` [PATCH 11/12] lpfc: Update lpfc version to 14.2.0.5 James Smart
2022-07-01 21:14 ` [PATCH 12/12] lpfc: Copyright updates for 14.2.0.5 patches James Smart
2022-07-07 21:17 ` [PATCH 00/12] lpfc: Update lpfc to revision 14.2.0.5 Martin K. Petersen
2022-07-14 4:22 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220701211425.2708-9-jsmart2021@gmail.com \
--to=jsmart2021@gmail.com \
--cc=justin.tee@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox