blob: 200a67631beebf0dca48a8826e3e341053517ede [file] [log] [blame]
From 60195f186f16b9c2ea3a8d76d866367e41d248d2 Mon Sep 17 00:00:00 2001
From: James Smart <>
Date: Fri, 18 Oct 2019 14:18:20 -0700
Subject: [PATCH] scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices
commit feff8b3d84d3d9570f893b4d83e5eab6693d6a52 upstream.
When operating in private loop mode, PLOGI exchanges are racing and the
driver tries to abort it's PLOGI. But the PLOGI abort ends up terminating
the login with the other end causing the other end to abort its PLOGI as
well. Discovery never fully completes.
Fix by disabling the PLOGI abort when private loop and letting the state
machine play out.
Signed-off-by: Dick Kennedy <>
Signed-off-by: James Smart <>
Signed-off-by: Martin K. Petersen <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 41309ac65693..b3d968303145 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -484,8 +484,10 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
* single discovery thread, this will cause a huge delay in
* discovery. Also this will cause multiple state machines
* running in parallel for this node.
+ * This only applies to a fabric environment.
- if (ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) {
+ if ((ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) &&
+ (vport->fc_flag & FC_FABRIC)) {
/* software abort outstanding PLOGI */
lpfc_els_abort(phba, ndlp);