* [PATCH net v2] net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G bit
@ 2026-06-20 1:19 Jan Klos
2026-06-20 6:45 ` AW: " Markus Stockhausen
0 siblings, 1 reply; 3+ messages in thread
From: Jan Klos @ 2026-06-20 1:19 UTC (permalink / raw)
To: Heiner Kallweit, Andrew Lunn, Russell King, netdev
Cc: Jan Klos, Maxime Chevallier, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Daniel Golle, Vladimir Oltean,
Aleksander Jan Bajkowski, Markus Stockhausen, Jan Hoffmann,
Issam Hamdi, Chukun Pan, Russell King (Oracle), ChunHao Lin,
linux-kernel
On RTL8127A connected to a link partner that advertises 10000baseT
speed cannot be changed to anything other than 10000baseT as 10GbE
is always advertised regardless of any setting. Fix this by
clearing MDIO_AN_10GBT_CTRL_ADV10G bit in rtl822x_config_aneg()'s
call to phy_modify_mmd_changed().
Fixes: 83d962316128 ("net: phy: realtek: add RTL8127-internal PHY")
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Jan Klos <honza.klos@gmail.com>
---
v2: Patch formalities (rebase, tree name, tags, ccs)
drivers/net/phy/realtek/realtek_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index 27268811f564..b65d0f5fa1a0 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -1802,7 +1802,8 @@ static int rtl822x_config_aneg(struct phy_device *phydev)
ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND2,
RTL_MDIO_AN_10GBT_CTRL,
MDIO_AN_10GBT_CTRL_ADV2_5G |
- MDIO_AN_10GBT_CTRL_ADV5G, adv);
+ MDIO_AN_10GBT_CTRL_ADV5G |
+ MDIO_AN_10GBT_CTRL_ADV10G, adv);
if (ret < 0)
return ret;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* AW: [PATCH net v2] net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G bit
2026-06-20 1:19 [PATCH net v2] net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G bit Jan Klos
@ 2026-06-20 6:45 ` Markus Stockhausen
2026-06-20 9:43 ` Jan Klos
0 siblings, 1 reply; 3+ messages in thread
From: Markus Stockhausen @ 2026-06-20 6:45 UTC (permalink / raw)
To: 'Jan Klos', 'Heiner Kallweit',
'Andrew Lunn', 'Russell King', netdev
Cc: 'Maxime Chevallier', 'David S. Miller',
'Eric Dumazet', 'Jakub Kicinski',
'Paolo Abeni', 'Daniel Golle',
'Vladimir Oltean', 'Aleksander Jan Bajkowski',
'Jan Hoffmann', 'Issam Hamdi',
'Chukun Pan', 'Russell King (Oracle)',
'ChunHao Lin', linux-kernel
> Von: Jan Klos <honza.klos@gmail.com>
> Gesendet: Samstag, 20. Juni 2026 03:20
> Betreff: [PATCH net v2] net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G
bit
>
> On RTL8127A connected to a link partner that advertises 10000baseT
> speed cannot be changed to anything other than 10000baseT as 10GbE
> is always advertised regardless of any setting. Fix this by
> clearing MDIO_AN_10GBT_CTRL_ADV10G bit in rtl822x_config_aneg()'s
> call to phy_modify_mmd_changed().
As you are enhancing the mask, shouldn't this be "... by respecting ..."?
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net v2] net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G bit
2026-06-20 6:45 ` AW: " Markus Stockhausen
@ 2026-06-20 9:43 ` Jan Klos
0 siblings, 0 replies; 3+ messages in thread
From: Jan Klos @ 2026-06-20 9:43 UTC (permalink / raw)
To: Markus Stockhausen
Cc: Heiner Kallweit, Andrew Lunn, Russell King, netdev,
Maxime Chevallier, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Daniel Golle, Vladimir Oltean,
Aleksander Jan Bajkowski, Jan Hoffmann, Issam Hamdi, Chukun Pan,
Russell King (Oracle), ChunHao Lin, linux-kernel
On Sat, 20 Jun 2026 at 08:45, Markus Stockhausen
<markus.stockhausen@gmx.de> wrote:
>
> > Von: Jan Klos <honza.klos@gmail.com>
> > Gesendet: Samstag, 20. Juni 2026 03:20
> > Betreff: [PATCH net v2] net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G
> bit
> >
> > On RTL8127A connected to a link partner that advertises 10000baseT
> > speed cannot be changed to anything other than 10000baseT as 10GbE
> > is always advertised regardless of any setting. Fix this by
> > clearing MDIO_AN_10GBT_CTRL_ADV10G bit in rtl822x_config_aneg()'s
> > call to phy_modify_mmd_changed().
>
> As you are enhancing the mask, shouldn't this be "... by respecting ..."?
>
> Markus
>
I don't think so, in (__)phy_modify_mmd_changed() the mask is really used to
clear MMD register bits from old register value before setting new bits in set:
* @mask: bit mask of bits to clear
* @set: new value of bits set in mask to write to @regnum
*
* Unlocked helper function which allows a MMD register to be modified as
* new register value = (old register value & ~mask) | set
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-20 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-20 1:19 [PATCH net v2] net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G bit Jan Klos
2026-06-20 6:45 ` AW: " Markus Stockhausen
2026-06-20 9:43 ` Jan Klos
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.