From: Laurence Oberman Date: Tue, 19 Nov 2019 15:46:34 +0000 (-0500) Subject: scsi: bnx2fc: timeout calculation invalid for bnx2fc_eh_abort() X-Git-Tag: v5.10.7~3666^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65309ef6b258f5a7b57c1033a82ba2aba5c434cc;p=platform%2Fkernel%2Flinux-rpi.git 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/1574178394-16635-1-git-send-email-loberman@redhat.com Reported-by: David Jeffery Reviewed-by: John Pittman Reviewed-by: Chad Dupuis Signed-off-by: Laurence Oberman Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 401743e..4c8122a 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");