From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stanislaw Gruszka Subject: [PATCH] r8169: disable ASPM Date: Tue, 22 Feb 2011 13:00:11 +0100 Message-ID: <20110222120001.GA24961@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Francois Romieu , stable@kernel.org To: netdev@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46158 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754053Ab1BVMAR (ORCPT ); Tue, 22 Feb 2011 07:00:17 -0500 Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: 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 Cc: stable@kernel.org Signed-off-by: Stanislaw Gruszka --- 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 #include #include +#include #include #include @@ -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) {