From: Greg Kroah-Hartman Date: Sun, 27 Aug 2017 07:39:01 +0000 (+0200) Subject: 3.18-stable patches X-Git-Tag: v3.18.68~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96cee15d467a827ad660840301cdd90b4608869d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches 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 --- 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 index 00000000000..5e791f58335 --- /dev/null +++ b/queue-3.18/alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch @@ -0,0 +1,37 @@ +From 88c54cdf61f508ebcf8da2d819f5dfc03e954d1d Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 22 Aug 2017 08:15:13 +0200 +Subject: ALSA: core: Fix unexpected error at replacing user TLV + +From: Takashi Iwai + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..c0b8a77abc7 --- /dev/null +++ b/queue-3.18/alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch @@ -0,0 +1,31 @@ +From bbba6f9d3da357bbabc6fda81e99ff5584500e76 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +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 + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..10521a1ea4c --- /dev/null +++ b/queue-3.18/input-trackpoint-add-new-trackpoint-firmware-id.patch @@ -0,0 +1,49 @@ +From ec667683c532c93fb41e100e5d61a518971060e2 Mon Sep 17 00:00:00 2001 +From: Aaron Ma +Date: Fri, 18 Aug 2017 12:17:21 -0700 +Subject: Input: trackpoint - add new trackpoint firmware ID + +From: Aaron Ma + +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 +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + 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 */ + + + /* diff --git a/queue-3.18/series b/queue-3.18/series index 4caf718a8b3..f851985b8bc 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -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