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 v9 04/11] net: dsa: realtek: rtl8365mb: set RGMII mode for family D
Date: Mon, 09 Nov 2026 08:52:43 +0000 [thread overview]
Message-ID: <179421436328.994134.5244949005980013878@kernel.org> (raw)
In-Reply-To: <9a9da3fd-2c1c-4911-aa6e-8a2100843bb8@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 (RTL8367S-VB), rtl8365mb_phylink_get_caps() in
drivers/net/dsa/realtek/rtl8365mb_main.c does not advertise RGMII for…
--
net: dsa: realtek: rtl8365mb: set RGMII mode for family D
For family D, this patch clears the EXT1 RGMII TX clock delay field in
EXT_TXC_DLY. It binds the RGMII/MII pins to MAC7 in TOP_CON0 and disables
SerDes 1 before RGMII is selected. In phylink_get_caps(), RGMII is no
longer advertised on port 7 when TOP_CON0 shows that MAC4 owns
extension 1.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 0d87d6bbe15a7..0b7c124abb1e7 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -1799,8 +1847,26 @@ static void rtl8365mb_phylink_get_caps(struct dsa_switch *ds, int port,
> * which remain unimplemented.
> */
>
> - if (extint->supported_interfaces & RTL8365MB_PHY_INTERFACE_MODE_RGMII)
> - phy_interface_set_rgmii(config->supported_interfaces);
> + if (extint->supported_interfaces & RTL8365MB_PHY_INTERFACE_MODE_RGMII) {
> + /* On family D the EXT1 pins are shared with MAC4 (UTP port 4).
> + * If MAC4 owns them, RGMII on this port cannot work.
> + */
> + if (rtl8365mb_is_d(priv) && extint->id == 1) {
> + ret = regmap_read(priv->map, RTL8365MB_D_REG_TOP_CON0, &data);
> + if (ret)
> + dev_warn(priv->dev,
> + "failed to read TOP_CON0, RGMII on port %d disabled: %pe\n",
> + port, ERR_PTR(ret));
> + else if (data & RTL8365MB_D_MAC4_SEL_EXT1_MASK)
> + dev_warn(priv->dev,
> + "port %d: EXT1 is owned by MAC4, RGMII disabled\n",
> + port);
> + else
> + phy_interface_set_rgmii(config->supported_interfaces);
[Severity: Low]
Is a warning the right log level here? Port 7 may end up with no usable
interface at all.
In the RTL8367S-VB chip table entry added later in the series, port 7 is
described as MII | TMII | RMII | RGMII. RGMII is the only one of those
modes the driver implements. When either branch above skips
phy_interface_set_rgmii(), config->supported_interfaces stays empty, and
phylink_create() rejects that:
drivers/net/phy/phylink.c:phylink_create() {
...
if (phy_interface_empty(config->supported_interfaces)) {
dev_err(config->dev,
"phylink: error: empty supported_interfaces\n");
return ERR_PTR(-EINVAL);
}
...
}
When port 7 is a user port, dsa_tree_setup_ports() falls back to
dsa_port_setup_as_unused(). When port 7 is the CPU port (the series
supports an RGMII CPU port there), the whole tree setup is aborted:
net/dsa/dsa.c:dsa_tree_setup_ports() {
...
if (dsa_port_is_dsa(dp) || dsa_port_is_cpu(dp)) {
err = dsa_port_setup(dp);
if (err)
goto teardown;
}
...
}
In that case the switch fails to probe. A warn-level "RGMII disabled"
message suggests the port keeps working in a degraded state.
In the regmap_read() failure branch, the real I/O error is only shown at
warn level. The probe then fails with a generic -EINVAL from phylink.
The commit message says:
"so the configuration is refused before any EXT1 register is touched"
and:
"The driver logs a warning naming the conflict."
Could the commit message mention that the port, or the whole switch if
port 7 is the CPU port, will fail to set up? Should these messages be
dev_err() and say that the port cannot be used?
> + } else {
> + phy_interface_set_rgmii(config->supported_interfaces);
> + }
> + }
>
> if (extint->supported_interfaces & RTL8365MB_PHY_INTERFACE_MODE_SGMII &&
> mb->sds_supported)
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/9b73858d-fc09-4988-8bab-fd7b88db9412%40yahoo.com
next prev parent reply other threads:[~2026-11-09 8:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9b73858d-fc09-4988-8bab-fd7b88db9412.ref@yahoo.com>
2026-11-08 8:04 ` [PATCH net-next v9 00/11] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-08 8:05 ` [PATCH net-next v9 01/11] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-11-08 8:06 ` [PATCH net-next v9 02/11] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-11-08 14:20 ` Linus Walleij
2026-11-09 8:52 ` netdev-bot+sashiko
2026-11-08 8:07 ` [PATCH net-next v9 03/11] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-11-08 8:08 ` [PATCH net-next v9 04/11] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-11-09 8:52 ` netdev-bot+sashiko [this message]
2026-11-08 8:09 ` [PATCH net-next v9 05/11] net: dsa: realtek: rtl8365mb: set and get vlan 4k " Mieczyslaw Nalewaj
2026-11-08 8:10 ` [PATCH net-next v9 06/11] net: dsa: realtek: rtl8365mb: use raw VID for PVID on " Mieczyslaw Nalewaj
2026-11-08 8:11 ` [PATCH net-next v9 07/11] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-11-09 8:52 ` netdev-bot+sashiko
2026-11-08 8:11 ` [PATCH net-next v9 08/11] net: dsa: realtek: rtl8365mb: re-latch the family D SerDes Mieczyslaw Nalewaj
2026-11-08 19:13 ` Johan Alvarado
2026-11-08 20:53 ` Mieczyslaw Nalewaj
2026-11-08 8:12 ` [PATCH net-next v9 09/11] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling Mieczyslaw Nalewaj
2026-11-08 8:13 ` [PATCH net-next v9 10/11] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Mieczyslaw Nalewaj
2026-11-09 8:52 ` netdev-bot+sashiko
2026-11-08 8:14 ` [PATCH net-next v9 11/11] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-08 14:21 ` Linus Walleij
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=179421436328.994134.5244949005980013878@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
all inboxes | Powered by JetHome®