Commit 132e0b65 authored by Edwin Peer's avatar Edwin Peer Committed by David S. Miller

bnxt_en: reverse order of TX disable and carrier off

A TX queue can potentially immediately timeout after it is stopped
and the last TX timestamp on that queue was more than 5 seconds ago with
carrier still up.  Prevent these intermittent false TX timeouts
by bringing down carrier first before calling netif_tx_disable().

Fixes: c0c050c5 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4083d3c
...@@ -8856,9 +8856,10 @@ void bnxt_tx_disable(struct bnxt *bp) ...@@ -8856,9 +8856,10 @@ void bnxt_tx_disable(struct bnxt *bp)
txr->dev_state = BNXT_DEV_STATE_CLOSING; txr->dev_state = BNXT_DEV_STATE_CLOSING;
} }
} }
/* Drop carrier first to prevent TX timeout */
netif_carrier_off(bp->dev);
/* Stop all TX queues */ /* Stop all TX queues */
netif_tx_disable(bp->dev); netif_tx_disable(bp->dev);
netif_carrier_off(bp->dev);
} }
void bnxt_tx_enable(struct bnxt *bp) void bnxt_tx_enable(struct bnxt *bp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment