From: Greg Kroah-Hartman Date: Thu, 20 Jun 2013 20:56:17 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.84~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81add72f309fca48dcf997f366032e5f1d9d34b1;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: alsa-usb-audio-fix-invalid-volume-resolution-for-logitech-hd-webcam-c310.patch alsa-usb-audio-work-around-android-accessory-firmware-bug.patch arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch clk-remove-notifier-from-list-before-freeing-it.patch tilepro-work-around-module-link-error-with-gcc-4.7.patch --- diff --git a/queue-3.4/alsa-usb-audio-fix-invalid-volume-resolution-for-logitech-hd-webcam-c310.patch b/queue-3.4/alsa-usb-audio-fix-invalid-volume-resolution-for-logitech-hd-webcam-c310.patch new file mode 100644 index 00000000000..87a57b2b335 --- /dev/null +++ b/queue-3.4/alsa-usb-audio-fix-invalid-volume-resolution-for-logitech-hd-webcam-c310.patch @@ -0,0 +1,31 @@ +From 36691e1be6ec551eef4a5225f126a281f8c051c2 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 17 Jun 2013 10:25:02 +0200 +Subject: ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310 + +From: Takashi Iwai + +commit 36691e1be6ec551eef4a5225f126a281f8c051c2 upstream. + +Just like the previous fix for LogitechHD Webcam c270 in commit +11e7064f35bb87da8f427d1aa4bbd8b7473a3993, c310 model also requires the +same workaround for avoiding the kernel warning. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59741 +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/mixer.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/usb/mixer.c ++++ b/sound/usb/mixer.c +@@ -821,6 +821,7 @@ static void volume_control_quirks(struct + + case USB_ID(0x046d, 0x0808): + case USB_ID(0x046d, 0x0809): ++ case USB_ID(0x046d, 0x081b): /* HD Webcam c310 */ + case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ + case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */ + case USB_ID(0x046d, 0x0991): diff --git a/queue-3.4/alsa-usb-audio-work-around-android-accessory-firmware-bug.patch b/queue-3.4/alsa-usb-audio-work-around-android-accessory-firmware-bug.patch new file mode 100644 index 00000000000..bcc66bbecc3 --- /dev/null +++ b/queue-3.4/alsa-usb-audio-work-around-android-accessory-firmware-bug.patch @@ -0,0 +1,67 @@ +From 342cda29343a6272c630f94ed56810a76740251b Mon Sep 17 00:00:00 2001 +From: Clemens Ladisch +Date: Sat, 15 Jun 2013 11:21:09 +0200 +Subject: ALSA: usb-audio: work around Android accessory firmware bug + +From: Clemens Ladisch + +commit 342cda29343a6272c630f94ed56810a76740251b upstream. + +When the Android firmware enables the audio interfaces in accessory +mode, it always declares in the control interface's baInterfaceNr array +that interfaces 0 and 1 belong to the audio function. However, the +accessory interface itself, if also enabled, already is at index 0 and +shifts the actual audio interface numbers to 1 and 2, which prevents the +PCM streaming interface from being seen by the host driver. + +To get the PCM interface interface to work, detect when the descriptors +point to the (for this driver useless) accessory interface, and redirect +to the correct one. + +Reported-by: Jeremy Rosen +Tested-by: Jeremy Rosen +Signed-off-by: Clemens Ladisch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/card.c | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) + +--- a/sound/usb/card.c ++++ b/sound/usb/card.c +@@ -149,14 +149,32 @@ static int snd_usb_create_stream(struct + return -EINVAL; + } + ++ alts = &iface->altsetting[0]; ++ altsd = get_iface_desc(alts); ++ ++ /* ++ * Android with both accessory and audio interfaces enabled gets the ++ * interface numbers wrong. ++ */ ++ if ((chip->usb_id == USB_ID(0x18d1, 0x2d04) || ++ chip->usb_id == USB_ID(0x18d1, 0x2d05)) && ++ interface == 0 && ++ altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC && ++ altsd->bInterfaceSubClass == USB_SUBCLASS_VENDOR_SPEC) { ++ interface = 2; ++ iface = usb_ifnum_to_if(dev, interface); ++ if (!iface) ++ return -EINVAL; ++ alts = &iface->altsetting[0]; ++ altsd = get_iface_desc(alts); ++ } ++ + if (usb_interface_claimed(iface)) { + snd_printdd(KERN_INFO "%d:%d:%d: skipping, already claimed\n", + dev->devnum, ctrlif, interface); + return -EINVAL; + } + +- alts = &iface->altsetting[0]; +- altsd = get_iface_desc(alts); + if ((altsd->bInterfaceClass == USB_CLASS_AUDIO || + altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC) && + altsd->bInterfaceSubClass == USB_SUBCLASS_MIDISTREAMING) { diff --git a/queue-3.4/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch b/queue-3.4/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch new file mode 100644 index 00000000000..08e1596c56d --- /dev/null +++ b/queue-3.4/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch @@ -0,0 +1,82 @@ +From 1bc39742aab09248169ef9d3727c9def3528b3f3 Mon Sep 17 00:00:00 2001 +From: Simon Baatz +Date: Mon, 10 Jun 2013 21:10:12 +0100 +Subject: ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page + +From: Simon Baatz + +commit 1bc39742aab09248169ef9d3727c9def3528b3f3 upstream. + +Commit f8b63c1 made flush_kernel_dcache_page a no-op assuming that +the pages it needs to handle are kernel mapped only. However, for +example when doing direct I/O, pages with user space mappings may +occur. + +Thus, continue to do lazy flushing if there are no user space +mappings. Otherwise, flush the kernel cache lines directly. + +Signed-off-by: Simon Baatz +Reviewed-by: Catalin Marinas +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/include/asm/cacheflush.h | 4 +--- + arch/arm/mm/flush.c | 33 +++++++++++++++++++++++++++++++++ + 2 files changed, 34 insertions(+), 3 deletions(-) + +--- a/arch/arm/include/asm/cacheflush.h ++++ b/arch/arm/include/asm/cacheflush.h +@@ -305,9 +305,7 @@ static inline void flush_anon_page(struc + } + + #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE +-static inline void flush_kernel_dcache_page(struct page *page) +-{ +-} ++extern void flush_kernel_dcache_page(struct page *); + + #define flush_dcache_mmap_lock(mapping) \ + spin_lock_irq(&(mapping)->tree_lock) +--- a/arch/arm/mm/flush.c ++++ b/arch/arm/mm/flush.c +@@ -299,6 +299,39 @@ void flush_dcache_page(struct page *page + EXPORT_SYMBOL(flush_dcache_page); + + /* ++ * Ensure cache coherency for the kernel mapping of this page. We can ++ * assume that the page is pinned via kmap. ++ * ++ * If the page only exists in the page cache and there are no user ++ * space mappings, this is a no-op since the page was already marked ++ * dirty at creation. Otherwise, we need to flush the dirty kernel ++ * cache lines directly. ++ */ ++void flush_kernel_dcache_page(struct page *page) ++{ ++ if (cache_is_vivt() || cache_is_vipt_aliasing()) { ++ struct address_space *mapping; ++ ++ mapping = page_mapping(page); ++ ++ if (!mapping || mapping_mapped(mapping)) { ++ void *addr; ++ ++ addr = page_address(page); ++ /* ++ * kmap_atomic() doesn't set the page virtual ++ * address for highmem pages, and ++ * kunmap_atomic() takes care of cache ++ * flushing already. ++ */ ++ if (!IS_ENABLED(CONFIG_HIGHMEM) || addr) ++ __cpuc_flush_dcache_area(addr, PAGE_SIZE); ++ } ++ } ++} ++EXPORT_SYMBOL(flush_kernel_dcache_page); ++ ++/* + * Flush an anonymous page so that users of get_user_pages() + * can safely access the data. The expected sequence is: + * diff --git a/queue-3.4/clk-remove-notifier-from-list-before-freeing-it.patch b/queue-3.4/clk-remove-notifier-from-list-before-freeing-it.patch new file mode 100644 index 00000000000..1f52e651097 --- /dev/null +++ b/queue-3.4/clk-remove-notifier-from-list-before-freeing-it.patch @@ -0,0 +1,77 @@ +From 72b5322f11ff0abf6a52b3007486656578d2c982 Mon Sep 17 00:00:00 2001 +From: Lai Jiangshan +Date: Mon, 3 Jun 2013 17:17:15 +0800 +Subject: clk: remove notifier from list before freeing it + +From: Lai Jiangshan + +commit 72b5322f11ff0abf6a52b3007486656578d2c982 upstream. + +The @cn is stay in @clk_notifier_list after it is freed, it cause +memory corruption. + +Example, if @clk is registered(first), unregistered(first), +registered(second), unregistered(second). + +The freed @cn will be used when @clk is registered(second), +and the bug will be happened when @clk is unregistered(second): + +[ 517.040000] clk_notif_dbg clk_notif_dbg.1: clk_notifier_unregister() +[ 517.040000] Unable to handle kernel paging request at virtual address 00df3008 +[ 517.050000] pgd = ed858000 +[ 517.050000] [00df3008] *pgd=00000000 +[ 517.060000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM +[ 517.060000] Modules linked in: clk_notif_dbg(O-) [last unloaded: clk_notif_dbg] +[ 517.060000] CPU: 1 PID: 499 Comm: modprobe Tainted: G O 3.10.0-rc3-00119-ga93cb29-dirty #85 +[ 517.060000] task: ee1e0180 ti: ee3e6000 task.ti: ee3e6000 +[ 517.060000] PC is at srcu_readers_seq_idx+0x48/0x84 +[ 517.060000] LR is at srcu_readers_seq_idx+0x60/0x84 +[ 517.060000] pc : [] lr : [] psr: 80070013 +[ 517.060000] sp : ee3e7d48 ip : 00000000 fp : ee3e7d6c +[ 517.060000] r10: 00000000 r9 : ee3e6000 r8 : 00000000 +[ 517.060000] r7 : ed84fe4c r6 : c068ec90 r5 : c068e430 r4 : 00000000 +[ 517.060000] r3 : 00df3000 r2 : 00000000 r1 : 00000002 r0 : 00000000 +[ 517.060000] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user +[ 517.060000] Control: 18c5387d Table: 2d85804a DAC: 00000015 +[ 517.060000] Process modprobe (pid: 499, stack limit = 0xee3e6238) +[ 517.060000] Stack: (0xee3e7d48 to 0xee3e8000) +.... +[ 517.060000] [] (srcu_readers_seq_idx+0x48/0x84) from [] (try_check_zero+0x34/0xfc) +[ 517.060000] [] (try_check_zero+0x34/0xfc) from [] (srcu_advance_batches+0x58/0x114) +[ 517.060000] [] (srcu_advance_batches+0x58/0x114) from [] (__synchronize_srcu+0x114/0x1ac) +[ 517.060000] [] (__synchronize_srcu+0x114/0x1ac) from [] (synchronize_srcu+0x2c/0x34) +[ 517.060000] [] (synchronize_srcu+0x2c/0x34) from [] (srcu_notifier_chain_unregister+0x68/0x74) +[ 517.060000] [] (srcu_notifier_chain_unregister+0x68/0x74) from [] (clk_notifier_unregister+0x7c/0xc0) +[ 517.060000] [] (clk_notifier_unregister+0x7c/0xc0) from [] (clk_notif_dbg_remove+0x34/0x9c [clk_notif_dbg]) +[ 517.060000] [] (clk_notif_dbg_remove+0x34/0x9c [clk_notif_dbg]) from [] (platform_drv_remove+0x24/0x28) +[ 517.060000] [] (platform_drv_remove+0x24/0x28) from [] (__device_release_driver+0x8c/0xd4) +[ 517.060000] [] (__device_release_driver+0x8c/0xd4) from [] (driver_detach+0x9c/0xc4) +[ 517.060000] [] (driver_detach+0x9c/0xc4) from [] (bus_remove_driver+0xcc/0xfc) +[ 517.060000] [] (bus_remove_driver+0xcc/0xfc) from [] (driver_unregister+0x54/0x78) +[ 517.060000] [] (driver_unregister+0x54/0x78) from [] (platform_driver_unregister+0x1c/0x20) +[ 517.060000] [] (platform_driver_unregister+0x1c/0x20) from [] (clk_notif_dbg_driver_exit+0x14/0x1c [clk_notif_dbg]) +[ 517.060000] [] (clk_notif_dbg_driver_exit+0x14/0x1c [clk_notif_dbg]) from [] (SyS_delete_module+0x200/0x28c) +[ 517.060000] [] (SyS_delete_module+0x200/0x28c) from [] (ret_fast_syscall+0x0/0x48) +[ 517.060000] Code: e5973004 e7911102 e0833001 e2881002 (e7933101) + +Reported-by: Sören Brinkmann +Signed-off-by: Lai Jiangshan +Tested-by: Sören Brinkmann +Signed-off-by: Mike Turquette +[mturquette@linaro.org: shortened $SUBJECT] +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/clk.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/clk/clk.c ++++ b/drivers/clk/clk.c +@@ -1453,6 +1453,7 @@ int clk_notifier_unregister(struct clk * + /* XXX the notifier code should handle this better */ + if (!cn->notifier_head.head) { + srcu_cleanup_notifier_head(&cn->notifier_head); ++ list_del(&cn->node); + kfree(cn); + } + diff --git a/queue-3.4/series b/queue-3.4/series new file mode 100644 index 00000000000..2915a5daf05 --- /dev/null +++ b/queue-3.4/series @@ -0,0 +1,5 @@ +arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch +alsa-usb-audio-fix-invalid-volume-resolution-for-logitech-hd-webcam-c310.patch +alsa-usb-audio-work-around-android-accessory-firmware-bug.patch +clk-remove-notifier-from-list-before-freeing-it.patch +tilepro-work-around-module-link-error-with-gcc-4.7.patch diff --git a/queue-3.4/tilepro-work-around-module-link-error-with-gcc-4.7.patch b/queue-3.4/tilepro-work-around-module-link-error-with-gcc-4.7.patch new file mode 100644 index 00000000000..e24b05c2d90 --- /dev/null +++ b/queue-3.4/tilepro-work-around-module-link-error-with-gcc-4.7.patch @@ -0,0 +1,31 @@ +From 3cb3f839d306443f3d1e79b0bde1a2ad2c12b555 Mon Sep 17 00:00:00 2001 +From: Chris Metcalf +Date: Sat, 15 Jun 2013 16:47:47 -0400 +Subject: tilepro: work around module link error with gcc 4.7 + +From: Chris Metcalf + +commit 3cb3f839d306443f3d1e79b0bde1a2ad2c12b555 upstream. + +gcc 4.7.x is emitting calls to __ffsdi2 where previously +it used to inline the appropriate ctz instructions. +While this needs to be fixed in gcc, it's also easy to avoid +having it cause build failures when building with those +compilers by exporting __ffsdi2 to modules. + +Signed-off-by: Chris Metcalf +Signed-off-by: Greg Kroah-Hartman + +--- + arch/tile/lib/exports.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/tile/lib/exports.c ++++ b/arch/tile/lib/exports.c +@@ -90,4 +90,6 @@ uint64_t __ashrdi3(uint64_t, unsigned in + EXPORT_SYMBOL(__ashrdi3); + uint64_t __ashldi3(uint64_t, unsigned int); + EXPORT_SYMBOL(__ashldi3); ++int __ffsdi2(uint64_t); ++EXPORT_SYMBOL(__ffsdi2); + #endif