bnxt_en: Fix typo in firmware message timeout logic. [Linux 5.0]

bnxt_en: Fix typo in firmware message timeout logic. [Linux 5.0]

This Linux kernel change "bnxt_en: Fix typo in firmware message timeout logic" is included in the Linux 5.0 release. This change is authored by Michael Chan <michael.chan [at]> on Wed Feb 20 19:07:31 2019 -0500. The commit for this change in Linux stable tree is 67681d0 (patch).

bnxt_en: Fix typo in firmware message timeout logic.

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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 8bc7e49..1ddd672 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -3903,7 +3903,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
            if (len)
            /* on first few passes, just barely sleep */
-           if (i < DFLT_HWRM_CMD_TIMEOUT)
+           if (i < HWRM_SHORT_TIMEOUT_COUNTER)

Leave a Reply

Your email address will not be published. Required fields are marked *