Skip to content

Commit 0956ba6

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Fix non-recovery of remote ports following an unsolicited LOGO
A commit introduced formal regstration of all Fabric nodes to the SCSI transport as well as REG/UNREG RPI mailbox requests. The commit introduced the NLP_RELEASE_RPI flag for rports set in the lpfc_cmpl_els_logo_acc() routine to help clean up the RPIs. This new code caused the driver to release the RPI value used for the remote port and marked the RPI invalid. When the driver later attempted to re-login, it would use the invalid RPI and the adapter rejected the PLOGI request. As no login occurred, the devloss timer on the rport expired and connectivity was lost. This patch corrects the code by removing the snippet that requests the rpi to be unregistered. This change only occurs on a node that is already marked to be rediscovered. This puts the code back to its original behavior, preserving the already-assigned rpi value (registered or not) which can be used on the re-login attempts. Link: https://lore.kernel.org/r/[email protected] Fixes: fe83e3b ("scsi: lpfc: Fix node handling for Fabric Controller and Domain Controller") Cc: <[email protected]> # v5.14+ Co-developed-by: Paul Ely <[email protected]> Signed-off-by: Paul Ely <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 2d62253 commit 0956ba6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5095,14 +5095,9 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
50955095
/* NPort Recovery mode or node is just allocated */
50965096
if (!lpfc_nlp_not_used(ndlp)) {
50975097
/* A LOGO is completing and the node is in NPR state.
5098-
* If this a fabric node that cleared its transport
5099-
* registration, release the rpi.
5098+
* Just unregister the RPI because the node is still
5099+
* required.
51005100
*/
5101-
spin_lock_irq(&ndlp->lock);
5102-
ndlp->nlp_flag &= ~NLP_NPR_2B_DISC;
5103-
if (phba->sli_rev == LPFC_SLI_REV4)
5104-
ndlp->nlp_flag |= NLP_RELEASE_RPI;
5105-
spin_unlock_irq(&ndlp->lock);
51065101
lpfc_unreg_rpi(vport, ndlp);
51075102
} else {
51085103
/* Indicate the node has already released, should

0 commit comments

Comments
 (0)