netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] r8169: disable ASPM
@ 2011-02-22 12:00 Stanislaw Gruszka
  2011-02-22 16:18 ` Francois Romieu
  0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2011-02-22 12:00 UTC (permalink / raw)
  To: netdev; +Cc: Francois Romieu, stable

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>
---
I have to add (with shame on us) that we selfishly carry this patch
in RHEL6 for some time now.

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 469ab0b..ae40c0e 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -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) {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] r8169: disable ASPM
  2011-02-22 12:00 [PATCH] r8169: disable ASPM Stanislaw Gruszka
@ 2011-02-22 16:18 ` Francois Romieu
  2011-02-22 17:17   ` Stanislaw Gruszka
  0 siblings, 1 reply; 4+ messages in thread
From: Francois Romieu @ 2011-02-22 16:18 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: netdev, stable, Hayes

Please Cc: Hayes <hayeswang@realtek.com> 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.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] r8169: disable ASPM
  2011-02-22 16:18 ` Francois Romieu
@ 2011-02-22 17:17   ` Stanislaw Gruszka
  2011-02-25  9:34     ` Francois Romieu
  0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2011-02-22 17:17 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev, stable, Hayes

On Tue, Feb 22, 2011 at 05:18:16PM +0100, Francois Romieu wrote:
> Please Cc: Hayes <hayeswang@realtek.com> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] r8169: disable ASPM
  2011-02-22 17:17   ` Stanislaw Gruszka
@ 2011-02-25  9:34     ` Francois Romieu
  0 siblings, 0 replies; 4+ messages in thread
From: Francois Romieu @ 2011-02-25  9:34 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: netdev, stable, Hayes

Stanislaw Gruszka <sgruszka@redhat.com> :
[...]
> Perhaps need to add entry in MAINTAINERS file?

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

-- 
Ueimor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-25  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 12:00 [PATCH] r8169: disable ASPM Stanislaw Gruszka
2011-02-22 16:18 ` Francois Romieu
2011-02-22 17:17   ` Stanislaw Gruszka
2011-02-25  9:34     ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).