]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix non-recovery of remote ports following an unsolicited LOGO
authorJames Smart <jsmart2021@gmail.com>
Tue, 23 Nov 2021 16:56:46 +0000 (08:56 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Nov 2021 02:57:13 +0000 (21:57 -0500)
commit443a1c40e6c3c66fa940767d0db29e12dd76f7e4
treeccc460e6271bdccd83567c130260a90179c669c0
parentae3266e8b75cf3327ba1a5065b090df7b9742cfa
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/20211123165646.62740-1-jsmart2021@gmail.com
Fixes: 4471fb7ae319 ("scsi: lpfc: Fix node handling for Fabric Controller and Domain Controller")
Cc: <stable@vger.kernel.org> # v5.14+
Co-developed-by: Paul Ely <paul.ely@broadcom.com>
Signed-off-by: Paul Ely <paul.ely@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c