Skip to contentSkip to conversation

r8169: disable ASPM

PATCH In review Stanislaw Gruszka 2 participants 4 messages Feb 22, 2011 – Feb 25, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8169: disable ASPM

r8169: disable ASPM

For some time is known that ASPM is causing troubles on r8169, i.e. make device randomly stop working without any errors in dmesg.

Currently Tomi Leppikangas reports that system with r8169 device hangs with MCE errors when ASPM is enabled:
https://bugzilla.redhat.com/show_bug.cgi?id=642861#c4

Lets disable ASPM for r8169 devices at all, to avoid problems with r8169 PCIe devices at least for some users.

---
I have to add (with shame on us) that we selfishly carry this patch in RHEL6 for some time now.

drivers/net/r8169.c +6 -0
index 469ab0b..ae40c0e 100644
@@ -25,6 +25,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/pm_runtime.h>
 #include <linux/firmware.h>
+#include <linux/pci-aspm.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -3009,6 +3010,11 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	mii->reg_num_mask = 0x1f;
 	mii->supports_gmii = !!(cfg->features & RTL_FEATURE_GMII);
 
+	/* 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 |
+				     PCIE_LINK_STATE_CLKPM);
+
 	/* enable device (incl. PCI PM wakeup and hotplug setup) */
 	rc = pci_enable_device(pdev);
 	if (rc < 0) {
#1 lore raw

Please Cc: Hayes <[email protected]> for hard hardware related issues (I just did). His opinion will be more authoritative than mine on this subject and he is interested in maintaining the r8169 driver too.

Signature · 1 line
Ueimor
#2 lore raw
Quoted 4 lines · Francois Romieu

Please Cc: Hayes <[email protected]> for hard hardware related issues (I just did). His opinion will be more authoritative than mine on this subject and he is interested in maintaining the r8169 driver too.

Perhaps need to add entry in MAINTAINERS file?

Stanislaw

#3 lore raw

Stanislaw Gruszka <[email protected]> :
[...]

Quoted 1 line

Perhaps need to add entry in MAINTAINERS file?

Consider it Acked-by if Hayes wants to add himself.

Signature · 1 line
Ueimor