Re: [PATCH net-next v10 09/12] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
From: netdev-bot+sashiko
Date: Mon Nov 16 2026 - 13:56:12 EST
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] rtl8365mb_pcs_config() now runs on family D too, but it still
starts with the family C DW8051 hold sequence, applied on both…
--
net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
This commit extends the RTL8367S SGMII/HSGMII PCS code in rtl8365mb so
it also works on family D switches. On family D the CPU SerDes sits
behind the indexed SDS13 window, and the SDS_MISC layout is different.
The family D paths only become reachable once the RTL8367S-VB chip entry
is added later in the series.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 1c2a998695d6d..909319974120a 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -1475,25 +1524,44 @@ static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
[ ... ]
> + sds_index = is_d ? RTL8365MB_D_SDS_EXT0_INDEX : 0;
> +
> /* Hold the embedded DW8051 microcontroller in reset and keep it
> * disabled. The vendor driver loads firmware into it to manage the
> * SerDes link, but the firmware only duplicates work that phylink
[Severity: Low]
Are the DW8051 bits known to have the same meaning on family D?
With this patch, rtl8365mb_pcs_config() also runs on family D. It still
starts with the family C DW8051 hold sequence, and that sequence has no
is_d check:
ret = regmap_update_bits(priv->map, RTL8365MB_CHIP_RESET_REG,
RTL8365MB_CHIP_RESET_DW8051_MASK,
RTL8365MB_CHIP_RESET_DW8051_MASK);
...
ret = regmap_update_bits(priv->map, RTL8365MB_MISC_CFG0_REG,
RTL8365MB_MISC_CFG0_DW8051_EN_MASK, 0);
This sets BIT(4) in CHIP_RESET (0x1322) and clears BIT(5) in MISC_CFG0
(0x130C). Both masks are defined only once, as family C registers, and
neither has a family D note.
Most of the rest of rtl8365mb_pcs_config() is now split by family: the
tuning table, the SDS index, the SDS_MISC layout, FIBER_CFG2 and
DIGITAL_INTERFACE_SELECT. The comment on RTL8365MB_BYPASS_LINE_RATE_REG
was also changed to say family D matches the vendor RTL8367D API. The
DW8051 bits get no such note.
If either bit means something else on family D, every pcs_config() call
for SerDes port 6 on the RTL8367S-VB would set an unknown bit in a reset
register and clear an unknown config bit.
There is some evidence that the layouts match. rtl8365mb_reset_chip()
already uses BIT(0) of 0x1322 on family D, and the series reports SGMII
and 2500base-x tested on two family D boards.
Could the vendor RTL8367D API be checked for these two bits? Then either
a comment like the one on the bypass register could be added, or the
sequence could be limited to family C.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/d9da17af-f49e-4878-a8dd-59a8919e6930%40yahoo.com