Skip to content

Commit eb90f87

Browse files
hkallweitkuba-moo
authored andcommitted
r8169: align RTL8125 EEE config with vendor driver
Align the EEE config for RTL8125A/RTL8125B with vendor driver r8125. This should help to avoid compatibility issues. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/044c925e-8669-4b98-87df-95b4056f4f5f@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent cbf49be commit eb90f87

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

drivers/net/ethernet/realtek/r8169_phy_config.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,25 @@ static void rtl8168h_config_eee_phy(struct phy_device *phydev)
8989
phy_modify_paged(phydev, 0xa42, 0x14, 0x0000, 0x0080);
9090
}
9191

92-
static void rtl8125a_config_eee_phy(struct phy_device *phydev)
92+
static void rtl8125_common_config_eee_phy(struct phy_device *phydev)
9393
{
94-
rtl8168h_config_eee_phy(phydev);
94+
phy_modify_paged(phydev, 0xa6d, 0x14, 0x0010, 0x0000);
95+
phy_modify_paged(phydev, 0xa42, 0x14, 0x0080, 0x0000);
96+
phy_modify_paged(phydev, 0xa4a, 0x11, 0x0200, 0x0000);
97+
}
9598

99+
static void rtl8125a_config_eee_phy(struct phy_device *phydev)
100+
{
101+
rtl8168g_config_eee_phy(phydev);
102+
/* disable EEE at 2.5Gbps */
96103
phy_modify_paged(phydev, 0xa6d, 0x12, 0x0001, 0x0000);
97-
phy_modify_paged(phydev, 0xa6d, 0x14, 0x0010, 0x0000);
104+
rtl8125_common_config_eee_phy(phydev);
98105
}
99106

100107
static void rtl8125b_config_eee_phy(struct phy_device *phydev)
101108
{
102-
phy_modify_paged(phydev, 0xa6d, 0x14, 0x0010, 0x0000);
103-
phy_modify_paged(phydev, 0xa42, 0x14, 0x0080, 0x0000);
104-
phy_modify_paged(phydev, 0xa4a, 0x11, 0x0200, 0x0000);
109+
rtl8168g_config_eee_phy(phydev);
110+
rtl8125_common_config_eee_phy(phydev);
105111
}
106112

107113
static void rtl8169s_hw_phy_config(struct rtl8169_private *tp,

0 commit comments

Comments
 (0)