Skip to content

Commit 00081c5

Browse files
Dick Kennedymartinkpetersen
authored andcommitted
scsi: lpfc: Fix LUN loss after cable pull
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]>
1 parent feb3cc5 commit 00081c5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/scsi/lpfc/lpfc_nportdisc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,13 @@ lpfc_cmpl_adisc_adisc_issue(struct lpfc_vport *vport,
17451745
}
17461746
}
17471747

1748-
if (ndlp->nlp_type & NLP_FCP_TARGET) {
1748+
if (ndlp->nlp_type & NLP_FCP_TARGET)
1749+
ndlp->nlp_fc4_type |= NLP_FC4_FCP;
1750+
1751+
if (ndlp->nlp_type & NLP_NVME_TARGET)
1752+
ndlp->nlp_fc4_type |= NLP_FC4_NVME;
1753+
1754+
if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET)) {
17491755
ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE;
17501756
lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE);
17511757
} else {

0 commit comments

Comments
 (0)