scsi: lpfc: Clear fabric topology flag before initiating a new FLOGI

Previous topologies may no longer be in fabric mode, so clear FC_FABRIC in
fc_flag for every new FLOGI.

Link: https://lore.kernel.org/r/20220412222008.126521-8-jsmart2021@gmail.com
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
James Smart 2022-04-12 15:19:49 -07:00 committed by Martin K. Petersen
parent 03cbbd7c2f
commit 3483a44bdf

View File

@ -1531,6 +1531,8 @@ lpfc_initial_flogi(struct lpfc_vport *vport)
lpfc_enqueue_node(vport, ndlp);
}
/* Reset the Fabric flag, topology change may have happened */
vport->fc_flag &= ~FC_FABRIC;
if (lpfc_issue_els_flogi(vport, ndlp, 0)) {
/* This decrement of reference count to node shall kick off
* the release of the node.