Re: [PATCH net-next] r8169: allow Giga Lite fallback on RTL8168EP
From: Hee-Suk Kim
Date: Mon Oct 12 2026 - 10:59:35 EST
Heiner Kallweit <hkallweit1@xxxxxxxxx> writes:
> On 10.10.2026 15:53, Hee-Suk Kim wrote:
>> @@ -5619,6 +5620,9 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
>> return -EUNATCH;
>> }
>>
>> + if (tp->mac_version == RTL_GIGA_MAC_VER_51)
>
> Any specific reason you restrict the functionality to this chip version?
> In the commit message you describe that vendor driver also supports the
> 500Mbps mode for RTL8168H and RTL8168FP.
No, just that RTL8168EP is the only one I could test. I'll include
RTL8168H and RTL8168FP in v2.
> Also vendor drivers r8125, r8126, r8127 include functionality for dealing
> with 500mbps mode settings. So more chip versions seem to support it.
> Hopefully Realtek people can provide some more insight.
I've found all three [1][2][3] do the same as r8168, so I could cover
them as well. It would be good if Realtek people could confirm that
PHYSR reports 0x30 for a Giga Lite link on them, since the vendor
drivers read the speed from the MAC instead.
They also set bits of OCP 0xa5ea when 2.5G/5G/10G is advertised, which
appear to enable the corresponding Lite modes (half the speed over two
pairs). I'd leave those out of this series for now, as I'm not aware of
a use case for them.
[1] https://github.com/awesometic/realtek-r8125-dkms/blob/9a152bf920334aead090d2fb4d91f67a84923123/src/r8125_n.c#L5948-L5980
[2] https://github.com/openwrt/rtl8126/blob/27721fbedc45897cf1f155f5eb44de76962a1ba8/r8126_n.c#L5009-L5033
[3] https://github.com/openwrt/rtl8127/blob/f80bc64922ac76f90618f61245fb29743c018d0a/r8127_n.c#L5330-L5359
> So for Giga lite (500Mbps) a wrong speed (1Gbps) is reported to the user.
> Not sure whether we want to add a SPEED_500 constant. On one hand it's a non-standard mode,
> on the other hand it's apparently widely used in South Korea.
> @Andrew: How do you see this?
>
> Alternatively we could add a notification to the user if Giga lite is auto-negotiated.
>
For reference, the vendor drivers report a Giga Lite link as 1000.
FWIW I'd prefer 500, just because userspace would show it as is.
Thanks,
hsk