Skip to content

Commit 45e544b

Browse files
javed-hmartinkpetersen
authored andcommitted
scsi: libfc: If PRLI rejected, move rport to PLOGI state
If PRLI reject code indicates "rejected status", move rport state machine back to PLOGI state. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 955225d commit 45e544b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/scsi/libfc/fc_rport.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,15 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
12081208
rjt = fc_frame_payload_get(fp, sizeof(*rjt));
12091209
if (!rjt)
12101210
FC_RPORT_DBG(rdata, "PRLI bad response\n");
1211-
else
1211+
else {
12121212
FC_RPORT_DBG(rdata, "PRLI ELS rejected, reason %x expl %x\n",
12131213
rjt->er_reason, rjt->er_explan);
1214+
if (rjt->er_reason == ELS_RJT_UNAB &&
1215+
rjt->er_explan == ELS_EXPL_PLOGI_REQD) {
1216+
fc_rport_enter_plogi(rdata);
1217+
goto out;
1218+
}
1219+
}
12141220
fc_rport_error_retry(rdata, FC_EX_ELS_RJT);
12151221
}
12161222

0 commit comments

Comments
 (0)