[kernel/f16] Fix disabled ASPM regression
Josh Boyer
jwboyer at fedoraproject.org
Wed Mar 28 17:14:29 UTC 2012
commit 964eeef941fe5ab32e3f5d8f1d2d80425c37749b
Author: Josh Boyer <jwboyer at redhat.com>
Date: Wed Mar 28 13:12:02 2012 -0400
Fix disabled ASPM regression
ASPM-Fix-pcie-devs-with-non-pcie-children.patch | 48 +++++++++++++++++++++++
kernel.spec | 7 +++
2 files changed, 55 insertions(+), 0 deletions(-)
---
diff --git a/ASPM-Fix-pcie-devs-with-non-pcie-children.patch b/ASPM-Fix-pcie-devs-with-non-pcie-children.patch
new file mode 100644
index 0000000..2f52fa8
--- /dev/null
+++ b/ASPM-Fix-pcie-devs-with-non-pcie-children.patch
@@ -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 at redhat.com>
+Cc: stable at 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
+
+
diff --git a/kernel.spec b/kernel.spec
index 615201d..f1f4c22 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -785,6 +785,8 @@ Patch21351: x86-add-io_apic_ops-to-allow-interception.patch
Patch21352: x86-apic_ops-Replace-apic_ops-with-x86_apic_ops.patch
Patch21353: xen-x86-Implement-x86_apic_ops.patch
+Patch21500: ASPM-Fix-pcie-devs-with-non-pcie-children.patch
+
Patch22000: weird-root-dentry-name-debug.patch
%endif
@@ -1460,6 +1462,8 @@ ApplyPatch xen-x86-Implement-x86_apic_ops.patch
#rhbz 803809 CVE-2012-1179
ApplyPatch mm-thp-fix-pmd_bad-triggering.patch
+ApplyPatch ASPM-Fix-pcie-devs-with-non-pcie-children.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2198,6 +2202,9 @@ fi
# and build.
%changelog
+* Wed Mar 28 2012 Josh Boyer <jwboyer at redhat.com>
+- Fix disabled ASPM regression
+
* Wed Mar 28 2012 Dave Jones <davej at redhat.com>
- Don't bind the IPS driver if no irq is assigned (typically BIOS bug). (rhbz 804353)
More information about the scm-commits
mailing list