From: Javed Hasan <jhasan@marvell.com>
Date: Thu, 26 Mar 2020 23:02:08 -0700
Subject: scsi: libfc: rport state move to PLOGI if all PRLI retry exhausted
Git-commit: c6e085c8813300cae73553bc276dbff015c1b0de
Patch-mainline: v5.9-rc4
References: bsc#1175528
After all PRLI retries are exhausted, move rport state machine back to
PLOGI state.
Link: https://lore.kernel.org/r/20200327060208.17104-3-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>
Acked-by: Lee Duncan <lduncan@suse.com>
---
drivers/scsi/libfc/fc_rport.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 6bb8917b99a1..773c45af9387 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -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;