scsi: lpfc: Skip reg_vpi when link is down for SLI3 in ADISC cmpl path
authorJames Smart <jsmart2021@gmail.com>
Wed, 7 Jul 2021 18:43:48 +0000 (11:43 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 19 Jul 2021 02:30:37 +0000 (22:30 -0400)
commit02607fbaf00d9aac8fe97b1d9643f09ebdb47922
tree004ea60b4d8e9d8831d1848c9958fdeb5d850361
parentc65436b21c3abbdaacd9c9f68bf2fa94e103168d
scsi: lpfc: Skip reg_vpi when link is down for SLI3 in ADISC cmpl path

During RSCN storms, some instances of LIP on SLI-3 adapters lead to a
situation where FLOGIs keep failing with firmware indicating an illegal
command error code.  This situation was preceded by an ADISC completion
that was processed while the link was down. This path on SLI-3 performs a
CLEAR_LA and attempts to activate a VPI with REG_VPI.  Later, as the FLOGI
completes, it's no longer in sync with the VPI state.  In SLI-3 it is
illegal to have an active VPI during FLOGI.

Resolve by circumventing the SLI-3 path that performs the CLEAR_LA and
REG_VPI. The path will be taken after the FLOGI after the next Link Up.

Link: https://lore.kernel.org/r/20210707184351.67872-18-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>
drivers/scsi/lpfc/lpfc_els.c