mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: javen <javen_xu@realsil.com.cn>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, freddy_gu@realsil.com.cn,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	daniel@makrotopia.org, vladimir.oltean@nxp.com
Subject: Re: [PATCH net-next v2 3/4] net: phy: realtek: add support for RTL8261C_CG
Date: Thu, 04 Jun 2026 10:57:09 +0200	[thread overview]
Message-ID: <94d987457c307b11316cdd49ede213b0@tipi-net.de> (raw)
In-Reply-To: <20260604074209.93-4-javen_xu@realsil.com.cn>

Hi Javen

On 4.6.2026 09:42, javen wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
> 
> This patch adds support for Realtek phy chip RTL8261C_CG. Its PHY ID is
> 0x001cc898.
> 
> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
> ---
> Changes in v2:
>  - remove RTL8261D, only support RTL8261C_CG
>  - remove speed 500, rarely used
>  - add helper function, genphy_c45_soft_reset() and 
> genphy_c45_config_master_slave()
> ---
>  drivers/net/phy/realtek/realtek_main.c | 178 +++++++++++++++++++++++++
>  1 file changed, 178 insertions(+)
> 
> diff --git a/drivers/net/phy/realtek/realtek_main.c 
> b/drivers/net/phy/realtek/realtek_main.c

> [...]

> +
> +#define RTL8261C_CE_MODEL		0x00
> +#define RTL8261X_GBCR_REG		0xa412

IMHO this is just RTL822X_VND2_C22_REG(MII_CTRL1000) (= 0xa412), already
used elsewhere in the file. Drop the define and reuse the macro, as
Aleksander suggested on v1.

> [...]

> +struct rtl8261x_priv {
> +	u8 sub_phy_id;
> +};

sub_phy_id is only written, never read. Andrew already asked about the
unused priv fields on v1. A local in probe() is enough, drop the field?

> [...]

> +
> +	if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
> +			      phydev->advertising))
> +		adv_1g = ADVERTISE_1000FULL;
> +
> +	ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND2,
> +				     RTL8261X_GBCR_REG,
> +				     ADVERTISE_1000FULL, adv_1g);

See above and replace with RTL822X_VND2_C22_REG(MII_CTRL1000).

The aneg-restart handling looks correct now, thanks for picking up the 
v1
comment.

> [...]

Thanks,
Nicolai

  reply	other threads:[~2026-06-04  8:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  7:42 [PATCH net-next v2 0/4] Add " javen
2026-06-04  7:42 ` [PATCH net-next v2 1/4] net: phy: c45: add genphy_c45_soft_reset() javen
2026-06-04  8:17   ` Nicolai Buchwitz
2026-06-04 12:21   ` Andrew Lunn
2026-06-04  7:42 ` [PATCH net-next v2 2/4] net: phy: c45: add genphy_c45_config_master_slave() javen
2026-06-04  8:49   ` Nicolai Buchwitz
2026-06-04 12:27     ` Andrew Lunn
2026-06-05  3:19     ` Javen
2026-06-04  7:42 ` [PATCH net-next v2 3/4] net: phy: realtek: add support for RTL8261C_CG javen
2026-06-04  8:57   ` Nicolai Buchwitz [this message]
2026-06-04  7:42 ` [PATCH net-next v2 4/4] net: phy: realtek: load firmware " 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=94d987457c307b11316cdd49ede213b0@tipi-net.de \
    --to=nb@tipi-net.de \
    --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=javen_xu@realsil.com.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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

Powered by JetHome