]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
r8169: fix ASPM-related problem for chip version 42 and 43
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 11 Sep 2023 09:06:58 +0000 (11:06 +0200)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:20:28 +0000 (17:20 +0200)
BugLink: https://bugs.launchpad.net/bugs/2031537
Referenced commit missed that for chip versions 42 and 43 ASPM
remained disabled in the respective rtl_hw_start_...() routines.
This resulted in problems as described in the referenced bug
ticket. Therefore re-instantiate the previous logic.

Fixes: 5fc3f6c90cca ("r8169: consolidate disabling ASPM before EPHY access")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217635
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 162d626f3013215b82b6514ca14f20932c7ccce5)
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
drivers/net/ethernet/realtek/r8169_main.c

index 3c9c847d2fac0bc85988ec15f120cd3924c9835e..b222c295c8cb4576d524fa937ccde4cbe7634469 100644 (file)
@@ -2743,6 +2743,13 @@ static void rtl_hw_aspm_clkreq_enable(struct rtl8169_private *tp, bool enable)
                return;
 
        if (enable) {
+               /* On these chip versions ASPM can even harm
+                * bus communication of other PCI devices.
+                */
+               if (tp->mac_version == RTL_GIGA_MAC_VER_42 ||
+                   tp->mac_version == RTL_GIGA_MAC_VER_43)
+                       return;
+
                rtl_mod_config5(tp, 0, ASPM_en);
                rtl_mod_config2(tp, 0, ClkReqEn);