]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/r8169-disable-aspm-again.patch
Linux 4.14.112
[thirdparty/kernel/stable-queue.git] / queue-4.19 / r8169-disable-aspm-again.patch
1 From 2eaa6332faa70811de428e011cf74696bfa1c8c1 Mon Sep 17 00:00:00 2001
2 From: Heiner Kallweit <hkallweit1@gmail.com>
3 Date: Fri, 5 Apr 2019 20:46:46 +0200
4 Subject: r8169: disable ASPM again
5
6 [ Upstream commit b75bb8a5b755d0c7bf1ac071e4df2349a7644a1e ]
7
8 There's a significant number of reports that re-enabling ASPM causes
9 different issues, ranging from decreased performance to system not
10 booting at all. This affects only a minority of users, but the number
11 of affected users is big enough that we better switch off ASPM again.
12
13 This will hurt notebook users who are not affected by the issues, they
14 may see decreased battery runtime w/o ASPM. With the PCI core folks is
15 being discussed to add generic sysfs attributes to control ASPM.
16 Once this is in place brave enough users can re-enable ASPM on their
17 system.
18
19 Fixes: a99790bf5c7f ("r8169: Reinstate ASPM Support")
20 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
21 Signed-off-by: David S. Miller <davem@davemloft.net>
22 Signed-off-by: Sasha Levin <sashal@kernel.org>
23 ---
24 drivers/net/ethernet/realtek/r8169.c | 6 ++++++
25 1 file changed, 6 insertions(+)
26
27 diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
28 index 5f45ffeeecb4..1d24884e9897 100644
29 --- a/drivers/net/ethernet/realtek/r8169.c
30 +++ b/drivers/net/ethernet/realtek/r8169.c
31 @@ -28,6 +28,7 @@
32 #include <linux/pm_runtime.h>
33 #include <linux/firmware.h>
34 #include <linux/prefetch.h>
35 +#include <linux/pci-aspm.h>
36 #include <linux/ipv6.h>
37 #include <net/ip6_checksum.h>
38
39 @@ -7324,6 +7325,11 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
40 return rc;
41 }
42
43 + /* Disable ASPM completely as that cause random device stop working
44 + * problems as well as full system hangs for some PCIe devices users.
45 + */
46 + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
47 +
48 /* enable device (incl. PCI PM wakeup and hotplug setup) */
49 rc = pcim_enable_device(pdev);
50 if (rc < 0) {
51 --
52 2.19.1
53