From: Yi Zou Date: Wed, 1 Dec 2010 00:19:30 +0000 (-0800) Subject: [SCSI] libfc: the timeout for the REC itself is 2 * R_A_TOV_els X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a91090fe0df10091c5612db8528ee7a822ab83d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Signed-off-by: Robert Love Signed-off-by: James Bottomley --- 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) struct fc_frame *fp; struct fc_rport *rport; struct fc_rport_libfc_priv *rpriv; - unsigned int rec_tov; lport = fsp->lp; rport = fsp->rport; @@ -1411,8 +1410,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp) return; } - rec_tov = get_fsp_rec_tov(fsp); - fp = fc_fcp_frame_alloc(lport, sizeof(struct fc_els_rec)); if (!fp) goto retry; @@ -1423,13 +1420,13 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp) FC_FCTL_REQ, 0); if (lport->tt.elsct_send(lport, rport->port_id, fp, ELS_REC, fc_fcp_rec_resp, fsp, - jiffies_to_msecs(rec_tov))) { + 2 * lport->r_a_tov)) { fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */ return; } 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 fc_fcp_recovery(fsp, FC_TIMED_OUT); }