libfc: Move to PLOGI state on RJT and retry exhaustion.
Subsystems (2)
cover libfc: Move to PLOGI state on RJT and retry exhaustion.
Hi Martin,
Kindly apply this series to scsi tree at your earliest convenience.
Thanks,
~Saurav
Javed Hasan (2):
libfc: If PRLI rejected, move rport to PLOGI state.
libfc: rport state move to PLOGI if all PRLI retry exhausted.
drivers/scsi/libfc/fc_rport.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1
PATCH 1/2 libfc: If PRLI rejected, move rport to PLOGI state.
From: Javed Hasan <[email protected]>
-If PRLI reject code indicates "rejected status",
move rport state machine back to PLOGI state.
--- drivers/scsi/libfc/fc_rport.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/scsi/libfc/fc_rport.c +7 -1
@@ -1208,9 +1208,15 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, rjt =fc_frame_payload_get (fp,sizeof (*rjt));if (!rjt)FC_RPORT_DBG (rdata,"PRLI bad response\n" ); -else +else {FC_RPORT_DBG (rdata,"PRLI ELS rejected, reason %x expl %x\n" , rjt->er_reason, rjt->er_explan); +if (rjt->er_reason ==ELS_RJT_UNAB && + rjt->er_explan ==ELS_EXPL_PLOGI_REQD ) { +fc_rport_enter_plogi (rdata); + goto out; + } + }fc_rport_error_retry (rdata,FC_EX_ELS_RJT ); }
Signature · 1 line
1.8.3.1
PATCH 2/2 libfc: rport state move to PLOGI if all PRLI retry exhausted.
In reply to Saurav KashyapFrom: Javed Hasan <[email protected]>
-After all PRLI retries are exhausted, move rport state machine
back to PLOGI state.
--- drivers/scsi/libfc/fc_rport.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/scsi/libfc/fc_rport.c +2 -0
@@ -632,6 +632,8 @@ static void fc_rport_error(struct fc_rport_priv *rdata, int err)fc_rport_enter_ready (rdata);break ;case RPORT_ST_PRLI : +fc_rport_enter_plogi (rdata); +break ;case RPORT_ST_ADISC :fc_rport_enter_logo (rdata);break ;
Signature · 1 line
1.8.3.1
Martin K. Petersen
AppliedSaurav,
Quoted 1 line
Kindly apply this series to scsi tree at your earliest convenience.
Applied to 5.7/scsi-queue, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering