mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javen <javen_xu@realsil.com.cn>
To: "nb@tipi-net.de" <nb@tipi-net.de>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
	"daniel@makrotopia.org" <daniel@makrotopia.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	顾晓军 <freddy_gu@realsil.com.cn>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	Javen <javen_xu@realsil.com.cn>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"vladimir.oltean@nxp.com" <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net-next v1 1/2] net: phy: realtek: add support for RTL8261
Date: Wed, 3 Jun 2026 02:32:37 +0000	[thread overview]
Message-ID: <10b6718e8fe84e1895f82ea05c446925@realsil.com.cn> (raw)

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.

>> +
>> +static int rtl8261x_get_features(struct phy_device *phydev)
>> +{
>> +	int ret;
>> +
>> +	ret = genphy_c45_pma_read_abilities(phydev);
>> +	if (ret)
>> +		return ret;
>> +	/*
>> +	 * Supplement Multi-Gig speeds that may not be automatically detected
>> +	 * RTL8261X supports 2.5G/5G in addition to standard 10G
>> +	 */
>> +	linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
>> +			 phydev->supported);
>> +	linkmode_set_bit(ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
>> +			 phydev->supported);
>
>Feature bits for 2.5 and 5 GBit/s are set unconditionally - even for the 
>generic variant.
>Do all variants have these capabilities? If not better add check for at 
l>east the generic one.

Thank you for pointing this out.
We can confirm that RTL8261C and RTL8261D support 2.5G and 5G.

For this patch only support for RTL8261C, I will remove the code associated with RTL8261D. And other suggestions are all accepted.
Thanks for your time.

BRs,
Javen

             reply	other threads:[~2026-06-03  2:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  2:32 Javen [this message]
2026-06-03  2:57 ` Andrew Lunn
2026-06-04  7:28   ` Javen
  -- strict thread matches above, loose matches on Subject: below --
2026-05-28  7:52 [PATCH net-next v1 0/2] Add support for RTL8261c javen
2026-05-28  7:52 ` [PATCH net-next v1 1/2] net: phy: realtek: add support for RTL8261 javen
2026-05-28  9:37   ` Nicolai Buchwitz
2026-05-29  0:51     ` Andrew Lunn
2026-06-03  2:35       ` Javen
2026-05-28 12:39   ` Andrew Lunn
2026-05-28 12:42   ` Andrew Lunn
2026-05-28 16:56   ` Aleksander Jan Bajkowski

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=10b6718e8fe84e1895f82ea05c446925@realsil.com.cn \
    --to=javen_xu@realsil.com.cn \
    --cc=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=freddy_gu@realsil.com.cn \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nb@tipi-net.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.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®