Skip to content

Commit a11f575

Browse files
committed
Merge branch 'bnxt_en-firmware-message-delay-fixes'
Michael Chan says: ==================== bnxt_en: firmware message delay fixes. We were seeing some intermittent firmware message timeouts in our lab and these 2 small patches fix them. Please apply to stable as well. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents ab01f25 + 0000b81 commit a11f575

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3903,7 +3903,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
39033903
if (len)
39043904
break;
39053905
/* on first few passes, just barely sleep */
3906-
if (i < DFLT_HWRM_CMD_TIMEOUT)
3906+
if (i < HWRM_SHORT_TIMEOUT_COUNTER)
39073907
usleep_range(HWRM_SHORT_MIN_TIMEOUT,
39083908
HWRM_SHORT_MAX_TIMEOUT);
39093909
else
@@ -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)