scsi: lpfc: Clear NLP_IN_DEV_LOSS flag if already in rediscovery
authorJustin Tee <justin.tee@broadcom.com>
Tue, 23 May 2023 18:31:59 +0000 (11:31 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 31 May 2023 22:14:20 +0000 (18:14 -0400)
commitfd57a687d44118c0a3859f61a110f6e12804dd16
tree05e595cd5f8bfc398b71563e31a6a7a501e1ff67
parenta4157aaf0fb458c867b76f6cd63cb57fa91da318
scsi: lpfc: Clear NLP_IN_DEV_LOSS flag if already in rediscovery

In dev_loss_tmo callback routine, we early return if the ndlp is in a state
of rediscovery.  This occurs when a target proactively PLOGIs or PRLIs
after an RSCN before the dev_loss_tmo callback routine is scheduled to run.
Move clear of the NLP_IN_DEV_LOSS flag before the ndlp state check in such
cases.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230523183206.7728-3-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c