[Open-FCoE] [PATCH 3/3] libfc: retry timer if rec is rejected

michaelc at cs.wisc.edu michaelc at cs.wisc.edu
Wed Sep 17 21:36:40 UTC 2008

From: Mike Christie <michaelc at cs.wisc.edu>

If we thought RECs were supported, we sent one and and it turns out
the target did not support it, we were failing the fsp right away.
But we might have been making progress on the fsp, so this patch
has us reset the fsp timer to the scsi timeout and then recheck
the progress in scsi timeout seconds.

Signed-off-by: Mike Christie <michaelc at cs.wisc.edu>
 drivers/scsi/libfc/fc_fcp.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 20ef99b..7a6582f 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1430,9 +1430,14 @@ static void fc_fcp_rec_resp(struct fc_seq *sp, struct fc_frame *fp, void *arg)
 			if (fc_fcp_debug)
 				FC_DBG("device does not support REC\n");
 			rp = fsp->rport->dd_data;
+			/*
+			 * if we do not spport RECs or got some bogus
+			 * reason then resetup timer so we check for
+			 * making progress.
+			 */
 			rp->flags &= ~FC_RP_FLAGS_REC_SUPPORTED;
-			/* fall through */
+			fc_fcp_timer_set(fsp, FC_SCSI_ER_TIMEOUT);
+			break;
 		case ELS_RJT_LOGIC:
 		case ELS_RJT_UNAB:

More information about the devel mailing list