Skip to content

Commit 9609385

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Allow DEVICE_RECOVERY mode after RSCN receipt if in PRLI_ISSUE state
Certain vendor specific targets initially register with the fabric as an initiator function first and then re-register as a target function afterwards. The timing of the target function re-registration can cause a race condition such that the driver is stuck assuming the remote port as an initiator function and never discovers the target's hosted LUNs. Expand the nlp_state qualifier to also include NLP_STE_PRLI_ISSUE because the state means that PRLI was issued but we have not quite reached MAPPED_NODE state yet. If we received an RSCN in the PRLI_ISSUE state, then we should restart discovery again by going into DEVICE_RECOVERY. Fixes: dded1dc ("scsi: lpfc: Modify when a node should be put in device recovery mode during RSCN") Cc: <[email protected]> # v6.6+ Signed-off-by: Justin Tee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e999ef1 commit 9609385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/lpfc/lpfc_hbadisc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5725,7 +5725,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
57255725
return ndlp;
57265726

57275727
if (ndlp->nlp_state > NLP_STE_UNUSED_NODE &&
5728-
ndlp->nlp_state < NLP_STE_PRLI_ISSUE) {
5728+
ndlp->nlp_state <= NLP_STE_PRLI_ISSUE) {
57295729
lpfc_disc_state_machine(vport, ndlp, NULL,
57305730
NLP_EVT_DEVICE_RECOVERY);
57315731
}

0 commit comments

Comments
 (0)