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
Subject: Re: [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
Date: Tue, 24 Nov 2026 01:24:45 +0000 [thread overview]
Message-ID: <179548348509.3135.4599625371501941340@kernel.org> (raw)
In-Reply-To: <729eeb67-d812-4f1d-81e2-4f4437181744@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] The commit message says "The chip has 8 ports (0-4, 6 and 7)",
but that list names 7 ports: five UTP ports (0-4) and the two…
- [Low] The new rtl8365mb_family_d descriptor sets `.jam_table =
rtl8365mb_init_jam_8365mb_vc`.
--
net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
This patch adds the RTL8367S-VB (chip ID 0x6642, version 0x0010) to the
rtl8365mb chip table. It also adds a new rtl8365mb_family_d descriptor
that selects the family D implementations added earlier in the series.
It also makes rtl8365mb_d_ext_config_forcemode() static and updates the
Kconfig help text and the RTL8365MB_LEARN_LIMIT_MAX comment.
> The chip has 8 ports (0-4, 6 and 7), which is described by port_mask in
> its chip info, as for the other chips.
[Severity: Low]
Is the count here correct? The list (0-4, 6 and 7) names 7 ports. The new
entry in rtl8365mb_chip_infos[] matches the list, not the count:
.port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)),
The 8 seems to come from rtl8365mb_detect(), where
priv->num_ports = fls(mb->chip_info->port_mask). That counts up to the
highest port index, not the number of ports present.
Could this say 7 ports, or say that the port indices run 0-7 with port 5
absent?
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index bfd7e303ca254..d4a886435876b 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -817,6 +829,24 @@ static const struct rtl8365mb_family_info rtl8365mb_family_c = {
> .l2_mc_to_data = rtl8365mb_c_l2_mc_to_data,
> };
>
> +static const struct rtl8365mb_family_info rtl8365mb_family_d = {
> + .family = RTL8365MB_FAMILY_D,
> + .jam_table = rtl8365mb_init_jam_8365mb_vc,
> + .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc),
[Severity: Low]
Can the RTL8367C jam table be written to family D silicon without first
checking it against the vendor RTL8367D init?
On every RTL8367S-VB probe, rtl8365mb_switch_init() writes all of these
register/value pairs right after reset. It then writes
rtl8365mb_init_jam_common. Neither table is filtered for family D:
rtl8365mb_switch_init() {
...
if (fi->jam_table) {
for (i = 0; i < fi->jam_size; i++) {
ret = regmap_write(priv->map, fi->jam_table[i].reg,
fi->jam_table[i].val);
...
}
The series already shows that register meanings change between families
in this address space. For example, 0x0A32 is the per-port EFID register
on family C but the LUT aging timer on family D.
rtl8365mb_init_jam_common also writes 0x020E to 0x0A30:
{ 0x03Fa, 0x0007 }, { 0x08C8, 0x00C0 }, { 0x0A30, 0x020E },
The driver defines 0x0A30 as the family D LUT_CFG register, with only
BIT(4) and BIT(6) documented. This value sets bits 1, 2, 3 and 9, which
have no documented meaning on family D. rtl8365mb_d_lut_init() only
clears bits 4 and 6.
0x13F9 (EXT_TXC_DLY) does look handled: rtl8365mb_ext_config_rgmii()
clears the EXT1 RGMII TX delay field when port 7 is set up for RGMII.
None of the other family-specific entries is corrected that way:
the 0x13EB and 0x1303/0x1304 pad controls
0x13E2
the 0x121E/0x1233/0x1237/0x1239/0x123A flow-control thresholds
0x0301, 0x1349, 0x18E0, 0x122B, 0x1305 and 0x13F0
Testing covered only the SGMII/HSGMII CPU port, and RGMII was not
tested.
Would it be better to take the init sequence from the vendor RTL8367D
sources, or to leave .jam_table NULL for family D?
rtl8365mb_switch_init() already handles a NULL table.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/bc42ae96-dc7e-4b6e-b9cc-64cde5dc51ce%40yahoo.com
prev parent reply other threads:[~2026-11-24 1:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bc42ae96-dc7e-4b6e-b9cc-64cde5dc51ce.ref@yahoo.com>
2026-11-19 23:57 ` [PATCH net-next v12 00/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-19 23:58 ` [PATCH net-next v12 01/13] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-11-19 23:59 ` [PATCH net-next v12 02/13] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-11-20 0:00 ` [PATCH net-next v12 03/13] net: dsa: realtek: rtl8365mb: refactor forcemode handling Mieczyslaw Nalewaj
2026-11-20 0:01 ` [PATCH net-next v12 04/13] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-11-20 0:02 ` [PATCH net-next v12 05/13] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-11-20 0:03 ` [PATCH net-next v12 06/13] net: dsa: realtek: rtl8365mb: refactor VLAN 4k handling Mieczyslaw Nalewaj
2026-11-20 0:04 ` [PATCH net-next v12 07/13] net: dsa: realtek: rtl8365mb: set and get vlan 4k for family D Mieczyslaw Nalewaj
2026-11-20 14:17 ` Gustavo Foletto Mora
2026-11-21 1:30 ` Mieczyslaw Nalewaj
2026-11-21 18:24 ` Gustavo Foletto Mora
2026-11-24 1:24 ` netdev-bot+sashiko
2026-11-20 0:05 ` [PATCH net-next v12 08/13] net: dsa: realtek: rtl8365mb: refactor PVID handling Mieczyslaw Nalewaj
2026-11-20 14:18 ` Gustavo Foletto Mora
2026-11-20 0:06 ` [PATCH net-next v12 09/13] net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D Mieczyslaw Nalewaj
2026-11-20 14:26 ` Gustavo Foletto Mora
2026-11-24 1:24 ` netdev-bot+sashiko
2026-11-20 0:07 ` [PATCH net-next v12 10/13] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-11-24 1:24 ` netdev-bot+sashiko
2026-11-20 0:07 ` [PATCH net-next v12 11/13] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling Mieczyslaw Nalewaj
2026-11-20 0:08 ` [PATCH net-next v12 12/13] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Mieczyslaw Nalewaj
2026-11-21 9:33 ` Mieczyslaw Nalewaj
2026-11-21 18:26 ` Gustavo Foletto Mora
2026-11-24 1:24 ` netdev-bot+sashiko
2026-11-20 0:09 ` [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-20 20:56 ` Gustavo Foletto Mora
2026-11-21 1:46 ` Mieczyslaw Nalewaj
2026-11-21 18:29 ` Gustavo Foletto Mora
2026-11-23 8:01 ` Oleksij Rempel
2026-11-23 12:47 ` Mieczyslaw Nalewaj
2026-11-24 1:24 ` netdev-bot+sashiko [this message]
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=179548348509.3135.4599625371501941340@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=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