From: Greg Kroah-Hartman Date: Tue, 10 Apr 2012 23:57:03 +0000 (-0700) Subject: 3.2-stable patches X-Git-Tag: v3.3.2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80136fecacc5235eccc472e08b6258e356b5a9c2;p=thirdparty%2Fkernel%2Fstable-queue.git 3.2-stable patches added patches: acer-wmi-no-wifi-rfkill-on-sony-machines.patch fix-length-of-buffer-copied-in-__nfs4_get_acl_uncached.patch mfd-clear-twl6030-irq-status-register-only-once.patch revert-x86-ioapic-add-register-level-checks-to-detect.patch sched-x86-fix-overflow-in-cyc2ns_offset.patch tomoyo-fix-mount-flags-checking-order.patch usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch x86-pci-do-not-tie-msi-ms-7253-use_crs-quirk-to-bios-version.patch x86-pci-use-host-bridge-_crs-info-on-msi-ms-7253.patch --- diff --git a/queue-3.2/acer-wmi-no-wifi-rfkill-on-sony-machines.patch b/queue-3.2/acer-wmi-no-wifi-rfkill-on-sony-machines.patch new file mode 100644 index 00000000000..015c2c4cbe3 --- /dev/null +++ b/queue-3.2/acer-wmi-no-wifi-rfkill-on-sony-machines.patch @@ -0,0 +1,37 @@ +From 5719b81988f3c24ff694dc3a37e35b35630a3966 Mon Sep 17 00:00:00 2001 +From: "Lee, Chun-Yi" +Date: Fri, 23 Mar 2012 12:36:44 +0800 +Subject: acer-wmi: No wifi rfkill on Sony machines + +From: "Lee, Chun-Yi" + +commit 5719b81988f3c24ff694dc3a37e35b35630a3966 upstream. + +The wireless rfkill should charged by sony-laptop but not acer-wmi. +So, add Sony's SNY5001 acpi device to blacklist in acer-wmi. + +Tested on Sony Vaio + +Cc: Carlos Corbacho +Cc: Matthew Garrett +Cc: Mattia Dongili +Cc: Dimitris N +Tested-by: Dimitris N +Signed-off-by: Lee, Chun-Yi +Signed-off-by: Matthew Garrett +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/acer-wmi.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/platform/x86/acer-wmi.c ++++ b/drivers/platform/x86/acer-wmi.c +@@ -692,6 +692,7 @@ static const struct acpi_device_id norfk + { "VPC2004", 0}, + { "IBM0068", 0}, + { "LEN0068", 0}, ++ { "SNY5001", 0}, /* sony-laptop in charge */ + { "", 0}, + }; + diff --git a/queue-3.2/fix-length-of-buffer-copied-in-__nfs4_get_acl_uncached.patch b/queue-3.2/fix-length-of-buffer-copied-in-__nfs4_get_acl_uncached.patch new file mode 100644 index 00000000000..690c086181b --- /dev/null +++ b/queue-3.2/fix-length-of-buffer-copied-in-__nfs4_get_acl_uncached.patch @@ -0,0 +1,34 @@ +From 20e0fa98b751facf9a1101edaefbc19c82616a68 Mon Sep 17 00:00:00 2001 +From: Sachin Prabhu +Date: Thu, 22 Mar 2012 16:46:28 +0000 +Subject: Fix length of buffer copied in __nfs4_get_acl_uncached + +From: Sachin Prabhu + +commit 20e0fa98b751facf9a1101edaefbc19c82616a68 upstream. + +_copy_from_pages() used to copy data from the temporary buffer to the +user passed buffer is passed the wrong size parameter when copying +data. res.acl_len contains both the bitmap and acl lenghts while +acl_len contains the acl length after adjusting for the bitmap size. + +Signed-off-by: Sachin Prabhu +Signed-off-by: Trond Myklebust +Cc: Josh Boyer +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/nfs4proc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -3618,7 +3618,7 @@ static ssize_t __nfs4_get_acl_uncached(s + if (acl_len > buflen) + goto out_free; + _copy_from_pages(buf, pages, res.acl_data_offset, +- res.acl_len); ++ acl_len); + } + ret = acl_len; + out_free: diff --git a/queue-3.2/mfd-clear-twl6030-irq-status-register-only-once.patch b/queue-3.2/mfd-clear-twl6030-irq-status-register-only-once.patch new file mode 100644 index 00000000000..e6870224dad --- /dev/null +++ b/queue-3.2/mfd-clear-twl6030-irq-status-register-only-once.patch @@ -0,0 +1,56 @@ +From 3f8349e6e98ba0455437724589072523865eae5e Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Wed, 22 Feb 2012 20:03:45 -0600 +Subject: mfd: Clear twl6030 IRQ status register only once + +From: Nishanth Menon + +commit 3f8349e6e98ba0455437724589072523865eae5e upstream. + +TWL6030 family of PMIC use a shadow interrupt status register +while kernel processes the current interrupt event. +However, any write(0 or 1) to register INT_STS_A, INT_STS_B or +INT_STS_C clears all 3 interrupt status registers. + +Since clear of the interrupt is done on 32k clk, depending on I2C +bus speed, we could in-adverently clear the status of a interrupt +status pending on shadow register in the current implementation. +This is due to the fact that multi-byte i2c write operation into +three seperate status register could result in multiple load +and clear of status and result in lost interrupts. + +Instead, doing a single byte write to INT_STS_A register with 0x0 +will clear all three interrupt status registers without the related +risk. + +Acked-by: Santosh Shilimkar +Signed-off-by: Nishanth Menon +Signed-off-by: Samuel Ortiz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mfd/twl6030-irq.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/drivers/mfd/twl6030-irq.c ++++ b/drivers/mfd/twl6030-irq.c +@@ -187,8 +187,17 @@ static int twl6030_irq_thread(void *data + } + local_irq_enable(); + } +- ret = twl_i2c_write(TWL_MODULE_PIH, sts.bytes, +- REG_INT_STS_A, 3); /* clear INT_STS_A */ ++ ++ /* ++ * NOTE: ++ * Simulation confirms that documentation is wrong w.r.t the ++ * interrupt status clear operation. A single *byte* write to ++ * any one of STS_A to STS_C register results in all three ++ * STS registers being reset. Since it does not matter which ++ * value is written, all three registers are cleared on a ++ * single byte write, so we just use 0x0 to clear. ++ */ ++ ret = twl_i2c_write_u8(TWL_MODULE_PIH, 0x00, REG_INT_STS_A); + if (ret) + pr_warning("twl6030: I2C error in clearing PIH ISR\n"); + diff --git a/queue-3.2/revert-x86-ioapic-add-register-level-checks-to-detect.patch b/queue-3.2/revert-x86-ioapic-add-register-level-checks-to-detect.patch new file mode 100644 index 00000000000..0b24a11689a --- /dev/null +++ b/queue-3.2/revert-x86-ioapic-add-register-level-checks-to-detect.patch @@ -0,0 +1,95 @@ +From dd97ac4172cb1c7a4c848bc37302e11540732856 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 10 Apr 2012 16:04:49 -0700 +Subject: Revert "x86/ioapic: Add register level checks to detect bogus io-apic entries" + +This reverts commit 273fb194e86b795b08a724c7646d0f694949070b +[73d63d038ee9f769f5e5b46792d227fe20e442c5 upstream] + +It causes problems, so needs to be reverted from 3.2-stable for now. + +Reported-by: Konrad Rzeszutek Wilk +Cc: Jon Dufresne +Cc: Suresh Siddha +Cc: +Cc: Josh Boyer +Cc: Ingo Molnar +Cc: Teck Choon Giam +Cc: Ben Guthro +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/apic/io_apic.c | 40 ++++++++-------------------------------- + 1 file changed, 8 insertions(+), 32 deletions(-) + +--- a/arch/x86/kernel/apic/io_apic.c ++++ b/arch/x86/kernel/apic/io_apic.c +@@ -3963,36 +3963,18 @@ int mp_find_ioapic_pin(int ioapic, u32 g + static __init int bad_ioapic(unsigned long address) + { + if (nr_ioapics >= MAX_IO_APICS) { +- pr_warn("WARNING: Max # of I/O APICs (%d) exceeded (found %d), skipping\n", +- MAX_IO_APICS, nr_ioapics); ++ printk(KERN_WARNING "WARNING: Max # of I/O APICs (%d) exceeded " ++ "(found %d), skipping\n", MAX_IO_APICS, nr_ioapics); + return 1; + } + if (!address) { +- pr_warn("WARNING: Bogus (zero) I/O APIC address found in table, skipping!\n"); ++ printk(KERN_WARNING "WARNING: Bogus (zero) I/O APIC address" ++ " found in table, skipping!\n"); + return 1; + } + return 0; + } + +-static __init int bad_ioapic_register(int idx) +-{ +- union IO_APIC_reg_00 reg_00; +- union IO_APIC_reg_01 reg_01; +- union IO_APIC_reg_02 reg_02; +- +- reg_00.raw = io_apic_read(idx, 0); +- reg_01.raw = io_apic_read(idx, 1); +- reg_02.raw = io_apic_read(idx, 2); +- +- if (reg_00.raw == -1 && reg_01.raw == -1 && reg_02.raw == -1) { +- pr_warn("I/O APIC 0x%x registers return all ones, skipping!\n", +- mpc_ioapic_addr(idx)); +- return 1; +- } +- +- return 0; +-} +- + void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) + { + int idx = 0; +@@ -4009,12 +3991,6 @@ void __init mp_register_ioapic(int id, u + ioapics[idx].mp_config.apicaddr = address; + + set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); +- +- if (bad_ioapic_register(idx)) { +- clear_fixmap(FIX_IO_APIC_BASE_0 + idx); +- return; +- } +- + ioapics[idx].mp_config.apicid = io_apic_unique_id(id); + ioapics[idx].mp_config.apicver = io_apic_get_version(idx); + +@@ -4035,10 +4011,10 @@ void __init mp_register_ioapic(int id, u + if (gsi_cfg->gsi_end >= gsi_top) + gsi_top = gsi_cfg->gsi_end + 1; + +- pr_info("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, GSI %d-%d\n", +- idx, mpc_ioapic_id(idx), +- mpc_ioapic_ver(idx), mpc_ioapic_addr(idx), +- gsi_cfg->gsi_base, gsi_cfg->gsi_end); ++ printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " ++ "GSI %d-%d\n", idx, mpc_ioapic_id(idx), ++ mpc_ioapic_ver(idx), mpc_ioapic_addr(idx), ++ gsi_cfg->gsi_base, gsi_cfg->gsi_end); + + nr_ioapics++; + } diff --git a/queue-3.2/sched-x86-fix-overflow-in-cyc2ns_offset.patch b/queue-3.2/sched-x86-fix-overflow-in-cyc2ns_offset.patch new file mode 100644 index 00000000000..5d04a33ba21 --- /dev/null +++ b/queue-3.2/sched-x86-fix-overflow-in-cyc2ns_offset.patch @@ -0,0 +1,93 @@ +From 9993bc635d01a6ee7f6b833b4ee65ce7c06350b1 Mon Sep 17 00:00:00 2001 +From: Salman Qazi +Date: Fri, 9 Mar 2012 16:41:01 -0800 +Subject: sched/x86: Fix overflow in cyc2ns_offset + +From: Salman Qazi + +commit 9993bc635d01a6ee7f6b833b4ee65ce7c06350b1 upstream. + +When a machine boots up, the TSC generally gets reset. However, +when kexec is used to boot into a kernel, the TSC value would be +carried over from the previous kernel. The computation of +cycns_offset in set_cyc2ns_scale is prone to an overflow, if the +machine has been up more than 208 days prior to the kexec. The +overflow happens when we multiply *scale, even though there is +enough room to store the final answer. + +We fix this issue by decomposing tsc_now into the quotient and +remainder of division by CYC2NS_SCALE_FACTOR and then performing +the multiplication separately on the two components. + +Refactor code to share the calculation with the previous +fix in __cycles_2_ns(). + +Signed-off-by: Salman Qazi +Acked-by: John Stultz +Acked-by: Peter Zijlstra +Cc: Paul Turner +Cc: john stultz +Link: http://lkml.kernel.org/r/20120310004027.19291.88460.stgit@dungbeetle.mtv.corp.google.com +Signed-off-by: Ingo Molnar +Cc: Mike Galbraith +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/timer.h | 8 ++------ + arch/x86/kernel/tsc.c | 3 ++- + include/linux/kernel.h | 13 +++++++++++++ + 3 files changed, 17 insertions(+), 7 deletions(-) + +--- a/arch/x86/include/asm/timer.h ++++ b/arch/x86/include/asm/timer.h +@@ -57,14 +57,10 @@ DECLARE_PER_CPU(unsigned long long, cyc2 + + static inline unsigned long long __cycles_2_ns(unsigned long long cyc) + { +- unsigned long long quot; +- unsigned long long rem; + int cpu = smp_processor_id(); + unsigned long long ns = per_cpu(cyc2ns_offset, cpu); +- quot = (cyc >> CYC2NS_SCALE_FACTOR); +- rem = cyc & ((1ULL << CYC2NS_SCALE_FACTOR) - 1); +- ns += quot * per_cpu(cyc2ns, cpu) + +- ((rem * per_cpu(cyc2ns, cpu)) >> CYC2NS_SCALE_FACTOR); ++ ns += mult_frac(cyc, per_cpu(cyc2ns, cpu), ++ (1UL << CYC2NS_SCALE_FACTOR)); + return ns; + } + +--- a/arch/x86/kernel/tsc.c ++++ b/arch/x86/kernel/tsc.c +@@ -622,7 +622,8 @@ static void set_cyc2ns_scale(unsigned lo + + if (cpu_khz) { + *scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz; +- *offset = ns_now - (tsc_now * *scale >> CYC2NS_SCALE_FACTOR); ++ *offset = ns_now - mult_frac(tsc_now, *scale, ++ (1UL << CYC2NS_SCALE_FACTOR)); + } + + sched_clock_idle_wakeup_event(0); +--- a/include/linux/kernel.h ++++ b/include/linux/kernel.h +@@ -85,6 +85,19 @@ + } \ + ) + ++/* ++ * Multiplies an integer by a fraction, while avoiding unnecessary ++ * overflow or loss of precision. ++ */ ++#define mult_frac(x, numer, denom)( \ ++{ \ ++ typeof(x) quot = (x) / (denom); \ ++ typeof(x) rem = (x) % (denom); \ ++ (quot * (numer)) + ((rem * (numer)) / (denom)); \ ++} \ ++) ++ ++ + #define _RET_IP_ (unsigned long)__builtin_return_address(0) + #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) + diff --git a/queue-3.2/series b/queue-3.2/series index 1d92a0e83d0..83a7a99ab50 100644 --- a/queue-3.2/series +++ b/queue-3.2/series @@ -43,3 +43,12 @@ tcm_fc-add-abort-flag-for-gracefully-handling-exchange-timeout.patch tcm_fc-do-not-free-tpg-structure-during-wq-allocation-failure.patch sysctl-fix-write-access-to-dmesg_restrict-kptr_restrict.patch modpost-fix-modpost-license-checking-of-vmlinux.o.patch +x86-pci-use-host-bridge-_crs-info-on-msi-ms-7253.patch +x86-pci-do-not-tie-msi-ms-7253-use_crs-quirk-to-bios-version.patch +tomoyo-fix-mount-flags-checking-order.patch +revert-x86-ioapic-add-register-level-checks-to-detect.patch +acer-wmi-no-wifi-rfkill-on-sony-machines.patch +fix-length-of-buffer-copied-in-__nfs4_get_acl_uncached.patch +sched-x86-fix-overflow-in-cyc2ns_offset.patch +mfd-clear-twl6030-irq-status-register-only-once.patch +usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch diff --git a/queue-3.2/tomoyo-fix-mount-flags-checking-order.patch b/queue-3.2/tomoyo-fix-mount-flags-checking-order.patch new file mode 100644 index 00000000000..031e09c5174 --- /dev/null +++ b/queue-3.2/tomoyo-fix-mount-flags-checking-order.patch @@ -0,0 +1,89 @@ +From df91e49477a9be15921cb2854e1d12a3bdb5e425 Mon Sep 17 00:00:00 2001 +From: Tetsuo Handa +Date: Wed, 29 Feb 2012 21:53:22 +0900 +Subject: TOMOYO: Fix mount flags checking order. + +From: Tetsuo Handa + +commit df91e49477a9be15921cb2854e1d12a3bdb5e425 upstream. + +Userspace can pass in arbitrary combinations of MS_* flags to mount(). + +If both MS_BIND and one of MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE are +passed, device name which should be checked for MS_BIND was not checked because +MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE had higher priority than MS_BIND. + +If both one of MS_BIND/MS_MOVE and MS_REMOUNT are passed, device name which +should not be checked for MS_REMOUNT was checked because MS_BIND/MS_MOVE had +higher priority than MS_REMOUNT. + +Fix these bugs by changing priority to MS_REMOUNT -> MS_BIND -> +MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE -> MS_MOVE as with do_mount() does. + +Also, unconditionally return -EINVAL if more than one of +MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE is passed so that TOMOYO will not +generate inaccurate audit logs, for commit 7a2e8a8f "VFS: Sanity check mount +flags passed to change_mnt_propagation()" clarified that these flags must be +exclusively passed. + +Signed-off-by: Tetsuo Handa +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + security/tomoyo/mount.c | 38 ++++++++++++++++++++------------------ + 1 file changed, 20 insertions(+), 18 deletions(-) + +--- a/security/tomoyo/mount.c ++++ b/security/tomoyo/mount.c +@@ -199,30 +199,32 @@ int tomoyo_mount_permission(char *dev_na + if (flags & MS_REMOUNT) { + type = tomoyo_mounts[TOMOYO_MOUNT_REMOUNT]; + flags &= ~MS_REMOUNT; +- } +- if (flags & MS_MOVE) { +- type = tomoyo_mounts[TOMOYO_MOUNT_MOVE]; +- flags &= ~MS_MOVE; +- } +- if (flags & MS_BIND) { ++ } else if (flags & MS_BIND) { + type = tomoyo_mounts[TOMOYO_MOUNT_BIND]; + flags &= ~MS_BIND; +- } +- if (flags & MS_UNBINDABLE) { +- type = tomoyo_mounts[TOMOYO_MOUNT_MAKE_UNBINDABLE]; +- flags &= ~MS_UNBINDABLE; +- } +- if (flags & MS_PRIVATE) { ++ } else if (flags & MS_SHARED) { ++ if (flags & (MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE)) ++ return -EINVAL; ++ type = tomoyo_mounts[TOMOYO_MOUNT_MAKE_SHARED]; ++ flags &= ~MS_SHARED; ++ } else if (flags & MS_PRIVATE) { ++ if (flags & (MS_SHARED | MS_SLAVE | MS_UNBINDABLE)) ++ return -EINVAL; + type = tomoyo_mounts[TOMOYO_MOUNT_MAKE_PRIVATE]; + flags &= ~MS_PRIVATE; +- } +- if (flags & MS_SLAVE) { ++ } else if (flags & MS_SLAVE) { ++ if (flags & (MS_SHARED | MS_PRIVATE | MS_UNBINDABLE)) ++ return -EINVAL; + type = tomoyo_mounts[TOMOYO_MOUNT_MAKE_SLAVE]; + flags &= ~MS_SLAVE; +- } +- if (flags & MS_SHARED) { +- type = tomoyo_mounts[TOMOYO_MOUNT_MAKE_SHARED]; +- flags &= ~MS_SHARED; ++ } else if (flags & MS_UNBINDABLE) { ++ if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE)) ++ return -EINVAL; ++ type = tomoyo_mounts[TOMOYO_MOUNT_MAKE_UNBINDABLE]; ++ flags &= ~MS_UNBINDABLE; ++ } else if (flags & MS_MOVE) { ++ type = tomoyo_mounts[TOMOYO_MOUNT_MOVE]; ++ flags &= ~MS_MOVE; + } + if (!type) + type = ""; diff --git a/queue-3.2/usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch b/queue-3.2/usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch new file mode 100644 index 00000000000..7c388e18f09 --- /dev/null +++ b/queue-3.2/usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch @@ -0,0 +1,34 @@ +From a2daf263107ba3eb6db33931881731fa51c95045 Mon Sep 17 00:00:00 2001 +From: Guan Xin +Date: Mon, 26 Mar 2012 04:11:46 +0000 +Subject: USB: Add Motorola Rokr E6 Id to the USBNet driver "zaurus" + +From: Guan Xin + +commit a2daf263107ba3eb6db33931881731fa51c95045 upstream. + +Added Vendor/Device Id of Motorola Rokr E6 (22b8:6027) so it can be +recognized by the "zaurus" USBNet driver. +Applies to Linux 3.2.13 and 2.6.39.4. +Signed-off-by: Guan Xin +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/usb/zaurus.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/usb/zaurus.c ++++ b/drivers/net/usb/zaurus.c +@@ -332,6 +332,11 @@ static const struct usb_device_id produc + .driver_info = ZAURUS_PXA_INFO, + }, + { ++ /* Motorola Rokr E6 */ ++ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6027, USB_CLASS_COMM, ++ USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), ++ .driver_info = (unsigned long) &bogus_mdlm_info, ++}, { + /* Motorola MOTOMAGX phones */ + USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6425, USB_CLASS_COMM, + USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), diff --git a/queue-3.2/x86-pci-do-not-tie-msi-ms-7253-use_crs-quirk-to-bios-version.patch b/queue-3.2/x86-pci-do-not-tie-msi-ms-7253-use_crs-quirk-to-bios-version.patch new file mode 100644 index 00000000000..07626ae5b37 --- /dev/null +++ b/queue-3.2/x86-pci-do-not-tie-msi-ms-7253-use_crs-quirk-to-bios-version.patch @@ -0,0 +1,47 @@ +From a97f4f5e524bcd09a85ef0b8821a14d35e69335f Mon Sep 17 00:00:00 2001 +From: Jonathan Nieder +Date: Tue, 28 Feb 2012 15:31:35 -0600 +Subject: x86/PCI: do not tie MSI MS-7253 use_crs quirk to BIOS version + +From: Jonathan Nieder + +commit a97f4f5e524bcd09a85ef0b8821a14d35e69335f upstream. + +Carlos was getting + + WARNING: at drivers/pci/pci.c:118 pci_ioremap_bar+0x24/0x52() + +when probing his sound card, and sound did not work. After adding +pci=use_crs to the kernel command line, no more trouble. + +Ok, we can add a quirk. dmidecode output reveals that this is an MSI +MS-7253, for which we already have a quirk, but the short-sighted +author tied the quirk to a single BIOS version, making it not kick in +on Carlos's machine with BIOS V1.2. If a later BIOS update makes it +no longer necessary to look at the _CRS info it will still be +harmless, so let's stop trying to guess which versions have and don't +have accurate _CRS tables. + +Addresses https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5533 +Also see . + +Reported-by: Carlos Luna +Reviewed-by: Bjorn Helgaas +Signed-off-by: Jonathan Nieder +Signed-off-by: Jesse Barnes +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/pci/acpi.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/arch/x86/pci/acpi.c ++++ b/arch/x86/pci/acpi.c +@@ -62,7 +62,6 @@ static const struct dmi_system_id pci_us + DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), + DMI_MATCH(DMI_BOARD_NAME, "MS-7253"), + DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), +- DMI_MATCH(DMI_BIOS_VERSION, "V1.6"), + }, + }, + {} diff --git a/queue-3.2/x86-pci-use-host-bridge-_crs-info-on-msi-ms-7253.patch b/queue-3.2/x86-pci-use-host-bridge-_crs-info-on-msi-ms-7253.patch new file mode 100644 index 00000000000..48d35905d16 --- /dev/null +++ b/queue-3.2/x86-pci-use-host-bridge-_crs-info-on-msi-ms-7253.patch @@ -0,0 +1,60 @@ +From 8411371709610c826bf65684f886bfdfb5780ca1 Mon Sep 17 00:00:00 2001 +From: Jonathan Nieder +Date: Tue, 28 Feb 2012 11:51:10 -0700 +Subject: x86/PCI: use host bridge _CRS info on MSI MS-7253 + +From: Jonathan Nieder + +commit 8411371709610c826bf65684f886bfdfb5780ca1 upstream. + +In the spirit of commit 29cf7a30f8a0 ("x86/PCI: use host bridge _CRS +info on ASUS M2V-MX SE"), this DMI quirk turns on "pci_use_crs" by +default on a board that needs it. + +This fixes boot failures and oopses introduced in 3e3da00c01d0 +("x86/pci: AMD one chain system to use pci read out res"). The quirk +is quite targetted (to a specific board and BIOS version) for two +reasons: + + (1) to emphasize that this method of tackling the problem one quirk + at a time is a little insane + + (2) to give BIOS vendors an opportunity to use simpler tables and + allow us to return to generic behavior (whatever that happens to + be) with a later BIOS update + +In other words, I am not at all happy with having quirks like this. +But it is even worse for the kernel not to work out of the box on +these machines, so... + +Reference: https://bugzilla.kernel.org/show_bug.cgi?id=42619 +Reported-by: Svante Signell +Signed-off-by: Jonathan Nieder +Signed-off-by: Bjorn Helgaas +Signed-off-by: Jesse Barnes +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/pci/acpi.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/arch/x86/pci/acpi.c ++++ b/arch/x86/pci/acpi.c +@@ -54,6 +54,17 @@ static const struct dmi_system_id pci_us + DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), + }, + }, ++ /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */ ++ { ++ .callback = set_use_crs, ++ .ident = "MSI MS-7253", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), ++ DMI_MATCH(DMI_BOARD_NAME, "MS-7253"), ++ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), ++ DMI_MATCH(DMI_BIOS_VERSION, "V1.6"), ++ }, ++ }, + {} + }; +