Commit 3a91090f authored by Yi Zou's avatar Yi Zou Committed by James Bottomley

[SCSI] libfc: the timeout for the REC itself is 2 * R_A_TOV_els

The timeout for the exchange carrying REC itself is 2 * R_A_TOV_els.
Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent ea3e2e72
...@@ -1399,7 +1399,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp) ...@@ -1399,7 +1399,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
struct fc_frame *fp; struct fc_frame *fp;
struct fc_rport *rport; struct fc_rport *rport;
struct fc_rport_libfc_priv *rpriv; struct fc_rport_libfc_priv *rpriv;
unsigned int rec_tov;
lport = fsp->lp; lport = fsp->lp;
rport = fsp->rport; rport = fsp->rport;
...@@ -1411,8 +1410,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp) ...@@ -1411,8 +1410,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
return; return;
} }
rec_tov = get_fsp_rec_tov(fsp);
fp = fc_fcp_frame_alloc(lport, sizeof(struct fc_els_rec)); fp = fc_fcp_frame_alloc(lport, sizeof(struct fc_els_rec));
if (!fp) if (!fp)
goto retry; goto retry;
...@@ -1423,13 +1420,13 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp) ...@@ -1423,13 +1420,13 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
FC_FCTL_REQ, 0); FC_FCTL_REQ, 0);
if (lport->tt.elsct_send(lport, rport->port_id, fp, ELS_REC, if (lport->tt.elsct_send(lport, rport->port_id, fp, ELS_REC,
fc_fcp_rec_resp, fsp, fc_fcp_rec_resp, fsp,
jiffies_to_msecs(rec_tov))) { 2 * lport->r_a_tov)) {
fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */ fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */
return; return;
} }
retry: retry:
if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY) if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY)
fc_fcp_timer_set(fsp, rec_tov); fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp));
else else
fc_fcp_recovery(fsp, FC_TIMED_OUT); fc_fcp_recovery(fsp, FC_TIMED_OUT);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment