summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Chan <michael.chan@broadcom.com>2019-02-20 19:07:31 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-23 20:09:52 +0100
commitb4baeab7e084af2cf55c9c1ec97214fa9c2afcf4 (patch)
tree744c7c88a0cc97050540a26dcf571a9ec087aea9
parenta40fa9498707b49c78b84481390eb40831a3ab1b (diff)
downloadlinux-stable-b4baeab7e084af2cf55c9c1ec97214fa9c2afcf4.tar.gz
linux-stable-b4baeab7e084af2cf55c9c1ec97214fa9c2afcf4.tar.bz2
linux-stable-b4baeab7e084af2cf55c9c1ec97214fa9c2afcf4.zip
bnxt_en: Fix typo in firmware message timeout logic.
[ Upstream commit 67681d02aaa1db9044a16df4ca9c77cde1221a3e ] The logic that polls for the firmware message response uses a shorter sleep interval for the first few passes. But there was a typo so it was using the wrong counter (larger counter) for these short sleep passes. The result is a slightly shorter timeout period for these firmware messages than intended. Fix it by using the proper counter. Fixes: 9751e8e71487 ("bnxt_en: reduce timeout on initial HWRM calls") Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 1fdaf86bbe8f..63b97289f4fe 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -3542,7 +3542,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
if (len)
break;
/* on first few passes, just barely sleep */
- if (i < DFLT_HWRM_CMD_TIMEOUT)
+ if (i < HWRM_SHORT_TIMEOUT_COUNTER)
usleep_range(HWRM_SHORT_MIN_TIMEOUT,
HWRM_SHORT_MAX_TIMEOUT);
else