Commit feff8b3d authored by James Smart's avatar James Smart Committed by Martin K. Petersen
Browse files

scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices

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.

Link: https://lore.kernel.org/r/20191018211832.7917-5-jsmart2021@gmail.com


Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 27f3efd6
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -542,8 +542,10 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
	 * single discovery thread, this will cause a huge delay in
	 * single discovery thread, this will cause a huge delay in
	 * discovery. Also this will cause multiple state machines
	 * discovery. Also this will cause multiple state machines
	 * running in parallel for this node.
	 * 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 */
		/* software abort outstanding PLOGI */
		lpfc_els_abort(phba, ndlp);
		lpfc_els_abort(phba, ndlp);
	}
	}