From: Nicolai Buchwitz <nb@tipi-net.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org
Subject: Re: [PATCH net v1 1/1] net: phy: realtek: fix EEE advertisement write on the internal PHY MMD path
Date: Mon, 10 Aug 2026 13:30:43 +0200 [thread overview]
Message-ID: <690ccf5721774e377b091ba92a601925@tipi-net.de> (raw)
In-Reply-To: <20260806134716.3511821-1-o.rempel@pengutronix.de>
On 6.8.2026 15:47, Oleksij Rempel wrote:
> In rtlgen_write_mmd(), the MDIO_AN_EEE_ADV case swaps the arguments to
> rtlgen_write_vend2(): it passes the MMD register number as the OCP
> address
> and the OCP address constant as the value. The caller's value is
> discarded
> and the write lands on the wrong register, so the EEE advertisement
> cannot
> be configured on the affected PHYs.
>
> Mirror rtlgen_read_mmd() and write the value to RTL_MDIO_AN_EEE_ADV.
>
> Fixes: da681ed73fb9 ("net: phy: realtek: improve mmd register access
> for internal PHY's")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/net/phy/realtek/realtek_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/realtek/realtek_main.c
> b/drivers/net/phy/realtek/realtek_main.c
> index a0a79192384e..177b62a7b2d1 100644
> --- a/drivers/net/phy/realtek/realtek_main.c
> +++ b/drivers/net/phy/realtek/realtek_main.c
> @@ -1768,7 +1768,7 @@ static int rtlgen_write_mmd(struct phy_device
> *phydev, int devnum, u16 regnum,
> if (devnum == MDIO_MMD_VEND2)
> ret = rtlgen_write_vend2(phydev, regnum, val);
> else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV)
> - ret = rtlgen_write_vend2(phydev, regnum, RTL_MDIO_AN_EEE_ADV);
> + ret = rtlgen_write_vend2(phydev, RTL_MDIO_AN_EEE_ADV, val);
> else
> ret = -EOPNOTSUPP;
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks,
Nicolai
next prev parent reply other threads:[~2026-08-10 11:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 13:47 [PATCH net v1 1/1] net: phy: realtek: fix EEE advertisement write on the internal PHY MMD path Oleksij Rempel
2026-08-06 14:07 ` Andrew Lunn
2026-08-10 11:30 ` Nicolai Buchwitz [this message]
2026-08-10 23:20 ` patchwork-bot+netdevbpf
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=690ccf5721774e377b091ba92a601925@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.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