๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23301

Re: [PATCH net-next v14 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support

#23301
From: netdev-bot+sashiko
Date: Fri, 27 Nov 2026 03:00
86 lines
11285 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] In drivers/net/dsa/realtek/rtl8365mb_main.c, the family D early
  return in rtl8365mb_sds_probe_option() sets mb->sds_supported = trueโ€ฆ

--

net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support

This commit extends the RTL8367S SGMII/HSGMII PCS code in rtl8365mb to
family D switches. On those switches the CPU SerDes is reached through
the indexed SDS13 window and the SDS_MISC fields use a different layout.
Family D gets its own tuning tables and SDS_MISC programming, and it
skips the family C option register probe, the SerDes pause programming
and pcs_link_up().

> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 3f45ff43cb4c8..cfb8d4bb1126c 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c

[ ... ]

> @@ -1418,6 +1461,14 @@ static int rtl8365mb_sds_probe_option(struct realtek_priv *priv)
>  	int ret;
>  	int i;
>  
> +	/* Family D has a fixed SDS13 programming model and does not use the
> +	 * family C option register to select its tuning table.
> +	 */
> +	if (rtl8365mb_is_d(priv)) {
> +		mb->sds_supported = true;
> +		return 0;
> +	}
> +

[Severity: Low]
This early return comes before the "Nothing to probe if no external
interface is wired to the SerDes" loop over mb->chip_info->extints. As a
result, every family D chip ends up with sds_supported set, whether or
not it has an SGMII/HSGMII extint.

