From: sashiko-bot@kernel.org
To: "Dima Ruinskiy" <dima.ruinskiy@intel.com>,
intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH iwl-net] e1000e: fix TX hang after failed S4 hibernate cycle
Date: Thu, 03 Dec 2026 10:23:20 +0000 [thread overview]
Message-ID: <sashiko-outbox-247566@kernel.org> (raw)
In-Reply-To: <20261203095751.1446451-1-dima.ruinskiy@intel.com>
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
prev parent reply other threads:[~2026-12-03 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-247566@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dima.ruinskiy@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.