From: Greg Kroah-Hartman Date: Sun, 1 Apr 2012 17:10:25 +0000 (-0700) Subject: 3.3-stable patches X-Git-Tag: v3.0.27~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00c25bbf5fff9c6b661b34175111f6706c85518d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.3-stable patches added patches: aspm-fix-pcie-devices-with-non-pcie-children.patch --- diff --git a/queue-3.3/aspm-fix-pcie-devices-with-non-pcie-children.patch b/queue-3.3/aspm-fix-pcie-devices-with-non-pcie-children.patch new file mode 100644 index 00000000000..3fe646ae058 --- /dev/null +++ b/queue-3.3/aspm-fix-pcie-devices-with-non-pcie-children.patch @@ -0,0 +1,70 @@ +From c9651e70ad0aa499814817cbf3cc1d0b806ed3a1 Mon Sep 17 00:00:00 2001 +From: Matthew Garrett +Date: Tue, 27 Mar 2012 10:17:41 -0400 +Subject: ASPM: Fix pcie devices with non-pcie children + +From: Matthew Garrett + +commit c9651e70ad0aa499814817cbf3cc1d0b806ed3a1 upstream. + +Since 3.2.12 and 3.3, some systems are failing to boot with a BUG_ON. +Some other systems using the pata_jmicron driver fail to boot because no +disks are detected. Passing pcie_aspm=force on the kernel command line +works around it. + +The cause: commit 4949be16822e ("PCI: ignore pre-1.1 ASPM quirking when +ASPM is disabled") 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 +trouble later on. Move the aspm_disabled check so we continue to honour +that scenario. + +Addresses https://bugzilla.kernel.org/show_bug.cgi?id=42979 and + http://bugs.debian.org/665420 + +Reported-by: Romain Francoise # kernel panic +Reported-by: Chris Holland # disk detection trouble +Signed-off-by: Matthew Garrett +Tested-by: Hatem Masmoudi # Dell Latitude E5520 +Tested-by: janek # pata_jmicron with JMB362/JMB363 +[jn: with more symptoms in log message] +Signed-off-by: Jonathan Nieder +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/pcie/aspm.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +--- a/drivers/pci/pcie/aspm.c ++++ b/drivers/pci/pcie/aspm.c +@@ -500,9 +500,6 @@ static int pcie_aspm_sanity_check(struct + 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 +@@ -511,6 +508,16 @@ static int pcie_aspm_sanity_check(struct + 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 diff --git a/queue-3.3/series b/queue-3.3/series index 43ef0b4b18a..2e754201532 100644 --- a/queue-3.3/series +++ b/queue-3.3/series @@ -173,3 +173,4 @@ rtc-provide-flag-for-rtc-devices-that-don-t-support-uie.patch nfsd-don-t-allow-zero-length-strings-in-cache_parse.patch arm-tegra-fix-device-tree-auxdata-for-usb-ehci.patch serial-sh-sci-fix-a-race-of-dma-submit_tx-on-transfer.patch +aspm-fix-pcie-devices-with-non-pcie-children.patch