Commit 5c4903549c05bbb373479e0ce2992573c120654a
Committed by
Jeff Kirsher
1 parent
b2d96e0ac0
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
net: Fix issue with netdev_tx_reset_queue not resetting queue from XOFF state
We are seeing dev_watchdog hangs on several drivers. I suspect this is due to the __QUEUE_STATE_STACK_XOFF bit being set prior to a reset for link change, and then not being cleared by netdev_tx_reset_queue. This change corrects that. In addition we were seeing dev_watchdog hangs on igb after running the ethtool tests. We found this to be due to the fact that the ethtool test runs the same logic as ndo_start_xmit, but we were never clearing the XOFF flag since the loopback test in ethtool does not do byte queue accounting. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff
drivers/net/ethernet/intel/igb/igb_main.c
... | ... | @@ -2752,6 +2752,8 @@ |
2752 | 2752 | |
2753 | 2753 | txdctl |= E1000_TXDCTL_QUEUE_ENABLE; |
2754 | 2754 | wr32(E1000_TXDCTL(reg_idx), txdctl); |
2755 | + | |
2756 | + netdev_tx_reset_queue(txring_txq(ring)); | |
2755 | 2757 | } |
2756 | 2758 | |
2757 | 2759 | /** |
... | ... | @@ -3244,7 +3246,6 @@ |
3244 | 3246 | buffer_info = &tx_ring->tx_buffer_info[i]; |
3245 | 3247 | igb_unmap_and_free_tx_resource(tx_ring, buffer_info); |
3246 | 3248 | } |
3247 | - netdev_tx_reset_queue(txring_txq(tx_ring)); | |
3248 | 3249 | |
3249 | 3250 | size = sizeof(struct igb_tx_buffer) * tx_ring->count; |
3250 | 3251 | memset(tx_ring->tx_buffer_info, 0, size); |
include/linux/netdevice.h