[PATCH iwl-net 2/5] e1000e: let dev_watchdog reset the adapter after a Tx hang

From: Steffen Dirkwinkel

Date: Mon Nov 23 2026 - 04:56:06 EST


From: Steffen Dirkwinkel <s.dirkwinkel@xxxxxxxxxxxx>

When e1000e detects a Tx hang it stops the queue and relies on
dev_watchdog() to call e1000_tx_timeout(), which resets the adapter.
While the hang lasts it is reported every two seconds, and every report
stops the queue again. Since commit 95ecba62e2fd ("net: fix races in
netdev_tx_sent_queue()/dev_watchdog()") netif_tx_stop_queue() also
writes trans_start, so the 5 s watchdog timeout never expires and a
hung adapter stays offline until the link is cycled by hand.

This was observed on a laptop with an I219-LM (8086:550a) running
v6.19: a Tx hang lasted 104 minutes, with 3120 hang reports and no
"NETDEV WATCHDOG" message, until the link was set down and up.

Stop the queue only if it isn't stopped yet. netif_tx_stop_queue() has
to write trans_start to close the race that commit fixed, so it is
left as it is.

Tested with error injection: setting CTRL.GIO_MASTER_DISABLE stalls
Tx. With this change, I219-LM devices (8086:15b7 and 8086:15f9) were
reachable again after 11 to 17 s in 24 of 24 tries. Without it, an
8086:15b7 device stayed offline in 8 of 8.

igb, igc and e1000 stop the queue in the same way and get the same
change in the following patches.

Fixes: 95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@xxxxxxxxxxxx>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 6f85dab5c55c..e916eba19fe0 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1144,8 +1144,12 @@ static void e1000_print_hw_hang(struct work_struct *work)
return;
}

- /* Real hang detected */
- netif_stop_queue(netdev);
+ /* Real hang detected. The hang is reported every two seconds, but
+ * stop the queue only once: stopping it again would also restart
+ * the Tx timeout, so dev_watchdog() would never reset the adapter.
+ */
+ if (!netif_queue_stopped(netdev))
+ netif_stop_queue(netdev);

e1e_rphy(hw, MII_BMSR, &phy_status);
e1e_rphy(hw, MII_STAT1000, &phy_1000t_status);

--
2.56.1