In rtl8365mb_setup(), sds_supported is the only check before the rate
limiters are raised:

	if (mb->sds_supported) {
		ret = rtl8365mb_sds_raise_rate_limits(priv);

So every family D chip now gets 0xFFFF written to 0x00CF and 0x0398, and
GENMASK(2, 0) written to 0x00D0 and 0x0399. Before this patch, family D
never wrote those registers.

The 19-bit LSB/MSB layout and the reason for raising these registers
(the 0x1FFFF reset default) are documented only for family C. The commit
message also says:

  "The port 6 rate limiter registers it writes are the family C ones;
   they have not been compared with the vendor RTL8367D API."

If these addresses mean something else on the RTL8367D, the regmap
writes would still succeed. The switch would be misconfigured and no
error would be reported.

For the RTL8367S-VB this probably makes no difference, since it does
have a SerDes on port 6. The commit message does say the code is meant
to be reused by other family D boards, though. A later family D chip
without a port 6 SerDes would still get these writes.

Could the family D branch skip only the option register read and keep
the extint check? And could the limiter addresses be checked against
the RTL8367D API, or the writes skipped on family D until they have
been?

>  	/* Nothing to probe if no external interface is wired to the SerDes */
>  	for (i = 0; i < RTL8365MB_MAX_NUM_EXTINTS; i++) {
>  		extint = &mb->chip_info->extints[i];

[ ... ]

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/874b29a3-f47f-4bf2-a0f6-2f9fea712f4c%40yahoo.com
Technical Details
Message-ID: <179574842350.3135.16231120628373898056@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-372418-linux-kernel-netdev=dewy.ru
References: <19c82953-5c62-461f-b5a6-3445a485d136@yahoo.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-372418-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v14 10/15] net: dsa: realtek: rtl8365mb: add
 family D SDS13 PCS support
Date: Fri, 27 Nov 2026 03:00:23 +0000
Organization: Usenet Network
Message-ID: <179574842350.3135.16231120628373898056@kernel.org>
References: <19c82953-5c62-461f-b5a6-3445a485d136@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="623926"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:UaHLajJTHUyN/6Jjno/TBfOWFno= sha256:f0IBPsePxCTU3cUXXpIS2tTp7iNu54lgKlBJH/ctK4w=
	sha1:5vlnCQ6eiLyBsloGZRD4gz/G+dI= sha256:GEVW8/BtbE49hq98cXvoOr08YMwkbg7sVyPJ2BG1g08=
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 A2D56125F0F; Fri, 27 Nov 2026 06:01:05 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 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] 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 ncu753rl7F4f;
	Fri, 27 Nov 2026 06:01:01 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372418-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 94273125F04; Fri, 27 Nov 2026 06:00:53 +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 74E543F3E1; Fri, 27 Nov 2026 03:00:26 +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=1795748426;
	b=ARrXvUNvbMQ1qbw8gs5O+JMlcFvOHOisIghCl1yTsDzPk/YEQgMQyE2l7jlktRbYR6Ho
	 5+yRgFHyt3ANtdOWoMqmjrdReKLGYnZNRAUqPih8u3Vrr0EXrMLRtPh7IyxBHMlrTdM3U
	 9/bcPqiQ6YIDi+mYm3B8PjW1wznpSIp9Oacus9FfpyrltABJ0OWu3X/mLtODgn5tsJmOn
	 p12ix1hXUX0Pn5xRltK0qS+Vl8a5EFhc4TSjKcVi1SZu5l8WE52BKUqBDcDZqZ52rttXH
	 UXJ8esV8FdZ7tRUlb7ZPx0VBr1aDHncepT9hhvDAzT33a7pJl7LBkWAYmIxZ3xJ7cnA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795748426;
	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=USZ4pXGtSrus6rr3wZ/V5Nx7cc8/08wBYDNTSgspgLs=;
	b=CGeiddeSpHYf4lDCX7hS9fyPI+vzCIkQ1NSwfD7QKyBfVsovT1xxHZMD3jFDcVuv5xyb
	 8uzfOw5yGP6W0t7VKU+HM9HuyrSH7We9QVvET8n5WdOdvzZ4clg/VzRSbVJ12PE7W7kEr
	 Ut+kQ+7kara4+M+e8/24cggZ03uoIeTtfGP1N3gj0LySfTAoXruLZv8lHid6d06Hcwjnq
	 nLwT8Tj2lFPlrkUI404XDFSPlwbB/DNzEmYHqGrEcRw+pG+n2ofnV+Hcmt4eBTkREeWBH
	 dK1ZWxLKk0iyfI1ks9HxT+x8q+7QuVo5j+We17ooSH1r062oN/ZKdINSFBor5V0bsfg==
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=m+A8L6z6;
	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 399A6606A327;
	Fri, 27 Nov 2026 03:00:26 +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=m+A8L6z6
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=1795748425;
	b=JcRJ10uVaRzoNhBCwiX/cm310xt6VKZ2VbTL0JP3VVWlFAROmLteqJ5jUwog8GAfIiRj
	 NH9W+8ZPs2j4gVyKpUMp+rG6WauMdoSG2K0V4dZv1vnpyhHHj7RQXSRqm7ozzOxstRsOi
	 iMp0oJcCs5Wm+65w2/ghCdYQLcmU3DMT1qh9mxr16Izr08CPeIJMz2IuigbxZnzeR7aV5
	 PIv6umymfp9e5RNmvwxrhQzDMqGWXE/OneUjqluzJl4FfFwBc3Z9qeY28GLDzkP4/SEeD
	 sEhKgXqL3ilhImiBmcUufmIZA5cGag11ZLM/VifojTOqzTfwKWuFHsgpnJjR57bUznQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795748425;
	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=USZ4pXGtSrus6rr3wZ/V5Nx7cc8/08wBYDNTSgspgLs=;
	b=i05EhnnV0wOifANVbHAz0bZLEWYcLnRBuj7QonKhnZNlrHmMF0Ou6KylC2K/SIWGT4Zv
	 zlylbPvfEP4A33VR8gkRIg/7m9IYtCgeikBTlfjCIBi9riokB8E9oWZeBL4tXHENZGwNM
	 G/3HBAccQPOfi4/9YfNoDxeKcRsyPMrpdURKIhNqNES01GObh8atc15cle0revsJzTX/L
	 PYuWqn6mO+FEXpntYyAFqFuoCAGqKgbXLOV3iqIWb6AqCAy8VDs6Xdtgo51ncj656Vn4Y
	 DhSqorkzwIbx/0dNBlqcQyM8WFn5K0n1ZjbTJv8Saj+FcNTSBJ6ObiCda/a+qq9GD0g==
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=m+A8L6z6;
	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 5829F606A337;
	Fri, 27 Nov 2026 03:00:25 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E61491F0093B;
	Fri, 27 Nov 2026 03:00:23 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795748425;
	bh=USZ4pXGtSrus6rr3wZ/V5Nx7cc8/08wBYDNTSgspgLs=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=m+A8L6z6SMmJDTeW5ik12AkU7p5PrDujYC7bxHMhscO1t3SvrUewPCERQGlQ5nmEb
	 DAuCK+J/QLzdKbvNpoJDS9MXBaA7J1Vz0iqBJcOgBveNZQP/l9VK4cwxSILK9+LJSF
	 OqoFer7/c84B2THDkFr5vIK7fv/8tYN74KHrOoKn646Zex3zLFM7tVlPuUJDyC+RA4
	 CHiWkEjT+bfCYLxK13cArfKEXK4ynRq7DkNNDRwOh4qXsoNJ+xFwFPAOvMj41eLEYg
	 YywZOUCJbHO0X2J6sMqjMc8ACQVGL9mVWt7axV/RSSUhS9yw2qBTdbwZrREtZMyenz
	 aGE8/HiApO3Eg==
X-Cc: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org,
 davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
 linux@armlinux.org.uk, luizluca@gmail.com, maxime.chevallier@bootlin.com,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
 alvin.sipraga@analog.com, gusfmora@gmail.com, kuncy7@gmail.com,
 fabianotassotti@gmail.com, gabonpivovich@gmail.com, contact@c127.dev,
 o.rempel@pengutronix.de
X-In-Reply-To: <19c82953-5c62-461f-b5a6-3445a485d136@yahoo.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