From: netdev-bot+sashiko@kernel.org
To: namiltd@yahoo.com
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
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 [thread overview]
Message-ID: <179574842350.3135.16231120628373898056@kernel.org> (raw)
In-Reply-To: <19c82953-5c62-461f-b5a6-3445a485d136@yahoo.com>
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
next prev parent reply other threads:[~2026-11-27 3:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <874b29a3-f47f-4bf2-a0f6-2f9fea712f4c.ref@yahoo.com>
2026-11-24 23:59 ` [PATCH net-next v14 00/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-25 0:00 ` [PATCH net-next v14 01/15] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-11-25 0:01 ` [PATCH net-next v14 02/15] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-11-27 3:00 ` netdev-bot+sashiko
2026-11-25 0:02 ` [PATCH net-next v14 03/15] net: dsa: realtek: rtl8365mb: refactor forcemode handling Mieczyslaw Nalewaj
2026-11-25 0:03 ` [PATCH net-next v14 04/15] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-11-25 0:04 ` [PATCH net-next v14 05/15] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-11-25 0:05 ` [PATCH net-next v14 06/15] net: dsa: realtek: rtl8365mb: refactor VLAN 4k handling Mieczyslaw Nalewaj
2026-11-25 0:06 ` [PATCH net-next v14 07/15] net: dsa: realtek: rtl8365mb: set and get vlan 4k for family D Mieczyslaw Nalewaj
2026-11-27 3:00 ` netdev-bot+sashiko
2026-11-25 0:07 ` [PATCH net-next v14 08/15] net: dsa: realtek: rtl8365mb: refactor PVID handling Mieczyslaw Nalewaj
2026-11-25 0:08 ` [PATCH net-next v14 09/15] net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D Mieczyslaw Nalewaj
2026-11-25 0:09 ` [PATCH net-next v14 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-11-27 3:00 ` netdev-bot+sashiko [this message]
2026-11-25 0:10 ` [PATCH net-next v14 11/15] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling Mieczyslaw Nalewaj
2026-11-25 0:11 ` [PATCH net-next v14 12/15] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Mieczyslaw Nalewaj
2026-11-27 3:00 ` netdev-bot+sashiko
2026-11-25 0:12 ` [PATCH net-next v14 13/15] net: dsa: realtek: rtl8365mb: refactor QoS priority handling Mieczyslaw Nalewaj
2026-11-27 3:00 ` netdev-bot+sashiko
2026-11-25 0:13 ` [PATCH net-next v14 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D Mieczyslaw Nalewaj
2026-11-27 3:00 ` netdev-bot+sashiko
2026-11-25 0:14 ` [PATCH net-next v14 15/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-27 3:00 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179574842350.3135.16231120628373898056@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alvin.sipraga@analog.com \
--cc=andrew@lunn.ch \
--cc=contact@c127.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fabianotassotti@gmail.com \
--cc=gabonpivovich@gmail.com \
--cc=gusfmora@gmail.com \
--cc=kuba@kernel.org \
--cc=kuncy7@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luizluca@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=namiltd@yahoo.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®