Skip to content

Commit 3a91090

Browse files
yizouJames Bottomley
authored andcommitted
[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: Yi Zou <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent ea3e2e7 commit 3a91090

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/scsi/libfc/fc_fcp.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
13991399
struct fc_frame *fp;
14001400
struct fc_rport *rport;
14011401
struct fc_rport_libfc_priv *rpriv;
1402-
unsigned int rec_tov;
14031402

14041403
lport = fsp->lp;
14051404
rport = fsp->rport;
@@ -1411,8 +1410,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
14111410
return;
14121411
}
14131412

1414-
rec_tov = get_fsp_rec_tov(fsp);
1415-
14161413
fp = fc_fcp_frame_alloc(lport, sizeof(struct fc_els_rec));
14171414
if (!fp)
14181415
goto retry;
@@ -1423,13 +1420,13 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
14231420
FC_FCTL_REQ, 0);
14241421
if (lport->tt.elsct_send(lport, rport->port_id, fp, ELS_REC,
14251422
fc_fcp_rec_resp, fsp,
1426-
jiffies_to_msecs(rec_tov))) {
1423+
2 * lport->r_a_tov)) {
14271424
fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */
14281425
return;
14291426
}
14301427
retry:
14311428
if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY)
1432-
fc_fcp_timer_set(fsp, rec_tov);
1429+
fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp));
14331430
else
14341431
fc_fcp_recovery(fsp, FC_TIMED_OUT);
14351432
}

0 commit comments

Comments
 (0)