scsi: lpfc: Fix multiple NVMe remoteport registration calls for the same NPort ID
authorJames Smart <jsmart2021@gmail.com>
Sun, 11 Sep 2022 22:14:57 +0000 (15:14 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 16 Sep 2022 02:18:27 +0000 (22:18 -0400)
commit845363516bb75bc35089b4093d1fae139f2fffc6
treefd9b5f9c788abfcff56a58d5e9bd61c2411fdfd8
parent0630a1f7ea14452124392b883302713de31da3d0
scsi: lpfc: Fix multiple NVMe remoteport registration calls for the same NPort ID

When a target makes the mistake of registering a FC4 type with the fabric,
but then rejects a PRLI of that type, the lpfc driver incorrectly retries
the PRLI causing multiple registrations with the transport. The driver
needs to detect the reject reason data and stop any retry.

Rework the PRLI reject scenarios.

Link: https://lore.kernel.org/r/20220911221505.117655-6-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_disc.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hw.h