diff options
author | Javed Hasan <jhasan@marvell.com> | 2020-03-26 23:02:07 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-03-29 18:10:59 -0400 |
commit | 45e544bfdab2014d11c7595b8ccc3c4715a09015 (patch) | |
tree | 32452e98989fd496ae5621531fa3c972a8f046e9 | |
parent | 955225db1bd2872d2421e30705244c756a3b7469 (diff) | |
download | lwn-45e544bfdab2014d11c7595b8ccc3c4715a09015.tar.gz lwn-45e544bfdab2014d11c7595b8ccc3c4715a09015.zip |
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/20200327060208.17104-2-skashyap@marvell.com
Signed-off-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index da6e97d8dc3b..6bb8917b99a1 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -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); } |