r8169: disable ALDPS per default for RTL8125
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 11 Sep 2024 13:51:11 +0000 (15:51 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Sep 2024 02:54:53 +0000 (19:54 -0700)
En-Wei reported that traffic breaks if cable is unplugged for more
than 3s and then re-plugged. This was supposed to be fixed by
621735f59064 ("r8169: fix rare issue with broken rx after link-down on
RTL8125"). But apparently this didn't fix the issue for everybody.
The 3s threshold rang a bell, as this is the delay after which ALDPS
kicks in. And indeed disabling ALDPS fixes the issue for this user.
Maybe this fixes the issue in general. In a follow-up step we could
remove the first fix attempt and see whether anybody complains.

Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
Tested-by: En-Wei WU <en-wei.wu@canonical.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/778b9d86-05c4-4856-be59-cde4487b9e52@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/r8169_phy_config.c

index 1f74317beb88788f4fcf7a598befea12b8da3be3..e1e5d9672ae44b61e5ed876301a9815d0089f079 100644 (file)
@@ -1060,6 +1060,7 @@ static void rtl8125a_2_hw_phy_config(struct rtl8169_private *tp,
        phy_modify_paged(phydev, 0xa86, 0x15, 0x0001, 0x0000);
        rtl8168g_enable_gphy_10m(phydev);
 
+       rtl8168g_disable_aldps(phydev);
        rtl8125a_config_eee_phy(phydev);
 }
 
@@ -1099,6 +1100,7 @@ static void rtl8125b_hw_phy_config(struct rtl8169_private *tp,
        phy_modify_paged(phydev, 0xbf8, 0x12, 0xe000, 0xa000);
 
        rtl8125_legacy_force_mode(phydev);
+       rtl8168g_disable_aldps(phydev);
        rtl8125b_config_eee_phy(phydev);
 }