🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21479

Re: [PATCH net-next v5 08/24] net: dsa: rzn1-a5psw: Fix LK_LEARNCOUNT write mode encoding

#21479
From: netdev-bot+sashiko
Date: Tue, 24 Nov 2026 02:26
66 lines
11123 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message for "net: dsa: rzn1-a5psw: Fix LK_LEARNCOUNT
  write mode encoding" carries Fixes: and Cc: stable, but it only…
- [Low] "net: dsa: rzn1-a5psw: Fix LK_LEARNCOUNT write mode encoding"
  fixes code from 5edf246c6869 ("net: dsa: rzn1-a5psw: add FDB…

--

net: dsa: rzn1-a5psw: Fix LK_LEARNCOUNT write mode encoding

This patch changes the three writes to A5PSW_LK_LEARNCOUNT in
a5psw_setup(), a5psw_port_fdb_add() and a5psw_port_fdb_del() to use
FIELD_PREP() with A5PSW_LK_LEARNCOUNT_MODE. Before this change, the raw
mode values were written into the count field instead of bits [31:30].

> The LK_LEARNCOUNT write mode lives in bits [31:30] of the register, but
> the driver writes the raw A5PSW_LK_LEARNCOUNT_MODE_* values (0, 1, 2)
> directly. As a result, adding an FDB entry writes "set LEARNCOUNT to 1"
> and deleting one writes "set LEARNCOUNT to 2", instead of atomically
> incrementing/decrementing the counter.

[Severity: Low]
The FIELD_PREP() conversion looks correct. Could the commit message also
say what a user sees go wrong because of the bad counter value?

As far as I can tell, the driver never reads A5PSW_LK_LEARNCOUNT back.
It is also not exposed through ethtool, devlink or debugfs. The only
accesses are the three writes in a5psw_setup(), a5psw_port_fdb_add() and
a5psw_port_fdb_del().

That means the bug only matters if the switch hardware itself acts on
LEARNCOUNT, for example as a learning limit or to decide that the lookup
table is full.

Since the patch carries Fixes: and Cc: stable, would it help to describe
that hardware effect? Stable backporters could then tell whether this is
a functional problem or just a wrong value in a counter nothing uses.

> Fixes: 5edf246c6869 ("net: dsa: rzn1-a5psw: add FDB support")
> Cc: stable@vger.kernel.org

[Severity: Low]
This isn't a bug, but should this patch go to net as a separate
submission instead of being part of this series?

The changelog says "v4->v5: New patch", so it was added to the
RZ/T2H/RZ/N2H ETHSW enablement series. That series looks like net-next
material: a new DSA tag protocol, DT bindings, PCS SWCTRL speed
selection and OF data refactoring.

This change only touches existing RZ/N1 code in a5psw_port_fdb_add(),
a5psw_port_fdb_del() and a5psw_setup(). It doesn't depend on any earlier
patch in the series.

The same seems to apply to the other fixes in the series: "Fix
VLANTransmitted counter offset", "Fix MDIO clock divider calculation"
and "Set driver data in probe".

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261120002549.1908299-1-prabhakar.mahadev-lad.rj%40bp.renesas.com
Technical Details
Message-ID: <179548718477.3135.6592520355111834808@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369964-linux-kernel-netdev=dewy.ru
References: <20261120002549.1908299-9-prabhakar.mahadev-lad.rj@bp.renesas.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369964-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v5 08/24] net: dsa: rzn1-a5psw: Fix LK_LEARNCOUNT
 write mode encoding
