mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javen <javen_xu@realsil.com.cn>
To: Andrew Lunn <andrew@lunn.ch>, Nicolai Buchwitz <nb@tipi-net.de>
Cc: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	顾晓军 <freddy_gu@realsil.com.cn>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"daniel@makrotopia.org" <daniel@makrotopia.org>,
	"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:35:07 +0000	[thread overview]
Message-ID: <b7a623057b07403fbf52061ae1d6dc09@realsil.com.cn> (raw)
In-Reply-To: <048a1319-f3c6-487f-901b-f303c7d40a1b@lunn.ch>

>
>> > +static int rtl8261x_config_master_slave(struct phy_device *phydev)
>> > +{
>> > +   u16 val;
>> > +   /*
>> > +    * Configure bits 15:14 of MMD 7.0x0020
>> > +    *
>> > +    * Bit 15 (Enable) | Bit 14 (Value) | Mode
>> > +    * ----------------|----------------|-------------
>> > +    *       0         |       0        | Auto (disabled)
>> > +    *       1         |       0        | Force Slave
>> > +    *       1         |       1        | Force Master
>> > +    */
>> > +   switch (phydev->master_slave_set) {
>> > +   case MASTER_SLAVE_CFG_MASTER_FORCE:
>> > +           val = RTL8261X_MS_MASTER;
>> > +           break;
>> > +   case MASTER_SLAVE_CFG_SLAVE_FORCE:
>> > +           val = RTL8261X_MS_SLAVE;
>> > +           break;
>> > +   case MASTER_SLAVE_CFG_UNKNOWN:
>> > +   case MASTER_SLAVE_CFG_MASTER_PREFERRED:
>> > +   case MASTER_SLAVE_CFG_SLAVE_PREFERRED:
>> > +   default:
>> > +           val = RTL8261X_MS_AUTO;
>> > +           break;
>> > +   }
>> > +
>> > +   return phy_modify_mmd(phydev, MDIO_MMD_AN,
>RTL8261X_MULTIG_CTRL,
>> > +                         RTL8261X_MASTER_SLAVE_MASK, val); }
>>
>> RTL8261X_MULTIG_CTRL is a IEEE-defined register, so it can use
>> MDIO_AN_10GBT_CTRL instead.
>> Also the define for RTL8261X_MULTIG_CTRL can be dropped.
>>
>> While at it I would suggest to add MDIO_AN_10GBT_CTRL_MS_ENABLE (bit
>> 15) and MDIO_AN_10GBT_CTRL_MS_VALUE (bit 14) to
>> include/uapi/linux/mdio.h and also make use of it.
>> RTL8261X_MS_AUTO would become
>
>If this is all just standard 802.3, the function should be added to phy-c45.c, so
>it can be used by any PHY driver.
>
>        Andrew

Thanks for you suggestions. All the changes will be added into next version.

BRs,
Javen

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

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-05-28 12:39   ` Andrew Lunn
2026-05-28 12:42   ` Andrew Lunn
2026-05-28 16:56   ` Aleksander Jan Bajkowski
2026-05-28  7:52 ` [PATCH net-next v1 2/2] net: phy: realtek: load firmware for RTL8261C javen
2026-05-28  9:08   ` Nicolai Buchwitz
2026-05-28 12:20   ` Daniel Golle
2026-06-01  5:38     ` Javen
2026-05-29  1:01   ` Andrew Lunn
2026-06-03  2:32 [PATCH net-next v1 1/2] net: phy: realtek: add support for RTL8261 Javen
2026-06-03  2:57 ` Andrew Lunn
2026-06-04  7:28   ` Javen

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=b7a623057b07403fbf52061ae1d6dc09@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®