]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Aug 2017 07:39:01 +0000 (09:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Aug 2017 07:39:01 +0000 (09:39 +0200)
added patches:
alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch
alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch
input-trackpoint-add-new-trackpoint-firmware-id.patch

queue-3.18/alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch [new file with mode: 0644]
queue-3.18/alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch [new file with mode: 0644]
queue-3.18/input-trackpoint-add-new-trackpoint-firmware-id.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch b/queue-3.18/alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch
new file mode 100644 (file)
index 0000000..5e791f5
--- /dev/null
@@ -0,0 +1,37 @@
+From 88c54cdf61f508ebcf8da2d819f5dfc03e954d1d Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 22 Aug 2017 08:15:13 +0200
+Subject: ALSA: core: Fix unexpected error at replacing user TLV
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 88c54cdf61f508ebcf8da2d819f5dfc03e954d1d upstream.
+
+When user tries to replace the user-defined control TLV, the kernel
+checks the change of its content via memcmp().  The problem is that
+the kernel passes the return value from memcmp() as is.  memcmp()
+gives a non-zero negative value depending on the comparison result,
+and this shall be recognized as an error code.
+
+The patch covers that corner-case, return 1 properly for the changed
+TLV.
+
+Fixes: 8aa9b586e420 ("[ALSA] Control API - more robust TLV implementation")
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/core/control.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/core/control.c
++++ b/sound/core/control.c
+@@ -1087,7 +1087,7 @@ static int snd_ctl_elem_user_tlv(struct
+               mutex_lock(&ue->card->user_ctl_lock);
+               change = ue->tlv_data_size != size;
+               if (!change)
+-                      change = memcmp(ue->tlv_data, new_data, size);
++                      change = memcmp(ue->tlv_data, new_data, size) != 0;
+               kfree(ue->tlv_data);
+               ue->tlv_data = new_data;
+               ue->tlv_data_size = size;
diff --git a/queue-3.18/alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch b/queue-3.18/alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch
new file mode 100644 (file)
index 0000000..c0b8a77
--- /dev/null
@@ -0,0 +1,31 @@
+From bbba6f9d3da357bbabc6fda81e99ff5584500e76 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 23 Aug 2017 09:30:17 +0200
+Subject: ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978)
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit bbba6f9d3da357bbabc6fda81e99ff5584500e76 upstream.
+
+Lenovo G50-70 (17aa:3978) with Conexant codec chip requires the
+similar workaround for the inverted stereo dmic like other Lenovo
+models.
+
+Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1020657
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_conexant.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_conexant.c
++++ b/sound/pci/hda/patch_conexant.c
+@@ -805,6 +805,7 @@ static const struct snd_pci_quirk cxt506
+       SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo IdeaPad Z560", CXT_FIXUP_MUTE_LED_EAPD),
+       SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
+       SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
++      SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC),
+       SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
+       SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
+       SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004),
diff --git a/queue-3.18/input-trackpoint-add-new-trackpoint-firmware-id.patch b/queue-3.18/input-trackpoint-add-new-trackpoint-firmware-id.patch
new file mode 100644 (file)
index 0000000..10521a1
--- /dev/null
@@ -0,0 +1,49 @@
+From ec667683c532c93fb41e100e5d61a518971060e2 Mon Sep 17 00:00:00 2001
+From: Aaron Ma <aaron.ma@canonical.com>
+Date: Fri, 18 Aug 2017 12:17:21 -0700
+Subject: Input: trackpoint - add new trackpoint firmware ID
+
+From: Aaron Ma <aaron.ma@canonical.com>
+
+commit ec667683c532c93fb41e100e5d61a518971060e2 upstream.
+
+Synaptics add new TP firmware ID: 0x2 and 0x3, for now both lower 2 bits
+are indicated as TP. Change the constant to bitwise values.
+
+This makes trackpoint to be recognized on Lenovo Carbon X1 Gen5 instead
+of it being identified as "PS/2 Generic Mouse".
+
+Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/trackpoint.c |    3 ++-
+ drivers/input/mouse/trackpoint.h |    3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/input/mouse/trackpoint.c
++++ b/drivers/input/mouse/trackpoint.c
+@@ -263,7 +263,8 @@ static int trackpoint_start_protocol(str
+       if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
+               return -1;
+-      if (param[0] != TP_MAGIC_IDENT)
++      /* add new TP ID. */
++      if (!(param[0] & TP_MAGIC_IDENT))
+               return -1;
+       if (firmware_id)
+--- a/drivers/input/mouse/trackpoint.h
++++ b/drivers/input/mouse/trackpoint.h
+@@ -21,8 +21,9 @@
+ #define TP_COMMAND            0xE2    /* Commands start with this */
+ #define TP_READ_ID            0xE1    /* Sent for device identification */
+-#define TP_MAGIC_IDENT                0x01    /* Sent after a TP_READ_ID followed */
++#define TP_MAGIC_IDENT                0x03    /* Sent after a TP_READ_ID followed */
+                                       /* by the firmware ID */
++                                      /* Firmware ID includes 0x1, 0x2, 0x3 */
+ /*
index 4caf718a8b3cf4a944ea172b8c31c3db2223b2dd..f851985b8bc57197f55dbb225cb2a5e9fcd40937 100644 (file)
@@ -5,3 +5,6 @@ tcp-when-rearming-rto-if-rto-time-is-in-past-then-fire-rto-asap.patch
 irda-do-not-leak-initialized-list.dev-to-userspace.patch
 net-sched-fix-null-pointer-dereference-when-action-calls-some-targets.patch
 net_sched-fix-order-of-queue-length-updates-in-qdisc_replace.patch
+input-trackpoint-add-new-trackpoint-firmware-id.patch
+alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch
+alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch