]> Git Repo - linux.git/commitdiff
scsi: bnx2fc: timeout calculation invalid for bnx2fc_eh_abort()
authorLaurence Oberman <[email protected]>
Tue, 19 Nov 2019 15:46:34 +0000 (10:46 -0500)
committerMartin K. Petersen <[email protected]>
Wed, 20 Nov 2019 03:31:18 +0000 (22:31 -0500)
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]>
drivers/scsi/bnx2fc/bnx2fc_io.c

index 401743e2b4294b2c6467f5a164449d454d3393da..4c8122a82322fa1cfd41f5cf8865156d7d413c69 100644 (file)
@@ -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");
This page took 0.063536 seconds and 4 git commands to generate.