Date: Tue, 24 Nov 2026 02:26:24 +0000
Organization: Usenet Network
Message-ID: <179548718477.3135.6592520355111834808@kernel.org>
References: <20261120002549.1908299-9-prabhakar.mahadev-lad.rj@bp.renesas.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="4034414"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:EOlouIxTTU2P+sb+TVvjrphzERM= sha256:+6h40wodfwY831OELjSWfd1gBjGpD7CXIUj3Rm0P0CE=
	sha1:iCAVxeCvvE2SEt9IwawKGyK1J3E= sha256:P9Alg9mtIYS4yr9WSPRNBifBC61r03efo222msUhRLs=
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 A4DDA125DC9; Tue, 24 Nov 2026 05:26:45 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
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 zWuAx_AuqrBV;
	Tue, 24 Nov 2026 05:26:41 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369964-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id DE732125DCA; Tue, 24 Nov 2026 05:26:31 +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 0D58027CE0; Tue, 24 Nov 2026 02:26:29 +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=1795487187;
	b=eq5+P0yrceNqPQc84kScGTloZL5qq7ifp7LD9xsuCE/PaaDwxy/unT8VYTbHJRzd0r7/
	 UGsYKNtGCvEhPC2G+bqEmXqI0Fy8I9jXmYOsmAFx3TlAVdo4VRc2L7wzW5j8y1Im7FAp4
	 TyJG+niyhBKeY7xTlYrnSFdbsBmhYT3+BEaKc/uOkUBiE1DAkNKsYXcmBM0Wrmbn/HX+3
	 P1NLMiVxzhy3Qqz5MoliNr2mnyKWmDapG7N9wdSpSB4w/WH3d5jzzIVJ/Cdp7OApl3fTk
	 llHQ7L/T1eMOVNq7197jEz8Y+WxDsvPempnaAiAFTCm77N+EMcuJg/vkMT3W3/uDXiw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795487187;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=p9Meye8EdomVgGo7ib0+5Twh3gdkb8XAbFKswpS/dAA=;
	b=C46CCUcv4PyMoVP90e122A/3SPpPFkJdPMkuRD7iZ4Nug82zyqaQhsa7KQkzs76vPgl1
	 n9k8/GKy78X7lTuE5HnDL4xe/ar142W/5msQfsa6fd+e64rpBGW0MIXeMct5X5lImJox2
	 1yQ8SRU4g5QRQD/uzZBXj9YdUsMT6y74eZe5v3ycj+JA1MpELTZn6+sKMjYtbc6XKd5W+
	 ZXKdKAdpiCZhZrv/tbvGC16pCrZ+Ppl8XFTuLcllOjWbuqO2C7UUFKnd8YGNG4mRIARxZ
	 DTt+xNQL4Xknjci0XjqtZX+ni5RD5v2n69Y+jumVajAtNGslV3n/+78zAUQKvc22BCQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QKM51Ptb;
	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 B905C606A31E;
	Tue, 24 Nov 2026 02:26:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QKM51Ptb
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795487186;
	b=N8mB1Ew4ua6qYg8pKhssnJ0fYwE81TeRZTm3Gq4Wxea70RQzZcQWeDh0uMOxu2u/EQS6
	 El62Cywj2WMpX7WPsso0lLDqs9CRl+8x6dTDK1JuREN4AUlsGsmA8ZfN6G/zKaVOJwHMj
	 szfyNK0BoRru6xQ+Xs5XEBDZvIXzOKVjn8tYnUruXLZ2aaWnpWyUwD7zEdzoT6lWLD1L3
	 h+tgR1cKYrt4OoCT29HjYn+dRmSgVwQTsNOJdz6ABToaXsdxEOKrz8Exutg6p8mmr9I6w
	 CGtdr0Q6fnQAPf5pnjB9ZBrkxo8a9S44iAUOGFRqbvs9V9rIenkJhfcI37UxMfwda6A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795487186;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=p9Meye8EdomVgGo7ib0+5Twh3gdkb8XAbFKswpS/dAA=;
	b=V6L77LxmIW2NaJ8R8aRU8U7quX7aQlW7NFKO52fEcwtr51CvCzPkv45ZNveiiXxbgm/l
	 l7MfNzvgQjg5yTRcCsfdJK+Aiepl3hRZP1/o94/jnl1zyJFDX4oZrhbXVnRkH3WFA1onL
	 Q6lqzwMLKpkZc4nVwlkCCQQvuOa0DGRSmdUHLn7/umG2xU6qMGspBUKPGIqV197Qnvp5i
	 LhdmgAS3ukoA3/4gn/V4RL2Ggc/BhQb72RxikrMEwMp0j+lEfLf9kJaVNmzrvzEvV3FCT
	 sEMqzMH0PkoTMOV0OirQNcGNstBuGxCuowdT6V2k0+NVy6QFMQ+ya+g1SA/32fcmMeQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QKM51Ptb;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA737606A686;
	Tue, 24 Nov 2026 02:26:26 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 381431F000C0;
	Tue, 24 Nov 2026 02:26:25 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795487186;
	bh=p9Meye8EdomVgGo7ib0+5Twh3gdkb8XAbFKswpS/dAA=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=QKM51PtbHVOfJUC5lAEw515T3RPXG4Pt/qEsW9pEjw5PEBp3vKBVPV4WBamVWlI3T
	 kqh74m/0an1nGp0uvEdD5o6qtm6Bx+5UCvn6Mb3vQr5Mnnaf9aZyNiFXCEg1Cc/If0
	 XsuDH97EU2rtCkPAMPtUXmzN410iOlYjH/F8ivdlENz4edTyQSLQqqxdvYS+PK+ick
	 KYAUQH2AwbTknmB1S/3PWe30IRD9hsNqXbZaKZLxYLajAPJJqx2ayRROLh9od0HLLh
	 i0tgtitUSzZ6Th13PMXapWLUjPK28r/X7xGc53fwJpjMHGKc/cRvkWqDPeRSj+GKsz
	 SEGyDbBIiSmnA==
X-Cc: clement.leger@linux.dev, andrew@lunn.ch, olteanv@gmail.com,
 davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
 robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
 hkallweit1@gmail.com, linux@armlinux.org.uk, horms@kernel.org,
 p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com,
 f.fainelli@gmail.com, ralph.siemsen@linaro.org,
 linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org,
 devicetree@vger.kernel.org, prabhakar.csengg+renesas@gmail.com,
 biju.das.jz@bp.renesas.com, fabrizio.castro.jz@renesas.com,
 prabhakar.mahadev-lad.rj@bp.renesas.com
X-In-Reply-To: <20261120002549.1908299-9-prabhakar.mahadev-lad.rj@bp.renesas.com>
X-sashiko-severity: Low
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