🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6381

[PATCH RFC net 5/6] net: macb: kick the transmitter on link-up

#6381
From: Steffen Dirkwinkel
Date: Thu, 22 Oct 2026 09:38
50 lines
11452 bytes
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>

Write TSTART in macb_mac_link_up() for every queue that still has
frames outstanding once transmit has been re-enabled.

Frames queued before a link-down stay in the ring, and setting NCR.TE
does not start the transmitter; the driver relies on the next
macb_start_xmit() to write TSTART. If BQL stopped the queue before the
link went down, that transmit never comes and the queue stays idle
until the netdev watchdog fires.

Like the rotation, the kick is skipped on the at91rm9200 EMAC, which
uses its own TX path.

Fixes: 881a0263d502 ("net: macb: Shuffle the tx ring before enabling tx")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 6e7ead23d0b7..3dfc7ffdd598 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -903,6 +903,8 @@ static void gem_shuffle_tx_rings(struct macb *bp)
 		gem_shuffle_tx_one_ring(queue);
 }
 
+static void macb_tx_restart(struct macb_queue *queue);
+
 static void macb_mac_link_up(struct phylink_config *config,
 			     struct phy_device *phydev,
 			     unsigned int mode, phy_interface_t interface,
@@ -969,6 +971,10 @@ static void macb_mac_link_up(struct phylink_config *config,
 	spin_unlock_irqrestore(&bp->lock, flags);
 
 	if (!(bp->caps & MACB_CAPS_MACB_IS_EMAC)) {
+		/* With BQL holding a queue stopped no xmit would issue TSTART */
+		for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
+			macb_tx_restart(queue);
+
 		/* Reap the frames completed while link-down had TCOMP masked */
 		local_bh_disable();
 		for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)

-- 
2.56.0
Technical Details
Message-ID: <20261022-std-macb-v14-send-v1-5-9187bc545bf6@beckhoff.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350487-linux-kernel-netdev=dewy.ru
References: <20261022-std-macb-v14-send-v1-0-9187bc545bf6@beckhoff.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350487-linux-kernel-netdev=dewy.ru
From: lists@steffen.cc (Steffen Dirkwinkel)
Newsgroups: linux.kernel.netdev
Subject: [PATCH RFC net 5/6] net: macb: kick the transmitter on link-up
Date: Thu, 22 Oct 2026 11:38:50 +0200
Organization: Usenet Network
Message-ID: <20261022-std-macb-v14-send-v1-5-9187bc545bf6@beckhoff.com>
References: <20261022-std-macb-v14-send-v1-0-9187bc545bf6@beckhoff.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="179549"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ill/D04NIBSXQPXBVLMGrQ5qW9s= sha256:i8YnVvef5n8Rh/Tmf5WqJb4axB29OH3fnkX63vc6pv4=
	sha1:P3QqMQN536e4rlzP98ZmiL7o0Is= sha256:MTQ/A2wK8OvoaluczLFY/NJCaT/yEzENHWfgc6DBThE=
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 F0C3011121E; Thu, 22 Oct 2026 12:44:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.15
X-Spam-Status: No, score=-3.15 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.25, 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 omvy_JCSmEm7;
	Thu, 22 Oct 2026 12:44:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-350487-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 8C67211121A; Thu, 22 Oct 2026 12:44:27 +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 B44DF60CCF6; Thu, 22 Oct 2026 09:40:23 +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=1792661960;
	b=kuG1n6GVVVuSckLRoZOQU3i5z19OQ0srhd5o+iK3VAsMZiShRT7+7jMp6bzRZBIiEP2+
	 skyAafdhi9Zc1qQHiGrAPFUhGxt7Qqm1Cubhq/53TMufmr69EbyXNWcnu+nnBOiHRyMqK
	 B7RXrXDfRDV4Mm84lpvUcB/Urs1RPWxpunt8RPyRLlTCiCnrBMf7aKWN2nHBy7rKjVsKt
	 Str5ROoNcPnLTpQpzerd8AXF3C5YkcLhczzYet3rP2TCV0I4vrDPrI+k+CrHQ6HHbtYiK
	 7io6VeVk+3CQm4htzhsd7ftrSYyuhlhxli1MSWPTXG/0MIoXzphlRFxj90puZkbQWwQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792661960;
	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=MPcn+B07MjwWl48U+6kkKYJpZBnSouBnLfdeIiveW/8=;
	b=s5bCM55jXqOTkSqjaADdzk+Wfma5cT60nC6GiNyPj+BV/OyxuFaDdSFOrA0uC2IwMnyd
	 4Y8AcKpDlQrxMwtnPaP33/Nu3omgzfyKUx7ovxl1VLSz4zPxVCsUWHbc2qZg8CDrld0p/
	 k7xvXbQGkR5lHQNJmShm3uBg5Rc8+4aUwae8yKJKsjr4sQWMQQGSQCO4ijXUVRKFx7KDM
	 sYvYp73MVBx2DEStOWQ8Uelqz01A4kj8nZAZMEgLD3LQTooZbw4y08RTreUcEZsv8Oynj
	 jje8nQTA+TYOgLYscQgY3hgsUz0ZeKv3P/7XQUm4JhaQC2po4pXn14a7FJi/MDIyiXw==
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=G4WJWQWD;
	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 2DF6F60A5BC7;
	Thu, 22 Oct 2026 09:39:20 +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=G4WJWQWD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=80.241.56.152
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792661954;
	b=CQLP4i4zRrPLRlGg4e/BkJDxhWeplo1ijc+tXh7XRdbC4HCaob6rRjEF6EScn1wfYYBb
	 0JDz1RplBPPDNsUD1Bbj7idUer7mz7r1iPVjmDju5rKeFXud5uyrKOpqJ9Q6NreaD8DsJ
	 VALTBnrTjJRtiFbM3bZJ8DJaneQji3pbh3bliumyEhQfRGYZU0dFnCnq+v3qPxL5W2+1N
	 KdmIijgJURORwxrUm/ZqTU+Fnc1w4wCH39N4tCLz5zpYxzlg8EFgSjBlZdAoToE3URDXx
	 iPnOSHsGnz3+GZXfEfUf7dgMRCutRS2P/eeBJemH+nLf33S14ng9+PLF9oifJ2yEYKQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792661954;
	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=MPcn+B07MjwWl48U+6kkKYJpZBnSouBnLfdeIiveW/8=;
	b=f5UMb4lfBHqJEVk6RiDSPy86ZglyRdNDb5oym1bl6mWjDJUm0TC/02hg3ZKBZJy1pB8p
	 8Npls6HtR49M6Mb9gRqwxbCQK1QeBrde+g6yZsNIy1LKLMu1kT6pakXgFx73DsHs2ltA+
	 EIyyzybAzCjwe4wMPy2pNv/8tNr3C/X4KKCT7eG3nPud79nyciH48QJcWzYVQz3MY6oKn
	 tTdx6Z6BBQNxx0X5udR/5jCFclrdTQo7+JfUjTyPlKRYt4o7sonEKb6ptSC/bVMdI0nGI
	 KIUS7o5pbRmG2A0JXGHMbTHK9DW2ITgVZaDwDxdS2QH3Vww5NhAQ5690cGebZd8SyIA==
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=G4WJWQWD;
	arc=none smtp.remote-ip=80.241.56.152
X-Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152])
	(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 3223660A263E;
	Thu, 22 Oct 2026 09:39:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3223660A263E
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-102.mailbox.org (Postfix) with ESMTPS id 4j9LhF6B16zKnBg;
	Thu, 22 Oct 2026 11:39:09 +0200 (CEST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=steffen.cc; s=MBO0001;
	t=1792661949;
	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=MPcn+B07MjwWl48U+6kkKYJpZBnSouBnLfdeIiveW/8=;
	b=G4WJWQWDvKAsQWTzxrl8MTsoYJfSimjLY5MhS2DEc6Um0cQbxJJz7wCEyQiYZRsWjmir1e
	WFFZcTV4gF4H9jq++utgBCHhJEljcgwor5RvDxi49NVV/bE8iuk9OxU6n3NG18AT3mWQ4E
	tc/Fjw9ROrNdp9A7RlLJwpUbc9pwjry0OJN3DVdUZS9DWAxl7thnP1MDAZ1R3zd4kvVPXQ
	oC0fpnzoNykME7ePzh9Jw5FfggHm2V7kSW3ZXlk/l8ZcYbqV8J9JF7EUqM124kJJCCSjqk
	pztI7jrtfbAYgBVGRLgjtp9Qwv9cJ6E002ZZJ7svfZyHA4utMuzG7sT/by7Vzg==
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: <20261022-std-macb-v14-send-v1-0-9187bc545bf6@beckhoff.com>
X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 
 linux-rt-devel@lists.linux.dev, 
 Christian Taedcke <christian.taedcke@weidmueller.com>, 
 Nicolai Buchwitz <nb@tipi-net.de>, 
 Andrea della Porta <andrea.porta@suse.com>, 
 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=1792661936; l=1899;
 i=s.dirkwinkel@beckhoff.com; s=20260625; h=from:subject:message-id;
 bh=5Z0ud4WyrI5qwf7Qm11+ThFk+cekJfz3YuSCjzXymPE=;
 b=DnlqritolN55nKpIS1HTsRk7AASRMQdpivNIZrQvkarLc+rCw8l1/4WhsoznSPM36Ah6tjfvg
 roI9dIsIpvGAzKBETuWEh5PE7K3BW9yHZScF0F5Apqj3EJ3xqJi2Qqh
X-Developer-Key: i=s.dirkwinkel@beckhoff.com; a=ed25519;
 pk=5DcsaSpVtmm7nCi3Bnw5A4vbXI+sg3hBgt8e2A2U/gw=
X-Rspamd-Queue-Id: 4j9LhF6B16zKnBg