scsi: lpfc: Fix unsolicited FLOGI receive handling during PT2PT discovery
authorJames Smart <jsmart2021@gmail.com>
Fri, 19 Aug 2022 01:17:30 +0000 (18:17 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 1 Sep 2022 03:39:58 +0000 (23:39 -0400)
commit439b93293ff202dae9661937a73af03374ec0ed0
tree502909b7af84168dd102701dc56f59b6ce2b1256
parentf0ee639adb78753377da3d125d7d72531026bca1
scsi: lpfc: Fix unsolicited FLOGI receive handling during PT2PT discovery

During a stress offline/online test in PT2PT topology, target rediscovery
can fail with a specific target vendor array.

When the HBA transitions to online mode it is possible to receive an
unsolicited FLOGI before processing the Link Up event. The received FLOGI
will set the defer_flogi_acc_flag, which instructs the driver to wait until
it transmits its own FLOGI before ACKing the received FLOGI.  In this
failure scenario, the link up processing clears the set
defer_flogi_acc_flag before we have sent out the FLOGI.  As the target has
the higher WWPN and is responsible for sending the PLOGI, the target is
stuck waiting for its FLOGI_ACC that the driver will never send.

Remove the clear of defer_flogi_acc_flag from Link Up event processing.  In
this stress test case, the defer_flogi_acc_flag is cleared during the Link
Down event processing anyways.

Link: https://lore.kernel.org/r/20220819011736.14141-2-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_hbadisc.c