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 15/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
Date: Fri, 27 Nov 2026 03:00:31 +0000 [thread overview]
Message-ID: <179574843188.3135.8470436383588006481@kernel.org> (raw)
In-Reply-To: <abe7ed42-694c-435b-b573-b0341aa10971@yahoo.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In drivers/net/dsa/realtek/rtl8365mb_main.c, the new
rtl8365mb_family_d sets .jam_table = rtl8365mb_init_jam_8365mb_vc.
--
net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
This adds the RTL8367S-VB (chip ID 0x6642, version 0x0010) to the chip
table as the first family D chip. It also adds a rtl8365mb_family_d
family_info that selects the family D code added earlier in the series.
The chip reuses the RTL8365MB-VC init jam table, followed by the common
jam table.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 639e6b62a2fc3..eef591eed0c91 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -835,6 +847,27 @@ static const struct rtl8365mb_family_info rtl8365mb_family_c = {
> .qos_set_untag_pcp = rtl8365mb_c_qos_set_untag_pcp,
> };
>
> +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: Medium]
Is it safe to write the RTL8365MB-VC jam table to family D silicon?
With this change, rtl8365mb_setup()->rtl8365mb_switch_init() writes
rtl8365mb_init_jam_8365mb_vc and then rtl8365mb_init_jam_common to the
RTL8367S-VB. It does this with plain regmap_write() right after the reset,
and nothing filters the writes for family D.
The new header comment says family D registers differ in the VLAN table,
the ext interface and RGMII setup, the SerDes and the LUT. The
RTL8365MB_D_LUT_CFG2_REG comment also says 0x0A32 is the EFID register on
family C but the aging timer on family D.
Some jam writes hit registers that family D only partly reprograms later.
The common table writes the LUT config:
rtl8365mb_init_jam_common[] = {
...
{ 0x03Fa, 0x0007 }, { 0x08C8, 0x00C0 }, { 0x0A30, 0x020E },
...
{ 0x1D32, 0x0002 },
};
rtl8365mb_d_lut_init() then clears only two bits of it:
ret = regmap_update_bits(priv->map, RTL8365MB_D_LUT_CFG_REG,
RTL8365MB_D_LUT_CFG_IPMC_HASH_MASK |
RTL8365MB_D_LUT_CFG_BCAM_DISABLE_MASK, 0);
That means bits 1, 2, 3 and 9 of 0x0A30 keep their family C values on a
family D LUT.
The VC table also writes the interface select register:
{ 0x18E0, 0x4004 }, { 0x122B, 0x241C }, { 0x1305, 0xC000 },
On family D, rtl8365mb_pcs_config() skips that register:
if (!is_d) {
val = sds_mode << RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(id);
...
So the EXT0 mode field and bits 15:14 stay as the jam left them.
Other entries, such as 0x1303, 0x1304, 0x13EB, 0x121E..0x123A, 0x18E0,
0x1349, 0x0301 and 0x1D32, have no family D definition in the driver.
The commit message says neither table was compared with the vendor RTL8367D
init, and testing covered only SGMII/HSGMII on port 6.
Could a wrong pad, MAC or LUT control value here break untested setups such
as RGMII/MII on port 7? Could it leave the LUT configured differently from
what the driver assumes?
The 0x13F9 entry mentioned in the commit message looks less worrying. The
family D RGMII path clears the EXT1 RGMII TX delay field (bits 5:3), and
the other value lands in the EXT2 field (bits 8:6), which family D does not
have.
Would it make sense to give family D its own jam table, or none, until it
can be checked against the vendor RTL8367D init sequence?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/874b29a3-f47f-4bf2-a0f6-2f9fea712f4c%40yahoo.com
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
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 [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=179574843188.3135.8470436383588006481@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