]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: realtek: Clear MDIO_AN_10GBT_CTRL_ADV10G bit
authorJan Klos <honza.klos@gmail.com>
Sat, 20 Jun 2026 01:19:53 +0000 (03:19 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Jun 2026 01:41:00 +0000 (18:41 -0700)
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>
Link: https://patch.msgid.link/20260620011956.37181-1-honza.klos@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/realtek/realtek_main.c

index 27268811f564f28034d8df9567bef418025e2cde..b65d0f5fa1a014bac736a418f8745a34b320683c 100644 (file)
@@ -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;
        }