Skip to content

Commit 649c3fe

Browse files
committed
eth: bnxt: fix the wake condition
The down condition should be the negation of the wake condition, IOW when I moved it from: if (cond && wake()) to if (__netif_txq_completed_wake(cond)) Cond should have been negated. Flip it now. This bug leads to occasional crashes with netconsole. It may also lead to queue never waking up in case BQL is not enabled. Reported-by: David Wei <[email protected]> Fixes: 08a0967 ("bnxt: use new queue try_stop/try_wake macros") Reviewed-by: Michael Chan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c9d99cf commit 649c3fe

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
692692

693693
__netif_txq_completed_wake(txq, nr_pkts, tx_bytes,
694694
bnxt_tx_avail(bp, txr), bp->tx_wake_thresh,
695-
READ_ONCE(txr->dev_state) != BNXT_DEV_STATE_CLOSING);
695+
READ_ONCE(txr->dev_state) == BNXT_DEV_STATE_CLOSING);
696696
}
697697

698698
static struct page *__bnxt_alloc_rx_page(struct bnxt *bp, dma_addr_t *mapping,

0 commit comments

Comments
 (0)