Fix disabled ASPM regression

This commit is contained in:
Josh Boyer 2012-03-28 13:12:02 -04:00
parent e5e09d24a2
commit 5bdfff4ee1
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,48 @@
Commit 4949be16822e92a18ea0cc1616319926628092ee changed the behaviour of
pcie_aspm_sanity_check() to always return 0 if aspm is disabled, in order
to avoid cases where we changed ASPM state on pre-PCIe 1.1 devices. This
skipped the secondary function of pcie_aspm_sanity_check which was to avoid
us enabling ASPM on devices that had non-PCIe children, causing us to hit
a BUG_ON later on. Move the aspm_disabled check so we continue to honour
that scenario.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@vger.kernel.org
---
drivers/pci/pcie/aspm.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 86111d9..41e367b 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -521,9 +521,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
int pos;
u32 reg32;
- if (aspm_disabled)
- return 0;
-
/*
* Some functions in a slot might not all be PCIe functions,
* very strange. Disable ASPM for the whole slot
@@ -532,6 +529,16 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
pos = pci_pcie_cap(child);
if (!pos)
return -EINVAL;
+
+ /*
+ * If ASPM is disabled then we're not going to change
+ * the BIOS state. It's safe to continue even if it's a
+ * pre-1.1 device
+ */
+
+ if (aspm_disabled)
+ continue;
+
/*
* Disable ASPM for pre-1.1 PCIe device, we follow MS to use
* RBER bit to determine if a function is 1.1 version device
--
1.7.7.6

View File

@ -54,7 +54,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
%global baserelease 7
%global baserelease 8
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -779,6 +779,8 @@ Patch21353: xen-x86-Implement-x86_apic_ops.patch
Patch21400: unhandled-irqs-switch-to-polling.patch
Patch21500: ASPM-Fix-pcie-devs-with-non-pcie-children.patch
Patch22000: weird-root-dentry-name-debug.patch
%endif
@ -1509,6 +1511,8 @@ ApplyPatch mm-thp-fix-pmd_bad-triggering.patch
#Highbank clock functions
ApplyPatch highbank-export-clock-functions.patch
ApplyPatch ASPM-Fix-pcie-devs-with-non-pcie-children.patch
# END OF PATCH APPLICATIONS
%endif
@ -2349,6 +2353,7 @@ fi
# '-'
%changelog
* Wed Mar 28 2012 Josh Boyer <jwboyer@redhat.com>
- Fix disabled ASPM regression
- Move 9p modules back to main package for KVM (rhbz 807733)
* Tue Mar 27 2012 Josh Boyer <jwboyer@redhat.com>