]> Git Repo - J-linux.git/commitdiff
scsi: lpfc: Fix LUN loss after cable pull
authorDick Kennedy <[email protected]>
Mon, 3 Aug 2020 21:02:28 +0000 (14:02 -0700)
committerMartin K. Petersen <[email protected]>
Wed, 5 Aug 2020 00:56:57 +0000 (20:56 -0400)
On devices that support FCP sequence error recovery, which attempts to
preserve the devices login across link bounce, adisc is used for device
validation. Turns out the device fc4 type is cleared as part of the link
bounce, but the ADISC handling doesn't restore the FC4 support as it
normally would with a PRLI. This caused situations where the device wasn't
reregistered with the transport thus scan logic and LUN discovery never
kicked in.

In the ADISC completion handling, reset the fc4 type so that transport port
reregistration occurs with the remote port.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/lpfc/lpfc_nportdisc.c

index e4c710fe02451f317d13d08218ba04c908f150b0..cad53d19cb25f15aeef94add85620e5a153a62b9 100644 (file)
@@ -1745,7 +1745,13 @@ lpfc_cmpl_adisc_adisc_issue(struct lpfc_vport *vport,
                }
        }
 
-       if (ndlp->nlp_type & NLP_FCP_TARGET) {
+       if (ndlp->nlp_type & NLP_FCP_TARGET)
+               ndlp->nlp_fc4_type |= NLP_FC4_FCP;
+
+       if (ndlp->nlp_type & NLP_NVME_TARGET)
+               ndlp->nlp_fc4_type |= NLP_FC4_NVME;
+
+       if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET)) {
                ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE;
                lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE);
        } else {
This page took 0.053788 seconds and 4 git commands to generate.