diff mbox series

[net] r8169: disable ASPM again

Message ID 0f112874-137a-ac8b-17ed-859dbc4cd3b7@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series [net] r8169: disable ASPM again | expand

Commit Message

Heiner Kallweit April 5, 2019, 6:46 p.m. UTC
There's a significant number of reports that re-enabling ASPM causes
different issues, ranging from decreased performance to system not
booting at all. This affects only a minority of users, but the number
of affected users is big enough that we better switch off ASPM again.

This will hurt notebook users who are not affected by the issues, they
may see decreased battery runtime w/o ASPM. With the PCI core folks is
being discussed to add generic sysfs attributes to control ASPM.
Once this is in place brave enough users can re-enable ASPM on their
system.

Fixes: a99790bf5c7f ("r8169: Reinstate ASPM Support")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

David Miller April 8, 2019, 10:20 p.m. UTC | #1
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Fri, 5 Apr 2019 20:46:46 +0200

> There's a significant number of reports that re-enabling ASPM causes
> different issues, ranging from decreased performance to system not
> booting at all. This affects only a minority of users, but the number
> of affected users is big enough that we better switch off ASPM again.
> 
> This will hurt notebook users who are not affected by the issues, they
> may see decreased battery runtime w/o ASPM. With the PCI core folks is
> being discussed to add generic sysfs attributes to control ASPM.
> Once this is in place brave enough users can re-enable ASPM on their
> system.
> 
> Fixes: a99790bf5c7f ("r8169: Reinstate ASPM Support")
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Applied and queued up for -stable.

Fingers crossed...
diff mbox series

Patch

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 88eb9e05d..c9b5a75e3 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -28,6 +28,7 @@ 
 #include <linux/pm_runtime.h>
 #include <linux/firmware.h>
 #include <linux/prefetch.h>
+#include <linux/pci-aspm.h>
 #include <linux/ipv6.h>
 #include <net/ip6_checksum.h>
 
@@ -7352,6 +7353,11 @@  static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (rc)
 		return rc;
 
+	/* Disable ASPM completely as that cause random device stop working
+	 * problems as well as full system hangs for some PCIe devices users.
+	 */
+	pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
+
 	/* enable device (incl. PCI PM wakeup and hotplug setup) */
 	rc = pcim_enable_device(pdev);
 	if (rc < 0) {