* [PATCH net-next] net: phy: realtek: fix in-band capabilities for 2.5G PHYs
@ 2026-01-13 20:55 Jan Hoffmann
2026-01-14 0:11 ` Daniel Golle
2026-01-16 4:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jan Hoffmann @ 2026-01-13 20:55 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Vladimir Oltean,
Michael Klein, Daniel Golle, Aleksander Jan Bajkowski, netdev,
linux-kernel
Cc: Jan Hoffmann
It looks like the configuration of in-band AN only affects SGMII, and it
is always disabled for 2500Base-X. Adjust the reported capabilities
accordingly.
This is based on testing using OpenWrt on Zyxel XGS1010-12 rev A1 with
RTL8226-CG, and Zyxel XGS1210-12 rev B1 with RTL8221B-VB-CG. On these
devices, 2500Base-X in-band AN is known to work with some SFP modules
(containing an unknown PHY). However, with the built-in Realtek PHYs,
no auto-negotiation takes place, irrespective of the configuration of
the PHY.
Fixes: 10fbd71fc5f9b ("net: phy: realtek: implement configuring in-band an")
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
---
drivers/net/phy/realtek/realtek_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index 5a7f472bf58e..7b7a48e5082a 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -1429,6 +1429,7 @@ static unsigned int rtl822x_inband_caps(struct phy_device *phydev,
{
switch (interface) {
case PHY_INTERFACE_MODE_2500BASEX:
+ return LINK_INBAND_DISABLE;
case PHY_INTERFACE_MODE_SGMII:
return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE;
default:
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: phy: realtek: fix in-band capabilities for 2.5G PHYs
2026-01-13 20:55 [PATCH net-next] net: phy: realtek: fix in-band capabilities for 2.5G PHYs Jan Hoffmann
@ 2026-01-14 0:11 ` Daniel Golle
2026-01-16 4:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Golle @ 2026-01-14 0:11 UTC (permalink / raw)
To: Jan Hoffmann
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Vladimir Oltean,
Michael Klein, Aleksander Jan Bajkowski, netdev, linux-kernel
On Tue, Jan 13, 2026 at 09:55:44PM +0100, Jan Hoffmann wrote:
> It looks like the configuration of in-band AN only affects SGMII, and it
> is always disabled for 2500Base-X. Adjust the reported capabilities
> accordingly.
>
> This is based on testing using OpenWrt on Zyxel XGS1010-12 rev A1 with
> RTL8226-CG, and Zyxel XGS1210-12 rev B1 with RTL8221B-VB-CG. On these
> devices, 2500Base-X in-band AN is known to work with some SFP modules
> (containing an unknown PHY). However, with the built-in Realtek PHYs,
> no auto-negotiation takes place, irrespective of the configuration of
> the PHY.
This observation is aligned with the SFP quirk sfp_quirk_oem_2_5g()
which also disabled in-band AN for those 2.5G copper modules, some are
reportedly containing a RTL8221B-VB-CG PHY (the vendor and device ID
strings do *not* uniquely identify one design in this case,
unfortunately...)
>
> Fixes: 10fbd71fc5f9b ("net: phy: realtek: implement configuring in-band an")
> Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
> ---
> drivers/net/phy/realtek/realtek_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
> index 5a7f472bf58e..7b7a48e5082a 100644
> --- a/drivers/net/phy/realtek/realtek_main.c
> +++ b/drivers/net/phy/realtek/realtek_main.c
> @@ -1429,6 +1429,7 @@ static unsigned int rtl822x_inband_caps(struct phy_device *phydev,
> {
> switch (interface) {
> case PHY_INTERFACE_MODE_2500BASEX:
> + return LINK_INBAND_DISABLE;
> case PHY_INTERFACE_MODE_SGMII:
> return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE;
> default:
> --
> 2.52.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: phy: realtek: fix in-band capabilities for 2.5G PHYs
2026-01-13 20:55 [PATCH net-next] net: phy: realtek: fix in-band capabilities for 2.5G PHYs Jan Hoffmann
2026-01-14 0:11 ` Daniel Golle
@ 2026-01-16 4:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-16 4:00 UTC (permalink / raw)
To: Jan Hoffmann
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
vladimir.oltean, michael, daniel, olek2, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 13 Jan 2026 21:55:44 +0100 you wrote:
> It looks like the configuration of in-band AN only affects SGMII, and it
> is always disabled for 2500Base-X. Adjust the reported capabilities
> accordingly.
>
> This is based on testing using OpenWrt on Zyxel XGS1010-12 rev A1 with
> RTL8226-CG, and Zyxel XGS1210-12 rev B1 with RTL8221B-VB-CG. On these
> devices, 2500Base-X in-band AN is known to work with some SFP modules
> (containing an unknown PHY). However, with the built-in Realtek PHYs,
> no auto-negotiation takes place, irrespective of the configuration of
> the PHY.
>
> [...]
Here is the summary with links:
- [net-next] net: phy: realtek: fix in-band capabilities for 2.5G PHYs
https://git.kernel.org/netdev/net-next/c/8744b63e8a9a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-16 4:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 20:55 [PATCH net-next] net: phy: realtek: fix in-band capabilities for 2.5G PHYs Jan Hoffmann
2026-01-14 0:11 ` Daniel Golle
2026-01-16 4:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox