From: Steffen Dirkwinkel <lists@steffen.cc>
To: "Tony Nguyen" <anthony.l.nguyen@intel.com>,
"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"David Ertman" <david.m.ertman@intel.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Willem de Bruijn" <willemb@google.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Helge Deller <deller@kernel.org>,
Kurt Kanzenbach <kurt@linutronix.de>,
Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>,
stable@vger.kernel.org
Subject: [PATCH iwl-net 1/5] e1000e: retry a global reset the I219 didn't apply
Date: Mon, 23 Nov 2026 10:55:15 +0100 [thread overview]
Message-ID: <20261123-e1000e-tx-hang-v1-1-ecb4309942f1@beckhoff.com> (raw)
In-Reply-To: <20261123-e1000e-tx-hang-v1-0-ecb4309942f1@beckhoff.com>
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
next prev parent reply other threads:[~2026-11-23 9:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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 ` [PATCH iwl-net 3/5] igb: " 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
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=20261123-e1000e-tx-hang-v1-1-ecb4309942f1@beckhoff.com \
--to=lists@steffen.cc \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=david.m.ertman@intel.com \
--cc=deller@kernel.org \
--cc=edumazet@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=s.dirkwinkel@beckhoff.com \
--cc=stable@vger.kernel.org \
--cc=toke@redhat.com \
--cc=willemb@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox