Skip to content

Commit ba04c7c

Browse files
Stanislaw Gruszkadavem330
authored andcommitted
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. Reported-by: Tomi Leppikangas <tomi.leppikangas@gmail.com> Cc: stable@kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f009918 commit ba04c7c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/r8169.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/dma-mapping.h>
2626
#include <linux/pm_runtime.h>
2727
#include <linux/firmware.h>
28+
#include <linux/pci-aspm.h>
2829

2930
#include <asm/system.h>
3031
#include <asm/io.h>
@@ -3020,6 +3021,11 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
30203021
mii->reg_num_mask = 0x1f;
30213022
mii->supports_gmii = !!(cfg->features & RTL_FEATURE_GMII);
30223023

3024+
/* disable ASPM completely as that cause random device stop working
3025+
* problems as well as full system hangs for some PCIe devices users */
3026+
pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
3027+
PCIE_LINK_STATE_CLKPM);
3028+
30233029
/* enable device (incl. PCI PM wakeup and hotplug setup) */
30243030
rc = pci_enable_device(pdev);
30253031
if (rc < 0) {

0 commit comments

Comments
 (0)