linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion.
@ 2020-03-27  6:02 Saurav Kashyap
  2020-03-27  6:02 ` [PATCH 1/2] libfc: If PRLI rejected, move rport to PLOGI state Saurav Kashyap
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Saurav Kashyap @ 2020-03-27  6:02 UTC (permalink / raw)
  To: martin.petersen; +Cc: GR-QLogic-Storage-Upstream, linux-scsi, jhasan

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(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] libfc: If PRLI rejected, move rport to PLOGI state.
  2020-03-27  6:02 [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion Saurav Kashyap
@ 2020-03-27  6:02 ` Saurav Kashyap
  2020-03-27  6:02 ` [PATCH 2/2] libfc: rport state move to PLOGI if all PRLI retry exhausted Saurav Kashyap
  2020-03-27 20:51 ` [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Saurav Kashyap @ 2020-03-27  6:02 UTC (permalink / raw)
  To: martin.petersen; +Cc: GR-QLogic-Storage-Upstream, linux-scsi, jhasan

From: Javed Hasan <jhasan@marvell.com>

-If PRLI reject code indicates "rejected status",
   move rport state machine back to PLOGI state.

Signed-off-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
---
 drivers/scsi/libfc/fc_rport.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index da6e97d..6bb8917 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);
 	}
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] libfc: rport state move to PLOGI if all PRLI retry exhausted.
  2020-03-27  6:02 [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion Saurav Kashyap
  2020-03-27  6:02 ` [PATCH 1/2] libfc: If PRLI rejected, move rport to PLOGI state Saurav Kashyap
@ 2020-03-27  6:02 ` Saurav Kashyap
  2020-03-27 20:51 ` [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Saurav Kashyap @ 2020-03-27  6:02 UTC (permalink / raw)
  To: martin.petersen; +Cc: GR-QLogic-Storage-Upstream, linux-scsi, jhasan

From: Javed Hasan <jhasan@marvell.com>

-After all PRLI retries are exhausted, move rport state machine
   back to PLOGI state.

Signed-off-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.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 6bb8917..773c45a 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;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion.
  2020-03-27  6:02 [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion Saurav Kashyap
  2020-03-27  6:02 ` [PATCH 1/2] libfc: If PRLI rejected, move rport to PLOGI state Saurav Kashyap
  2020-03-27  6:02 ` [PATCH 2/2] libfc: rport state move to PLOGI if all PRLI retry exhausted Saurav Kashyap
@ 2020-03-27 20:51 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2020-03-27 20:51 UTC (permalink / raw)
  To: Saurav Kashyap
  Cc: martin.petersen, GR-QLogic-Storage-Upstream, linux-scsi, jhasan


Saurav,

> Kindly apply this series to scsi tree at your earliest convenience.

Applied to 5.7/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-27 20:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27  6:02 [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion Saurav Kashyap
2020-03-27  6:02 ` [PATCH 1/2] libfc: If PRLI rejected, move rport to PLOGI state Saurav Kashyap
2020-03-27  6:02 ` [PATCH 2/2] libfc: rport state move to PLOGI if all PRLI retry exhausted Saurav Kashyap
2020-03-27 20:51 ` [PATCH 0/2] libfc: Move to PLOGI state on RJT and retry exhaustion Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).