]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Feb 2015 22:43:03 +0000 (14:43 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Feb 2015 22:43:03 +0000 (14:43 -0800)
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

14 files changed:
queue-3.14/alsa-hdspm-constrain-periods-to-2-on-older-cards.patch [new file with mode: 0644]
queue-3.14/alsa-off-by-one-bug-in-snd_riptide_joystick_probe.patch [new file with mode: 0644]
queue-3.14/cpufreq-s3c-remove-incorrect-__init-annotations.patch [new file with mode: 0644]
queue-3.14/cpufreq-set-cpufreq_cpu_data-to-null-before-putting-kobject.patch [new file with mode: 0644]
queue-3.14/cpufreq-speedstep-smi-enable-interrupts-when-waiting.patch [new file with mode: 0644]
queue-3.14/em28xx-audio-fix-missing-newlines.patch [new file with mode: 0644]
queue-3.14/em28xx-ensure-closing-messages-terminate-with-a-newline.patch [new file with mode: 0644]
queue-3.14/lmedm04-fix-usb_submit_urb-bogus-urb-xfer-pipe-1-type-3-in-interrupt-urb.patch [new file with mode: 0644]
queue-3.14/megaraid_sas-disable-interrupt_mask-before-enabling-hardware-interrupts.patch [new file with mode: 0644]
queue-3.14/power-bq24190-fix-ignored-supplicants.patch [new file with mode: 0644]
queue-3.14/power-gpio-charger-balance-enable-disable_irq_wake-calls.patch [new file with mode: 0644]
queue-3.14/power_supply-88pm860x-fix-leaked-power-supply-on-probe-fail.patch [new file with mode: 0644]
queue-3.14/series
queue-3.14/xen-manage-fix-usb-interaction-issues-when-resuming.patch [new file with mode: 0644]

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 (file)
index 0000000..0d4bdfc
--- /dev/null
@@ -0,0 +1,47 @@
+From f0153c3d948c1764f6c920a0675d86fc1d75813e Mon Sep 17 00:00:00 2001
+From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
+Date: Tue, 10 Feb 2015 11:33:50 +0100
+Subject: ALSA: hdspm - Constrain periods to 2 on older cards
+
+From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
+
+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 <adi@drcomp.erfurt.thur.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..8c3eb02
--- /dev/null
@@ -0,0 +1,91 @@
+From e4940626defdf6c92da1052ad3f12741c1a28c90 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Mon, 9 Feb 2015 16:51:40 +0300
+Subject: ALSA: off by one bug in snd_riptide_joystick_probe()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+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 <dan.carpenter@oracle.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..27f483a
--- /dev/null
@@ -0,0 +1,59 @@
+From 61882b63171736571e1139ab5aa929e3bb336016 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 18 Feb 2015 21:55:03 +0100
+Subject: cpufreq: s3c: remove incorrect __init annotations
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+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 <arnd@arndb.de>
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..068891d
--- /dev/null
@@ -0,0 +1,128 @@
+From 6ffae8c06fab058d6c3f8ecb7f921327721034e7 Mon Sep 17 00:00:00 2001
+From: Viresh Kumar <viresh.kumar@linaro.org>
+Date: Sat, 31 Jan 2015 06:02:44 +0530
+Subject: cpufreq: Set cpufreq_cpu_data to NULL before putting kobject
+
+From: Viresh Kumar <viresh.kumar@linaro.org>
+
+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:
+  [<ffffffff81661b14>] dump_stack+0x46/0x58
+  [<ffffffff81072b61>] warn_slowpath_common+0x81/0xa0
+  [<ffffffff81072c7a>] warn_slowpath_null+0x1a/0x20
+  [<ffffffff812e16d1>] kobject_get+0x41/0x50
+  [<ffffffff815262a5>] cpufreq_cpu_get+0x75/0xc0
+  [<ffffffff81527c3e>] cpufreq_update_policy+0x2e/0x1f0
+  [<ffffffff810b8cb2>] ? up+0x32/0x50
+  [<ffffffff81381aa9>] ? acpi_ns_get_node+0xcb/0xf2
+  [<ffffffff81381efd>] ? acpi_evaluate_object+0x22c/0x252
+  [<ffffffff813824f6>] ? acpi_get_handle+0x95/0xc0
+  [<ffffffff81360967>] ? acpi_has_method+0x25/0x40
+  [<ffffffff81391e08>] acpi_processor_ppc_has_changed+0x77/0x82
+  [<ffffffff81089566>] ? move_linked_works+0x66/0x90
+  [<ffffffff8138e8ed>] acpi_processor_notify+0x58/0xe7
+  [<ffffffff8137410c>] acpi_ev_notify_dispatch+0x44/0x5c
+  [<ffffffff8135f293>] acpi_os_execute_deferred+0x15/0x22
+  [<ffffffff8108c910>] process_one_work+0x160/0x410
+  [<ffffffff8108d05b>] worker_thread+0x11b/0x520
+  [<ffffffff8108cf40>] ? rescuer_thread+0x380/0x380
+  [<ffffffff81092421>] kthread+0xe1/0x100
+  [<ffffffff81092340>] ? kthread_create_on_node+0x1b0/0x1b0
+  [<ffffffff81669ebc>] ret_from_fork+0x7c/0xb0
+  [<ffffffff81092340>] ? 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 <ethan.zhao@oracle.com>
+Reported-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
+Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..d79bf6c
--- /dev/null
@@ -0,0 +1,92 @@
+From d4d4eda23794c701442e55129dd4f8f2fefd5e4d Mon Sep 17 00:00:00 2001
+From: Mikulas Patocka <mpatocka@redhat.com>
+Date: Mon, 9 Feb 2015 13:38:17 -0500
+Subject: cpufreq: speedstep-smi: enable interrupts when waiting
+
+From: Mikulas Patocka <mpatocka@redhat.com>
+
+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 <mpatocka@redhat.com
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..bc35407
--- /dev/null
@@ -0,0 +1,37 @@
+From 7818b0aab87b680fb10f68eccebeeb6cd8283c73 Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel@arm.linux.org.uk>
+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 <rmk+kernel@arm.linux.org.uk>
+
+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 <rmk+kernel@arm.linux.org.uk>
+Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..4b5f9eb
--- /dev/null
@@ -0,0 +1,78 @@
+From 0418ca6073478f54f1da2e4013fa50d36838de75 Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel@arm.linux.org.uk>
+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 <rmk+kernel@arm.linux.org.uk>
+
+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 <rmk+kernel@arm.linux.org.uk>
+Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..0f96660
--- /dev/null
@@ -0,0 +1,45 @@
+From 15e1ce33182d1d5dbd8efe8d382b9352dc857527 Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+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 <tvboxspy@gmail.com>
+
+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 <tvboxspy@gmail.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..78c202a
--- /dev/null
@@ -0,0 +1,42 @@
+From c2ced1719a1b903350955a511e1666e6d05a7f5b Mon Sep 17 00:00:00 2001
+From: "Sumit.Saxena@avagotech.com" <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" <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 <sumit.saxena@avagotech.com>
+Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com>
+Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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, &regs->outbound_intr_status);
+       readl(&regs->outbound_intr_status);
+@@ -100,7 +102,6 @@ megasas_enable_intr_fusion(struct megasa
+       /* Dummy readl to force pci flush */
+       readl(&regs->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 (file)
index 0000000..93b60c4
--- /dev/null
@@ -0,0 +1,39 @@
+From 478913fdbdfd4a781d91c993eb86838620fe7421 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Date: Mon, 5 Jan 2015 09:51:48 +0100
+Subject: power: bq24190: Fix ignored supplicants
+
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+
+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 <k.kozlowski@samsung.com>
+Fixes: d7bf353fd0aa ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
+Signed-off-by: Sebastian Reichel <sre@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..9937f1f
--- /dev/null
@@ -0,0 +1,42 @@
+From faeed51bb65ce0241052d8dc24ac331ade12e976 Mon Sep 17 00:00:00 2001
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Date: Thu, 15 Jan 2015 05:00:37 +0300
+Subject: power: gpio-charger: balance enable/disable_irq_wake calls
+
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+
+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 <dbaryshkov@gmail.com>
+Signed-off-by: Sebastian Reichel <sre@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..6284d92
--- /dev/null
@@ -0,0 +1,32 @@
+From 24727b45b484e8937dcde53fa8d1aa70ac30ec0c Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Date: Tue, 27 Jan 2015 16:51:54 +0100
+Subject: power_supply: 88pm860x: Fix leaked power supply on probe fail
+
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+
+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 <k.kozlowski@samsung.com>
+Fixes: a830d28b48bf ("power_supply: Enable battery-charger for 88pm860x")
+Signed-off-by: Sebastian Reichel <sre@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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:
index 0282333ab80345f681ed795a8a50f3a5b029ab1f..b2a15d2ca52fda803278674d920aa8554a919f06 100644 (file)
@@ -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 (file)
index 0000000..ccb33f6
--- /dev/null
@@ -0,0 +1,95 @@
+From 72978b2fe2f2cdf9f319c6c6dcdbe92b38de2be2 Mon Sep 17 00:00:00 2001
+From: Ross Lagerwall <ross.lagerwall@citrix.com>
+Date: Mon, 19 Jan 2015 13:19:38 +0000
+Subject: xen/manage: Fix USB interaction issues when resuming
+
+From: Ross Lagerwall <ross.lagerwall@citrix.com>
+
+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]  [<ffffffff81446bde>] ? xen_poll_irq_timeout+0x3e/0x50
+[ 7279.648010]  [<ffffffff81448d60>] xen_poll_irq+0x10/0x20
+[ 7279.648010]  [<ffffffff81011723>] xen_lock_spinning+0xb3/0x120
+[ 7279.648010]  [<ffffffff810115d1>] __raw_callee_save_xen_lock_spinning+0x11/0x20
+[ 7279.648010]  [<ffffffff815620b6>] ? usb_control_msg+0xe6/0x120
+[ 7279.648010]  [<ffffffff81747e50>] ? _raw_spin_lock_irq+0x50/0x60
+[ 7279.648010]  [<ffffffff8174522c>] wait_for_completion+0xac/0x160
+[ 7279.648010]  [<ffffffff8109c520>] ? try_to_wake_up+0x2c0/0x2c0
+[ 7279.648010]  [<ffffffff814b60f2>] dpm_wait+0x32/0x40
+[ 7279.648010]  [<ffffffff814b6eb0>] device_resume+0x90/0x210
+[ 7279.648010]  [<ffffffff814b7d71>] dpm_resume+0x121/0x250
+[ 7279.648010]  [<ffffffff8144c570>] ? xenbus_dev_request_and_reply+0xc0/0xc0
+[ 7279.648010]  [<ffffffff814b80d5>] dpm_resume_end+0x15/0x30
+[ 7279.648010]  [<ffffffff81449fba>] do_suspend+0x10a/0x200
+[ 7279.648010]  [<ffffffff8144a2f0>] ? xen_pre_suspend+0x20/0x20
+[ 7279.648010]  [<ffffffff8144a1d0>] shutdown_handler+0x120/0x150
+[ 7279.648010]  [<ffffffff8144c60f>] xenwatch_thread+0x9f/0x160
+[ 7279.648010]  [<ffffffff810ac510>] ? finish_wait+0x80/0x80
+[ 7279.648010]  [<ffffffff8108d189>] kthread+0xc9/0xe0
+[ 7279.648010]  [<ffffffff8108d0c0>] ? flush_kthread_worker+0x80/0x80
+[ 7279.648010]  [<ffffffff8175087c>] ret_from_fork+0x7c/0xb0
+[ 7279.648010]  [<ffffffff8108d0c0>] ? 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]  [<ffffffff817442f9>] schedule+0x29/0x70
+[ 7441.243930]  [<ffffffff81743406>] schedule_timeout+0x166/0x2c0
+[ 7441.246681]  [<ffffffff81075b80>] ? call_timer_fn+0x110/0x110
+[ 7441.249339]  [<ffffffff8174357e>] schedule_timeout_uninterruptible+0x1e/0x20
+[ 7441.252644]  [<ffffffff81077710>] msleep+0x20/0x30
+[ 7441.254812]  [<ffffffff81555f00>] hub_port_reset+0xf0/0x580
+[ 7441.257400]  [<ffffffff81558465>] hub_port_init+0x75/0xb40
+[ 7441.259981]  [<ffffffff814bb3c9>] ? update_autosuspend+0x39/0x60
+[ 7441.262817]  [<ffffffff814bb4f0>] ? pm_runtime_set_autosuspend_delay+0x50/0xa0
+[ 7441.266212]  [<ffffffff8155a64a>] hub_thread+0x71a/0x1750
+[ 7441.268728]  [<ffffffff810ac510>] ? finish_wait+0x80/0x80
+[ 7441.271272]  [<ffffffff81559f30>] ? usb_port_resume+0x670/0x670
+[ 7441.274067]  [<ffffffff8108d189>] kthread+0xc9/0xe0
+[ 7441.276305]  [<ffffffff8108d0c0>] ? flush_kthread_worker+0x80/0x80
+[ 7441.279131]  [<ffffffff8175087c>] ret_from_fork+0x7c/0xb0
+[ 7441.281659]  [<ffffffff8108d0c0>] ? flush_kthread_worker+0x80/0x80
+
+Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
+Signed-off-by: David Vrabel <david.vrabel@citrix.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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);