Skip to content

Commit 0000b81

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Wait longer for the firmware message response to complete.
The code waits up to 20 usec for the firmware response to complete once we've seen the valid response header in the buffer. It turns out that in some scenarios, this wait time is not long enough. Extend it to 150 usec and use usleep_range() instead of udelay(). Fixes: 9751e8e ("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>
1 parent 67681d0 commit 0000b81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3926,7 +3926,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
39263926
dma_rmb();
39273927
if (*valid)
39283928
break;
3929-
udelay(1);
3929+
usleep_range(1, 5);
39303930
}
39313931

39323932
if (j >= HWRM_VALID_BIT_DELAY_USEC) {

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ struct nqe_cn {
582582
(HWRM_SHORT_TIMEOUT_COUNTER * HWRM_SHORT_MIN_TIMEOUT + \
583583
((n) - HWRM_SHORT_TIMEOUT_COUNTER) * HWRM_MIN_TIMEOUT))
584584

585-
#define HWRM_VALID_BIT_DELAY_USEC 20
585+
#define HWRM_VALID_BIT_DELAY_USEC 150
586586

587587
#define BNXT_HWRM_CHNL_CHIMP 0
588588
#define BNXT_HWRM_CHNL_KONG 1

0 commit comments

Comments
 (0)