aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2010-11-30 19:19:30 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:27 -0500
commit3a91090fe0df10091c5612db8528ee7a822ab83d (patch)
tree7c9f8a57f2ca9a398faa9319f22e3401c9aa4b0c /drivers/scsi/libfc
parentea3e2e72eeb3e8a9440a5da965914f9b12088626 (diff)
[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 <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 47c930a01454..338620b33fa1 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1399,7 +1399,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
1399 struct fc_frame *fp; 1399 struct fc_frame *fp;
1400 struct fc_rport *rport; 1400 struct fc_rport *rport;
1401 struct fc_rport_libfc_priv *rpriv; 1401 struct fc_rport_libfc_priv *rpriv;
1402 unsigned int rec_tov;
1403 1402
1404 lport = fsp->lp; 1403 lport = fsp->lp;
1405 rport = fsp->rport; 1404 rport = fsp->rport;
@@ -1411,8 +1410,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
1411 return; 1410 return;
1412 } 1411 }
1413 1412
1414 rec_tov = get_fsp_rec_tov(fsp);
1415
1416 fp = fc_fcp_frame_alloc(lport, sizeof(struct fc_els_rec)); 1413 fp = fc_fcp_frame_alloc(lport, sizeof(struct fc_els_rec));
1417 if (!fp) 1414 if (!fp)
1418 goto retry; 1415 goto retry;
@@ -1423,13 +1420,13 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
1423 FC_FCTL_REQ, 0); 1420 FC_FCTL_REQ, 0);
1424 if (lport->tt.elsct_send(lport, rport->port_id, fp, ELS_REC, 1421 if (lport->tt.elsct_send(lport, rport->port_id, fp, ELS_REC,
1425 fc_fcp_rec_resp, fsp, 1422 fc_fcp_rec_resp, fsp,
1426 jiffies_to_msecs(rec_tov))) { 1423 2 * lport->r_a_tov)) {
1427 fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */ 1424 fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */
1428 return; 1425 return;
1429 } 1426 }
1430retry: 1427retry:
1431 if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY) 1428 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));
1433 else 1430 else
1434 fc_fcp_recovery(fsp, FC_TIMED_OUT); 1431 fc_fcp_recovery(fsp, FC_TIMED_OUT);
1435} 1432}