Re: [PATCH net-next v2 1/4] net: ethtool: add 500baseT2 link mode

From: Hee-Suk Kim

Date: Sat Dec 05 2026 - 11:24:14 EST


Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx> writes:

> Hi,
>
> On 12/5/26 05:00, Hee-Suk Kim wrote:
>> Add ETHTOOL_LINK_MODE_500baseT2_Full_BIT and SPEED_500 for 500 Mbps
>> over two pairs, together with the matching phylib link capability.
>>
>> Signed-off-by: Hee-Suk Kim <hskim@xxxxxxxxxxxxx>
>
> [...]
>
>> @@ -295,6 +298,10 @@ unsigned long phy_caps_from_interface(phy_interface_t interface)
>> {
>> unsigned long link_caps = 0;
>>
>> + /* The only PHYs known to support 500baseT2 are attached over GMII */
>> + if (interface == PHY_INTERFACE_MODE_GMII)
>> + link_caps |= BIT(LINK_CAPA_500FD);
>> +
>
> This whole patch seems good to me, with all the phy_caps and all, the only question
> I have is about the xMII mode used. Is it really GMII, or some tweaked version of it ?
>
> I guess the MAC to PHY mode on these setups isn't pure GMII, but likely a modified
> of it, with a different clock rate ? at 1G the GMII is clocked at 125MHz, do you know
> what's going on at 500M ?
>

I don't think it's really GMII. On these Realtek chips the PHY and MAC
are integrated on a single chip, and r8169 just labels older chips as
GMII/MII in rtl_init_phylink():

if (tp->mac_version < RTL_GIGA_MAC_VER_61)
phy_mode = tp->supports_gmii ? PHY_INTERFACE_MODE_GMII :
PHY_INTERFACE_MODE_MII;
else
phy_mode = PHY_INTERFACE_MODE_INTERNAL;

That comment meant that the Realtek chips needing 500baseT2 are labeled
GMII (all below VER_61 in this series), not that the xMII is really
GMII.

Giga Lite is the only known (and Realtek proprietary) way to do 500 Mbps
over two pairs, so they are the only users of 500baseT2.

> Does a PHY that supports 500BaseT2 also support other 2-pair modes, like 100BaseTX ?
> IOW, can the xMII used here adapt for multiple speeds like GMII ?
>
> We may need a dedicated phy_interface_t value for the xMII here is what I mean :)

Yes, it's a regular 10/100/1000 PHY with Giga Lite added on top.

Since the MAC and PHY are integrated, I can't tell how the chip carries
500 Mbps between them. It seems to handle that internally. In the v1
tests [1], the link ran at ~94 or ~470 Mbps depending only on the Giga
Lite enable bit (page 0xa42, reg 0x14, bit 9), regardless of the speed
the kernel reported.

A dedicated value would make sense if we knew what the bus is, but I
have no information beyond the above, not even whether a standalone
Realtek PHY with Giga Lite (if any) would use the same protocol as the
integrated chips.

The current patch works fine, since Realtek is the only user as
mentioned above. So, unless you'd prefer a dedicated value, I'm thinking
of rewording the comment to something like:

/* Realtek's Giga Lite is the only supported 500baseT2 hardware. Its
* PHY is integrated with the MAC and labeled as GMII by r8169.
*/
if (interface == PHY_INTERFACE_MODE_GMII)
link_caps |= BIT(LINK_CAPA_500FD);

A third option would be to switch the Giga Lite capable chips in r8169
to PHY_INTERFACE_MODE_INTERNAL, but I couldn't find what the GMII/MII
labeling there is for, so I'm hesitant to drop it. Heiner or Javen may
know more.

[1] https://lore.kernel.org/r/20261010135356.85454-1-hskim@xxxxxxxxxxxxx

Thanks,
hsk

>
> Maxime