🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20869

[PATCH iwl-net 1/5] e1000e: retry a global reset the I219 didn't apply

#20869
From: Steffen Dirkwinkel
Date: Mon, 23 Nov 2026 09:55
80 lines
12749 bytes
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
Technical Details
Message-ID: <20261123-e1000e-tx-hang-v1-1-ecb4309942f1@beckhoff.com>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369209-linux-kernel-netdev=dewy.ru
References: <20261123-e1000e-tx-hang-v1-0-ecb4309942f1@beckhoff.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369209-linux-kernel-netdev=dewy.ru
From: lists@steffen.cc (Steffen Dirkwinkel)
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <20261123-e1000e-tx-hang-v1-1-ecb4309942f1@beckhoff.com>
References: <20261123-e1000e-tx-hang-v1-0-ecb4309942f1@beckhoff.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3844981"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:6jhul9OsCR8Up1wxO+em7LM4b40= sha256:Mr7E2OFZIl5cfd7EkO38HDzcG65/ePgw7kKfUhy1f3A=
	sha1:Z+t/b8g/UUXP/xDvIeYBX2q3DtE= sha256:A4f+/9PxNbo51ubd3qgyApda+9wHPR10TE0cAJCHKFE=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 9C636125D95; Mon, 23 Nov 2026 12:56:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=steffen.cc
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id REGthQaSiIxM;
	Mon, 23 Nov 2026 12:56:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-369209-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=steffen.cc
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 05AA1125D9A; Mon, 23 Nov 2026 12:56:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 1F0F6601E8B; Mon, 23 Nov 2026 09:56:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795427766;
	b=hEcyBO6GssVeUyLFnx1Lh8gqe0KLCyBiCWiSy9y89vjutQFyFwA+PXx50uYirrYvXj7e
	 aOwir29oVfSv9K9uPXKpE4dF1fzGfisVKxvkLiqEAz/tsJC8C+pw7DpSkbBg2n7dKWMX2
	 uo8YKoK+aQFm9rvcKGerKvXey1SaPY2Q1MVwj+9Mncf7UBZAzu8RRzEZzNuHwt0o2As+v
	 YDNuiU3auK+/7GDgrW/BjLIkV4osTgeU3xiKUYmOIuHhC4blZISuA2cvDC2GM8CGp3i0V
	 Gw1e+xXGyll+01n598tCWrlJMldYeUcL+MdXxZgLhUDGBj09gxux9rCQu1yGfYcj0uQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795427766;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:
	 Date:Subject:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:Message-Id:References:
	 In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:
	 X-Rspamd-Queue-Id;
	bh=CUFZdLSuEVrrJUDvAVyiBpqKpftwiDzoT2ikSg1vLJc=;
	b=fbA1yTGiL+hf/D1dLnkIAytBBivgqoBZQVIpAebv1xHD0mjRaQMU5RL7TZpSWac5+xbu
	 UF+M1F5BUTQFKypTtsD/oPHB2mBR5OUiMhXh+jChVMPW3PU9tNsZmvO7X7zemfk7PULVP
	 WCy30wsckHKKUY+atssvBoX63CuVtMeZ/FB2PZxzbNrWsvbDLN7XKRQ/JDp0NWQaOA6WA
	 ShN8xPm/uJEtZGNHTTyUDLLYHgTPgr8Gm1iZhcwtbPq+NL8hHtvq6VQT4VtAQ8hTteuBe
	 nyRe66Azo8k0PoY6uuMC6hwOnlJLCuitOXB4AEMwitfExCvenWebHyXLaLJfBVZz0ZA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=steffen.cc header.i=@steffen.cc header.a=rsa-sha256 header.s=MBO0001 header.b=XKXfLffB;
	dmarc=pass header.from=steffen.cc;
	spf=pass smtp.mailfrom=steffen.cc;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id C5BE7606A699;
	Mon, 23 Nov 2026 09:56:06 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=steffen.cc header.i=@steffen.cc header.a=rsa-sha256 header.s=MBO0001 header.b=XKXfLffB
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=80.241.56.171
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795427760;
	b=eCW6nHVrQCLBnTIHPu1LYEkVRy65mw8xssdt0tyJRQuv7tnb0V+COiCOPrONl0bZEgoi
	 BBg3d6iPfVNObLYDhLn5pZ3vzSrH5W0zTs/kCo/XVQh/gZmQ7oJx91LQIcrWbttDT0r3f
	 ZZidU0cur1ZcVYpB2Zq8yrIHeF1V8On0tIea2Ivjh6wYeKwmvMiew2b9hCYn0pcvWPwiH
	 Jybe9D9HtAP4tgTmbv8JNZoV2/ZShW5G5s7G02lrQAn7Y1sw3PvxN1l9cNnpUg1JM1Qq2
	 +jw9bDnVv6wBbleElk7+sAGtV/psKvrlWEWaWyi1u4TGxP55JI4D/5VckZLxPRKkJVQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795427760;
	h=DMARC-Filter:Received:DKIM-Signature:From:Date:Subject:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:Message-Id:References:
	 In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:
	 X-Rspamd-Queue-Id;
	bh=CUFZdLSuEVrrJUDvAVyiBpqKpftwiDzoT2ikSg1vLJc=;
	b=tm7V4DQOz02mfTVWY20J0G7f8oIteTUoe40IVjKjfnNFhUHuL5XNYxa6LHEQ0pBoX5cU
	 SE4+ymuZy//WoXQ1KFM6ZAti6ALXXg5hwNNz5uE83lBOQbdVqrn9HIKgc6tvYI6hGbIXF
	 JMciEsvvJfZqZqPu/3Y1lj+xUx9snQkUCaToFisyDUX13tZE+QBN4R6IB34g3jtqdfrNy
	 jTfFfUt/uI4+wyErzeyGLAtE5oe8k0nZHusCx3N22l9XiCUtd4cETy6/pS9YQEQGhfeyR
	 SiskJ1VSbE8iPwEkqXGKBAav4cm6FW8FvWRXP0dxUqoVAQfU/kgUhGLMuOtaBOpeeVQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=steffen.cc;
	spf=pass smtp.mailfrom=steffen.cc;
	dkim=pass header.d=steffen.cc header.i=@steffen.cc header.a=rsa-sha256 header.s=MBO0001 header.b=XKXfLffB;
	arc=none smtp.remote-ip=80.241.56.171
