Skip to content

Commit 65309ef

Browse files
lobermanmartinkpetersen
authored andcommitted
scsi: bnx2fc: timeout calculation invalid for bnx2fc_eh_abort()
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. Link: https://lore.kernel.org/r/[email protected] Reported-by: David Jeffery <[email protected]> Reviewed-by: John Pittman <[email protected]> Reviewed-by: Chad Dupuis <[email protected]> Signed-off-by: Laurence Oberman <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent c941e0d commit 65309ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/bnx2fc/bnx2fc_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
12421242

12431243
/* Wait 2 * RA_TOV + 1 to be sure timeout function hasn't fired */
12441244
time_left = wait_for_completion_timeout(&io_req->abts_done,
1245-
(2 * rp->r_a_tov + 1) * HZ);
1245+
msecs_to_jiffies(2 * rp->r_a_tov + 1));
12461246
if (time_left)
12471247
BNX2FC_IO_DBG(io_req,
12481248
"Timed out in eh_abort waiting for abts_done");

0 commit comments

Comments
 (0)