scsi: lpfc: Remove NLP_RCV_PLOGI early return during RSCN processing for ndlps
authorJustin Tee <justin.tee@broadcom.com>
Wed, 31 Jan 2024 18:51:01 +0000 (10:51 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 6 Feb 2024 01:51:35 +0000 (20:51 -0500)
Upon first RSCN receipt of a target server's remote port that is initially
acting as an initiator function, the driver marks the ndlp->nlp_type as an
initiator role.  Then later, when processing an RSCN for a target function
role switch, that ndlp remote port is permanently stuck as an initiator
role and can never transition to be discovered as an updated target role
function.

Remove the NLP_RCV_PLOGI early return if statement clause so that the
NLP_NPR_2B_DISC flag gets set.  This allows for role change detections.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20240131185112.149731-7-justintee8345@gmail.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c

index f80bbc3..35ea674 100644 (file)
@@ -5774,14 +5774,6 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
                        if (vport->phba->nvmet_support)
                                return ndlp;
 
-                       /* If we've already received a PLOGI from this NPort
-                        * we don't need to try to discover it again.
-                        */
-                       if (ndlp->nlp_flag & NLP_RCV_PLOGI &&
-                           !(ndlp->nlp_type &
-                            (NLP_FCP_TARGET | NLP_NVME_TARGET)))
-                               return NULL;
-
                        if (ndlp->nlp_state > NLP_STE_UNUSED_NODE &&
                            ndlp->nlp_state < NLP_STE_PRLI_ISSUE) {
                                lpfc_disc_state_machine(vport, ndlp, NULL,