X-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3F59606A33A;
	Mon, 23 Nov 2026 09:55:59 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C3F59606A33A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=steffen.cc
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=steffen.cc
X-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4jY1Xk5Q0zzMlbC;
	Mon, 23 Nov 2026 10:55:50 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=steffen.cc; s=MBO0001;
	t=1795427750;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=CUFZdLSuEVrrJUDvAVyiBpqKpftwiDzoT2ikSg1vLJc=;
	b=XKXfLffBqBw/lIXDBCbFqd/6OPVIDIymadSqER38M3JIMW1URHVQ5mCJ/iJ2uS1oJmIRUu
	MZKU9tPE/D2lR8SKNNv4orpV3cWc/IHlzxK4v5EDl94L1IGCxgIaxCf3zsWDz50TRLQKcL
	EtwwPNrLW6SRXyG87ujV6t2B5thgLkVyKKLSTtPGLp1TsNeCHZtInA0BWhfWMqSJ+dyTsU
	SMiwf9KjR7xeec3n7xbOsVVaR2bc3Kaa8h2CckA6hZixJdVBYvMk+ugboM+w5qF/igoQVP
	9U43tNVzpwkDck9hHR3OouoK0hBeziwif4vRaHnI99ua3/BbmV9ISDxlRxADWw==
X-Authentication-Results: outgoing_mbo_mout;
	dkim=none;
	spf=pass (outgoing_mbo_mout: domain of lists@steffen.cc designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=lists@steffen.cc
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261123-e1000e-tx-hang-v1-0-ecb4309942f1@beckhoff.com>
X-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
X-Mailer: b4 0.15.2
X-Developer-Signature: v=1; a=ed25519-sha256; t=1795427747; l=3258;
 i=s.dirkwinkel@beckhoff.com; s=20260625; h=from:subject:message-id;
 bh=yqmgwh9JQiMyoM4++9UMC+bt5AFLx9eaGnWZdS19Kpc=;
 b=FMYdigKOgk1H5XF+dkBC+6hmwOvfDg/FXDEefvgv4tKeH3aixxHMvqWncMErJg33LFyPqSm0r
 k9osIN17oX1DUblDclZ43OoQpd853YibgbwK5gCaiDTR+mTnQiWdgO1
X-Developer-Key: i=s.dirkwinkel@beckhoff.com; a=ed25519;
 pk=5DcsaSpVtmm7nCi3Bnw5A4vbXI+sg3hBgt8e2A2U/gw=
X-Rspamd-Queue-Id: 4jY1Xk5Q0zzMlbC