From: Greg Kroah-Hartman Date: Tue, 7 Aug 2012 21:37:06 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.5.1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=439f87474a6d289b5829a0e3e1940f1cfaa3e442;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: alsa-mpu401-fix-missing-initialization-of-irq-field.patch alsa-snd-usb-fix-clock-source-validity-index.patch asoc-wm8962-allow-vmid-time-to-fully-ramp.patch asoc-wm8994-ensure-there-are-enough-bclks-for-four-channels.patch m68k-correct-the-atari-allowint-definition.patch m68k-make-sys_atomic_cmpxchg_32-work-on-classic-m68k.patch usb-echi-dbgp-increase-the-controller-wait-time-to-come-out-of-halt.patch --- diff --git a/queue-3.0/alsa-mpu401-fix-missing-initialization-of-irq-field.patch b/queue-3.0/alsa-mpu401-fix-missing-initialization-of-irq-field.patch new file mode 100644 index 00000000000..298c79e3eda --- /dev/null +++ b/queue-3.0/alsa-mpu401-fix-missing-initialization-of-irq-field.patch @@ -0,0 +1,32 @@ +From bc733d495267a23ef8660220d696c6e549ce30b3 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 23 Jul 2012 11:35:55 +0200 +Subject: ALSA: mpu401: Fix missing initialization of irq field + +From: Takashi Iwai + +commit bc733d495267a23ef8660220d696c6e549ce30b3 upstream. + +The irq field of struct snd_mpu401 is supposed to be initialized to -1. +Since it's set to zero as of now, a probing error before the irq +installation results in a kernel warning "Trying to free already-free +IRQ 0". + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44821 +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/drivers/mpu401/mpu401_uart.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/drivers/mpu401/mpu401_uart.c ++++ b/sound/drivers/mpu401/mpu401_uart.c +@@ -554,6 +554,7 @@ int snd_mpu401_uart_new(struct snd_card + spin_lock_init(&mpu->output_lock); + spin_lock_init(&mpu->timer_lock); + mpu->hardware = hardware; ++ mpu->irq = -1; + if (! (info_flags & MPU401_INFO_INTEGRATED)) { + int res_size = hardware == MPU401_HW_PC98II ? 4 : 2; + mpu->res = request_region(port, res_size, "MPU401 UART"); diff --git a/queue-3.0/alsa-snd-usb-fix-clock-source-validity-index.patch b/queue-3.0/alsa-snd-usb-fix-clock-source-validity-index.patch new file mode 100644 index 00000000000..df0206306d4 --- /dev/null +++ b/queue-3.0/alsa-snd-usb-fix-clock-source-validity-index.patch @@ -0,0 +1,38 @@ +From aff252a848ce21b431ba822de3dab9c4c94571cb Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Wed, 1 Aug 2012 10:16:53 +0200 +Subject: ALSA: snd-usb: fix clock source validity index + +From: Daniel Mack + +commit aff252a848ce21b431ba822de3dab9c4c94571cb upstream. + +uac_clock_source_is_valid() uses the control selector value to access +the bmControls bitmap of the clock source unit. This is wrong, as +control selector values start from 1, while the bitmap uses all +available bits. + +In other words, "Clock Validity Control" is stored in D3..2, not D5..4 +of the clock selector unit's bmControls. + +Signed-off-by: Daniel Mack +Reported-by: Andreas Koch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/clock.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/sound/usb/clock.c ++++ b/sound/usb/clock.c +@@ -111,7 +111,8 @@ static bool uac_clock_source_is_valid(st + return 0; + + /* If a clock source can't tell us whether it's valid, we assume it is */ +- if (!uac2_control_is_readable(cs_desc->bmControls, UAC2_CS_CONTROL_CLOCK_VALID)) ++ if (!uac2_control_is_readable(cs_desc->bmControls, ++ UAC2_CS_CONTROL_CLOCK_VALID - 1)) + return 1; + + err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR, diff --git a/queue-3.0/asoc-wm8962-allow-vmid-time-to-fully-ramp.patch b/queue-3.0/asoc-wm8962-allow-vmid-time-to-fully-ramp.patch new file mode 100644 index 00000000000..9018927be1d --- /dev/null +++ b/queue-3.0/asoc-wm8962-allow-vmid-time-to-fully-ramp.patch @@ -0,0 +1,30 @@ +From 9d40e5582c9c4cfb6977ba2a0ca9c2ed82c56f21 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Mon, 30 Jul 2012 18:24:19 +0100 +Subject: ASoC: wm8962: Allow VMID time to fully ramp + +From: Mark Brown + +commit 9d40e5582c9c4cfb6977ba2a0ca9c2ed82c56f21 upstream. + +Required for reliable power up from cold. + +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8962.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/soc/codecs/wm8962.c ++++ b/sound/soc/codecs/wm8962.c +@@ -2890,6 +2890,9 @@ static int wm8962_set_bias_level(struct + /* VMID 2*250k */ + snd_soc_update_bits(codec, WM8962_PWR_MGMT_1, + WM8962_VMID_SEL_MASK, 0x100); ++ ++ if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) ++ msleep(100); + break; + + case SND_SOC_BIAS_OFF: diff --git a/queue-3.0/asoc-wm8994-ensure-there-are-enough-bclks-for-four-channels.patch b/queue-3.0/asoc-wm8994-ensure-there-are-enough-bclks-for-four-channels.patch new file mode 100644 index 00000000000..e086c311311 --- /dev/null +++ b/queue-3.0/asoc-wm8994-ensure-there-are-enough-bclks-for-four-channels.patch @@ -0,0 +1,30 @@ +From b8edf3e5522735c8ce78b81845f7a1a2d4a08626 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Fri, 22 Jun 2012 17:21:17 +0100 +Subject: ASoC: wm8994: Ensure there are enough BCLKs for four channels + +From: Mark Brown + +commit b8edf3e5522735c8ce78b81845f7a1a2d4a08626 upstream. + +Otherwise if someone tries to use all four channels on AIF1 with the +device in master mode we won't be able to clock out all the data. + +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8994.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/wm8994.c ++++ b/sound/soc/codecs/wm8994.c +@@ -2127,7 +2127,7 @@ static int wm8994_hw_params(struct snd_p + return -EINVAL; + } + +- bclk_rate = params_rate(params) * 2; ++ bclk_rate = params_rate(params) * 4; + switch (params_format(params)) { + case SNDRV_PCM_FORMAT_S16_LE: + bclk_rate *= 16; diff --git a/queue-3.0/m68k-correct-the-atari-allowint-definition.patch b/queue-3.0/m68k-correct-the-atari-allowint-definition.patch new file mode 100644 index 00000000000..6972ecf185e --- /dev/null +++ b/queue-3.0/m68k-correct-the-atari-allowint-definition.patch @@ -0,0 +1,95 @@ +From c663600584a596b5e66258cc10716fb781a5c2c9 Mon Sep 17 00:00:00 2001 +From: Mikael Pettersson +Date: Thu, 19 Apr 2012 00:53:36 +0200 +Subject: m68k: Correct the Atari ALLOWINT definition + +From: Mikael Pettersson + +commit c663600584a596b5e66258cc10716fb781a5c2c9 upstream. + +Booting a 3.2, 3.3, or 3.4-rc4 kernel on an Atari using the +`nfeth' ethernet device triggers a WARN_ONCE() in generic irq +handling code on the first irq for that device: + +WARNING: at kernel/irq/handle.c:146 handle_irq_event_percpu+0x134/0x142() +irq 3 handler nfeth_interrupt+0x0/0x194 enabled interrupts +Modules linked in: +Call Trace: [<000299b2>] warn_slowpath_common+0x48/0x6a + [<000299c0>] warn_slowpath_common+0x56/0x6a + [<00029a4c>] warn_slowpath_fmt+0x2a/0x32 + [<0005b34c>] handle_irq_event_percpu+0x134/0x142 + [<0005b34c>] handle_irq_event_percpu+0x134/0x142 + [<0000a584>] nfeth_interrupt+0x0/0x194 + [<001ba0a8>] schedule_preempt_disabled+0x0/0xc + [<0005b37a>] handle_irq_event+0x20/0x2c + [<0005add4>] generic_handle_irq+0x2c/0x3a + [<00002ab6>] do_IRQ+0x20/0x32 + [<0000289e>] auto_irqhandler_fixup+0x4/0x6 + [<00003144>] cpu_idle+0x22/0x2e + [<001b8a78>] printk+0x0/0x18 + [<0024d112>] start_kernel+0x37a/0x386 + [<0003021d>] __do_proc_dointvec+0xb1/0x366 + [<0003021d>] __do_proc_dointvec+0xb1/0x366 + [<0024c31e>] _sinittext+0x31e/0x9c0 + +After invoking the irq's handler the kernel sees !irqs_disabled() +and concludes that the handler erroneously enabled interrupts. + +However, debugging shows that !irqs_disabled() is true even before +the handler is invoked, which indicates a problem in the platform +code rather than the specific driver. + +The warning does not occur in 3.1 or older kernels. + +It turns out that the ALLOWINT definition for Atari is incorrect. + +The Atari definition of ALLOWINT is ~0x400, the stated purpose of +that is to avoid taking HSYNC interrupts. irqs_disabled() returns +true if the 3-bit ipl & 4 is non-zero. The nfeth interrupt runs at +ipl 3 (it's autovector 3), but 3 & 4 is zero so irqs_disabled() is +false, and the warning above is generated. + +When interrupts are explicitly disabled, ipl is set to 7. When they +are enabled, ipl is masked with ALLOWINT. On Atari this will result +in ipl = 3, which blocks interrupts at ipl 3 and below. So how come +nfeth interrupts at ipl 3 are received at all? That's because ipl +is reset to 2 by Atari-specific code in default_idle(), again with +the stated purpose of blocking HSYNC interrupts. This discrepancy +means that ipl 3 can remain blocked for longer than intended. + +Both default_idle() and falcon_hblhandler() identify HSYNC with +ipl 2, and the "Atari ST/.../F030 Hardware Register Listing" agrees, +but ALLOWINT is defined as if HSYNC was ipl 3. + +[As an experiment I modified default_idle() to reset ipl to 3, and +as expected that resulted in all nfeth interrupts being blocked.] + +The fix is simple: define ALLOWINT as ~0x500 instead. This makes +arch_local_irq_enable() consistent with default_idle(), and prevents +the !irqs_disabled() problems for ipl 3 interrupts. + +Tested on Atari running in an Aranym VM. + +Signed-off-by: Mikael Pettersson +Tested-by: Michael Schmitz (on Falcon/CT60) +Signed-off-by: Geert Uytterhoeven +Signed-off-by: Greg Kroah-Hartman + + +--- + arch/m68k/include/asm/entry_mm.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/m68k/include/asm/entry_mm.h ++++ b/arch/m68k/include/asm/entry_mm.h +@@ -35,8 +35,8 @@ + + /* the following macro is used when enabling interrupts */ + #if defined(MACH_ATARI_ONLY) +- /* block out HSYNC on the atari */ +-#define ALLOWINT (~0x400) ++ /* block out HSYNC = ipl 2 on the atari */ ++#define ALLOWINT (~0x500) + #define MAX_NOINT_IPL 3 + #else + /* portable version */ diff --git a/queue-3.0/m68k-make-sys_atomic_cmpxchg_32-work-on-classic-m68k.patch b/queue-3.0/m68k-make-sys_atomic_cmpxchg_32-work-on-classic-m68k.patch new file mode 100644 index 00000000000..c1d8c12302b --- /dev/null +++ b/queue-3.0/m68k-make-sys_atomic_cmpxchg_32-work-on-classic-m68k.patch @@ -0,0 +1,39 @@ +From 9e2760d18b3cf179534bbc27692c84879c61b97c Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Sat, 28 Jul 2012 00:20:34 +0200 +Subject: m68k: Make sys_atomic_cmpxchg_32 work on classic m68k + +From: Andreas Schwab + +commit 9e2760d18b3cf179534bbc27692c84879c61b97c upstream. + +User space access must always go through uaccess accessors, since on +classic m68k user space and kernel space are completely separate. + +Signed-off-by: Andreas Schwab +Tested-by: Thorsten Glaser +Signed-off-by: Geert Uytterhoeven +Signed-off-by: Greg Kroah-Hartman + +--- + arch/m68k/kernel/sys_m68k.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/arch/m68k/kernel/sys_m68k.c ++++ b/arch/m68k/kernel/sys_m68k.c +@@ -479,9 +479,13 @@ sys_atomic_cmpxchg_32(unsigned long newv + goto bad_access; + } + +- mem_value = *mem; ++ /* ++ * No need to check for EFAULT; we know that the page is ++ * present and writable. ++ */ ++ __get_user(mem_value, mem); + if (mem_value == oldval) +- *mem = newval; ++ __put_user(newval, mem); + + pte_unmap_unlock(pte, ptl); + up_read(&mm->mmap_sem); diff --git a/queue-3.0/series b/queue-3.0/series index 70d473c8e17..a6eba62b26b 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -37,3 +37,10 @@ usb-kaweth.c-use-gfp_atomic-under-spin_lock.patch net-fix-rtnetlink-iff_promisc-and-iff_allmulti-handling.patch tcp-perform-dma-to-userspace-only-if-there-is-a-task-waiting-for-it.patch net-tun-fix-ioctl-based-info-leaks.patch +usb-echi-dbgp-increase-the-controller-wait-time-to-come-out-of-halt.patch +alsa-snd-usb-fix-clock-source-validity-index.patch +alsa-mpu401-fix-missing-initialization-of-irq-field.patch +asoc-wm8962-allow-vmid-time-to-fully-ramp.patch +asoc-wm8994-ensure-there-are-enough-bclks-for-four-channels.patch +m68k-make-sys_atomic_cmpxchg_32-work-on-classic-m68k.patch +m68k-correct-the-atari-allowint-definition.patch diff --git a/queue-3.0/usb-echi-dbgp-increase-the-controller-wait-time-to-come-out-of-halt.patch b/queue-3.0/usb-echi-dbgp-increase-the-controller-wait-time-to-come-out-of-halt.patch new file mode 100644 index 00000000000..a93536238a0 --- /dev/null +++ b/queue-3.0/usb-echi-dbgp-increase-the-controller-wait-time-to-come-out-of-halt.patch @@ -0,0 +1,35 @@ +From f96a4216e85050c0a9d41a41ecb0ae9d8e39b509 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Mon, 30 Jul 2012 16:06:42 +0100 +Subject: USB: echi-dbgp: increase the controller wait time to come out of halt. + +From: Colin Ian King + +commit f96a4216e85050c0a9d41a41ecb0ae9d8e39b509 upstream. + +The default 10 microsecond delay for the controller to come out of +halt in dbgp_ehci_startup is too short, so increase it to 1 millisecond. + +This is based on emperical testing on various USB debug ports on +modern machines such as a Lenovo X220i and an Ivybridge development +platform that needed to wait ~450-950 microseconds. + +Signed-off-by: Colin Ian King +Signed-off-by: Jason Wessel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/early/ehci-dbgp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/early/ehci-dbgp.c ++++ b/drivers/usb/early/ehci-dbgp.c +@@ -450,7 +450,7 @@ static int dbgp_ehci_startup(void) + writel(FLAG_CF, &ehci_regs->configured_flag); + + /* Wait until the controller is no longer halted */ +- loop = 10; ++ loop = 1000; + do { + status = readl(&ehci_regs->status); + if (!(status & STS_HALT))