]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2019 12:35:24 +0000 (13:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2019 12:35:24 +0000 (13:35 +0100)
added patches:
alsa-hda-add-mute-led-support-for-hp-probook-645-g4.patch
alsa-hda-realtek-dell-headphone-has-noise-on-unmute-for-alc236.patch
alsa-hda-realtek-enable-internal-speaker-of-asus-ux431flc.patch
alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch
alsa-pcm-oss-avoid-potential-buffer-overflows.patch
coresight-etm4x-fix-input-validation-for-sysfs.patch
input-fix-memory-leak-in-psxpad_spi_probe.patch
input-goodix-add-upside-down-quirk-for-teclast-x89-tablet.patch
input-synaptics-rmi4-don-t-increment-rmiaddr-for-smbus-transfers.patch
input-synaptics-rmi4-re-enable-irqs-in-f34v7_do_reflash.patch
input-synaptics-switch-another-x1-carbon-6-to-rmi-smbus.patch

12 files changed:
queue-4.19/alsa-hda-add-mute-led-support-for-hp-probook-645-g4.patch [new file with mode: 0644]
queue-4.19/alsa-hda-realtek-dell-headphone-has-noise-on-unmute-for-alc236.patch [new file with mode: 0644]
queue-4.19/alsa-hda-realtek-enable-internal-speaker-of-asus-ux431flc.patch [new file with mode: 0644]
queue-4.19/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch [new file with mode: 0644]
queue-4.19/alsa-pcm-oss-avoid-potential-buffer-overflows.patch [new file with mode: 0644]
queue-4.19/coresight-etm4x-fix-input-validation-for-sysfs.patch [new file with mode: 0644]
queue-4.19/input-fix-memory-leak-in-psxpad_spi_probe.patch [new file with mode: 0644]
queue-4.19/input-goodix-add-upside-down-quirk-for-teclast-x89-tablet.patch [new file with mode: 0644]
queue-4.19/input-synaptics-rmi4-don-t-increment-rmiaddr-for-smbus-transfers.patch [new file with mode: 0644]
queue-4.19/input-synaptics-rmi4-re-enable-irqs-in-f34v7_do_reflash.patch [new file with mode: 0644]
queue-4.19/input-synaptics-switch-another-x1-carbon-6-to-rmi-smbus.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/alsa-hda-add-mute-led-support-for-hp-probook-645-g4.patch b/queue-4.19/alsa-hda-add-mute-led-support-for-hp-probook-645-g4.patch
new file mode 100644 (file)
index 0000000..f317f94
--- /dev/null
@@ -0,0 +1,32 @@
+From e190de6941db14813032af87873f5550ad5764fe Mon Sep 17 00:00:00 2001
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Date: Wed, 20 Nov 2019 16:20:35 +0800
+Subject: ALSA: hda - Add mute led support for HP ProBook 645 G4
+
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+
+commit e190de6941db14813032af87873f5550ad5764fe upstream.
+
+Mic mute led does not work on HP ProBook 645 G4.
+We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it.
+
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20191120082035.18937-1-kai.heng.feng@canonical.com
+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
+@@ -923,6 +923,7 @@ static const struct snd_pci_quirk cxt506
+       SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
+       SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
++      SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO),
+       SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE),
diff --git a/queue-4.19/alsa-hda-realtek-dell-headphone-has-noise-on-unmute-for-alc236.patch b/queue-4.19/alsa-hda-realtek-dell-headphone-has-noise-on-unmute-for-alc236.patch
new file mode 100644 (file)
index 0000000..af88597
--- /dev/null
@@ -0,0 +1,49 @@
+From e1e8c1fdce8b00fce08784d9d738c60ebf598ebc Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Tue, 26 Nov 2019 17:04:23 +0800
+Subject: ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit e1e8c1fdce8b00fce08784d9d738c60ebf598ebc upstream.
+
+headphone have noise even the volume is very small.
+Let it fill up pcbeep hidden register to default value.
+The issue was gone.
+
+Fixes: 4344aec84bd8 ("ALSA: hda/realtek - New codec support for ALC256")
+Fixes: 736f20a70608 ("ALSA: hda/realtek - Add support for ALC236/ALC3204")
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/9ae47f23a64d4e41a9c81e263cd8a250@realtek.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -379,9 +379,7 @@ static void alc_fill_eapd_coef(struct hd
+       case 0x10ec0215:
+       case 0x10ec0233:
+       case 0x10ec0235:
+-      case 0x10ec0236:
+       case 0x10ec0255:
+-      case 0x10ec0256:
+       case 0x10ec0257:
+       case 0x10ec0282:
+       case 0x10ec0283:
+@@ -393,6 +391,11 @@ static void alc_fill_eapd_coef(struct hd
+       case 0x10ec0300:
+               alc_update_coef_idx(codec, 0x10, 1<<9, 0);
+               break;
++      case 0x10ec0236:
++      case 0x10ec0256:
++              alc_write_coef_idx(codec, 0x36, 0x5757);
++              alc_update_coef_idx(codec, 0x10, 1<<9, 0);
++              break;
+       case 0x10ec0275:
+               alc_update_coef_idx(codec, 0xe, 0, 1<<0);
+               break;
diff --git a/queue-4.19/alsa-hda-realtek-enable-internal-speaker-of-asus-ux431flc.patch b/queue-4.19/alsa-hda-realtek-enable-internal-speaker-of-asus-ux431flc.patch
new file mode 100644 (file)
index 0000000..795a6e7
--- /dev/null
@@ -0,0 +1,57 @@
+From 436e25505f3458cc92c7f3c985e9cbc198a98209 Mon Sep 17 00:00:00 2001
+From: Jian-Hong Pan <jian-hong@endlessm.com>
+Date: Mon, 25 Nov 2019 17:34:06 +0800
+Subject: ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC
+
+From: Jian-Hong Pan <jian-hong@endlessm.com>
+
+commit 436e25505f3458cc92c7f3c985e9cbc198a98209 upstream.
+
+Laptops like ASUS UX431FLC and UX431FL can share the same audio quirks.
+But UX431FLC needs one more step to enable the internal speaker: Pull
+the GPIO from CODEC to initialize the AMP.
+
+Fixes: 60083f9e94b2 ("ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL")
+Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20191125093405.5702-1-jian-hong@endlessm.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -5701,6 +5701,7 @@ enum {
+       ALC299_FIXUP_PREDATOR_SPK,
+       ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
+       ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
++      ALC294_FIXUP_ASUS_INTSPK_GPIO,
+ };
+ static const struct hda_fixup alc269_fixups[] = {
+@@ -6764,6 +6765,13 @@ static const struct hda_fixup alc269_fix
+               .chained = true,
+               .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
+       },
++      [ALC294_FIXUP_ASUS_INTSPK_GPIO] = {
++              .type = HDA_FIXUP_FUNC,
++              /* The GPIO must be pulled to initialize the AMP */
++              .v.func = alc_fixup_gpio4,
++              .chained = true,
++              .chain_id = ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC
++      },
+ };
+ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+@@ -6923,7 +6931,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
+       SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
+       SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
+-      SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC),
++      SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_GPIO),
+       SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
+       SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
+       SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
diff --git a/queue-4.19/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch b/queue-4.19/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch
new file mode 100644 (file)
index 0000000..1c7b86a
--- /dev/null
@@ -0,0 +1,33 @@
+From 695d1ec3994f9de2cefae80ee2087c95d2e5a2f3 Mon Sep 17 00:00:00 2001
+From: Hui Wang <hui.wang@canonical.com>
+Date: Thu, 21 Nov 2019 10:54:27 +0800
+Subject: ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop
+
+From: Hui Wang <hui.wang@canonical.com>
+
+commit 695d1ec3994f9de2cefae80ee2087c95d2e5a2f3 upstream.
+
+The headset on this machine is not defined, after applying the quirk
+ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well
+
+BugLink: https://bugs.launchpad.net/bugs/1846148
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Hui Wang <hui.wang@canonical.com>
+Link: https://lore.kernel.org/r/20191121025427.8856-1-hui.wang@canonical.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -7038,6 +7038,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
+       SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP", ALC256_FIXUP_HUAWEI_MBXP_PINS),
+       SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
++      SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
+       SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
+ #if 0
diff --git a/queue-4.19/alsa-pcm-oss-avoid-potential-buffer-overflows.patch b/queue-4.19/alsa-pcm-oss-avoid-potential-buffer-overflows.patch
new file mode 100644 (file)
index 0000000..2156367
--- /dev/null
@@ -0,0 +1,64 @@
+From 4cc8d6505ab82db3357613d36e6c58a297f57f7c Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 4 Dec 2019 15:48:24 +0100
+Subject: ALSA: pcm: oss: Avoid potential buffer overflows
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 4cc8d6505ab82db3357613d36e6c58a297f57f7c upstream.
+
+syzkaller reported an invalid access in PCM OSS read, and this seems
+to be an overflow of the internal buffer allocated for a plugin.
+Since the rate plugin adjusts its transfer size dynamically, the
+calculation for the chained plugin might be bigger than the given
+buffer size in some extreme cases, which lead to such an buffer
+overflow as caught by KASAN.
+
+Fix it by limiting the max transfer size properly by checking against
+the destination size in each plugin transfer callback.
+
+Reported-by: syzbot+f153bde47a62e0b05f83@syzkaller.appspotmail.com
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20191204144824.17801-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/core/oss/linear.c |    2 ++
+ sound/core/oss/mulaw.c  |    2 ++
+ sound/core/oss/route.c  |    2 ++
+ 3 files changed, 6 insertions(+)
+
+--- a/sound/core/oss/linear.c
++++ b/sound/core/oss/linear.c
+@@ -107,6 +107,8 @@ static snd_pcm_sframes_t linear_transfer
+               }
+       }
+ #endif
++      if (frames > dst_channels[0].frames)
++              frames = dst_channels[0].frames;
+       convert(plugin, src_channels, dst_channels, frames);
+       return frames;
+ }
+--- a/sound/core/oss/mulaw.c
++++ b/sound/core/oss/mulaw.c
+@@ -269,6 +269,8 @@ static snd_pcm_sframes_t mulaw_transfer(
+               }
+       }
+ #endif
++      if (frames > dst_channels[0].frames)
++              frames = dst_channels[0].frames;
+       data = (struct mulaw_priv *)plugin->extra_data;
+       data->func(plugin, src_channels, dst_channels, frames);
+       return frames;
+--- a/sound/core/oss/route.c
++++ b/sound/core/oss/route.c
+@@ -57,6 +57,8 @@ static snd_pcm_sframes_t route_transfer(
+               return -ENXIO;
+       if (frames == 0)
+               return 0;
++      if (frames > dst_channels[0].frames)
++              frames = dst_channels[0].frames;
+       nsrcs = plugin->src_format.channels;
+       ndsts = plugin->dst_format.channels;
diff --git a/queue-4.19/coresight-etm4x-fix-input-validation-for-sysfs.patch b/queue-4.19/coresight-etm4x-fix-input-validation-for-sysfs.patch
new file mode 100644 (file)
index 0000000..80242fc
--- /dev/null
@@ -0,0 +1,90 @@
+From 2fe6899e36aa174abefd017887f9cfe0cb60c43a Mon Sep 17 00:00:00 2001
+From: Mike Leach <mike.leach@linaro.org>
+Date: Mon, 4 Nov 2019 11:12:42 -0700
+Subject: coresight: etm4x: Fix input validation for sysfs.
+
+From: Mike Leach <mike.leach@linaro.org>
+
+commit 2fe6899e36aa174abefd017887f9cfe0cb60c43a upstream.
+
+A number of issues are fixed relating to sysfs input validation:-
+
+1) bb_ctrl_store() - incorrect compare of bit select field to absolute
+value. Reworked per ETMv4 specification.
+2) seq_event_store() - incorrect mask value - register has two
+event values.
+3) cyc_threshold_store() - must mask with max before checking min
+otherwise wrapped values can set illegal value below min.
+4) res_ctrl_store() - update to mask off all res0 bits.
+
+Reviewed-by: Leo Yan <leo.yan@linaro.org>
+Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
+Signed-off-by: Mike Leach <mike.leach@linaro.org>
+Fixes: a77de2637c9eb ("coresight: etm4x: moving sysFS entries to a dedicated file")
+Cc: stable <stable@vger.kernel.org> # 4.9+
+Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
+Link: https://lore.kernel.org/r/20191104181251.26732-6-mathieu.poirier@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwtracing/coresight/coresight-etm4x-sysfs.c |   21 ++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+--- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
++++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
+@@ -655,10 +655,13 @@ static ssize_t cyc_threshold_store(struc
+       if (kstrtoul(buf, 16, &val))
+               return -EINVAL;
++
++      /* mask off max threshold before checking min value */
++      val &= ETM_CYC_THRESHOLD_MASK;
+       if (val < drvdata->ccitmin)
+               return -EINVAL;
+-      config->ccctlr = val & ETM_CYC_THRESHOLD_MASK;
++      config->ccctlr = val;
+       return size;
+ }
+ static DEVICE_ATTR_RW(cyc_threshold);
+@@ -689,14 +692,16 @@ static ssize_t bb_ctrl_store(struct devi
+               return -EINVAL;
+       if (!drvdata->nr_addr_cmp)
+               return -EINVAL;
++
+       /*
+-       * Bit[7:0] selects which address range comparator is used for
+-       * branch broadcast control.
++       * Bit[8] controls include(1) / exclude(0), bits[0-7] select
++       * individual range comparators. If include then at least 1
++       * range must be selected.
+        */
+-      if (BMVAL(val, 0, 7) > drvdata->nr_addr_cmp)
++      if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0))
+               return -EINVAL;
+-      config->bb_ctrl = val;
++      config->bb_ctrl = val & GENMASK(8, 0);
+       return size;
+ }
+ static DEVICE_ATTR_RW(bb_ctrl);
+@@ -1329,8 +1334,8 @@ static ssize_t seq_event_store(struct de
+       spin_lock(&drvdata->spinlock);
+       idx = config->seq_idx;
+-      /* RST, bits[7:0] */
+-      config->seq_ctrl[idx] = val & 0xFF;
++      /* Seq control has two masks B[15:8] F[7:0] */
++      config->seq_ctrl[idx] = val & 0xFFFF;
+       spin_unlock(&drvdata->spinlock);
+       return size;
+ }
+@@ -1585,7 +1590,7 @@ static ssize_t res_ctrl_store(struct dev
+       if (idx % 2 != 0)
+               /* PAIRINV, bit[21] */
+               val &= ~BIT(21);
+-      config->res_ctrl[idx] = val;
++      config->res_ctrl[idx] = val & GENMASK(21, 0);
+       spin_unlock(&drvdata->spinlock);
+       return size;
+ }
diff --git a/queue-4.19/input-fix-memory-leak-in-psxpad_spi_probe.patch b/queue-4.19/input-fix-memory-leak-in-psxpad_spi_probe.patch
new file mode 100644 (file)
index 0000000..fb96f58
--- /dev/null
@@ -0,0 +1,35 @@
+From navid.emamdoost@gmail.com  Mon Dec  9 13:28:47 2019
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+Date: Thu, 21 Nov 2019 14:01:11 -0600
+Subject: Input: Fix memory leak in psxpad_spi_probe
+To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Kate Stewart <kstewart@linuxfoundation.org>, Navid Emamdoost <navid.emamdoost@gmail.com>, Richard Fontana <rfontana@redhat.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Allison Randal <allison@lohutok.net>, Thomas Gleixner <tglx@linutronix.de>, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
+Cc: emamd001@umn.edu
+Message-ID: <20191121200115.24846-1-navid.emamdoost@gmail.com>
+
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+
+In the implementation of psxpad_spi_probe() the allocated memory for
+pdev is leaked if psxpad_spi_init_ff() or input_register_polled_device()
+fail. The solution is using device managed allocation, like the one used
+for pad. Perform the allocation using
+devm_input_allocate_polled_device().
+
+Fixes: 8be193c7b1f4 ("Input: add support for PlayStation 1/2 joypads connected via SPI")
+Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
+Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/input/joystick/psxpad-spi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/input/joystick/psxpad-spi.c
++++ b/drivers/input/joystick/psxpad-spi.c
+@@ -292,7 +292,7 @@ static int psxpad_spi_probe(struct spi_d
+       if (!pad)
+               return -ENOMEM;
+-      pdev = input_allocate_polled_device();
++      pdev = devm_input_allocate_polled_device(&spi->dev);
+       if (!pdev) {
+               dev_err(&spi->dev, "failed to allocate input device\n");
+               return -ENOMEM;
diff --git a/queue-4.19/input-goodix-add-upside-down-quirk-for-teclast-x89-tablet.patch b/queue-4.19/input-goodix-add-upside-down-quirk-for-teclast-x89-tablet.patch
new file mode 100644 (file)
index 0000000..6275ac5
--- /dev/null
@@ -0,0 +1,43 @@
+From df5b5e555b356662a5e4a23c6774fdfce8547d54 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 2 Dec 2019 09:36:15 -0800
+Subject: Input: goodix - add upside-down quirk for Teclast X89 tablet
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit df5b5e555b356662a5e4a23c6774fdfce8547d54 upstream.
+
+The touchscreen on the Teclast X89 is mounted upside down in relation to
+the display orientation (the touchscreen itself is mounted upright, but the
+display is mounted upside-down). Add a quirk for this so that we send
+coordinates which match the display orientation.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Bastien Nocera <hadess@hadess.net>
+Link: https://lore.kernel.org/r/20191202085636.6650-1-hdegoede@redhat.com
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/touchscreen/goodix.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/input/touchscreen/goodix.c
++++ b/drivers/input/touchscreen/goodix.c
+@@ -128,6 +128,15 @@ static const unsigned long goodix_irq_fl
+ static const struct dmi_system_id rotated_screen[] = {
+ #if defined(CONFIG_DMI) && defined(CONFIG_X86)
+       {
++              .ident = "Teclast X89",
++              .matches = {
++                      /* tPAD is too generic, also match on bios date */
++                      DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
++                      DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
++                      DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
++              },
++      },
++      {
+               .ident = "WinBook TW100",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
diff --git a/queue-4.19/input-synaptics-rmi4-don-t-increment-rmiaddr-for-smbus-transfers.patch b/queue-4.19/input-synaptics-rmi4-don-t-increment-rmiaddr-for-smbus-transfers.patch
new file mode 100644 (file)
index 0000000..2bd13b9
--- /dev/null
@@ -0,0 +1,59 @@
+From a284e11c371e446371675668d8c8120a27227339 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Date: Mon, 2 Dec 2019 10:08:12 -0800
+Subject: Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers
+
+From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+
+commit a284e11c371e446371675668d8c8120a27227339 upstream.
+
+This increment of rmi_smbus in rmi_smb_read/write_block() causes
+garbage to be read/written.
+
+The first read of SMB_MAX_COUNT bytes is fine, but after that
+it is nonsense. Trial-and-error showed that by dropping the
+increment of rmiaddr everything is fine and the F54 function
+properly works.
+
+I tried a hack with rmi_smb_write_block() as well (writing to the
+same F54 touchpad data area, then reading it back), and that
+suggests that there too the rmiaddr increment has to be dropped.
+It makes sense that if it has to be dropped for read, then it has
+to be dropped for write as well.
+
+It looks like the initial work with F54 was done using i2c, not smbus,
+and it seems nobody ever tested F54 with smbus. The other functions
+all read/write less than SMB_MAX_COUNT as far as I can tell, so this
+issue was never noticed with non-F54 functions.
+
+With this change I can read out the touchpad data correctly on my
+Lenovo X1 Carbon 6th Gen laptop.
+
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Link: https://lore.kernel.org/r/8dd22e21-4933-8e9c-a696-d281872c8de7@xs4all.nl
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/rmi4/rmi_smbus.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/input/rmi4/rmi_smbus.c
++++ b/drivers/input/rmi4/rmi_smbus.c
+@@ -166,7 +166,6 @@ static int rmi_smb_write_block(struct rm
+               /* prepare to write next block of bytes */
+               cur_len -= SMB_MAX_COUNT;
+               databuff += SMB_MAX_COUNT;
+-              rmiaddr += SMB_MAX_COUNT;
+       }
+ exit:
+       mutex_unlock(&rmi_smb->page_mutex);
+@@ -218,7 +217,6 @@ static int rmi_smb_read_block(struct rmi
+               /* prepare to read next block of bytes */
+               cur_len -= SMB_MAX_COUNT;
+               databuff += SMB_MAX_COUNT;
+-              rmiaddr += SMB_MAX_COUNT;
+       }
+       retval = 0;
diff --git a/queue-4.19/input-synaptics-rmi4-re-enable-irqs-in-f34v7_do_reflash.patch b/queue-4.19/input-synaptics-rmi4-re-enable-irqs-in-f34v7_do_reflash.patch
new file mode 100644 (file)
index 0000000..138cb80
--- /dev/null
@@ -0,0 +1,41 @@
+From 86bcd3a12999447faad60ec59c2d64d18d8e61ac Mon Sep 17 00:00:00 2001
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Mon, 2 Dec 2019 09:37:00 -0800
+Subject: Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
+
+From: Lucas Stach <l.stach@pengutronix.de>
+
+commit 86bcd3a12999447faad60ec59c2d64d18d8e61ac upstream.
+
+F34 is a bit special as it reinitializes the device and related driver
+structs during the firmware update. This clears the fn_irq_mask which
+will then prevent F34 from receiving further interrupts, leading to
+timeouts during the firmware update. Make sure to reinitialize the
+IRQ enables at the appropriate times.
+
+The issue is in F34 code, but the commit in the fixes tag exposed the
+issue, as before this commit things would work by accident.
+
+Fixes: 363c53875aef (Input: synaptics-rmi4 - avoid processing unknown IRQs)
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+Link: https://lore.kernel.org/r/20191129133514.23224-1-l.stach@pengutronix.de
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/rmi4/rmi_f34v7.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/input/rmi4/rmi_f34v7.c
++++ b/drivers/input/rmi4/rmi_f34v7.c
+@@ -1192,6 +1192,9 @@ int rmi_f34v7_do_reflash(struct f34_data
+ {
+       int ret;
++      f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev,
++                                             f34->fn->irq_mask);
++
+       rmi_f34v7_read_queries_bl_version(f34);
+       f34->v7.image = fw->data;
diff --git a/queue-4.19/input-synaptics-switch-another-x1-carbon-6-to-rmi-smbus.patch b/queue-4.19/input-synaptics-switch-another-x1-carbon-6-to-rmi-smbus.patch
new file mode 100644 (file)
index 0000000..80077da
--- /dev/null
@@ -0,0 +1,32 @@
+From fc1156f373e3927e0dcf06678906c367588bfdd6 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Date: Fri, 22 Nov 2019 16:17:08 -0800
+Subject: Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus
+
+From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+
+commit fc1156f373e3927e0dcf06678906c367588bfdd6 upstream.
+
+Some Lenovo X1 Carbon Gen 6 laptops report LEN0091. Add this
+to the smbus_pnp_ids list.
+
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20191119105118.54285-2-hverkuil-cisco@xs4all.nl
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/synaptics.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/mouse/synaptics.c
++++ b/drivers/input/mouse/synaptics.c
+@@ -175,6 +175,7 @@ static const char * const smbus_pnp_ids[
+       "LEN0071", /* T480 */
+       "LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
+       "LEN0073", /* X1 Carbon G5 (Elantech) */
++      "LEN0091", /* X1 Carbon 6 */
+       "LEN0092", /* X1 Carbon 6 */
+       "LEN0093", /* T480 */
+       "LEN0096", /* X280 */
index 03181b65e91dd87f1239f2e080e48ff38550ddbf..eb703637e935d14ee4dec57b326419e09be86e7c 100644 (file)
@@ -205,3 +205,14 @@ net-aquantia-fix-rss-table-and-key-sizes.patch
 sched-fair-scale-bandwidth-quota-and-period-without-losing-quota-period-ratio-precision.patch
 fuse-verify-nlink.patch
 fuse-verify-attributes.patch
+alsa-hda-realtek-enable-internal-speaker-of-asus-ux431flc.patch
+alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch
+alsa-hda-realtek-dell-headphone-has-noise-on-unmute-for-alc236.patch
+alsa-pcm-oss-avoid-potential-buffer-overflows.patch
+alsa-hda-add-mute-led-support-for-hp-probook-645-g4.patch
+input-synaptics-switch-another-x1-carbon-6-to-rmi-smbus.patch
+input-synaptics-rmi4-re-enable-irqs-in-f34v7_do_reflash.patch
+input-synaptics-rmi4-don-t-increment-rmiaddr-for-smbus-transfers.patch
+input-goodix-add-upside-down-quirk-for-teclast-x89-tablet.patch
+coresight-etm4x-fix-input-validation-for-sysfs.patch
+input-fix-memory-leak-in-psxpad_spi_probe.patch