Article View: linux.kernel.netdev
Article #20870[PATCH iwl-net 4/5] igc: let dev_watchdog reset the adapter after a Tx hang
From: Steffen Dirkwinkel
Date: Mon, 23 Nov 2026 09:55
Date: Mon, 23 Nov 2026 09:55
56 lines
11903 bytes
11903 bytes
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
Technical Details
Message-ID:
<20261123-e1000e-tx-hang-v1-4-ecb4309942f1@beckhoff.com>Path:
mbox-mo1.pugleaf.net!srv.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-369211-linux-kernel-netdev=dewy.ruReferences:
<20261123-e1000e-tx-hang-v1-0-ecb4309942f1@beckhoff.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.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-369211-linux-kernel-netdev=dewy.ru From: lists@steffen.cc (Steffen Dirkwinkel) Newsgroups: linux.kernel.netdev Subject: [PATCH iwl-net 4/5] igc: let dev_watchdog reset the adapter after a Tx hang Date: Mon, 23 Nov 2026 10:55:18 +0100 Organization: Usenet Network Message-ID: <20261123-e1000e-tx-hang-v1-4-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="3845032"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:cvS/BArSHMo+jbRKG5I3etV3qok= sha256:koiRAA+PTBxL1Xzoc5uk2KAEC+gDu7O98zKSXl4TZxk= sha1:VmWi4+EtuDoUzdX+UOB8eeLAp2c= sha256:xKemNwyYXfgTovibiDZZjX4xkVNibuRBzWQ/bPbuqSQ= 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 40241125D98; Mon, 23 Nov 2026 12:56:31 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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 ZGUQSTc5YYUa; Mon, 23 Nov 2026 12:56:28 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369211-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 41596125D95; Mon, 23 Nov 2026 12:56:20 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 2CC412AC5C; Mon, 23 Nov 2026 09:56:14 +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=1795427768; b=3T4rIIAgVs4+n15cGUm1LdFnPDTLfWzCaD2I8O8y2JWFNjK1ADnhhIkgLZU6E0zqHCi0 frP2DH/RlLmt17Y6jmDitxEKKEzLB+Ga1/sw/K9qg+Iid7fpVGcTue4QKW9Xhw7Yvvibx +YXYqamJpLQq0z3CS1JFMXjwtWFvN/8v+wc9E61+HFXnKCE4APXbaENaGkwSycbBKiaLN 5Y24V4fB4U9p0tqrEoe/edyVcZlD1cQGFs7dP2FYwU3XYwXJqf6vOXY6B9XzfuDhRagH0 EFOsmpMjXOMwt5Yz3o44rHxq1WrbDxQMbkYXx6Lx/XDDmJqtDcG8ydmNlvQym72Wfbg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795427768; 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=QmVkY0D1iugOAnFAYa2JnBEt+O5w2UV3yLDwM6Do3wo=; b=Vk5P9zZAPLT7onaxkAVthJHOg7q0fI+SbrPqefG8ZycPBFYMCW6gPZ519I5cjGL7dIGH C82L/q2xb0vMRima3/YpfZsJY4SUQpgkNzc/l37tx1Nm+wtl7CsOtSr9Y1p2AyyESx1uq W1H2yDzUfF7CeywwoRrg2rdz7YAOwiCQx7CbUwj0mIqdzMlrKtHvQn3whTYIzDHcOLOQS cn9y2P4Muwl8T1TlQyoNpj4FzUby/Drr7KFKr+qYsLMSEUu51Z1a7lT5Xr3MoZBTgEnXT mEbarXDnyDGp7PkADwjNoBM7OsFxDbSOgn2IOTs1fjkuMcGT3dI1R9N1YdSmYr5oAyQ== 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="NM0GSes/"; 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 866C0606A333; Mon, 23 Nov 2026 09:56:08 +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=NM0GSes/ X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=80.241.56.151 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795427762; b=Yx7V1/kVZ+YAvv9WW7NSriqhaNY3wGc3g3jHd9aQL1b3ehXq2emCTL0AoH+VFVjOJ4Po YpBswHotqKF15NY8n6Q8QiWQzgdX3PZJv6A0JoUI/ZBha1zVKJpDp0lRAGoi6GZBnVdme 104yPdwkpLU6Zc+YHSxEew8TlQbDpXqP+78f7LIQnPvPnNTqedG1nLwMZ8w7igyNi/x4s rmiLYPg/b41SSlwPNbGloMhrO7CJUWG+Pn9SFS9KOlIfkuSKu4RS6ukE36JlNkdTg6cHe SJoavB7696QyIHYMsoMi+AFPNx6bz+ZpfSBvYvCRM6fSVowbqxHUU60fL5ScOpOkYuw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795427762; 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=QmVkY0D1iugOAnFAYa2JnBEt+O5w2UV3yLDwM6Do3wo=; b=iWwuI1dsbRN4F/47iuxn2zoOhhn04enuSbSPOaV+f84iLhWUMG1TZN4Hfoa5/mFtd6Pe TAC7eDgb/qQvK5jmXGURRCYuJg8DzZfJFg4CrHd7pLdonNpTt7sImEfvIdxm6yxzL1Iwv f125lljWk3i2074Jny+7zMBSFaeRIojZ5SzceoHbHC702QZsn7MUltsIYNsXxAEMr6x8R 5/rF1fOjYqGtIc9+HnEDmniFHd6hPOJweOzjaNuln07MIzrv7s5dtn6c41omwJlHsG8s4 kaBXLzLKoXvO0uZvoyh2Itwb15AI21E4byDN9tOOccaVbVU5v3VCxwNnedsPmmgxdaA== 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="NM0GSes/"; arc=none smtp.remote-ip=80.241.56.151 X-Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (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 2FA33606A686; Mon, 23 Nov 2026 09:56:02 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2FA33606A686 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-101.mailbox.org (Postfix) with ESMTPS id 4jY1Xn55VLz8v21; Mon, 23 Nov 2026 10:55:53 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=steffen.cc; s=MBO0001; t=1795427753; 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=QmVkY0D1iugOAnFAYa2JnBEt+O5w2UV3yLDwM6Do3wo=; b=NM0GSes//QXNxRW0kJJIfeWJbCEiU5+Bzsov5kmja9Mn1ntPLZHYOeOprqoGpVuXHEhOUS 8BaWS1zjyuePum3Ip7KHbjCVAsTJr+Tiowj59GQEmDprmZnfJgRZb/fmr8/ZmQSHn1/IP7 pl8lRwW9TGIxDdJUeR/39FH1eJBgIlwnFJMKevHZQGvrwr6tLrpU0UB8JAmIRDFl5ijCu9 KxiKiYZj58KpUZ5/+/LoF5li85zAOzj4RIsyGePiA2XlV+CPHzRIYh5vULRDCmpKavuKOS ACBX2UwdNenb6kTx7DqPMzxpkgrnXFpUy1Q/i/VE6LZlGlVpShJD3eMqgYvmOA== 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=2381; i=s.dirkwinkel@beckhoff.com; s=20260625; h=from:subject:message-id; bh=4g3DPsLitWHXFohTOuhHku+cbWck24n8+SNlkObQQIY=; b=5LDOPqcYvOa34lnT0z+fdHRrcuGJNdYPI18Z7XLjpbHMsow1VF2k6vtSBKoXoSQQL7fai7d6V DHCBPkgjeVmBxYqCZX4Alketx9gPPVCRPK0Ebtwy8kJOxxNfGKOHSJT X-Developer-Key: i=s.dirkwinkel@beckhoff.com; a=ed25519; pk=5DcsaSpVtmm7nCi3Bnw5A4vbXI+sg3hBgt8e2A2U/gw= X-Rspamd-Queue-Id: 4jY1Xn55VLz8v21