aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Smart <[email protected]>2022-04-12 15:19:53 -0700
committerMartin K. Petersen <[email protected]>2022-04-18 22:48:45 -0400
commit76395c88d0afb82c9bec87e99e282c4ff11ea5f4 (patch)
tree37836d3812908c7049167233746449dac8bf4b56
parent31e887864eb2c0cce3d0c448a7b1ef9792e850b7 (diff)
scsi: lpfc: Transition to NPR state upon LOGO cmpl if link down or aborted
In P2P topology, a target controller reboot sometimes results in not reestablishing a login because the ndlp is stuck in LOGO state. Fix by transitioning to NPR state if we get link down before LOGO completes. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 8155c63d793c..50ecf9bfbf65 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -3007,7 +3007,10 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
ndlp->nlp_DID, ulp_status,
ulp_word4);
+ /* Call NLP_EVT_DEVICE_RM if link is down or LOGO is aborted */
if (lpfc_error_lost_link(ulp_status, ulp_word4)) {
+ lpfc_disc_state_machine(vport, ndlp, cmdiocb,
+ NLP_EVT_DEVICE_RM);
skip_recovery = 1;
goto out;
}