🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20872

[PATCH iwl-net 3/5] igb: let dev_watchdog reset the adapter after a Tx hang

#20872
From: Steffen Dirkwinkel
Date: Mon, 23 Nov 2026 09:55
55 lines
11843 bytes
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>

Like e1000e, igb 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.

Until commit a22ed15c99a0 ("igb: Get rid of spurious interrupts") the
igb watchdog forced an interrupt every two seconds, so the hang was
reported every two seconds and the adapter was never reset. Since then
a report needs an interrupt from traffic, and the adapter is reset only
if a stopped queue sees none for 5 s.

Stop the queue only if it isn't stopped yet.

Found by code inspection after the same problem in e1000e. Tested on an
I210 with the Tx queues disabled through TXDCTL and that commit
reverted: without this change Tx never recovered in 8 of 8 tries, with
it the watchdog reset the adapter after 15 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/igb/igb_main.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 131df3e09ba1..0aca2e70087a 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -8484,8 +8484,15 @@ static bool igb_clean_tx_irq(struct igb_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-3-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-369207-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!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-369207-linux-kernel-netdev=dewy.ru
From: lists@steffen.cc (Steffen Dirkwinkel)
Newsgroups: linux.kernel.netdev
Subject: [PATCH iwl-net 3/5] igb: let dev_watchdog reset the adapter after
 a Tx hang
Date: Mon, 23 Nov 2026 10:55:17 +0100
Organization: Usenet Network
Message-ID: <20261123-e1000e-tx-hang-v1-3-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="3845134"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:n+b05Q0y2rdDol2F94u4VzsQ/pk= sha256:sHQfgOb9FKvEZnHZNsIKZvjoJebzk0Tj6nMRlG/mZWQ=
	sha1:hZ5lyUB4aqXFIqH4ES/hGyzT8WY= sha256:nk6dvhhEiiTLQ70qaILIkFGpWHEq5Qfm0OJIGS4WNRw=
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 0F1DF125D98; Mon, 23 Nov 2026 12:56:45 +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 1RH1h6NKhYuq;
	Mon, 23 Nov 2026 12:56:42 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-369207-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id E56F2125D95; Mon, 23 Nov 2026 12:56:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 8378F344E5; Mon, 23 Nov 2026 09:56:11 +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=1795427767;
	b=jA9qsA8e61Oio8sYmonr/QUb1NY2BrT8H2kVEz5ETf+VRkVUNJTmEC7bjj6g+5qUwRr0
	 TbyOvUvql/DOhmv5BgbhP1k9YKZ6LGZDXAuZdKDAdiDuSrS3v9hyW2WlpEB2oYEQ5Z25L
	 8y28/q9xnc1CYxmMQHA2Tz7jd0PkK4h0a2C6Tlmlu1ltyUXdcpW4jGtYt5KN0m0SlKbjr
	 LTiHYZClpPj/sTbrWVMSeh8DeHzQrES5hZANi1gba6pQcKJ3gIySotVSEpvcslqwfn9Zx
	 4DUDluLjMevBg4rkk1hZbmCwMp7Q0We//wYwT543+NtICf6Pk/a4py55RCJSiK/9SlQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795427767;
	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=bEpIf88Bd6lcTR9zfzufaNRnF9usrLgoYrUbzb2lfhE=;
	b=vRP5vgPIp2l1QhsrDoPiNaB6vLqGfpUHNT1Gtb6Rxja9wo01WHqYiAaHHogQnVEQk8J3
	 2NoduyKdttejLzEZwLffcle8rOTNiwcCl3SqgaBfmQJobHzSo3N5bH+upm2GQ/mT/q0o+
	 cI7gyXekrWN31bvGPZOrqwbp+zvs7UERZ4reDCpqpxXBT2xf00H4Ae1KwzxUJsM1kvq99
	 G7cbqAHVMP4uy8q6pzdFQMcPxniiAMF3vReEIYF9g/oHOnJDjxLl82EcbM4Vbcu00c/Vg
	 WJpvWszAZqVYO70yl1ujGbD6uaLsEPojKNT7jJs6j/3FGZeqMD4eeDsR2zuY0Po98YQ==
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=Y9ysuHnt;
	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 76254606A6A0;
	Mon, 23 Nov 2026 09:56:07 +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=Y9ysuHnt
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=80.241.56.172
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795427756;
	b=orh/HpU0EG84vpFTAtREBG9x6UV5gmtm0rSvEF5M7Qmb+VUnJpkD8DI9z52v5wY5/+Qf
	 RP2sFfrN/AwveA23TrcQ3Z8B+qeX10G4ZPXo4NQIo1yiY0bi+8xmNOow5i/3ZW2sVP10A
	 3HGVRl7O1BIRQapvDesw1AZLkGhhlPeNZSe5PjKAIKN4RI3a9MtPlUyqN2JbFKKIsGfsh
	 nOccoalQbjZLKLpF4z4xsulHBp6oUF5JBgRLPE5hXuBXtVWrmyzQZVfwy9DQt0ZmctT5e
	 Sh3pCAUtYBF9bJfo9Mf1AeLgbCdJrgrKZtjI6f0ao9Mt1uI52h33bEo+RkxqkJruTKA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795427756;
	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=bEpIf88Bd6lcTR9zfzufaNRnF9usrLgoYrUbzb2lfhE=;
	b=H5uIilLLHIn6q7sBbX7uatnzQHZO1BWloi0PdnZuRH5ayNfIHAfygsHxN8sgzPMZi9V+
	 ytf+iubHNrEh3RXgYI6VylvM807AwjWLkTi4Lm5/GZ2ePird7VcXkVeeErADcQbHdVGvH
	 DWL8GDFzb7CK/q/pkWBrGqXLPzygeq/0ag8GaXcNPw3hvuSmaobLO21meFXAz6qxxj43k
	 RgtFEsBOriiyDAJuTtENT6VTm1F3KFpM17OASoZeyU4NdUs9F5po6/F3I9DgQUtQi+/1X
	 3vptzhsvf/2UDGtUVqBdDpepMhoZV9OBpJ8G+LvqMKvZQYMoSnHQU4KDNx2iPRy2sBg==
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=Y9ysuHnt;
	arc=none smtp.remote-ip=80.241.56.172
X-Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172])
	(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 1E0F4606A33E;
	Mon, 23 Nov 2026 09:55:55 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1E0F4606A33E
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-202.mailbox.org (Postfix) with ESMTPS id 4jY1Xm5C9dzMlgh;
	Mon, 23 Nov 2026 10:55:52 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=steffen.cc; s=MBO0001;
	t=1795427752;
	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=bEpIf88Bd6lcTR9zfzufaNRnF9usrLgoYrUbzb2lfhE=;
	b=Y9ysuHntcZr/WuV1FN7G9XOKaV9MwE9QBnxdAjOysKRf7VwR6PJxOwLKxUxpnj/7x8pBIK
	46JMRw1jfqooqNjoTNACt6vM/DtzHd5a9R8ogsc5xpZXby2xbfRxLa6p8BHBb2rP4cj1ta
	xflqulWQ7fj7Dtz20GqogRZWC/oGDqwfykV5CcGWmAcgwSqqlC4YASyRfI7OZaYFBt8EGC
	XYOfVxmUlfnugzA2QOwQCJ8wlLN86jI3L9W01ctUiDkHthslKrBicfR1xEg94mcS4qlm2n
	h0FVop07MPGcqBQs0Lv+ybypsMyZr+K3kKrV8S1bQyDsY+6nkthVM4HWLkYD0A==
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=2327;
 i=s.dirkwinkel@beckhoff.com; s=20260625; h=from:subject:message-id;
 bh=kUAgDpH1g5eruMkTh7j/zlD+tdNUXEhJeF4Te0NE57c=;
 b=7q9oPPB6+vOKUJdNZ/0FO9hSkalrOkgPaS/zyYRT1rxRiLlwOTPyi4s0eVSZyGv5KcFpcRD3v
 5/b1b2sdH2tCwKsEVw/OL5SezW6Xa45sNKMQDXtZprZxLD14L6Hwsrk
X-Developer-Key: i=s.dirkwinkel@beckhoff.com; a=ed25519;
 pk=5DcsaSpVtmm7nCi3Bnw5A4vbXI+sg3hBgt8e2A2U/gw=
X-Rspamd-Queue-Id: 4jY1Xm5C9dzMlgh