From: Greg Kroah-Hartman Date: Sat, 28 Feb 2015 22:43:03 +0000 (-0800) Subject: 3.14-stable patches X-Git-Tag: v3.10.71~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c716f797764928a44abf270f2de91b156d357bf9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: alsa-hdspm-constrain-periods-to-2-on-older-cards.patch alsa-off-by-one-bug-in-snd_riptide_joystick_probe.patch cpufreq-s3c-remove-incorrect-__init-annotations.patch cpufreq-set-cpufreq_cpu_data-to-null-before-putting-kobject.patch cpufreq-speedstep-smi-enable-interrupts-when-waiting.patch em28xx-audio-fix-missing-newlines.patch em28xx-ensure-closing-messages-terminate-with-a-newline.patch lmedm04-fix-usb_submit_urb-bogus-urb-xfer-pipe-1-type-3-in-interrupt-urb.patch megaraid_sas-disable-interrupt_mask-before-enabling-hardware-interrupts.patch power-bq24190-fix-ignored-supplicants.patch power-gpio-charger-balance-enable-disable_irq_wake-calls.patch power_supply-88pm860x-fix-leaked-power-supply-on-probe-fail.patch xen-manage-fix-usb-interaction-issues-when-resuming.patch --- diff --git a/queue-3.14/alsa-hdspm-constrain-periods-to-2-on-older-cards.patch b/queue-3.14/alsa-hdspm-constrain-periods-to-2-on-older-cards.patch new file mode 100644 index 00000000000..0d4bdfca8c1 --- /dev/null +++ b/queue-3.14/alsa-hdspm-constrain-periods-to-2-on-older-cards.patch @@ -0,0 +1,47 @@ +From f0153c3d948c1764f6c920a0675d86fc1d75813e Mon Sep 17 00:00:00 2001 +From: Adrian Knoth +Date: Tue, 10 Feb 2015 11:33:50 +0100 +Subject: ALSA: hdspm - Constrain periods to 2 on older cards + +From: Adrian Knoth + +commit f0153c3d948c1764f6c920a0675d86fc1d75813e upstream. + +RME RayDAT and AIO use a fixed buffer size of 16384 samples. With period +sizes of 32-4096, this translates to 4-512 periods. + +The older RME cards have a variable buffer size but require exactly two +periods. + +This patch enforces nperiods=2 on those cards. + +Signed-off-by: Adrian Knoth +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/rme9652/hdspm.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/sound/pci/rme9652/hdspm.c ++++ b/sound/pci/rme9652/hdspm.c +@@ -6102,6 +6102,9 @@ static int snd_hdspm_playback_open(struc + snd_pcm_hw_constraint_minmax(runtime, + SNDRV_PCM_HW_PARAM_PERIOD_SIZE, + 64, 8192); ++ snd_pcm_hw_constraint_minmax(runtime, ++ SNDRV_PCM_HW_PARAM_PERIODS, ++ 2, 2); + break; + } + +@@ -6176,6 +6179,9 @@ static int snd_hdspm_capture_open(struct + snd_pcm_hw_constraint_minmax(runtime, + SNDRV_PCM_HW_PARAM_PERIOD_SIZE, + 64, 8192); ++ snd_pcm_hw_constraint_minmax(runtime, ++ SNDRV_PCM_HW_PARAM_PERIODS, ++ 2, 2); + break; + } + diff --git a/queue-3.14/alsa-off-by-one-bug-in-snd_riptide_joystick_probe.patch b/queue-3.14/alsa-off-by-one-bug-in-snd_riptide_joystick_probe.patch new file mode 100644 index 00000000000..8c3eb02243d --- /dev/null +++ b/queue-3.14/alsa-off-by-one-bug-in-snd_riptide_joystick_probe.patch @@ -0,0 +1,91 @@ +From e4940626defdf6c92da1052ad3f12741c1a28c90 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Mon, 9 Feb 2015 16:51:40 +0300 +Subject: ALSA: off by one bug in snd_riptide_joystick_probe() + +From: Dan Carpenter + +commit e4940626defdf6c92da1052ad3f12741c1a28c90 upstream. + +The problem here is that we check: + + if (dev >= SNDRV_CARDS) + +Then we increment "dev". + + if (!joystick_port[dev++]) + +Then we use it as an offset into a array with SNDRV_CARDS elements. + + if (!request_region(joystick_port[dev], 8, "Riptide gameport")) { + +This has 3 effects: +1) If you use the module option to specify the joystick port then it has + to be shifted one space over. +2) The wrong error message will be printed on failure if you have over + 32 cards. +3) Static checkers will correctly complain that are off by one. + +Fixes: db1005ec6ff8 ('ALSA: riptide - Fix joystick resource handling') +Signed-off-by: Dan Carpenter +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/riptide/riptide.c | 27 +++++++++++++++++++-------- + 1 file changed, 19 insertions(+), 8 deletions(-) + +--- a/sound/pci/riptide/riptide.c ++++ b/sound/pci/riptide/riptide.c +@@ -2032,32 +2032,43 @@ snd_riptide_joystick_probe(struct pci_de + { + static int dev; + struct gameport *gameport; ++ int ret; + + if (dev >= SNDRV_CARDS) + return -ENODEV; ++ + if (!enable[dev]) { +- dev++; +- return -ENOENT; ++ ret = -ENOENT; ++ goto inc_dev; + } + +- if (!joystick_port[dev++]) +- return 0; ++ if (!joystick_port[dev]) { ++ ret = 0; ++ goto inc_dev; ++ } + + gameport = gameport_allocate_port(); +- if (!gameport) +- return -ENOMEM; ++ if (!gameport) { ++ ret = -ENOMEM; ++ goto inc_dev; ++ } + if (!request_region(joystick_port[dev], 8, "Riptide gameport")) { + snd_printk(KERN_WARNING + "Riptide: cannot grab gameport 0x%x\n", + joystick_port[dev]); + gameport_free_port(gameport); +- return -EBUSY; ++ ret = -EBUSY; ++ goto inc_dev; + } + + gameport->io = joystick_port[dev]; + gameport_register_port(gameport); + pci_set_drvdata(pci, gameport); +- return 0; ++ ++ ret = 0; ++inc_dev: ++ dev++; ++ return ret; + } + + static void snd_riptide_joystick_remove(struct pci_dev *pci) diff --git a/queue-3.14/cpufreq-s3c-remove-incorrect-__init-annotations.patch b/queue-3.14/cpufreq-s3c-remove-incorrect-__init-annotations.patch new file mode 100644 index 00000000000..27f483a4e37 --- /dev/null +++ b/queue-3.14/cpufreq-s3c-remove-incorrect-__init-annotations.patch @@ -0,0 +1,59 @@ +From 61882b63171736571e1139ab5aa929e3bb336016 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 18 Feb 2015 21:55:03 +0100 +Subject: cpufreq: s3c: remove incorrect __init annotations + +From: Arnd Bergmann + +commit 61882b63171736571e1139ab5aa929e3bb336016 upstream. + +The two functions s3c2416_cpufreq_driver_init and s3c_cpufreq_register +are marked init but are called from a context that might be run after +the __init sections are discarded, as the compiler points out: + +WARNING: vmlinux.o(.data+0x1ad9dc): Section mismatch in reference from the variable s3c2416_cpufreq_driver to the function .init.text:s3c2416_cpufreq_driver_init() +WARNING: drivers/built-in.o(.text+0x35b5dc): Section mismatch in reference from the function s3c2410a_cpufreq_add() to the function .init.text:s3c_cpufreq_register() + +This removes the __init markings. + +Signed-off-by: Arnd Bergmann +Acked-by: Viresh Kumar +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/s3c2416-cpufreq.c | 4 ++-- + drivers/cpufreq/s3c24xx-cpufreq.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/cpufreq/s3c2416-cpufreq.c ++++ b/drivers/cpufreq/s3c2416-cpufreq.c +@@ -263,7 +263,7 @@ out: + } + + #ifdef CONFIG_ARM_S3C2416_CPUFREQ_VCORESCALE +-static void __init s3c2416_cpufreq_cfg_regulator(struct s3c2416_data *s3c_freq) ++static void s3c2416_cpufreq_cfg_regulator(struct s3c2416_data *s3c_freq) + { + int count, v, i, found; + struct cpufreq_frequency_table *freq; +@@ -335,7 +335,7 @@ static struct notifier_block s3c2416_cpu + .notifier_call = s3c2416_cpufreq_reboot_notifier_evt, + }; + +-static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) ++static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) + { + struct s3c2416_data *s3c_freq = &s3c2416_cpufreq; + struct cpufreq_frequency_table *freq; +--- a/drivers/cpufreq/s3c24xx-cpufreq.c ++++ b/drivers/cpufreq/s3c24xx-cpufreq.c +@@ -454,7 +454,7 @@ static struct cpufreq_driver s3c24xx_dri + }; + + +-int __init s3c_cpufreq_register(struct s3c_cpufreq_info *info) ++int s3c_cpufreq_register(struct s3c_cpufreq_info *info) + { + if (!info || !info->name) { + printk(KERN_ERR "%s: failed to pass valid information\n", diff --git a/queue-3.14/cpufreq-set-cpufreq_cpu_data-to-null-before-putting-kobject.patch b/queue-3.14/cpufreq-set-cpufreq_cpu_data-to-null-before-putting-kobject.patch new file mode 100644 index 00000000000..068891d8135 --- /dev/null +++ b/queue-3.14/cpufreq-set-cpufreq_cpu_data-to-null-before-putting-kobject.patch @@ -0,0 +1,128 @@ +From 6ffae8c06fab058d6c3f8ecb7f921327721034e7 Mon Sep 17 00:00:00 2001 +From: Viresh Kumar +Date: Sat, 31 Jan 2015 06:02:44 +0530 +Subject: cpufreq: Set cpufreq_cpu_data to NULL before putting kobject + +From: Viresh Kumar + +commit 6ffae8c06fab058d6c3f8ecb7f921327721034e7 upstream. + +In __cpufreq_remove_dev_finish(), per-cpu 'cpufreq_cpu_data' needs +to be cleared before calling kobject_put(&policy->kobj) and under +cpufreq_driver_lock. Otherwise, if someone else calls cpufreq_cpu_get() +in parallel with it, they can obtain a non-NULL policy from that after +kobject_put(&policy->kobj) was executed. + +Consider this case: + +Thread A Thread B +cpufreq_cpu_get() + acquire cpufreq_driver_lock + read-per-cpu cpufreq_cpu_data + kobject_put(&policy->kobj); + kobject_get(&policy->kobj); + ... + per_cpu(&cpufreq_cpu_data, cpu) = NULL + +And this will result in a warning like this one: + + ------------[ cut here ]------------ + WARNING: CPU: 0 PID: 4 at include/linux/kref.h:47 + kobject_get+0x41/0x50() + Modules linked in: acpi_cpufreq(+) nfsd auth_rpcgss nfs_acl + lockd grace sunrpc xfs libcrc32c sd_mod ixgbe igb mdio ahci hwmon + ... + Call Trace: + [] dump_stack+0x46/0x58 + [] warn_slowpath_common+0x81/0xa0 + [] warn_slowpath_null+0x1a/0x20 + [] kobject_get+0x41/0x50 + [] cpufreq_cpu_get+0x75/0xc0 + [] cpufreq_update_policy+0x2e/0x1f0 + [] ? up+0x32/0x50 + [] ? acpi_ns_get_node+0xcb/0xf2 + [] ? acpi_evaluate_object+0x22c/0x252 + [] ? acpi_get_handle+0x95/0xc0 + [] ? acpi_has_method+0x25/0x40 + [] acpi_processor_ppc_has_changed+0x77/0x82 + [] ? move_linked_works+0x66/0x90 + [] acpi_processor_notify+0x58/0xe7 + [] acpi_ev_notify_dispatch+0x44/0x5c + [] acpi_os_execute_deferred+0x15/0x22 + [] process_one_work+0x160/0x410 + [] worker_thread+0x11b/0x520 + [] ? rescuer_thread+0x380/0x380 + [] kthread+0xe1/0x100 + [] ? kthread_create_on_node+0x1b0/0x1b0 + [] ret_from_fork+0x7c/0xb0 + [] ? kthread_create_on_node+0x1b0/0x1b0 + ---[ end trace 89e66eb9795efdf7 ]--- + +The actual code flow is as follows: + + Thread A: Workqueue: kacpi_notify + + acpi_processor_notify() + acpi_processor_ppc_has_changed() + cpufreq_update_policy() + cpufreq_cpu_get() + kobject_get() + + Thread B: xenbus_thread() + + xenbus_thread() + msg->u.watch.handle->callback() + handle_vcpu_hotplug_event() + vcpu_hotplug() + cpu_down() + __cpu_notify(CPU_POST_DEAD..) + cpufreq_cpu_callback() + __cpufreq_remove_dev_finish() + cpufreq_policy_put_kobj() + kobject_put() + +cpufreq_cpu_get() gets the policy from per-cpu variable cpufreq_cpu_data +under cpufreq_driver_lock, and once it gets a valid policy it expects it +to not be freed until cpufreq_cpu_put() is called. + +But the race happens when another thread puts the kobject first and updates +cpufreq_cpu_data before or later. And so the first thread gets a valid policy +structure and before it does kobject_get() on it, the second one has already +done kobject_put(). + +Fix this by setting cpufreq_cpu_data to NULL before putting the kobject and that +too under locks. + +Reported-by: Ethan Zhao +Reported-by: Santosh Shilimkar +Signed-off-by: Viresh Kumar +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/cpufreq.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/cpufreq/cpufreq.c ++++ b/drivers/cpufreq/cpufreq.c +@@ -1365,9 +1365,10 @@ static int __cpufreq_remove_dev_finish(s + unsigned long flags; + struct cpufreq_policy *policy; + +- read_lock_irqsave(&cpufreq_driver_lock, flags); ++ write_lock_irqsave(&cpufreq_driver_lock, flags); + policy = per_cpu(cpufreq_cpu_data, cpu); +- read_unlock_irqrestore(&cpufreq_driver_lock, flags); ++ per_cpu(cpufreq_cpu_data, cpu) = NULL; ++ write_unlock_irqrestore(&cpufreq_driver_lock, flags); + + if (!policy) { + pr_debug("%s: No cpu_data found\n", __func__); +@@ -1422,7 +1423,6 @@ static int __cpufreq_remove_dev_finish(s + } + } + +- per_cpu(cpufreq_cpu_data, cpu) = NULL; + return 0; + } + diff --git a/queue-3.14/cpufreq-speedstep-smi-enable-interrupts-when-waiting.patch b/queue-3.14/cpufreq-speedstep-smi-enable-interrupts-when-waiting.patch new file mode 100644 index 00000000000..d79bf6cc1f1 --- /dev/null +++ b/queue-3.14/cpufreq-speedstep-smi-enable-interrupts-when-waiting.patch @@ -0,0 +1,92 @@ +From d4d4eda23794c701442e55129dd4f8f2fefd5e4d Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Mon, 9 Feb 2015 13:38:17 -0500 +Subject: cpufreq: speedstep-smi: enable interrupts when waiting + +From: Mikulas Patocka + +commit d4d4eda23794c701442e55129dd4f8f2fefd5e4d upstream. + +On Dell Latitude C600 laptop with Pentium 3 850MHz processor, the +speedstep-smi driver sometimes loads and sometimes doesn't load with +"change to state X failed" message. + +The hardware sometimes refuses to change frequency and in this case, we +need to retry later. I found out that we need to enable interrupts while +waiting. When we enable interrupts, the hardware blockage that prevents +frequency transition resolves and the transition is possible. With +disabled interrupts, the blockage doesn't resolve (no matter how long do +we wait). The exact reasons for this hardware behavior are unknown. + +This patch enables interrupts in the function speedstep_set_state that can +be called with disabled interrupts. However, this function is called with +disabled interrupts only from speedstep_get_freqs, so it shouldn't cause +any problem. + +Signed-off-by: Mikulas Patocka +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/speedstep-lib.c | 3 +++ + drivers/cpufreq/speedstep-smi.c | 12 ++++++++++++ + 2 files changed, 15 insertions(+) + +--- a/drivers/cpufreq/speedstep-lib.c ++++ b/drivers/cpufreq/speedstep-lib.c +@@ -400,6 +400,7 @@ unsigned int speedstep_get_freqs(enum sp + + pr_debug("previous speed is %u\n", prev_speed); + ++ preempt_disable(); + local_irq_save(flags); + + /* switch to low state */ +@@ -464,6 +465,8 @@ unsigned int speedstep_get_freqs(enum sp + + out: + local_irq_restore(flags); ++ preempt_enable(); ++ + return ret; + } + EXPORT_SYMBOL_GPL(speedstep_get_freqs); +--- a/drivers/cpufreq/speedstep-smi.c ++++ b/drivers/cpufreq/speedstep-smi.c +@@ -156,6 +156,7 @@ static void speedstep_set_state(unsigned + return; + + /* Disable IRQs */ ++ preempt_disable(); + local_irq_save(flags); + + command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); +@@ -166,9 +167,19 @@ static void speedstep_set_state(unsigned + + do { + if (retry) { ++ /* ++ * We need to enable interrupts, otherwise the blockage ++ * won't resolve. ++ * ++ * We disable preemption so that other processes don't ++ * run. If other processes were running, they could ++ * submit more DMA requests, making the blockage worse. ++ */ + pr_debug("retry %u, previous result %u, waiting...\n", + retry, result); ++ local_irq_enable(); + mdelay(retry * 50); ++ local_irq_disable(); + } + retry++; + __asm__ __volatile__( +@@ -185,6 +196,7 @@ static void speedstep_set_state(unsigned + + /* enable IRQs */ + local_irq_restore(flags); ++ preempt_enable(); + + if (new_state == state) + pr_debug("change to %u MHz succeeded after %u tries " diff --git a/queue-3.14/em28xx-audio-fix-missing-newlines.patch b/queue-3.14/em28xx-audio-fix-missing-newlines.patch new file mode 100644 index 00000000000..bc354077839 --- /dev/null +++ b/queue-3.14/em28xx-audio-fix-missing-newlines.patch @@ -0,0 +1,37 @@ +From 7818b0aab87b680fb10f68eccebeeb6cd8283c73 Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Sat, 20 Dec 2014 09:45:36 -0300 +Subject: [media] em28xx-audio: fix missing newlines +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Russell King + +commit 7818b0aab87b680fb10f68eccebeeb6cd8283c73 upstream. + +Inspection shows that newlines are missing from several kernel messages +in em28xx-audio. Fix these. + +Fixes: 1b3fd2d34266 ("[media] em28xx-audio: don't hardcode audio URB calculus") + +Signed-off-by: Russell King +Reviewed-by: Frank Schäfer +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/usb/em28xx/em28xx-audio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/usb/em28xx/em28xx-audio.c ++++ b/drivers/media/usb/em28xx/em28xx-audio.c +@@ -814,7 +814,7 @@ static int em28xx_audio_urb_init(struct + if (urb_size > ep_size * npackets) + npackets = DIV_ROUND_UP(urb_size, ep_size); + +- em28xx_info("Number of URBs: %d, with %d packets and %d size", ++ em28xx_info("Number of URBs: %d, with %d packets and %d size\n", + num_urb, npackets, urb_size); + + /* Estimate the bytes per period */ diff --git a/queue-3.14/em28xx-ensure-closing-messages-terminate-with-a-newline.patch b/queue-3.14/em28xx-ensure-closing-messages-terminate-with-a-newline.patch new file mode 100644 index 00000000000..4b5f9eb2871 --- /dev/null +++ b/queue-3.14/em28xx-ensure-closing-messages-terminate-with-a-newline.patch @@ -0,0 +1,78 @@ +From 0418ca6073478f54f1da2e4013fa50d36838de75 Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Sat, 20 Dec 2014 09:45:20 -0300 +Subject: [media] em28xx: ensure "closing" messages terminate with a newline +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Russell King + +commit 0418ca6073478f54f1da2e4013fa50d36838de75 upstream. + +The lockdep splat addressed in a previous commit revealed that at +least one message in em28xx-input.c was missing a new line: + +em28178 #0: Closing input extensionINFO: trying to register non-static key. + +Further inspection shows several other messages also miss a new line. +These will be fixed in a subsequent patch. + +Fixes: aa929ad783c0 ("[media] em28xx: print a message at disconnect") + +Signed-off-by: Russell King +Reviewed-by: Frank Schäfer +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/usb/em28xx/em28xx-audio.c | 2 +- + drivers/media/usb/em28xx/em28xx-dvb.c | 2 +- + drivers/media/usb/em28xx/em28xx-input.c | 2 +- + drivers/media/usb/em28xx/em28xx-video.c | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/media/usb/em28xx/em28xx-audio.c ++++ b/drivers/media/usb/em28xx/em28xx-audio.c +@@ -974,7 +974,7 @@ static int em28xx_audio_fini(struct em28 + return 0; + } + +- em28xx_info("Closing audio extension"); ++ em28xx_info("Closing audio extension\n"); + + if (dev->adev.sndcard) { + snd_card_disconnect(dev->adev.sndcard); +--- a/drivers/media/usb/em28xx/em28xx-dvb.c ++++ b/drivers/media/usb/em28xx/em28xx-dvb.c +@@ -1468,7 +1468,7 @@ static int em28xx_dvb_fini(struct em28xx + return 0; + } + +- em28xx_info("Closing DVB extension"); ++ em28xx_info("Closing DVB extension\n"); + + if (dev->dvb) { + struct em28xx_dvb *dvb = dev->dvb; +--- a/drivers/media/usb/em28xx/em28xx-input.c ++++ b/drivers/media/usb/em28xx/em28xx-input.c +@@ -810,7 +810,7 @@ static int em28xx_ir_fini(struct em28xx + return 0; + } + +- em28xx_info("Closing input extension"); ++ em28xx_info("Closing input extension\n"); + + em28xx_shutdown_buttons(dev); + +--- a/drivers/media/usb/em28xx/em28xx-video.c ++++ b/drivers/media/usb/em28xx/em28xx-video.c +@@ -1900,7 +1900,7 @@ static int em28xx_v4l2_fini(struct em28x + return 0; + } + +- em28xx_info("Closing video extension"); ++ em28xx_info("Closing video extension\n"); + + mutex_lock(&dev->lock); + diff --git a/queue-3.14/lmedm04-fix-usb_submit_urb-bogus-urb-xfer-pipe-1-type-3-in-interrupt-urb.patch b/queue-3.14/lmedm04-fix-usb_submit_urb-bogus-urb-xfer-pipe-1-type-3-in-interrupt-urb.patch new file mode 100644 index 00000000000..0f96660f79e --- /dev/null +++ b/queue-3.14/lmedm04-fix-usb_submit_urb-bogus-urb-xfer-pipe-1-type-3-in-interrupt-urb.patch @@ -0,0 +1,45 @@ +From 15e1ce33182d1d5dbd8efe8d382b9352dc857527 Mon Sep 17 00:00:00 2001 +From: Malcolm Priestley +Date: Fri, 2 Jan 2015 10:56:28 -0300 +Subject: [media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb + +From: Malcolm Priestley + +commit 15e1ce33182d1d5dbd8efe8d382b9352dc857527 upstream. + +A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK +but the endpoint otheriwse functions as interrupt. + +Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe. + +Signed-off-by: Malcolm Priestley +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/usb/dvb-usb-v2/lmedm04.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c ++++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c +@@ -350,6 +350,7 @@ static int lme2510_int_read(struct dvb_u + { + struct dvb_usb_device *d = adap_to_d(adap); + struct lme2510_state *lme_int = adap_to_priv(adap); ++ struct usb_host_endpoint *ep; + + lme_int->lme_urb = usb_alloc_urb(0, GFP_ATOMIC); + +@@ -371,6 +372,12 @@ static int lme2510_int_read(struct dvb_u + adap, + 8); + ++ /* Quirk of pipe reporting PIPE_BULK but behaves as interrupt */ ++ ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe); ++ ++ if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK) ++ lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa), ++ + lme_int->lme_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + + usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC); diff --git a/queue-3.14/megaraid_sas-disable-interrupt_mask-before-enabling-hardware-interrupts.patch b/queue-3.14/megaraid_sas-disable-interrupt_mask-before-enabling-hardware-interrupts.patch new file mode 100644 index 00000000000..78c202abcab --- /dev/null +++ b/queue-3.14/megaraid_sas-disable-interrupt_mask-before-enabling-hardware-interrupts.patch @@ -0,0 +1,42 @@ +From c2ced1719a1b903350955a511e1666e6d05a7f5b Mon Sep 17 00:00:00 2001 +From: "Sumit.Saxena@avagotech.com" +Date: Mon, 5 Jan 2015 20:06:13 +0530 +Subject: megaraid_sas: disable interrupt_mask before enabling hardware interrupts + +From: "Sumit.Saxena@avagotech.com" + +commit c2ced1719a1b903350955a511e1666e6d05a7f5b upstream. + +Update driver "mask_interrupts" before enable/disable hardware interrupt +in order to avoid missing interrupts because of "mask_interrupts" still +set to 1 and hardware interrupts are enabled. + +Signed-off-by: Sumit Saxena +Signed-off-by: Chaitra Basappa +Reviewed-by: Martin K. Petersen +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c ++++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c +@@ -92,6 +92,8 @@ megasas_enable_intr_fusion(struct megasa + { + struct megasas_register_set __iomem *regs; + regs = instance->reg_set; ++ ++ instance->mask_interrupts = 0; + /* For Thunderbolt/Invader also clear intr on enable */ + writel(~0, ®s->outbound_intr_status); + readl(®s->outbound_intr_status); +@@ -100,7 +102,6 @@ megasas_enable_intr_fusion(struct megasa + + /* Dummy readl to force pci flush */ + readl(®s->outbound_intr_mask); +- instance->mask_interrupts = 0; + } + + /** diff --git a/queue-3.14/power-bq24190-fix-ignored-supplicants.patch b/queue-3.14/power-bq24190-fix-ignored-supplicants.patch new file mode 100644 index 00000000000..93b60c4aaae --- /dev/null +++ b/queue-3.14/power-bq24190-fix-ignored-supplicants.patch @@ -0,0 +1,39 @@ +From 478913fdbdfd4a781d91c993eb86838620fe7421 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Mon, 5 Jan 2015 09:51:48 +0100 +Subject: power: bq24190: Fix ignored supplicants + +From: Krzysztof Kozlowski + +commit 478913fdbdfd4a781d91c993eb86838620fe7421 upstream. + +The driver mismatched 'num_supplicants' with 'num_supplies' of +power_supply structure. + +It provided list of supplicants (power_supply.supplied_to) but did +not set the number of supplicants. Instead it set the num_supplies which +is used when iterating over number of supplies (power_supply.supplied_from). + +As a result the list of supplicants was ignored by core because its size +was 0. + +Signed-off-by: Krzysztof Kozlowski +Fixes: d7bf353fd0aa ("bq24190_charger: Add support for TI BQ24190 Battery Charger") +Signed-off-by: Sebastian Reichel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/power/bq24190_charger.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/power/bq24190_charger.c ++++ b/drivers/power/bq24190_charger.c +@@ -929,7 +929,7 @@ static void bq24190_charger_init(struct + charger->properties = bq24190_charger_properties; + charger->num_properties = ARRAY_SIZE(bq24190_charger_properties); + charger->supplied_to = bq24190_charger_supplied_to; +- charger->num_supplies = ARRAY_SIZE(bq24190_charger_supplied_to); ++ charger->num_supplicants = ARRAY_SIZE(bq24190_charger_supplied_to); + charger->get_property = bq24190_charger_get_property; + charger->set_property = bq24190_charger_set_property; + charger->property_is_writeable = bq24190_charger_property_is_writeable; diff --git a/queue-3.14/power-gpio-charger-balance-enable-disable_irq_wake-calls.patch b/queue-3.14/power-gpio-charger-balance-enable-disable_irq_wake-calls.patch new file mode 100644 index 00000000000..9937f1f41e9 --- /dev/null +++ b/queue-3.14/power-gpio-charger-balance-enable-disable_irq_wake-calls.patch @@ -0,0 +1,42 @@ +From faeed51bb65ce0241052d8dc24ac331ade12e976 Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Thu, 15 Jan 2015 05:00:37 +0300 +Subject: power: gpio-charger: balance enable/disable_irq_wake calls + +From: Dmitry Eremin-Solenikov + +commit faeed51bb65ce0241052d8dc24ac331ade12e976 upstream. + +enable_irq_wakeup returns 0 in case it correctly enabled the IRQ to +generate the wakeup event (and thus resume should call disable_irq_wake). +Currently gpio-charger driver has this logic inverted. Correct that thus +correcting enable/disable_irq_wake() calls balance. + +Signed-off-by: Dmitry Eremin-Solenikov +Signed-off-by: Sebastian Reichel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/power/gpio-charger.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/power/gpio-charger.c ++++ b/drivers/power/gpio-charger.c +@@ -168,7 +168,7 @@ static int gpio_charger_suspend(struct d + + if (device_may_wakeup(dev)) + gpio_charger->wakeup_enabled = +- enable_irq_wake(gpio_charger->irq); ++ !enable_irq_wake(gpio_charger->irq); + + return 0; + } +@@ -178,7 +178,7 @@ static int gpio_charger_resume(struct de + struct platform_device *pdev = to_platform_device(dev); + struct gpio_charger *gpio_charger = platform_get_drvdata(pdev); + +- if (gpio_charger->wakeup_enabled) ++ if (device_may_wakeup(dev) && gpio_charger->wakeup_enabled) + disable_irq_wake(gpio_charger->irq); + power_supply_changed(&gpio_charger->charger); + diff --git a/queue-3.14/power_supply-88pm860x-fix-leaked-power-supply-on-probe-fail.patch b/queue-3.14/power_supply-88pm860x-fix-leaked-power-supply-on-probe-fail.patch new file mode 100644 index 00000000000..6284d9289c2 --- /dev/null +++ b/queue-3.14/power_supply-88pm860x-fix-leaked-power-supply-on-probe-fail.patch @@ -0,0 +1,32 @@ +From 24727b45b484e8937dcde53fa8d1aa70ac30ec0c Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Tue, 27 Jan 2015 16:51:54 +0100 +Subject: power_supply: 88pm860x: Fix leaked power supply on probe fail + +From: Krzysztof Kozlowski + +commit 24727b45b484e8937dcde53fa8d1aa70ac30ec0c upstream. + +Driver forgot to unregister power supply if request_threaded_irq() +failed in probe(). In such case the memory associated with power supply +leaked. + +Signed-off-by: Krzysztof Kozlowski +Fixes: a830d28b48bf ("power_supply: Enable battery-charger for 88pm860x") +Signed-off-by: Sebastian Reichel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/power/88pm860x_charger.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/power/88pm860x_charger.c ++++ b/drivers/power/88pm860x_charger.c +@@ -711,6 +711,7 @@ static int pm860x_charger_probe(struct p + return 0; + + out_irq: ++ power_supply_unregister(&info->usb); + while (--i >= 0) + free_irq(info->irq[i], info); + out: diff --git a/queue-3.14/series b/queue-3.14/series index 0282333ab80..b2a15d2ca52 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -10,3 +10,16 @@ iwlwifi-mvm-always-use-mac-color-zero.patch hid-i2c-hid-limit-reads-to-wmaxinputlength-bytes-for-input-events.patch pci-generate-uppercase-hex-for-modalias-var-in-uevent.patch pci-fix-infinite-loop-with-rom-image-of-size-0.patch +cpufreq-set-cpufreq_cpu_data-to-null-before-putting-kobject.patch +cpufreq-speedstep-smi-enable-interrupts-when-waiting.patch +cpufreq-s3c-remove-incorrect-__init-annotations.patch +xen-manage-fix-usb-interaction-issues-when-resuming.patch +lmedm04-fix-usb_submit_urb-bogus-urb-xfer-pipe-1-type-3-in-interrupt-urb.patch +alsa-off-by-one-bug-in-snd_riptide_joystick_probe.patch +alsa-hdspm-constrain-periods-to-2-on-older-cards.patch +power_supply-88pm860x-fix-leaked-power-supply-on-probe-fail.patch +power-bq24190-fix-ignored-supplicants.patch +power-gpio-charger-balance-enable-disable_irq_wake-calls.patch +megaraid_sas-disable-interrupt_mask-before-enabling-hardware-interrupts.patch +em28xx-ensure-closing-messages-terminate-with-a-newline.patch +em28xx-audio-fix-missing-newlines.patch diff --git a/queue-3.14/xen-manage-fix-usb-interaction-issues-when-resuming.patch b/queue-3.14/xen-manage-fix-usb-interaction-issues-when-resuming.patch new file mode 100644 index 00000000000..ccb33f691f6 --- /dev/null +++ b/queue-3.14/xen-manage-fix-usb-interaction-issues-when-resuming.patch @@ -0,0 +1,95 @@ +From 72978b2fe2f2cdf9f319c6c6dcdbe92b38de2be2 Mon Sep 17 00:00:00 2001 +From: Ross Lagerwall +Date: Mon, 19 Jan 2015 13:19:38 +0000 +Subject: xen/manage: Fix USB interaction issues when resuming + +From: Ross Lagerwall + +commit 72978b2fe2f2cdf9f319c6c6dcdbe92b38de2be2 upstream. + +Commit 61a734d305e1 ("xen/manage: Always freeze/thaw processes when +suspend/resuming") ensured that userspace processes were always frozen +before suspending to reduce interaction issues when resuming devices. +However, freeze_processes() does not freeze kernel threads. Freeze +kernel threads as well to prevent deadlocks with the khubd thread when +resuming devices. + +This is what native suspend and resume does. + +Example deadlock: +[ 7279.648010] [] ? xen_poll_irq_timeout+0x3e/0x50 +[ 7279.648010] [] xen_poll_irq+0x10/0x20 +[ 7279.648010] [] xen_lock_spinning+0xb3/0x120 +[ 7279.648010] [] __raw_callee_save_xen_lock_spinning+0x11/0x20 +[ 7279.648010] [] ? usb_control_msg+0xe6/0x120 +[ 7279.648010] [] ? _raw_spin_lock_irq+0x50/0x60 +[ 7279.648010] [] wait_for_completion+0xac/0x160 +[ 7279.648010] [] ? try_to_wake_up+0x2c0/0x2c0 +[ 7279.648010] [] dpm_wait+0x32/0x40 +[ 7279.648010] [] device_resume+0x90/0x210 +[ 7279.648010] [] dpm_resume+0x121/0x250 +[ 7279.648010] [] ? xenbus_dev_request_and_reply+0xc0/0xc0 +[ 7279.648010] [] dpm_resume_end+0x15/0x30 +[ 7279.648010] [] do_suspend+0x10a/0x200 +[ 7279.648010] [] ? xen_pre_suspend+0x20/0x20 +[ 7279.648010] [] shutdown_handler+0x120/0x150 +[ 7279.648010] [] xenwatch_thread+0x9f/0x160 +[ 7279.648010] [] ? finish_wait+0x80/0x80 +[ 7279.648010] [] kthread+0xc9/0xe0 +[ 7279.648010] [] ? flush_kthread_worker+0x80/0x80 +[ 7279.648010] [] ret_from_fork+0x7c/0xb0 +[ 7279.648010] [] ? flush_kthread_worker+0x80/0x80 + +[ 7441.216287] INFO: task khubd:89 blocked for more than 120 seconds. +[ 7441.219457] Tainted: G X 3.13.11-ckt12.kz #1 +[ 7441.222176] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. +[ 7441.225827] khubd D ffff88003f433440 0 89 2 0x00000000 +[ 7441.229258] ffff88003ceb9b98 0000000000000046 ffff88003ce83000 0000000000013440 +[ 7441.232959] ffff88003ceb9fd8 0000000000013440 ffff88003cd13000 ffff88003ce83000 +[ 7441.236658] 0000000000000286 ffff88003d3e0000 ffff88003ceb9bd0 00000001001aa01e +[ 7441.240415] Call Trace: +[ 7441.241614] [] schedule+0x29/0x70 +[ 7441.243930] [] schedule_timeout+0x166/0x2c0 +[ 7441.246681] [] ? call_timer_fn+0x110/0x110 +[ 7441.249339] [] schedule_timeout_uninterruptible+0x1e/0x20 +[ 7441.252644] [] msleep+0x20/0x30 +[ 7441.254812] [] hub_port_reset+0xf0/0x580 +[ 7441.257400] [] hub_port_init+0x75/0xb40 +[ 7441.259981] [] ? update_autosuspend+0x39/0x60 +[ 7441.262817] [] ? pm_runtime_set_autosuspend_delay+0x50/0xa0 +[ 7441.266212] [] hub_thread+0x71a/0x1750 +[ 7441.268728] [] ? finish_wait+0x80/0x80 +[ 7441.271272] [] ? usb_port_resume+0x670/0x670 +[ 7441.274067] [] kthread+0xc9/0xe0 +[ 7441.276305] [] ? flush_kthread_worker+0x80/0x80 +[ 7441.279131] [] ret_from_fork+0x7c/0xb0 +[ 7441.281659] [] ? flush_kthread_worker+0x80/0x80 + +Signed-off-by: Ross Lagerwall +Signed-off-by: David Vrabel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/xen/manage.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/xen/manage.c ++++ b/drivers/xen/manage.c +@@ -113,10 +113,16 @@ static void do_suspend(void) + + err = freeze_processes(); + if (err) { +- pr_err("%s: freeze failed %d\n", __func__, err); ++ pr_err("%s: freeze processes failed %d\n", __func__, err); + goto out; + } + ++ err = freeze_kernel_threads(); ++ if (err) { ++ pr_err("%s: freeze kernel threads failed %d\n", __func__, err); ++ goto out_thaw; ++ } ++ + err = dpm_suspend_start(PMSG_FREEZE); + if (err) { + pr_err("%s: dpm_suspend_start %d\n", __func__, err);