* [PATCH iwl-net 1/5] e1000e: retry a global reset the I219 didn't apply
2026-11-23 9:55 [PATCH iwl-net 0/5] intel: fix a Tx hang at boot on I219 and Tx hang recovery Steffen Dirkwinkel
@ 2026-11-23 9:55 ` Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 2/5] e1000e: let dev_watchdog reset the adapter after a Tx hang Steffen Dirkwinkel
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Steffen Dirkwinkel @ 2026-11-23 9:55 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ertman,
Toke Høiland-Jørgensen, Willem de Bruijn
Cc: intel-wired-lan, netdev, linux-kernel, Helge Deller,
Kurt Kanzenbach, Steffen Dirkwinkel, stable
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
On the Beckhoff CB7268 (Cannon Point-LP PCH) and CB3067 (Q370 PCH)
boards with an I219-LM (8086:15b7), Tx sometimes hangs for good right
after boot: "Detected Hardware Unit Hang" with TDH 0 and TDT 1. This
was observed in the field and reproduced in CI, where about one in 140
cold boots hung.
e1000_reset_hw_ich8lan() sets CTRL.GIO_MASTER_DISABLE through
e1000e_disable_pcie_master() and relies on the global reset to clear
it. On these boards the MAC occasionally ignores the reset: 20 ms
later CTRL still holds its old value, GIO_MASTER_DISABLE included.
A debug kernel that resets the MAC in a loop lost up to 7% of back-to-back
resets and still some with 20 ms between them.
Check GIO_MASTER_DISABLE after the reset and issue the reset up to two more
times. In 122 lost resets the first retry always took.
Tested by power cycling affected devices: 13 of 1816 boots hung without
this change and 0 of 2830 with it, where 19 lost resets were retried.
Fixes: 79849ebc0e06 ("e1000e: initial support for i219")
Cc: stable@vger.kernel.org
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/net/ethernet/intel/e1000e/ich8lan.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index aa90e0ce8aca..4d4bc262ae85 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -4834,9 +4834,11 @@ static s32 e1000_get_bus_info_ich8lan(struct e1000_hw *hw)
static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
{
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
+ struct e1000_adapter *adapter = hw->adapter;
u16 kum_cfg;
u32 ctrl, reg;
s32 ret_val;
+ int tries;
/* Prevent the PCI-E bus from sticking if there is no TLP connection
* on the last TLP read/write transaction when MAC is reset.
@@ -4895,10 +4897,27 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
e1000_gate_hw_phy_config_ich8lan(hw, true);
}
ret_val = e1000_acquire_swflag_ich8lan(hw);
- e_dbg("Issuing a global reset to ich8lan\n");
- ew32(CTRL, (ctrl | E1000_CTRL_RST));
- /* cannot issue a flush here because it hangs the hardware */
- msleep(20);
+ for (tries = 0; ; tries++) {
+ e_dbg("Issuing a global reset to ich8lan\n");
+ ew32(CTRL, (ctrl | E1000_CTRL_RST));
+ /* cannot issue a flush here because it hangs the hardware */
+ msleep(20);
+
+ /* Some I219 occasionally ignore the reset of the MAC, mostly
+ * right after a previous reset, and CTRL keeps its value.
+ * GIO_MASTER_DISABLE then stays set from
+ * e1000e_disable_pcie_master() above, so the MAC can't fetch
+ * descriptors and Tx hangs. Issue the reset again.
+ */
+ reg = er32(CTRL);
+ if (!(reg & E1000_CTRL_GIO_MASTER_DISABLE) || tries >= 2)
+ break;
+ e_warn("Global reset not applied (CTRL 0x%08x), retrying\n",
+ reg);
+ }
+ if (reg & E1000_CTRL_GIO_MASTER_DISABLE)
+ e_err("Global reset not applied after %d tries (CTRL 0x%08x)\n",
+ tries + 1, reg);
/* Set Phy Config Counter to 50msec */
if (hw->mac.type == e1000_pch2lan) {
--
2.56.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH iwl-net 2/5] e1000e: let dev_watchdog reset the adapter after a Tx hang
2026-11-23 9:55 [PATCH iwl-net 0/5] intel: fix a Tx hang at boot on I219 and Tx hang recovery Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 1/5] e1000e: retry a global reset the I219 didn't apply Steffen Dirkwinkel
@ 2026-11-23 9:55 ` Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 3/5] igb: " Steffen Dirkwinkel
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Steffen Dirkwinkel @ 2026-11-23 9:55 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ertman,
Toke Høiland-Jørgensen, Willem de Bruijn
Cc: intel-wired-lan, netdev, linux-kernel, Helge Deller,
Kurt Kanzenbach, Steffen Dirkwinkel, stable
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
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@vger.kernel.org
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
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
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH iwl-net 3/5] igb: let dev_watchdog reset the adapter after a Tx hang
2026-11-23 9:55 [PATCH iwl-net 0/5] intel: fix a Tx hang at boot on I219 and Tx hang recovery Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 1/5] e1000e: retry a global reset the I219 didn't apply Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 2/5] e1000e: let dev_watchdog reset the adapter after a Tx hang Steffen Dirkwinkel
@ 2026-11-23 9:55 ` Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 4/5] igc: " Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 5/5] e1000: " Steffen Dirkwinkel
4 siblings, 0 replies; 6+ messages in thread
From: Steffen Dirkwinkel @ 2026-11-23 9:55 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ertman,
Toke Høiland-Jørgensen, Willem de Bruijn
Cc: intel-wired-lan, netdev, linux-kernel, Helge Deller,
Kurt Kanzenbach, Steffen Dirkwinkel, stable
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Like e1000e, igb stops the queue on every Tx hang report and relies on
dev_watchdog() to reset the adapter. Since commit 95ecba62e2fd ("net:
fix races in netdev_tx_sent_queue()/dev_watchdog()") every stop also
writes trans_start, so the watchdog timeout can't expire as long as the
hang is reported again in time.
Until commit a22ed15c99a0 ("igb: Get rid of spurious interrupts") the
igb watchdog forced an interrupt every two seconds, so the hang was
reported every two seconds and the adapter was never reset. Since then
a report needs an interrupt from traffic, and the adapter is reset only
if a stopped queue sees none for 5 s.
Stop the queue only if it isn't stopped yet.
Found by code inspection after the same problem in e1000e. Tested on an
I210 with the Tx queues disabled through TXDCTL and that commit
reverted: without this change Tx never recovered in 8 of 8 tries, with
it the watchdog reset the adapter after 15 s in 8 of 8. With unmodified
interrupt handling Tx recovered with and without this change.
Fixes: 95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()")
Cc: stable@vger.kernel.org
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/net/ethernet/intel/igb/igb_main.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 131df3e09ba1..0aca2e70087a 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -8484,8 +8484,15 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector, int napi_budget)
tx_buffer->next_to_watch,
jiffies,
tx_buffer->next_to_watch->wb.status);
- netif_stop_subqueue(tx_ring->netdev,
- tx_ring->queue_index);
+ /* The hang is reported again on every watchdog run,
+ * 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_subqueue_stopped(tx_ring->netdev,
+ tx_ring->queue_index))
+ netif_stop_subqueue(tx_ring->netdev,
+ tx_ring->queue_index);
/* we are about to reset, no point in enabling stuff */
return true;
--
2.56.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH iwl-net 4/5] igc: let dev_watchdog reset the adapter after a Tx hang
2026-11-23 9:55 [PATCH iwl-net 0/5] intel: fix a Tx hang at boot on I219 and Tx hang recovery Steffen Dirkwinkel
` (2 preceding siblings ...)
2026-11-23 9:55 ` [PATCH iwl-net 3/5] igb: " Steffen Dirkwinkel
@ 2026-11-23 9:55 ` Steffen Dirkwinkel
2026-11-23 9:55 ` [PATCH iwl-net 5/5] e1000: " Steffen Dirkwinkel
4 siblings, 0 replies; 6+ messages in thread
From: Steffen Dirkwinkel @ 2026-11-23 9:55 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ertman,
Toke Høiland-Jørgensen, Willem de Bruijn
Cc: intel-wired-lan, netdev, linux-kernel, Helge Deller,
Kurt Kanzenbach, Steffen Dirkwinkel, stable
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Like e1000e and igb, igc stops the queue on every Tx hang report and
relies on dev_watchdog() to reset the adapter. Since commit
95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()")
every stop also writes trans_start, so the watchdog timeout can't
expire as long as the hang is reported again in time.
Since commit 8dcf2c212078 ("igc: Get rid of spurious interrupts") a
report needs an interrupt from traffic, and the adapter is reset only
if a stopped queue sees none for 5 s. The 6.1 and 6.6 stable trees have
the first commit but not the second: there the igc watchdog forces an
interrupt every two seconds and the adapter is never reset.
Stop the queue only if it isn't stopped yet.
Found by code inspection after the same problem in e1000e. Tested on an
I226-IT with the Tx queues disabled through TXDCTL and the second
commit reverted: without this change Tx never recovered in 8 of 8
tries, with it the watchdog reset the adapter after 14 to 17 s in 8 of
8. With unmodified interrupt handling Tx recovered with and without
this change.
Fixes: 95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()")
Cc: stable@vger.kernel.org
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 1fb5f3cbe93c..a2d383f79a29 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3281,8 +3281,15 @@ static bool igc_clean_tx_irq(struct igc_q_vector *q_vector, int napi_budget)
tx_buffer->next_to_watch,
jiffies,
tx_buffer->next_to_watch->wb.status);
- netif_stop_subqueue(tx_ring->netdev,
- tx_ring->queue_index);
+ /* The hang is reported again on every watchdog run,
+ * 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_subqueue_stopped(tx_ring->netdev,
+ tx_ring->queue_index))
+ netif_stop_subqueue(tx_ring->netdev,
+ tx_ring->queue_index);
/* we are about to reset, no point in enabling stuff */
return true;
--
2.56.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH iwl-net 5/5] e1000: let dev_watchdog reset the adapter after a Tx hang
2026-11-23 9:55 [PATCH iwl-net 0/5] intel: fix a Tx hang at boot on I219 and Tx hang recovery Steffen Dirkwinkel
` (3 preceding siblings ...)
2026-11-23 9:55 ` [PATCH iwl-net 4/5] igc: " Steffen Dirkwinkel
@ 2026-11-23 9:55 ` Steffen Dirkwinkel
4 siblings, 0 replies; 6+ messages in thread
From: Steffen Dirkwinkel @ 2026-11-23 9:55 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ertman,
Toke Høiland-Jørgensen, Willem de Bruijn
Cc: intel-wired-lan, netdev, linux-kernel, Helge Deller,
Kurt Kanzenbach, Steffen Dirkwinkel, stable
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Like e1000e, e1000 stops the queue on every Tx hang report and relies
on dev_watchdog() to reset the adapter. Its watchdog forces an
interrupt every two seconds, so the hang is reported every two seconds.
Since commit 95ecba62e2fd ("net: fix races in
netdev_tx_sent_queue()/dev_watchdog()") every stop also writes
trans_start, so the 5 s watchdog timeout never expires and the adapter
is never reset.
Stop the queue only if it isn't stopped yet.
Found by code inspection after the same problem in e1000e. Tested in
QEMU (e1000) with TCTL.EN cleared to stall Tx: without this change the
device never recovered, with it the watchdog reset it after about 10 s,
in 3 of 3 runs each. Not tested on hardware.
Fixes: 95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()")
Cc: stable@vger.kernel.org
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index d7e279b739b8..4858c0a8c7b2 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3925,7 +3925,14 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter,
jiffies,
eop_desc->upper.fields.status);
e1000_dump(adapter);
- netif_stop_queue(netdev);
+
+ /* The hang is reported again on every watchdog run,
+ * 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);
}
}
adapter->total_tx_bytes += total_tx_bytes;
--
2.56.1
^ permalink raw reply [flat|nested] 6+ messages in thread