[PATCH] bnx2fc: timeout calculation invalid for bnx2fc_eh_abort()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In the bnx2fc_eh_abort() function there is a calculation for
wait_for_completion that uses a HZ multiplier.
This is incorrect, it scales the timeout by 1000 seconds
instead of converting the ms value to jiffies.
Therefore change the calculation.

Reported-by: David Jeffery <djeffery@xxxxxxxxxx>
Reviewed-by: John Pittman .jpittman@xxxxxxxxxx>
Signed-off-by: Laurence Oberman <loberman@xxxxxxxxxx>
---
 drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 401743e..d8ae6d0 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1242,7 +1242,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
 
 	/* Wait 2 * RA_TOV + 1 to be sure timeout function hasn't fired */
 	time_left = wait_for_completion_timeout(&io_req->abts_done,
-						(2 * rp->r_a_tov + 1) * HZ);
+					msecs_to_jiffies(2 * rp->r_a_tov + 1));
 	if (time_left)
 		BNX2FC_IO_DBG(io_req,
 			      "Timed out in eh_abort waiting for abts_done");
-- 
1.8.3.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux