🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16755

Re: [PATCH net-next v6 1/2] net: macb: implement ethtool_ops.get|set_channels()

#16755
From: Nicolai Buchwitz
Date: Sun, 15 Nov 2026 19:39
36 lines
9796 bytes
Hi Théo

On 13.11.2026 18:32, Théo Lebrun wrote:

> [...]

> @@ -3351,16 +3374,21 @@ static void macb_context_swap_end(struct macb 
> *bp,
> 
>  	lockdep_assert_held(&bp->mac_cfg_lock);
> 
> -	/* Swap contexts & give buffer pointers to HW. */
> +	/* Swap contexts & give buffer pointers to HW.
> +	 * !new_ctx means that the swap failed and we keep the old context.
> +	 */
> +
> +	if (new_ctx) {
> +		old_ctx = bp->ctx;
> +		WRITE_ONCE(bp->ctx, new_ctx);
> +		wmb(); /* ensure IRQ enabled below read the new context */
> +	}
> 
> -	old_ctx = bp->ctx;
> -	WRITE_ONCE(bp->ctx, new_ctx);
> -	wmb(); /* ensure IRQ enabled below read the new context */
>  	macb_init_buffers(bp);

The NULL case reuses the old rings without mog_init_rings(). The HW
restarts at descriptor 0 but head/tail don't, so Tx stalls after a
failed ethtool -L? macb_hresp_error_task() reinits the rings first.

> [...]

Regards,
Nicolai
Technical Details
Message-ID: <0d65e4cc9a68684cd69ffa7feb5b7440@tipi-net.de>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363831-linux-kernel-netdev=dewy.ru
References: <20261113-macb-set-channels-v6-0-5de59d9e7f02@bootlin.com> <20261113-macb-set-channels-v6-1-5de59d9e7f02@bootlin.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363831-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v6 1/2] net: macb: implement ethtool_ops.get|set_channels()
Date: Sun, 15 Nov 2026 20:39:22 +0100
Organization: Usenet Network
Message-ID: <0d65e4cc9a68684cd69ffa7feb5b7440@tipi-net.de>
References: <20261113-macb-set-channels-v6-0-5de59d9e7f02@bootlin.com> <20261113-macb-set-channels-v6-1-5de59d9e7f02@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="1885307"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:xraMzQxZ4YKTvoIT1etKHQVVm0w= sha256:N3cJQhyGwS1NmNB/pYV4Km4oxSc/gqM39Ma6eVklhX4= sha1:jlD0bv21huJo0wcp5PSfUuskIoQ= sha256:jegppW17pQQ/OqiWRbvZTcwcTrNPSMiDACWl+NEC3c0=
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 36DFC114A50; Sun, 15 Nov 2026 22:39:54 +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=tipi-net.de
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 51rdvSAOkkS1; Sun, 15 Nov 2026 22:39:45 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-363831-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id E2CD6114A4B; Sun, 15 Nov 2026 22:39:36 +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 AD8802A04E; Sun, 15 Nov 2026 19:39:34 +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=1794771574; b=L9r4jbV0Auxj2rhl8NvcfnZ1dWKPqgPYwU/ZqcLgGb7Q1KgbFdeMv27E6PkLMDrNzMFm BkYs3SGgvzA9UuRtihpBrHcwIwJh4YCdyVY2b3LWFi0t2OcGUEO7h9fS14yveRzaXvh19 AVPPEzYbu7iN3dbqhM6D+I0e7gsXjDH4G7k9Po0cgj/5mMWIOaEqpMLsnBF2Lcklbau05 VFbaTPjTJZJUxIxRtNJoMCd/LSbIA8rWRSj8cys44g1viF2/VG/WRroHYDeeUyyHYVgbx BYOJLqTI6lRZGokI4w3RJhCWRsAJcM5PnTVB7SQgCsl55h+UDXefWy/zF4Qw75uOwHA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794771574; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=jWvcQguugJJmaOTWfGcO5C8vl8bBwsJMp17FuaFFPd8=; b=Q721Nxd3OkjbGVZyHD+EKRyVI9Cv0YFUdGswdAOttzYUUEAZBEUU39r8czscDsG1w5H4 0SZxIvSU0s9WlRif4XX2zg6Bmsh56DPRvzPpHTa8OFsJ3ybSi7guBr3FlF3Tm6LLPpVy8 IjLmYDJv6gxJmHH08UjCvSI1IGa5fBqDV3zGaeLn78o9S2RKPt7WVatkGo8KyEBN2KB2l ljTXOXw/LQtxzwgK9nH1du4Ihgur3O+6DoYeY40l+FczIwqSL1nqyXpiFyOht855U5d4v l4WS+Dbxs52WdZCCSs20WZXg2jWvigOZL/yPurKaC1tSvwDVxWspFqs9soQMAGXBmrQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=g+NJQwOj; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; 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 4C9A7606A882; Sun, 15 Nov 2026 19:39:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=g+NJQwOj
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794771573; b=Up1Pqj/G5z7dwqgMeC+YNnjM81yMxamNVqa5siZaHN0BYNYlcV4ZZi1hpi0GHFHgrrSn pbdhrR4YA+L2BcBkunGNIbcbM/1+myVksQMBLtWZtBM94i0PrrwAtNs7I0fXZ2rqbED7N 5R2FKb8jtSKNP/1ufaJ8zHrEcnz5yr5NeGlOM6YTfjZo+qLcaelfBVkY7vgzELYHnZEDk 6rHncFLTsGNLCQjxLCCAHYtAkwaeLYx6Nr5jSXtPx0tGPZ6ObIvfpG3IbRKJttA5nTntT vYeQbuIsXzSpwCiLgyRx8HI73XCvAsBohs2vBED4xw7va5sjooN+WevAiZG7Ug9INkg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794771573; h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=jWvcQguugJJmaOTWfGcO5C8vl8bBwsJMp17FuaFFPd8=; b=HPVZda1SvkSKgHNVKkotHJm1Pczccu1kjucv+AMBWYAJVeNOJ7Eic/rQhulAONKlT6XU ZxeRgrsJWrBqN3smfN+c2788AKEeLQ7VaEYSnepQSbfXbi3BbwNLTbrSfS4tAijdCfJnI qj5cfYeRslxtRGhG9YfXmSfXGCZc76SGjwM6NgpNPtg+DaU+8b4GXTTQHu3N6u/E3IaJ8 6hbSATBp64/uTcO8gy5RS//yinNrUvanJXBF8ZsU4vXzU44rRxdMb1oWKdzHYyTAdjFx/ rFEkkmiQV4SnDmjQgYV2WqKxPUzR1P4LDFUkoFfs9sTy7Um2xy3C7/Syuj2AiX4jt9A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=g+NJQwOj; arc=none smtp.remote-ip=194.13.80.246
X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 34AAC606A881; Sun, 15 Nov 2026 19:39:27 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 34AAC606A881
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de
X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D7757A1649; Sun, 15 Nov 2026 20:39:22 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1794771564; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=jWvcQguugJJmaOTWfGcO5C8vl8bBwsJMp17FuaFFPd8=; b=g+NJQwOjR1M5zeuXwatlNshn+nXRLYrqnCyBYGIZznNDkD/VFqCwESuWkyS8wi8wo65nmU KoaQ9V5PQCEwp8eY3LRzro3yrOzUBOQqD/cRr3yoCLtNsiTVQQKMq8SSxi0jzsJdRZevPC 7c9Sb4sD9YK7if4n2zkB8kdq7akvuT6vrXCABP35LT9VO7j23p0i2svN0hzM1/SBlTrGDW sQ1Cr3301piW+w7zpxzobifeK1iIpNSo/EdX4hJXivqiaMo31Z2QvBcfJn6ysT6HTqNJuu aqXMK+O/fdmSwZCytVmlzr3Pnq7whVaY31rPCdS0GUxCiMhJw1E5LGP7+9fu1w==
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-Cc: Conor Dooley <conor.dooley@microchip.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>, Russell King <linux@armlinux.org.uk>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Valerio <pvalerio@redhat.com>, Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>, Gregory CLEMENT <gregory.clement@bootlin.com>, Benoît Monin <benoit.monin@bootlin.com>, Tawfik Bayouk <tawfik.bayouk@mobileye.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
X-In-Reply-To: <20261113-macb-set-channels-v6-1-5de59d9e7f02@bootlin.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3
X-Received-Bytes: 9511