]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Aug 2017 07:48:20 +0000 (09:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Aug 2017 07:48:20 +0000 (09:48 +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
arcv2-pae40-explicitly-set-msb-counterpart-of-slc-region-ops-addresses.patch
input-elan_i2c-add-elan0602-acpi-id-to-support-lenovo-yoga310.patch
input-trackpoint-add-new-trackpoint-firmware-id.patch

queue-4.4/alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch [new file with mode: 0644]
queue-4.4/alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch [new file with mode: 0644]
queue-4.4/arcv2-pae40-explicitly-set-msb-counterpart-of-slc-region-ops-addresses.patch [new file with mode: 0644]
queue-4.4/input-elan_i2c-add-elan0602-acpi-id-to-support-lenovo-yoga310.patch [new file with mode: 0644]
queue-4.4/input-trackpoint-add-new-trackpoint-firmware-id.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch b/queue-4.4/alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch
new file mode 100644 (file)
index 0000000..42ff582
--- /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
+@@ -1126,7 +1126,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-4.4/alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch b/queue-4.4/alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch
new file mode 100644 (file)
index 0000000..7ee513f
--- /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
+@@ -854,6 +854,7 @@ static const struct snd_pci_quirk cxt506
+       SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC),
+       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-4.4/arcv2-pae40-explicitly-set-msb-counterpart-of-slc-region-ops-addresses.patch b/queue-4.4/arcv2-pae40-explicitly-set-msb-counterpart-of-slc-region-ops-addresses.patch
new file mode 100644 (file)
index 0000000..cc5bb49
--- /dev/null
@@ -0,0 +1,68 @@
+From 7d79cee2c6540ea64dd917a14e2fd63d4ac3d3c0 Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
+Date: Tue, 1 Aug 2017 12:58:47 +0300
+Subject: ARCv2: PAE40: Explicitly set MSB counterpart of SLC region ops addresses
+
+From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
+
+commit 7d79cee2c6540ea64dd917a14e2fd63d4ac3d3c0 upstream.
+
+It is necessary to explicitly set both SLC_AUX_RGN_START1 and SLC_AUX_RGN_END1
+which hold MSB bits of the physical address correspondingly of region start
+and end otherwise SLC region operation is executed in unpredictable manner
+
+Without this patch, SLC flushes on HSDK (IOC disabled) were taking
+seconds.
+
+Reported-by: Vladimir Kondratiev <vladimir.kondratiev@intel.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+[vgupta: PAR40 regs only written if PAE40 exist]
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arc/include/asm/cache.h |    2 ++
+ arch/arc/mm/cache.c          |   13 +++++++++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+--- a/arch/arc/include/asm/cache.h
++++ b/arch/arc/include/asm/cache.h
+@@ -88,7 +88,9 @@ extern int ioc_exists;
+ #define ARC_REG_SLC_FLUSH     0x904
+ #define ARC_REG_SLC_INVALIDATE        0x905
+ #define ARC_REG_SLC_RGN_START 0x914
++#define ARC_REG_SLC_RGN_START1        0x915
+ #define ARC_REG_SLC_RGN_END   0x916
++#define ARC_REG_SLC_RGN_END1  0x917
+ /* Bit val in SLC_CONTROL */
+ #define SLC_CTRL_IM           0x040
+--- a/arch/arc/mm/cache.c
++++ b/arch/arc/mm/cache.c
+@@ -543,6 +543,7 @@ noinline void slc_op(phys_addr_t paddr,
+       static DEFINE_SPINLOCK(lock);
+       unsigned long flags;
+       unsigned int ctrl;
++      phys_addr_t end;
+       spin_lock_irqsave(&lock, flags);
+@@ -572,8 +573,16 @@ noinline void slc_op(phys_addr_t paddr,
+        * END needs to be setup before START (latter triggers the operation)
+        * END can't be same as START, so add (l2_line_sz - 1) to sz
+        */
+-      write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1));
+-      write_aux_reg(ARC_REG_SLC_RGN_START, paddr);
++      end = paddr + sz + l2_line_sz - 1;
++      if (is_pae40_enabled())
++              write_aux_reg(ARC_REG_SLC_RGN_END1, upper_32_bits(end));
++
++      write_aux_reg(ARC_REG_SLC_RGN_END, lower_32_bits(end));
++
++      if (is_pae40_enabled())
++              write_aux_reg(ARC_REG_SLC_RGN_START1, upper_32_bits(paddr));
++
++      write_aux_reg(ARC_REG_SLC_RGN_START, lower_32_bits(paddr));
+       while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY);
diff --git a/queue-4.4/input-elan_i2c-add-elan0602-acpi-id-to-support-lenovo-yoga310.patch b/queue-4.4/input-elan_i2c-add-elan0602-acpi-id-to-support-lenovo-yoga310.patch
new file mode 100644 (file)
index 0000000..34ebd8c
--- /dev/null
@@ -0,0 +1,30 @@
+From 1d2226e45040ed4aee95b633cbd64702bf7fc2a1 Mon Sep 17 00:00:00 2001
+From: KT Liao <kt.liao@emc.com.tw>
+Date: Fri, 18 Aug 2017 16:58:15 -0700
+Subject: Input: elan_i2c - add ELAN0602 ACPI ID to support Lenovo Yoga310
+
+From: KT Liao <kt.liao@emc.com.tw>
+
+commit 1d2226e45040ed4aee95b633cbd64702bf7fc2a1 upstream.
+
+Add ELAN0602 to the list of known ACPI IDs to enable support for ELAN
+touchpads found in Lenovo Yoga310.
+
+Signed-off-by: KT Liao <kt.liao@emc.com.tw>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/elan_i2c_core.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/mouse/elan_i2c_core.c
++++ b/drivers/input/mouse/elan_i2c_core.c
+@@ -1234,6 +1234,7 @@ static const struct acpi_device_id elan_
+       { "ELAN0000", 0 },
+       { "ELAN0100", 0 },
+       { "ELAN0600", 0 },
++      { "ELAN0602", 0 },
+       { "ELAN0605", 0 },
+       { "ELAN0608", 0 },
+       { "ELAN0605", 0 },
diff --git a/queue-4.4/input-trackpoint-add-new-trackpoint-firmware-id.patch b/queue-4.4/input-trackpoint-add-new-trackpoint-firmware-id.patch
new file mode 100644 (file)
index 0000000..634016d
--- /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
+@@ -265,7 +265,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 dd867d47fef048b933c2bd37e3faa82c30d4627d..3533c659664382a1fcf7324f4f1d97193b52f6bd 100644 (file)
@@ -14,3 +14,8 @@ net-sched-fix-null-pointer-dereference-when-action-calls-some-targets.patch
 net_sched-fix-order-of-queue-length-updates-in-qdisc_replace.patch
 mei-me-add-broxton-pci-device-ids.patch
 mei-me-add-lewisburg-device-ids.patch
+input-trackpoint-add-new-trackpoint-firmware-id.patch
+input-elan_i2c-add-elan0602-acpi-id-to-support-lenovo-yoga310.patch
+alsa-core-fix-unexpected-error-at-replacing-user-tlv.patch
+alsa-hda-add-stereo-mic-quirk-for-lenovo-g50-70-17aa-3978.patch
+arcv2-pae40-explicitly-set-msb-counterpart-of-slc-region-ops-addresses.patch