]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 15:44:00 +0000 (17:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 15:44:00 +0000 (17:44 +0200)
added patches:
alsa-firewire-motu-fix-destruction-of-data-for-isochronous-resources.patch
alsa-hda-realtek-update-headset-mode-for-alc256.patch
alsa-oxfw-allow-pcm-capture-for-stanton-scs.1m.patch
drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch
hid-wacom-correct-button-numbering-2nd-gen-intuos-pro-over-bluetooth.patch
hid-wacom-sync-intuosp2_bt-touch-state-after-each-frame-if-necessary.patch
libata-extend-quirks-for-the-st1000lm024-drives-with-nolpm-quirk.patch
nouveau-fix-build-with-config_nouveau_legacy_ctx_support-disabled.patch

queue-4.14/alsa-firewire-motu-fix-destruction-of-data-for-isochronous-resources.patch [new file with mode: 0644]
queue-4.14/alsa-hda-realtek-update-headset-mode-for-alc256.patch [new file with mode: 0644]
queue-4.14/alsa-oxfw-allow-pcm-capture-for-stanton-scs.1m.patch [new file with mode: 0644]
queue-4.14/drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch [new file with mode: 0644]
queue-4.14/hid-wacom-correct-button-numbering-2nd-gen-intuos-pro-over-bluetooth.patch [new file with mode: 0644]
queue-4.14/hid-wacom-sync-intuosp2_bt-touch-state-after-each-frame-if-necessary.patch [new file with mode: 0644]
queue-4.14/libata-extend-quirks-for-the-st1000lm024-drives-with-nolpm-quirk.patch [new file with mode: 0644]
queue-4.14/nouveau-fix-build-with-config_nouveau_legacy_ctx_support-disabled.patch [new file with mode: 0644]
queue-4.14/series [new file with mode: 0644]
queue-4.19/series [new file with mode: 0644]
queue-5.1/series [new file with mode: 0644]

diff --git a/queue-4.14/alsa-firewire-motu-fix-destruction-of-data-for-isochronous-resources.patch b/queue-4.14/alsa-firewire-motu-fix-destruction-of-data-for-isochronous-resources.patch
new file mode 100644 (file)
index 0000000..e771e2b
--- /dev/null
@@ -0,0 +1,33 @@
+From 0e3fb6995bfabb23c172e8b883bf5ac57102678e Mon Sep 17 00:00:00 2001
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Date: Sat, 1 Jun 2019 12:08:01 +0900
+Subject: ALSA: firewire-motu: fix destruction of data for isochronous resources
+
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+
+commit 0e3fb6995bfabb23c172e8b883bf5ac57102678e upstream.
+
+The data for isochronous resources is not destroyed in expected place.
+This commit fixes the bug.
+
+Cc: <stable@vger.kernel.org> # v4.12+
+Fixes: 9b2bb4f2f4a2 ("ALSA: firewire-motu: add stream management functionality")
+Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/firewire/motu/motu-stream.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/firewire/motu/motu-stream.c
++++ b/sound/firewire/motu/motu-stream.c
+@@ -345,7 +345,7 @@ static void destroy_stream(struct snd_mo
+       }
+       amdtp_stream_destroy(stream);
+-      fw_iso_resources_free(resources);
++      fw_iso_resources_destroy(resources);
+ }
+ int snd_motu_stream_init_duplex(struct snd_motu *motu)
diff --git a/queue-4.14/alsa-hda-realtek-update-headset-mode-for-alc256.patch b/queue-4.14/alsa-hda-realtek-update-headset-mode-for-alc256.patch
new file mode 100644 (file)
index 0000000..5b9e659
--- /dev/null
@@ -0,0 +1,190 @@
+From 717f43d81afc1250300479075952a0e36d74ded3 Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Fri, 31 May 2019 17:16:53 +0800
+Subject: ALSA: hda/realtek - Update headset mode for ALC256
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit 717f43d81afc1250300479075952a0e36d74ded3 upstream.
+
+ALC255 and ALC256 were some difference for hidden register.
+This update was suitable for ALC256.
+
+Fixes: e69e7e03ed22 ("ALSA: hda/realtek - ALC256 speaker noise issue")
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |   75 +++++++++++++++++++++++++++++++++---------
+ 1 file changed, 60 insertions(+), 15 deletions(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -3936,18 +3936,19 @@ static struct coef_fw alc225_pre_hsmode[
+ static void alc_headset_mode_unplugged(struct hda_codec *codec)
+ {
+       static struct coef_fw coef0255[] = {
++              WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
+               WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
+               UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
+               WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
+               WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
+               {}
+       };
+-      static struct coef_fw coef0255_1[] = {
+-              WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
+-              {}
+-      };
+       static struct coef_fw coef0256[] = {
+               WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
++              WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
++              WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
++              WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */
++              UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
+               {}
+       };
+       static struct coef_fw coef0233[] = {
+@@ -4010,13 +4011,11 @@ static void alc_headset_mode_unplugged(s
+       switch (codec->core.vendor_id) {
+       case 0x10ec0255:
+-              alc_process_coef_fw(codec, coef0255_1);
+               alc_process_coef_fw(codec, coef0255);
+               break;
+       case 0x10ec0236:
+       case 0x10ec0256:
+               alc_process_coef_fw(codec, coef0256);
+-              alc_process_coef_fw(codec, coef0255);
+               break;
+       case 0x10ec0234:
+       case 0x10ec0274:
+@@ -4066,6 +4065,12 @@ static void alc_headset_mode_mic_in(stru
+               WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
+               {}
+       };
++      static struct coef_fw coef0256[] = {
++              UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
++              WRITE_COEFEX(0x57, 0x03, 0x09a3),
++              WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
++              {}
++      };
+       static struct coef_fw coef0233[] = {
+               UPDATE_COEF(0x35, 0, 1<<14),
+               WRITE_COEF(0x06, 0x2100),
+@@ -4113,14 +4118,19 @@ static void alc_headset_mode_mic_in(stru
+       };
+       switch (codec->core.vendor_id) {
+-      case 0x10ec0236:
+       case 0x10ec0255:
+-      case 0x10ec0256:
+               alc_write_coef_idx(codec, 0x45, 0xc489);
+               snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
+               alc_process_coef_fw(codec, coef0255);
+               snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
+               break;
++      case 0x10ec0236:
++      case 0x10ec0256:
++              alc_write_coef_idx(codec, 0x45, 0xc489);
++              snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
++              alc_process_coef_fw(codec, coef0256);
++              snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
++              break;
+       case 0x10ec0234:
+       case 0x10ec0274:
+       case 0x10ec0294:
+@@ -4199,6 +4209,14 @@ static void alc_headset_mode_default(str
+               WRITE_COEF(0x49, 0x0049),
+               {}
+       };
++      static struct coef_fw coef0256[] = {
++              WRITE_COEF(0x45, 0xc489),
++              WRITE_COEFEX(0x57, 0x03, 0x0da3),
++              WRITE_COEF(0x49, 0x0049),
++              UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
++              WRITE_COEF(0x06, 0x6100),
++              {}
++      };
+       static struct coef_fw coef0233[] = {
+               WRITE_COEF(0x06, 0x2100),
+               WRITE_COEF(0x32, 0x4ea3),
+@@ -4246,11 +4264,16 @@ static void alc_headset_mode_default(str
+               alc_process_coef_fw(codec, alc225_pre_hsmode);
+               alc_process_coef_fw(codec, coef0225);
+               break;
+-      case 0x10ec0236:
+       case 0x10ec0255:
+-      case 0x10ec0256:
+               alc_process_coef_fw(codec, coef0255);
+               break;
++      case 0x10ec0236:
++      case 0x10ec0256:
++              alc_write_coef_idx(codec, 0x1b, 0x0e4b);
++              alc_write_coef_idx(codec, 0x45, 0xc089);
++              msleep(50);
++              alc_process_coef_fw(codec, coef0256);
++              break;
+       case 0x10ec0234:
+       case 0x10ec0274:
+       case 0x10ec0294:
+@@ -4294,8 +4317,7 @@ static void alc_headset_mode_ctia(struct
+       };
+       static struct coef_fw coef0256[] = {
+               WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
+-              WRITE_COEF(0x1b, 0x0c6b),
+-              WRITE_COEFEX(0x57, 0x03, 0x8ea6),
++              WRITE_COEF(0x1b, 0x0e6b),
+               {}
+       };
+       static struct coef_fw coef0233[] = {
+@@ -4410,8 +4432,7 @@ static void alc_headset_mode_omtp(struct
+       };
+       static struct coef_fw coef0256[] = {
+               WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
+-              WRITE_COEF(0x1b, 0x0c6b),
+-              WRITE_COEFEX(0x57, 0x03, 0x8ea6),
++              WRITE_COEF(0x1b, 0x0e6b),
+               {}
+       };
+       static struct coef_fw coef0233[] = {
+@@ -4540,13 +4561,37 @@ static void alc_determine_headset_type(s
+       };
+       switch (codec->core.vendor_id) {
+-      case 0x10ec0236:
+       case 0x10ec0255:
++              alc_process_coef_fw(codec, coef0255);
++              msleep(300);
++              val = alc_read_coef_idx(codec, 0x46);
++              is_ctia = (val & 0x0070) == 0x0070;
++              break;
++      case 0x10ec0236:
+       case 0x10ec0256:
++              alc_write_coef_idx(codec, 0x1b, 0x0e4b);
++              alc_write_coef_idx(codec, 0x06, 0x6104);
++              alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
++
++              snd_hda_codec_write(codec, 0x21, 0,
++                          AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
++              msleep(80);
++              snd_hda_codec_write(codec, 0x21, 0,
++                          AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
++
+               alc_process_coef_fw(codec, coef0255);
+               msleep(300);
+               val = alc_read_coef_idx(codec, 0x46);
+               is_ctia = (val & 0x0070) == 0x0070;
++
++              alc_write_coefex_idx(codec, 0x57, 0x3, 0x0da3);
++              alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0);
++
++              snd_hda_codec_write(codec, 0x21, 0,
++                          AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
++              msleep(80);
++              snd_hda_codec_write(codec, 0x21, 0,
++                          AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
+               break;
+       case 0x10ec0234:
+       case 0x10ec0274:
diff --git a/queue-4.14/alsa-oxfw-allow-pcm-capture-for-stanton-scs.1m.patch b/queue-4.14/alsa-oxfw-allow-pcm-capture-for-stanton-scs.1m.patch
new file mode 100644 (file)
index 0000000..7809253
--- /dev/null
@@ -0,0 +1,38 @@
+From d8fa87c368f5b4096c4746894fdcc195da285df1 Mon Sep 17 00:00:00 2001
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Date: Sun, 9 Jun 2019 19:29:12 +0900
+Subject: ALSA: oxfw: allow PCM capture for Stanton SCS.1m
+
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+
+commit d8fa87c368f5b4096c4746894fdcc195da285df1 upstream.
+
+Stanton SCS.1m can transfer isochronous packet with Multi Bit Linear
+Audio data channels, therefore it allows software to capture PCM
+substream. However, ALSA oxfw driver doesn't.
+
+This commit changes the driver to add one PCM substream for capture
+direction.
+
+Fixes: de5126cc3c0b ("ALSA: oxfw: add stream format quirk for SCS.1 models")
+Cc: <stable@vger.kernel.org> # v4.5+
+Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/firewire/oxfw/oxfw.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/sound/firewire/oxfw/oxfw.c
++++ b/sound/firewire/oxfw/oxfw.c
+@@ -176,9 +176,6 @@ static int detect_quirks(struct snd_oxfw
+               oxfw->midi_input_ports = 0;
+               oxfw->midi_output_ports = 0;
+-              /* Output stream exists but no data channels are useful. */
+-              oxfw->has_output = false;
+-
+               return snd_oxfw_scs1x_add(oxfw);
+       }
diff --git a/queue-4.14/drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch b/queue-4.14/drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch
new file mode 100644 (file)
index 0000000..e44f419
--- /dev/null
@@ -0,0 +1,112 @@
+From b30a43ac7132cdda833ac4b13dd1ebd35ace14b7 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 18 Apr 2019 16:45:15 +1000
+Subject: drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3)
+
+From: Dave Airlie <airlied@redhat.com>
+
+commit b30a43ac7132cdda833ac4b13dd1ebd35ace14b7 upstream.
+
+There was a nouveau DDX that relied on legacy context ioctls to work,
+but we fixed it years ago, give distros that have a modern DDX the
+option to break the uAPI and close the mess of holes that legacy
+context support is.
+
+Full context of the story:
+
+commit 0e975980d435d58df2d430d688b8c18778b42218
+Author: Peter Antoine <peter.antoine@intel.com>
+Date:   Tue Jun 23 08:18:49 2015 +0100
+
+    drm: Turn off Legacy Context Functions
+
+    The context functions are not used by the i915 driver and should not
+    be used by modeset drivers. These driver functions contain several bugs
+    and security holes. This change makes these functions optional can be
+    turned on by a setting, they are turned off by default for modeset
+    driver with the exception of the nouvea driver that may require them with
+    an old version of libdrm.
+
+    The previous attempt was
+
+    commit 7c510133d93dd6f15ca040733ba7b2891ed61fd1
+    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
+    Date:   Thu Aug 8 15:41:21 2013 +0200
+
+        drm: mark context support as a legacy subsystem
+
+    but this had to be reverted
+
+    commit c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095
+    Author: Dave Airlie <airlied@redhat.com>
+    Date:   Fri Sep 20 08:32:59 2013 +1000
+
+        Revert "drm: mark context support as a legacy subsystem"
+
+    v2: remove returns from void function, and formatting (Daniel Vetter)
+
+    v3:
+    - s/Nova/nouveau/ in the commit message, and add references to the
+      previous attempts
+    - drop the part touching the drm hw lock, that should be a separate
+      patch.
+
+    Signed-off-by: Peter Antoine <peter.antoine@intel.com> (v2)
+    Cc: Peter Antoine <peter.antoine@intel.com> (v2)
+    Reviewed-by: Peter Antoine <peter.antoine@intel.com>
+    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+v2: move DRM_VM dependency into legacy config.
+v3: fix missing dep (kbuild robot)
+
+Cc: stable@vger.kernel.org
+Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/nouveau/Kconfig       |   13 ++++++++++++-
+ drivers/gpu/drm/nouveau/nouveau_drm.c |    7 +++++--
+ 2 files changed, 17 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/nouveau/Kconfig
++++ b/drivers/gpu/drm/nouveau/Kconfig
+@@ -16,10 +16,21 @@ config DRM_NOUVEAU
+       select INPUT if ACPI && X86
+       select THERMAL if ACPI && X86
+       select ACPI_VIDEO if ACPI && X86
+-      select DRM_VM
+       help
+         Choose this option for open-source NVIDIA support.
++config NOUVEAU_LEGACY_CTX_SUPPORT
++      bool "Nouveau legacy context support"
++      depends on DRM_NOUVEAU
++      select DRM_VM
++      default y
++      help
++        There was a version of the nouveau DDX that relied on legacy
++        ctx ioctls not erroring out. But that was back in time a long
++        ways, so offer a way to disable it now. For uapi compat with
++        old nouveau ddx this should be on by default, but modern distros
++        should consider turning it off.
++
+ config NOUVEAU_PLATFORM_DRIVER
+       bool "Nouveau (NVIDIA) SoC GPUs"
+       depends on DRM_NOUVEAU && ARCH_TEGRA
+--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
++++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
+@@ -967,8 +967,11 @@ nouveau_driver_fops = {
+ static struct drm_driver
+ driver_stub = {
+       .driver_features =
+-              DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER |
+-              DRIVER_KMS_LEGACY_CONTEXT,
++              DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER
++#if defined(CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT)
++              | DRIVER_KMS_LEGACY_CONTEXT
++#endif
++              ,
+       .load = nouveau_drm_load,
+       .unload = nouveau_drm_unload,
diff --git a/queue-4.14/hid-wacom-correct-button-numbering-2nd-gen-intuos-pro-over-bluetooth.patch b/queue-4.14/hid-wacom-correct-button-numbering-2nd-gen-intuos-pro-over-bluetooth.patch
new file mode 100644 (file)
index 0000000..4dc4aa5
--- /dev/null
@@ -0,0 +1,69 @@
+From 6441fc781c344df61402be1fde582c4491fa35fa Mon Sep 17 00:00:00 2001
+From: Jason Gerecke <jason.gerecke@wacom.com>
+Date: Tue, 7 May 2019 11:53:21 -0700
+Subject: HID: wacom: Correct button numbering 2nd-gen Intuos Pro over Bluetooth
+
+From: Jason Gerecke <jason.gerecke@wacom.com>
+
+commit 6441fc781c344df61402be1fde582c4491fa35fa upstream.
+
+The button numbering of the 2nd-gen Intuos Pro is not consistent between
+the USB and Bluetooth interfaces. Over USB, the HID_GENERIC codepath
+enumerates the eight ExpressKeys first (BTN_0 - BTN_7) followed by the
+center modeswitch button (BTN_8). The Bluetooth codepath, however, has
+the center modeswitch button as BTN_0 and the the eight ExpressKeys as
+BTN_1 - BTN_8. To ensure userspace button mappings do not change
+depending on how the tablet is connected, modify the Bluetooth codepath
+to report buttons in the same order as USB.
+
+To ensure the mode switch LED continues to toggle in response to the
+mode switch button, the `wacom_is_led_toggled` function also requires
+a small update.
+
+Link: https://github.com/linuxwacom/input-wacom/pull/79
+Fixes: 4922cd26f03c ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface")
+Cc: <stable@vger.kernel.org> # 4.11+
+Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
+Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/wacom_wac.c |   11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+--- a/drivers/hid/wacom_wac.c
++++ b/drivers/hid/wacom_wac.c
+@@ -1340,7 +1340,7 @@ static void wacom_intuos_pro2_bt_pad(str
+       struct input_dev *pad_input = wacom->pad_input;
+       unsigned char *data = wacom->data;
+-      int buttons = (data[282] << 1) | ((data[281] >> 6) & 0x01);
++      int buttons = data[282] | ((data[281] & 0x40) << 2);
+       int ring = data[285] & 0x7F;
+       bool ringstatus = data[285] & 0x80;
+       bool prox = buttons || ringstatus;
+@@ -3650,7 +3650,7 @@ static void wacom_24hd_update_leds(struc
+ static bool wacom_is_led_toggled(struct wacom *wacom, int button_count,
+                                int mask, int group)
+ {
+-      int button_per_group;
++      int group_button;
+       /*
+        * 21UX2 has LED group 1 to the left and LED group 0
+@@ -3660,9 +3660,12 @@ static bool wacom_is_led_toggled(struct
+       if (wacom->wacom_wac.features.type == WACOM_21UX2)
+               group = 1 - group;
+-      button_per_group = button_count/wacom->led.count;
++      group_button = group * (button_count/wacom->led.count);
+-      return mask & (1 << (group * button_per_group));
++      if (wacom->wacom_wac.features.type == INTUOSP2_BT)
++              group_button = 8;
++
++      return mask & (1 << group_button);
+ }
+ static void wacom_update_led(struct wacom *wacom, int button_count, int mask,
diff --git a/queue-4.14/hid-wacom-sync-intuosp2_bt-touch-state-after-each-frame-if-necessary.patch b/queue-4.14/hid-wacom-sync-intuosp2_bt-touch-state-after-each-frame-if-necessary.patch
new file mode 100644 (file)
index 0000000..f241c6d
--- /dev/null
@@ -0,0 +1,51 @@
+From 69dbdfffef20c715df9f381b2cee4e9e0a4efd93 Mon Sep 17 00:00:00 2001
+From: Jason Gerecke <jason.gerecke@wacom.com>
+Date: Tue, 7 May 2019 11:53:22 -0700
+Subject: HID: wacom: Sync INTUOSP2_BT touch state after each frame if necessary
+
+From: Jason Gerecke <jason.gerecke@wacom.com>
+
+commit 69dbdfffef20c715df9f381b2cee4e9e0a4efd93 upstream.
+
+The Bluetooth interface of the 2nd-gen Intuos Pro batches together four
+independent "frames" of finger data into a single report. Each frame
+is essentially equivalent to a single USB report, with the up-to-10
+fingers worth of information being spread across two frames. At the
+moment the driver only calls `input_sync` after processing all four
+frames have been processed, which can result in the driver sending
+multiple updates for a single slot within the same SYN_REPORT. This
+can confuse userspace, so modify the driver to sync more often if
+necessary (i.e., after reporting the state of all fingers).
+
+Fixes: 4922cd26f03c ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface")
+Cc: <stable@vger.kernel.org> # 4.11+
+Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/wacom_wac.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/hid/wacom_wac.c
++++ b/drivers/hid/wacom_wac.c
+@@ -1328,11 +1328,17 @@ static void wacom_intuos_pro2_bt_touch(s
+               if (wacom->num_contacts_left <= 0) {
+                       wacom->num_contacts_left = 0;
+                       wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
++                      input_sync(touch_input);
+               }
+       }
+-      input_report_switch(touch_input, SW_MUTE_DEVICE, !(data[281] >> 7));
+-      input_sync(touch_input);
++      if (wacom->num_contacts_left == 0) {
++              // Be careful that we don't accidentally call input_sync with
++              // only a partial set of fingers of processed
++              input_report_switch(touch_input, SW_MUTE_DEVICE, !(data[281] >> 7));
++              input_sync(touch_input);
++      }
++
+ }
+ static void wacom_intuos_pro2_bt_pad(struct wacom_wac *wacom)
diff --git a/queue-4.14/libata-extend-quirks-for-the-st1000lm024-drives-with-nolpm-quirk.patch b/queue-4.14/libata-extend-quirks-for-the-st1000lm024-drives-with-nolpm-quirk.patch
new file mode 100644 (file)
index 0000000..4b8a9b9
--- /dev/null
@@ -0,0 +1,42 @@
+From 31f6264e225fb92cf6f4b63031424f20797c297d Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 11 Jun 2019 16:32:59 +0200
+Subject: libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 31f6264e225fb92cf6f4b63031424f20797c297d upstream.
+
+We've received a bugreport that using LPM with ST1000LM024 drives leads
+to system lockups. So it seems that these models are buggy in more then
+1 way. Add NOLPM quirk to the existing quirks entry for BROKEN_FPDMA_AA.
+
+BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1571330
+Cc: stable@vger.kernel.org
+Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/ata/libata-core.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -4472,9 +4472,12 @@ static const struct ata_blacklist_entry
+       { "ST3320[68]13AS",     "SD1[5-9]",     ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+-      /* drives which fail FPDMA_AA activation (some may freeze afterwards) */
+-      { "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA },
+-      { "ST1000LM024 HN-M101MBB", "2BA30001", ATA_HORKAGE_BROKEN_FPDMA_AA },
++      /* drives which fail FPDMA_AA activation (some may freeze afterwards)
++         the ST disks also have LPM issues */
++      { "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA |
++                                              ATA_HORKAGE_NOLPM, },
++      { "ST1000LM024 HN-M101MBB", "2BA30001", ATA_HORKAGE_BROKEN_FPDMA_AA |
++                                              ATA_HORKAGE_NOLPM, },
+       { "VB0250EAVER",        "HPG7",         ATA_HORKAGE_BROKEN_FPDMA_AA },
+       /* Blacklist entries taken from Silicon Image 3124/3132
diff --git a/queue-4.14/nouveau-fix-build-with-config_nouveau_legacy_ctx_support-disabled.patch b/queue-4.14/nouveau-fix-build-with-config_nouveau_legacy_ctx_support-disabled.patch
new file mode 100644 (file)
index 0000000..e2ee04e
--- /dev/null
@@ -0,0 +1,54 @@
+From 0d91b155a7f9c1f4a2b360bc2b79dc728aee8b48 Mon Sep 17 00:00:00 2001
+From: Thomas Backlund <tmb@mageia.org>
+Date: Sat, 15 Jun 2019 12:22:44 +0300
+Subject: nouveau: Fix build with CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT disabled
+
+From: Thomas Backlund <tmb@mageia.org>
+
+Not-entirely-upstream-sha1-but-equivalent: bed2dd8421
+("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()")
+
+Setting CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n (added by commit: b30a43ac7132)
+causes the build to fail with:
+
+ERROR: "drm_legacy_mmap" [drivers/gpu/drm/nouveau/nouveau.ko] undefined!
+
+This does not happend upstream as the offending code got removed in:
+bed2dd8421 ("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()")
+
+Fix that by adding check for CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT around
+the drm_legacy_mmap() call.
+
+Also, as Sven Joachim pointed out, we need to make the check in
+CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n case return -EINVAL as its done
+for basically all other gpu drivers, especially in upstream kernels
+drivers/gpu/drm/ttm/ttm_bo_vm.c as of the upstream commit bed2dd8421.
+
+NOTE. This is a minimal stable-only fix for trees where b30a43ac7132 is
+backported as the build error affects nouveau only.
+
+Fixes: b30a43ac7132 ("drm/nouveau: add kconfig option to turn off nouveau
+       legacy contexts. (v3)")
+Signed-off-by: Thomas Backlund <tmb@mageia.org>
+Cc: stable@vger.kernel.org
+Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
+Cc: Sven Joachim <svenjoac@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/nouveau/nouveau_ttm.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
++++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
+@@ -273,7 +273,11 @@ nouveau_ttm_mmap(struct file *filp, stru
+       struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev);
+       if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
++#if defined(CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT)
+               return drm_legacy_mmap(filp, vma);
++#else
++              return -EINVAL;
++#endif
+       return ttm_bo_mmap(filp, vma, &drm->ttm.bdev);
+ }
diff --git a/queue-4.14/series b/queue-4.14/series
new file mode 100644 (file)
index 0000000..e11ff97
--- /dev/null
@@ -0,0 +1,8 @@
+drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch
+nouveau-fix-build-with-config_nouveau_legacy_ctx_support-disabled.patch
+hid-wacom-correct-button-numbering-2nd-gen-intuos-pro-over-bluetooth.patch
+hid-wacom-sync-intuosp2_bt-touch-state-after-each-frame-if-necessary.patch
+alsa-oxfw-allow-pcm-capture-for-stanton-scs.1m.patch
+alsa-hda-realtek-update-headset-mode-for-alc256.patch
+alsa-firewire-motu-fix-destruction-of-data-for-isochronous-resources.patch
+libata-extend-quirks-for-the-st1000lm024-drives-with-nolpm-quirk.patch
diff --git a/queue-4.19/series b/queue-4.19/series
new file mode 100644 (file)
index 0000000..119945a
--- /dev/null
@@ -0,0 +1,13 @@
+drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch
+nouveau-fix-build-with-config_nouveau_legacy_ctx_support-disabled.patch
+hid-multitouch-handle-faulty-elo-touch-device.patch
+hid-wacom-don-t-set-tool-type-until-we-re-in-range.patch
+hid-wacom-don-t-report-anything-prior-to-the-tool-entering-range.patch
+hid-wacom-send-btn_touch-in-response-to-intuosp2_bt-eraser-contact.patch
+hid-wacom-correct-button-numbering-2nd-gen-intuos-pro-over-bluetooth.patch
+hid-wacom-sync-intuosp2_bt-touch-state-after-each-frame-if-necessary.patch
+revert-alsa-hda-realtek-improve-the-headset-mic-for-acer-aspire-laptops.patch
+alsa-oxfw-allow-pcm-capture-for-stanton-scs.1m.patch
+alsa-hda-realtek-update-headset-mode-for-alc256.patch
+alsa-firewire-motu-fix-destruction-of-data-for-isochronous-resources.patch
+libata-extend-quirks-for-the-st1000lm024-drives-with-nolpm-quirk.patch
diff --git a/queue-5.1/series b/queue-5.1/series
new file mode 100644 (file)
index 0000000..9dc3d11
--- /dev/null
@@ -0,0 +1,21 @@
+drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch
+nouveau-fix-build-with-config_nouveau_legacy_ctx_support-disabled.patch
+hid-input-make-sure-the-wheel-high-resolution-multiplier-is-set.patch
+hid-input-fix-assignment-of-.value.patch
+revert-hid-increase-maximum-report-size-allowed-by-hid_field_extract.patch
+hid-multitouch-handle-faulty-elo-touch-device.patch
+hid-wacom-don-t-set-tool-type-until-we-re-in-range.patch
+hid-wacom-don-t-report-anything-prior-to-the-tool-entering-range.patch
+hid-wacom-send-btn_touch-in-response-to-intuosp2_bt-eraser-contact.patch
+hid-wacom-correct-button-numbering-2nd-gen-intuos-pro-over-bluetooth.patch
+hid-wacom-sync-intuosp2_bt-touch-state-after-each-frame-if-necessary.patch
+revert-alsa-hda-realtek-improve-the-headset-mic-for-acer-aspire-laptops.patch
+alsa-oxfw-allow-pcm-capture-for-stanton-scs.1m.patch
+alsa-ice1712-check-correct-return-value-to-snd_i2c_sendbytes-ews-dmx-6fire.patch
+alsa-hda-realtek-update-headset-mode-for-alc256.patch
+alsa-firewire-motu-fix-destruction-of-data-for-isochronous-resources.patch
+selinux-log-raw-contexts-as-untrusted-strings.patch
+selinux-fix-a-missing-check-bug-in-selinux_add_mnt_opt.patch
+selinux-fix-a-missing-check-bug-in-selinux_sb_eat_lsm_opts.patch
+libata-extend-quirks-for-the-st1000lm024-drives-with-nolpm-quirk.patch
+io_uring-fix-memory-leak-of-unix-domain-socket-inode.patch