Re: [PATCH net-next v1 1/2] net: phy: realtek: add support for RTL8261
From: Andrew Lunn
Date: Tue Jun 02 2026 - 22:58:18 EST
On Wed, Jun 03, 2026 at 02:32:37AM +0000, Javen wrote:
> Hi, Nicolai
>
> >> +/* Concatenated 4-bit speed code values (SPD_H << 2 | SPD_L) */
> >> +#define RTL8261X_SPEED_CODE_500M 0x3 /* H=0, L=3 */
> >> +#define RTL8261X_SPEED_CODE_1000M 0x7 /* H=1, L=3 */
> >> +#define RTL8261X_SPEED_CODE_2500M 0x8 /* H=2, L=0 */
> >> +#define RTL8261X_SPEED_CODE_5000M 0x9 /* H=2, L=1 */
> >> +#define RTL8261X_SPEED_500 500
> >
> > 500 MBit/s isnt a standard rate which also isnt represented in ethtool.
> > Is this just for documentation or intended to be used? If yes, how?
>
> Giga-lite (500M) is a Realtek-proprietary speed: when two Realtek
> PHYs supporting Giga-lite are connected and the higher speed is
> disabled or unstable, auto-negotiation may fall back to 500M. Since
> ethtool has no SPEED_500 definition, the driver reports
> SPEED_UNKNOWN for this case. So we add this.
Is it negotiated? What bit does it use in which code word page to
accomplish this? Is there a register which can be used to control the
advertisement? Can you see the link partner advertisement for this
bit?
Andrew