]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2013 23:16:57 +0000 (16:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2013 23:16:57 +0000 (16:16 -0700)
added patches:
alsa-hda-fix-gpio-for-acer-aspire-3830tg.patch
arm-multi_v7_defconfig-enable-arm_atag_dtb_compat.patch
hid-wiimote-fix-ff-deadlock.patch

queue-3.11/alsa-hda-fix-gpio-for-acer-aspire-3830tg.patch [new file with mode: 0644]
queue-3.11/arm-multi_v7_defconfig-enable-arm_atag_dtb_compat.patch [new file with mode: 0644]
queue-3.11/hid-wiimote-fix-ff-deadlock.patch [new file with mode: 0644]
queue-3.11/series

diff --git a/queue-3.11/alsa-hda-fix-gpio-for-acer-aspire-3830tg.patch b/queue-3.11/alsa-hda-fix-gpio-for-acer-aspire-3830tg.patch
new file mode 100644 (file)
index 0000000..c454134
--- /dev/null
@@ -0,0 +1,58 @@
+From 4a4370442c996be0fd08234a167c8a127c2488bb Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 30 Sep 2013 12:13:44 +0200
+Subject: ALSA: hda - Fix GPIO for Acer Aspire 3830TG
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 4a4370442c996be0fd08234a167c8a127c2488bb upstream.
+
+Acer Aspire 3830TG seems requiring GPIO bit 0 as the primary mute
+control.  When a machine is booted after Windows 8, the GPIO pin is
+turned off and it results in the silent output.
+
+This patch adds the manual fixup of GPIO bit 0 for this model.
+
+Reported-by: Christopher <DIDI2002@web.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ sound/pci/hda/patch_conexant.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/sound/pci/hda/patch_conexant.c
++++ b/sound/pci/hda/patch_conexant.c
+@@ -3224,6 +3224,7 @@ enum {
+       CXT_PINCFG_LEMOTE_A1205,
+       CXT_FIXUP_STEREO_DMIC,
+       CXT_FIXUP_INC_MIC_BOOST,
++      CXT_FIXUP_GPIO1,
+ };
+ static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
+@@ -3302,6 +3303,15 @@ static const struct hda_fixup cxt_fixups
+               .type = HDA_FIXUP_FUNC,
+               .v.func = cxt5066_increase_mic_boost,
+       },
++      [CXT_FIXUP_GPIO1] = {
++              .type = HDA_FIXUP_VERBS,
++              .v.verbs = (const struct hda_verb[]) {
++                      { 0x01, AC_VERB_SET_GPIO_MASK, 0x01 },
++                      { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01 },
++                      { 0x01, AC_VERB_SET_GPIO_DATA, 0x01 },
++                      { }
++              },
++      },
+ };
+ static const struct snd_pci_quirk cxt5051_fixups[] = {
+@@ -3311,6 +3321,7 @@ static const struct snd_pci_quirk cxt505
+ static const struct snd_pci_quirk cxt5066_fixups[] = {
+       SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
++      SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_GPIO1),
+       SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
+       SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
+       SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
diff --git a/queue-3.11/arm-multi_v7_defconfig-enable-arm_atag_dtb_compat.patch b/queue-3.11/arm-multi_v7_defconfig-enable-arm_atag_dtb_compat.patch
new file mode 100644 (file)
index 0000000..b258215
--- /dev/null
@@ -0,0 +1,33 @@
+From a0396b9bd5a4a7baf598b60d2ca53c605c440a42 Mon Sep 17 00:00:00 2001
+From: Olof Johansson <olof@lixom.net>
+Date: Mon, 16 Sep 2013 09:01:24 -0700
+Subject: ARM: multi_v7_defconfig: enable ARM_ATAG_DTB_COMPAT
+
+From: Olof Johansson <olof@lixom.net>
+
+commit a0396b9bd5a4a7baf598b60d2ca53c605c440a42 upstream.
+
+Without this, legacy platforms that can boot with a multiplatform
+kernel but that need the DTB to be appended, won't have a way to pass
+firmware-set bootargs to the kernel.
+
+This is needed to boot multi_v7_defconfig on snowball, for instance.
+
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Cc: Kevin Hilman <khilman@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/configs/multi_v7_defconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/configs/multi_v7_defconfig
++++ b/arch/arm/configs/multi_v7_defconfig
+@@ -46,6 +46,7 @@ CONFIG_ARCH_ZYNQ=y
+ CONFIG_SMP=y
+ CONFIG_HIGHPTE=y
+ CONFIG_ARM_APPENDED_DTB=y
++CONFIG_ARM_ATAG_DTB_COMPAT=y
+ CONFIG_NET=y
+ CONFIG_UNIX=y
+ CONFIG_INET=y
diff --git a/queue-3.11/hid-wiimote-fix-ff-deadlock.patch b/queue-3.11/hid-wiimote-fix-ff-deadlock.patch
new file mode 100644 (file)
index 0000000..741d3c1
--- /dev/null
@@ -0,0 +1,168 @@
+From f50f9aabf32db7414551ffdfdccc71be5f3d6e7d Mon Sep 17 00:00:00 2001
+From: David Herrmann <dh.herrmann@gmail.com>
+Date: Wed, 2 Oct 2013 13:47:28 +0200
+Subject: HID: wiimote: fix FF deadlock
+
+From: David Herrmann <dh.herrmann@gmail.com>
+
+commit f50f9aabf32db7414551ffdfdccc71be5f3d6e7d upstream.
+
+The input core has an internal spinlock that is acquired during event
+injection via input_event() and friends but also held during FF callbacks.
+That means, there is no way to share a lock between event-injection and FF
+handling. Unfortunately, this is what is required for wiimote state
+tracking and what we do with state.lock and input->lock.
+
+This deadlock can be triggered when using continuous data reporting and FF
+on a wiimote device at the same time. I takes me at least 30m of
+stress-testing to trigger it but users reported considerably shorter
+times (http://bpaste.net/show/132504/) when using some gaming-console
+emulators.
+
+The real problem is that we have two copies of internal state, one in the
+wiimote objects and the other in the input device. As the input-lock is
+not supposed to be accessed from outside of input-core, we have no other
+chance than offloading FF handling into a worker. This actually works
+pretty nice and also allows to implictly merge fast rumble changes into a
+single request.
+
+Due to the 3-layered workers (rumble+queue+l2cap) this might reduce FF
+responsiveness. Initial tests were fine so lets fix the race first and if
+it turns out to be too slow we can always handle FF out-of-band and skip
+the queue-worker.
+
+Reported-by: Thomas Schneider
+Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/hid-wiimote-modules.c |   40 +++++++++++++++++++++++++++-----------
+ drivers/hid/hid-wiimote.h         |    4 ++-
+ 2 files changed, 32 insertions(+), 12 deletions(-)
+
+--- a/drivers/hid/hid-wiimote-modules.c
++++ b/drivers/hid/hid-wiimote-modules.c
+@@ -119,12 +119,22 @@ static const struct wiimod_ops wiimod_ke
+  * the rumble motor, this flag shouldn't be set.
+  */
++/* used by wiimod_rumble and wiipro_rumble */
++static void wiimod_rumble_worker(struct work_struct *work)
++{
++      struct wiimote_data *wdata = container_of(work, struct wiimote_data,
++                                                rumble_worker);
++
++      spin_lock_irq(&wdata->state.lock);
++      wiiproto_req_rumble(wdata, wdata->state.cache_rumble);
++      spin_unlock_irq(&wdata->state.lock);
++}
++
+ static int wiimod_rumble_play(struct input_dev *dev, void *data,
+                             struct ff_effect *eff)
+ {
+       struct wiimote_data *wdata = input_get_drvdata(dev);
+       __u8 value;
+-      unsigned long flags;
+       /*
+        * The wiimote supports only a single rumble motor so if any magnitude
+@@ -137,9 +147,10 @@ static int wiimod_rumble_play(struct inp
+       else
+               value = 0;
+-      spin_lock_irqsave(&wdata->state.lock, flags);
+-      wiiproto_req_rumble(wdata, value);
+-      spin_unlock_irqrestore(&wdata->state.lock, flags);
++      /* Locking state.lock here might deadlock with input_event() calls.
++       * schedule_work acts as barrier. Merging multiple changes is fine. */
++      wdata->state.cache_rumble = value;
++      schedule_work(&wdata->rumble_worker);
+       return 0;
+ }
+@@ -147,6 +158,8 @@ static int wiimod_rumble_play(struct inp
+ static int wiimod_rumble_probe(const struct wiimod_ops *ops,
+                              struct wiimote_data *wdata)
+ {
++      INIT_WORK(&wdata->rumble_worker, wiimod_rumble_worker);
++
+       set_bit(FF_RUMBLE, wdata->input->ffbit);
+       if (input_ff_create_memless(wdata->input, NULL, wiimod_rumble_play))
+               return -ENOMEM;
+@@ -159,6 +172,8 @@ static void wiimod_rumble_remove(const s
+ {
+       unsigned long flags;
++      cancel_work_sync(&wdata->rumble_worker);
++
+       spin_lock_irqsave(&wdata->state.lock, flags);
+       wiiproto_req_rumble(wdata, 0);
+       spin_unlock_irqrestore(&wdata->state.lock, flags);
+@@ -1731,7 +1746,6 @@ static int wiimod_pro_play(struct input_
+ {
+       struct wiimote_data *wdata = input_get_drvdata(dev);
+       __u8 value;
+-      unsigned long flags;
+       /*
+        * The wiimote supports only a single rumble motor so if any magnitude
+@@ -1744,9 +1758,10 @@ static int wiimod_pro_play(struct input_
+       else
+               value = 0;
+-      spin_lock_irqsave(&wdata->state.lock, flags);
+-      wiiproto_req_rumble(wdata, value);
+-      spin_unlock_irqrestore(&wdata->state.lock, flags);
++      /* Locking state.lock here might deadlock with input_event() calls.
++       * schedule_work acts as barrier. Merging multiple changes is fine. */
++      wdata->state.cache_rumble = value;
++      schedule_work(&wdata->rumble_worker);
+       return 0;
+ }
+@@ -1756,6 +1771,8 @@ static int wiimod_pro_probe(const struct
+ {
+       int ret, i;
++      INIT_WORK(&wdata->rumble_worker, wiimod_rumble_worker);
++
+       wdata->extension.input = input_allocate_device();
+       if (!wdata->extension.input)
+               return -ENOMEM;
+@@ -1817,12 +1834,13 @@ static void wiimod_pro_remove(const stru
+       if (!wdata->extension.input)
+               return;
++      input_unregister_device(wdata->extension.input);
++      wdata->extension.input = NULL;
++      cancel_work_sync(&wdata->rumble_worker);
++
+       spin_lock_irqsave(&wdata->state.lock, flags);
+       wiiproto_req_rumble(wdata, 0);
+       spin_unlock_irqrestore(&wdata->state.lock, flags);
+-
+-      input_unregister_device(wdata->extension.input);
+-      wdata->extension.input = NULL;
+ }
+ static const struct wiimod_ops wiimod_pro = {
+--- a/drivers/hid/hid-wiimote.h
++++ b/drivers/hid/hid-wiimote.h
+@@ -133,13 +133,15 @@ struct wiimote_state {
+       __u8 *cmd_read_buf;
+       __u8 cmd_read_size;
+-      /* calibration data */
++      /* calibration/cache data */
+       __u16 calib_bboard[4][3];
++      __u8 cache_rumble;
+ };
+ struct wiimote_data {
+       struct hid_device *hdev;
+       struct input_dev *input;
++      struct work_struct rumble_worker;
+       struct led_classdev *leds[4];
+       struct input_dev *accel;
+       struct input_dev *ir;
index 49c59ed02a366d26aa9c27a0958bbfe9bd7280dc..ee0909d273fec34f674b0c6729a4d7e706ec3b16 100644 (file)
@@ -108,3 +108,6 @@ xfs-fix-node-forward-in-xfs_node_toosmall.patch
 drm-nouveau-bios-init-stub-opcode-0xaa.patch
 irq-force-hardirq-exit-s-softirq-processing-on-its-own-stack.patch
 arm-tegra-unify-tegra-s-kconfig-a-bit-more.patch
+alsa-hda-fix-gpio-for-acer-aspire-3830tg.patch
+arm-multi_v7_defconfig-enable-arm_atag_dtb_compat.patch
+hid-wiimote-fix-ff-deadlock.patch