Netdev List
 help / color / mirror / Atom feed
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 v17 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
Date: Tue, 01 Dec 2026 21:22:17 +0000	[thread overview]
Message-ID: <179616013744.3146.12761762298631844706@kernel.org> (raw)
In-Reply-To: <3fcaf694-597e-4b77-8f56-d0cc33232c98@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] On family D, rtl8365mb_pcs_config()
  (drivers/net/dsa/realtek/rtl8365mb_main.c) now skips the…

--

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

This patch extends the RTL8367S SGMII/HSGMII PCS code in rtl8365mb to
family D switches. On these switches the SerDes is reached through the
indexed SDS13 window and the SDS_MISC fields differ from family C. It adds
family D tuning tables and SDS_MISC programming, skips the steps that only
apply to family C, and stops advertising 10/100 Mbit/s on the family D
SerDes port.

> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 7500ea9b3a627..2e661ddd8cd23 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c

[ ... ]

> @@ -1575,34 +1663,60 @@ static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,

[ ... ]

>  	ret = regmap_update_bits(priv->map, RTL8365MB_SDS_MISC_REG,
> -				 RTL8365MB_SDS_MISC_MAC8_SEL_SGMII_MASK |
> -					 RTL8365MB_SDS_MISC_MAC8_SEL_HSGMII_MASK,
> -				 mode == RTL8365MB_EXT_PORT_MODE_SGMII ?
> -					 RTL8365MB_SDS_MISC_MAC8_SEL_SGMII_MASK :
> -					 RTL8365MB_SDS_MISC_MAC8_SEL_HSGMII_MASK);
> +				 misc_mask, misc_val);
>  	if (ret)
>  		return ret;
>  
> -	val = mode << RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(id);
> -	ret = regmap_update_bits(priv->map,
> -				 RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(id),
> -				 RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(id),
> -				 val);
> -	if (ret)
> -		return ret;
> +	if (!is_d) {
> +		val = sds_mode << RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(id);
> +		ret = regmap_update_bits(priv->map,
> +					 RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(id),
> +					 RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(id),
> +					 val);
> +		if (ret)
> +			return ret;
> +	}
>  
>  	/* Take the SerDes out of reset. The vendor driver does this only
>  	 * after the SerDes mux and the interface mode are configured.
>  	 */

[Severity: Low]
On family D, rtl8365mb_pcs_config() no longer writes the
DIGITAL_INTERFACE_SELECT mode for the SerDes interface. Neither the code
nor the commit message gives a reason. Could a short comment here or a
sentence in the changelog explain it?

The skip itself looks necessary. id is RTL8365MB_SDS_EXT_INTERFACE_ID (1,
the family C id). On the RTL8367S-VB that id is the RGMII port 7, so the
write would overwrite port 7's mode. The family D mode values (0x02/0x12)
also don't fit in the 4-bit field.

Family D does still use this register, though.
rtl8365mb_ext_config_rgmii() programs it for the family D EXT1 RGMII port:

	ret = regmap_update_bits(
		priv->map, RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(extint->id),
		RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(extint->id),
		...

On the SerDes path, the EXT0 mode field (bits 3:0 of
DIGITAL_INTERFACE_SELECT_REG0) keeps whatever the reset default, EEPROM
or bootloader left there. The comment just above also says the vendor
driver deasserts the SerDes reset only after "the interface mode" is
configured.

Does the vendor RTL8367D sequence leave the EXT0 select field alone
because the SDS_MISC mode field is enough to select the SerDes mode? Or
does it also program EXT0 at this point? If it does, could a bootloader
that leaves EXT0 in a non-SerDes mode keep the link from coming up?

The commit message covers the other family D differences (line rate
bypass, port 6 rate limiters, pause, 10/100 Mbit/s), but not this one.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/236d002f-5ca5-4f12-bf5b-0ed6442e5c9a%40yahoo.com

  reply	other threads:[~2026-12-01 21:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <236d002f-5ca5-4f12-bf5b-0ed6442e5c9a.ref@yahoo.com>
2026-11-30 20:06 ` [PATCH net-next v17 00/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-30 20:08   ` [PATCH net-next v17 01/15] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-11-30 20:08   ` [PATCH net-next v17 02/15] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-11-30 20:08   ` [PATCH net-next v17 03/15] net: dsa: realtek: rtl8365mb: refactor forcemode handling Mieczyslaw Nalewaj
2026-11-30 20:09   ` [PATCH net-next v17 04/15] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-11-30 20:09   ` [PATCH net-next v17 05/15] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-11-30 20:09   ` [PATCH net-next v17 06/15] net: dsa: realtek: rtl8365mb: refactor VLAN 4k handling Mieczyslaw Nalewaj
2026-11-30 20:10   ` [PATCH net-next v17 07/15] net: dsa: realtek: rtl8365mb: set and get VLAN 4k for family D Mieczyslaw Nalewaj
2026-12-01 21:22     ` netdev-bot+sashiko
2026-11-30 20:11   ` [PATCH net-next v17 08/15] net: dsa: realtek: rtl8365mb: refactor PVID handling Mieczyslaw Nalewaj
2026-11-30 20:11   ` [PATCH net-next v17 09/15] net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D Mieczyslaw Nalewaj
2026-12-01 21:22     ` netdev-bot+sashiko
2026-11-30 20:11   ` [PATCH net-next v17 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-12-01 21:22     ` netdev-bot+sashiko [this message]
2026-11-30 20:11   ` [PATCH net-next v17 11/15] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling Mieczyslaw Nalewaj
2026-11-30 20:12   ` [PATCH net-next v17 12/15] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Mieczyslaw Nalewaj
2026-12-01 21:22     ` netdev-bot+sashiko
2026-11-30 20:12   ` [PATCH net-next v17 13/15] net: dsa: realtek: rtl8365mb: refactor QoS priority handling Mieczyslaw Nalewaj
2026-11-30 20:17   ` [PATCH net-next v17 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D Mieczyslaw Nalewaj
2026-12-01 21:22     ` netdev-bot+sashiko
2026-11-30 20:17   ` [PATCH net-next v17 15/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj

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=179616013744.3146.12761762298631844706@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