scsi: lpfc: Rework FDMI initialization after link up
authorJames Smart <jsmart2021@gmail.com>
Fri, 6 May 2022 03:55:16 +0000 (20:55 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 May 2022 02:12:04 +0000 (22:12 -0400)
commitde3ec318fee32313092b609f88475f86e58f3fe5
treeec9648e157e73392670f24f0164f30f4645fdd70
parent5099478e436f0acd8c76495590c105668f2d8afc
scsi: lpfc: Rework FDMI initialization after link up

After a link up, it's possible for the switch to change FDMI support (e.g.
FDMI1 vs FDMI2 vs SmartSAN).  If the switch reverts to FDMI1, then the
revert is currently not detected.

Additionally, when NPIV is configured, it's possible the physical port's
RHBA is unprocessed by the switch before reciept of an NPIV port issued
RPRT.  This causes some switches vendors to reject the NPIV's RPRT.

Fix by reinitializing base FDMI mode on link up, and defer FDMI vport RPRT
submission until after confirming physical port's RHBA is completed.

Link: https://lore.kernel.org/r/20220506035519.50908-10-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.h
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_ct.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_init.c