* [PATCH iwl-net] e1000e: fix TX hang after failed S4 hibernate cycle
@ 2026-12-03 9:57 Dima Ruinskiy
2026-12-03 10:23 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Dima Ruinskiy @ 2026-12-03 9:57 UTC (permalink / raw)
To: intel-wired-lan; +Cc: dima.ruinskiy, anthony.l.nguyen, Michael Edri
When hibernation fails for any reason, the freeze/thaw cycle leaves the
e1000e adapter in a broken state: the PHY Reset Asserted (PHYRA) bit
remains set in the MAC Status register, preventing TX descriptor
processing, leading to a persistent TX hang.
In e1000e_pm_thaw(), call e1000e_reset() before e1000e_up() to clear stale
hardware state after the freeze/thaw cycle. This matches the resume path,
which already calls e1000e_reset() in __e1000_resume().
Fixes: 2800209994f8 ("e1000e: Refactor PM flows")
Co-developed-by: Michael Edri <michael.edri@intel.com>
Signed-off-by: Michael Edri <michael.edri@intel.com>
Signed-off-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index e5508ae5812e..e79e63681367 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6927,6 +6927,11 @@ static int e1000e_pm_thaw(struct device *dev)
rtnl_lock();
if (netif_running(netdev)) {
+ /* Reset adapter to clear stale PHY state
+ * after freeze/thaw cycle. Without this,
+ * a failed hibernation leaves the TX path hung.
+ */
+ e1000e_reset(adapter);
rc = e1000_request_irq(adapter);
if (rc)
goto err_irq;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iwl-net] e1000e: fix TX hang after failed S4 hibernate cycle
2026-12-03 9:57 [PATCH iwl-net] e1000e: fix TX hang after failed S4 hibernate cycle Dima Ruinskiy
@ 2026-12-03 10:23 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-03 10:23 UTC (permalink / raw)
To: Dima Ruinskiy, intel-wired-lan
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] e1000e: BUG_ON panic and TX ring desync via e1000e_reset() in
e1000e_pm_thaw()
- [Medium] e1000e: duplicate hardware reset in e1000e_pm_thaw() on
resume and recovery
--
commit adb0449c9bbd60d253066f7b7823fc2a85104bf9
Author: Dima Ruinskiy <dima.ruinskiy@intel.com>
e1000e: fix TX hang after failed S4 hibernate cycle
This commit adds a call to e1000e_reset() in e1000e_pm_thaw() before
requesting interrupts and bringing the interface back up, to clear stale
PHY state after a freeze/thaw cycle.
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 1d592f61f2cbe..60125dca5d555 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -6945,6 +6945,11 @@ static int e1000e_pm_thaw(struct device *dev)
>
> rtnl_lock();
> if (netif_running(netdev)) {
> + /* Reset adapter to clear stale PHY state
> + * after freeze/thaw cycle. Without this,
> + * a failed hibernation leaves the TX path hung.
> + */
> + e1000e_reset(adapter);
> rc = e1000_request_irq(adapter);
> if (rc)
> goto err_irq;
[Severity: High]
Can this e1000e_reset() call hit BUG_ON(tdt != tx_ring->next_to_use) in
e1000_flush_tx_ring() on I219 and newer PCH adapters?
During hibernation freeze, e1000e_pm_freeze() calls e1000e_down(adapter,
false), which skips e1000e_reset() and calls e1000_clean_tx_ring(). That
resets tx_ring->next_to_use to 0 while hardware TDLEN(0) and TDT(0) retain
their pre-freeze values.
On thaw, e1000e_reset() calls e1000_flush_desc_rings() when
hw->mac.type >= e1000_pch_spt. If FLUSH_DESC_REQUIRED is still set in
PCICFG_DESC_RING_STATUS (for instance, when PHYRA blocked the freeze-time
flush), e1000_flush_tx_ring() panics whenever TDT(0) is non-zero.
Even if TDT(0) is 0, e1000_flush_tx_ring() puts a dummy descriptor without
E1000_TXD_CMD_RS at slot 0 and sets tx_ring->next_to_use to 1. Since
e1000e_up() -> e1000_configure_tx() resets TDH(0)/TDT(0) to 0 without
cleaning tx_ring, slot 0 sends tx_ring->dma data and stalls TX cleanup.
[Severity: Medium]
Does calling e1000e_reset() unconditionally here cause a second full
hardware reset on every S3/S0ix resume, S4 restore, and PCI error recovery?
e1000e_pm_thaw() is also called by e1000e_pm_resume() right after
__e1000_resume() has already called e1000e_reset() and
e1000_init_manageability_pt(), and by e1000_io_resume() after
e1000_io_slot_reset() has already reset the adapter.
Running a second reset under global rtnl_lock() adds 35 to 60+ ms of resume
latency (including a 10 ms busy-wait in e1000e_get_cfg_done_generic()) and
blocks other asynchronously resuming network devices.
If e1000_request_irq() fails, the redundant reset also wipes the
manageability pass-through setup from e1000_init_manageability_pt().
Should the reset only run from the standalone .thaw callback, for example
via a helper taking a bool reset parameter?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203095751.1446451-1-dima.ruinskiy@intel.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-03 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 9:57 [PATCH iwl-net] e1000e: fix TX hang after failed S4 hibernate cycle Dima Ruinskiy
2026-12-03 10:23 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox