]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2020 12:00:59 +0000 (14:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2020 12:00:59 +0000 (14:00 +0200)
added patches:
alsa-hda-fixup-headset-for-asus-gx502-laptop.patch
alsa-hda-realtek-the-mic-on-a-redmibook-doesn-t-work.patch
drm-i915-filter-wake_flags-passed-to-default_wake_function.patch
drm-i915-gem-delay-tracking-the-gem-context-until-it-is-registered.patch
drm-kfd-fix-a-system-crash-issue-during-gpu-recovery.patch
i2c-i801-fix-resume-bug.patch
revert-alsa-hda-fix-silent-audio-output-and-corrupted.patch
usb-quirks-add-usb_quirk_ignore_remote_wakeup-quirk-for-byd-zhaoxin-notebook.patch
usb-typec-ucsi-acpi-increase-command-completion-timeout-value.patch
usb-typec-ucsi-prevent-mode-overrun.patch
usb-uas-fix-disconnect-by-unplugging-a-hub.patch
usblp-fix-race-between-disconnect-and-read.patch

13 files changed:
queue-5.8/alsa-hda-fixup-headset-for-asus-gx502-laptop.patch [new file with mode: 0644]
queue-5.8/alsa-hda-realtek-the-mic-on-a-redmibook-doesn-t-work.patch [new file with mode: 0644]
queue-5.8/drm-i915-filter-wake_flags-passed-to-default_wake_function.patch [new file with mode: 0644]
queue-5.8/drm-i915-gem-delay-tracking-the-gem-context-until-it-is-registered.patch [new file with mode: 0644]
queue-5.8/drm-kfd-fix-a-system-crash-issue-during-gpu-recovery.patch [new file with mode: 0644]
queue-5.8/i2c-i801-fix-resume-bug.patch [new file with mode: 0644]
queue-5.8/revert-alsa-hda-fix-silent-audio-output-and-corrupted.patch [new file with mode: 0644]
queue-5.8/series
queue-5.8/usb-quirks-add-usb_quirk_ignore_remote_wakeup-quirk-for-byd-zhaoxin-notebook.patch [new file with mode: 0644]
queue-5.8/usb-typec-ucsi-acpi-increase-command-completion-timeout-value.patch [new file with mode: 0644]
queue-5.8/usb-typec-ucsi-prevent-mode-overrun.patch [new file with mode: 0644]
queue-5.8/usb-uas-fix-disconnect-by-unplugging-a-hub.patch [new file with mode: 0644]
queue-5.8/usblp-fix-race-between-disconnect-and-read.patch [new file with mode: 0644]

diff --git a/queue-5.8/alsa-hda-fixup-headset-for-asus-gx502-laptop.patch b/queue-5.8/alsa-hda-fixup-headset-for-asus-gx502-laptop.patch
new file mode 100644 (file)
index 0000000..32693d6
--- /dev/null
@@ -0,0 +1,120 @@
+From c3cdf189276c2a63da62ee250615bd55e3fb680d Mon Sep 17 00:00:00 2001
+From: Luke D Jones <luke@ljones.dev>
+Date: Mon, 7 Sep 2020 20:19:59 +1200
+Subject: ALSA: hda: fixup headset for ASUS GX502 laptop
+
+From: Luke D Jones <luke@ljones.dev>
+
+commit c3cdf189276c2a63da62ee250615bd55e3fb680d upstream.
+
+The GX502 requires a few steps to enable the headset i/o: pincfg,
+verbs to enable and unmute the amp used for headpone out, and
+a jacksense callback to toggle output via internal or jack using
+a verb.
+
+Signed-off-by: Luke D Jones <luke@ljones.dev>
+Cc: <stable@vger.kernel.org>
+BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208005
+Link: https://lore.kernel.org/r/20200907081959.56186-1-luke@ljones.dev
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |   65 ++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 65 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -6004,6 +6004,40 @@ static void alc_fixup_disable_mic_vref(s
+               snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
+ }
++
++static void alc294_gx502_toggle_output(struct hda_codec *codec,
++                                      struct hda_jack_callback *cb)
++{
++      /* The Windows driver sets the codec up in a very different way where
++       * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
++       */
++      if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
++              alc_write_coef_idx(codec, 0x10, 0x8a20);
++      else
++              alc_write_coef_idx(codec, 0x10, 0x0a20);
++}
++
++static void alc294_fixup_gx502_hp(struct hda_codec *codec,
++                                      const struct hda_fixup *fix, int action)
++{
++      /* Pin 0x21: headphones/headset mic */
++      if (!is_jack_detectable(codec, 0x21))
++              return;
++
++      switch (action) {
++      case HDA_FIXUP_ACT_PRE_PROBE:
++              snd_hda_jack_detect_enable_callback(codec, 0x21,
++                              alc294_gx502_toggle_output);
++              break;
++      case HDA_FIXUP_ACT_INIT:
++              /* Make sure to start in a correct state, i.e. if
++               * headphones have been plugged in before powering up the system
++               */
++              alc294_gx502_toggle_output(codec, NULL);
++              break;
++      }
++}
++
+ static void  alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
+                             const struct hda_fixup *fix, int action)
+ {
+@@ -6184,6 +6218,9 @@ enum {
+       ALC285_FIXUP_THINKPAD_HEADSET_JACK,
+       ALC294_FIXUP_ASUS_HPE,
+       ALC294_FIXUP_ASUS_COEF_1B,
++      ALC294_FIXUP_ASUS_GX502_HP,
++      ALC294_FIXUP_ASUS_GX502_PINS,
++      ALC294_FIXUP_ASUS_GX502_VERBS,
+       ALC285_FIXUP_HP_GPIO_LED,
+       ALC285_FIXUP_HP_MUTE_LED,
+       ALC236_FIXUP_HP_MUTE_LED,
+@@ -7349,6 +7386,33 @@ static const struct hda_fixup alc269_fix
+               .chained = true,
+               .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
+       },
++      [ALC294_FIXUP_ASUS_GX502_PINS] = {
++              .type = HDA_FIXUP_PINS,
++              .v.pins = (const struct hda_pintbl[]) {
++                      { 0x19, 0x03a11050 }, /* front HP mic */
++                      { 0x1a, 0x01a11830 }, /* rear external mic */
++                      { 0x21, 0x03211020 }, /* front HP out */
++                      { }
++              },
++              .chained = true,
++              .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS
++      },
++      [ALC294_FIXUP_ASUS_GX502_VERBS] = {
++              .type = HDA_FIXUP_VERBS,
++              .v.verbs = (const struct hda_verb[]) {
++                      /* set 0x15 to HP-OUT ctrl */
++                      { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
++                      /* unmute the 0x15 amp */
++                      { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
++                      { }
++              },
++              .chained = true,
++              .chain_id = ALC294_FIXUP_ASUS_GX502_HP
++      },
++      [ALC294_FIXUP_ASUS_GX502_HP] = {
++              .type = HDA_FIXUP_FUNC,
++              .v.func = alc294_fixup_gx502_hp,
++      },
+       [ALC294_FIXUP_ASUS_COEF_1B] = {
+               .type = HDA_FIXUP_VERBS,
+               .v.verbs = (const struct hda_verb[]) {
+@@ -7722,6 +7786,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
+       SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
+       SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
++      SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
+       SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
+       SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
+       SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
diff --git a/queue-5.8/alsa-hda-realtek-the-mic-on-a-redmibook-doesn-t-work.patch b/queue-5.8/alsa-hda-realtek-the-mic-on-a-redmibook-doesn-t-work.patch
new file mode 100644 (file)
index 0000000..726b017
--- /dev/null
@@ -0,0 +1,71 @@
+From fc19d559b0d31b5b831fd468b10d7dadafc0d0ec Mon Sep 17 00:00:00 2001
+From: Hui Wang <hui.wang@canonical.com>
+Date: Wed, 9 Sep 2020 10:00:41 +0800
+Subject: ALSA: hda/realtek - The Mic on a RedmiBook doesn't work
+
+From: Hui Wang <hui.wang@canonical.com>
+
+commit fc19d559b0d31b5b831fd468b10d7dadafc0d0ec upstream.
+
+The Mic connects to the Nid 0x19, but the configuration of Nid 0x19
+is not defined to Mic, and also need to set the coeff to enable the
+auto detection on the Nid 0x19. After this change, the Mic plugging
+in or plugging out could be detected and could record the sound from
+the Mic.
+
+And the coeff value is suggested by Kailang of Realtek.
+
+Cc: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Hui Wang <hui.wang@canonical.com>
+Link: https://lore.kernel.org/r/20200909020041.8967-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 |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -6239,6 +6239,7 @@ enum {
+       ALC269_FIXUP_LEMOTE_A1802,
+       ALC269_FIXUP_LEMOTE_A190X,
+       ALC256_FIXUP_INTEL_NUC8_RUGGED,
++      ALC255_FIXUP_XIAOMI_HEADSET_MIC,
+ };
+ static const struct hda_fixup alc269_fixups[] = {
+@@ -7602,6 +7603,16 @@ static const struct hda_fixup alc269_fix
+               .chained = true,
+               .chain_id = ALC269_FIXUP_HEADSET_MODE
+       },
++      [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = {
++              .type = HDA_FIXUP_VERBS,
++              .v.verbs = (const struct hda_verb[]) {
++                      { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
++                      { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
++                      { }
++              },
++              .chained = true,
++              .chain_id = ALC289_FIXUP_ASUS_GA401
++      },
+ };
+ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+@@ -7899,6 +7910,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
+       SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
+       SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
++      SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
+       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),
+       SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
+@@ -8076,6 +8088,7 @@ static const struct hda_model_fixup alc2
+       {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
+       {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
+       {.id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc298-samsung-headphone"},
++      {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
+       {}
+ };
+ #define ALC225_STANDARD_PINS \
diff --git a/queue-5.8/drm-i915-filter-wake_flags-passed-to-default_wake_function.patch b/queue-5.8/drm-i915-filter-wake_flags-passed-to-default_wake_function.patch
new file mode 100644 (file)
index 0000000..4ca4847
--- /dev/null
@@ -0,0 +1,57 @@
+From 20612303a0b45de748d31331407e84300c38e497 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue, 28 Jul 2020 16:21:44 +0100
+Subject: drm/i915: Filter wake_flags passed to default_wake_function
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 20612303a0b45de748d31331407e84300c38e497 upstream.
+
+(NOTE: This is the minimal backportable fix, a full fix is being
+developed at https://patchwork.freedesktop.org/patch/388048/)
+
+The flags passed to the wait_entry.func are passed onwards to
+try_to_wake_up(), which has a very particular interpretation for its
+wake_flags. In particular, beyond the published WF_SYNC, it has a few
+internal flags as well. Since we passed the fence->error down the chain
+via the flags argument, these ended up in the default_wake_function
+confusing the kernel/sched.
+
+Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2110
+Fixes: ef4688497512 ("drm/i915: Propagate fence errors")
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Matthew Auld <matthew.auld@intel.com>
+Cc: <stable@vger.kernel.org> # v5.4+
+Reviewed-by: Matthew Auld <matthew.auld@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20200728152144.1100-1-chris@chris-wilson.co.uk
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+[Joonas: Rebased and reordered into drm-intel-gt-next branch]
+[Joonas: Added a note and link about more complete fix]
+Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+(cherry picked from commit f4b3c395540aa3d4f5a6275c5bdd83ab89034806)
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_sw_fence.c |   10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i915/i915_sw_fence.c
++++ b/drivers/gpu/drm/i915/i915_sw_fence.c
+@@ -164,9 +164,13 @@ static void __i915_sw_fence_wake_up_all(
+               do {
+                       list_for_each_entry_safe(pos, next, &x->head, entry) {
+-                              pos->func(pos,
+-                                        TASK_NORMAL, fence->error,
+-                                        &extra);
++                              int wake_flags;
++
++                              wake_flags = fence->error;
++                              if (pos->func == autoremove_wake_function)
++                                      wake_flags = 0;
++
++                              pos->func(pos, TASK_NORMAL, wake_flags, &extra);
+                       }
+                       if (list_empty(&extra))
diff --git a/queue-5.8/drm-i915-gem-delay-tracking-the-gem-context-until-it-is-registered.patch b/queue-5.8/drm-i915-gem-delay-tracking-the-gem-context-until-it-is-registered.patch
new file mode 100644 (file)
index 0000000..cdc2143
--- /dev/null
@@ -0,0 +1,81 @@
+From e7d95527f27a6d9edcffbd74eee38e5cb6b91785 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 30 Jul 2020 10:28:56 +0100
+Subject: drm/i915/gem: Delay tracking the GEM context until it is registered
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit e7d95527f27a6d9edcffbd74eee38e5cb6b91785 upstream.
+
+Avoid exposing a partially constructed context by deferring the
+list_add() from the initial construction to the end of registration.
+Otherwise, if we peek into the list of contexts from inside debugfs, we
+may see the partially constructed context and chase down some dangling
+incomplete pointers.
+
+Reported-by: CQ Tang <cq.tang@intel.com>
+Fixes: 3aa9945a528e ("drm/i915: Separate GEM context construction and registration to userspace")
+References: f6e8aa387171 ("drm/i915: Report the number of closed vma held by each context in debugfs")
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+Cc: CQ Tang <cq.tang@intel.com>
+Cc: <stable@vger.kernel.org> # v5.2+
+Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20200730092856.23615-1-chris@chris-wilson.co.uk
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+(cherry picked from commit eb4dedae920a07c485328af3da2202ec5184fb17)
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/gem/i915_gem_context.c |   16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
++++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
+@@ -720,6 +720,7 @@ __create_context(struct drm_i915_private
+       ctx->i915 = i915;
+       ctx->sched.priority = I915_USER_PRIORITY(I915_PRIORITY_NORMAL);
+       mutex_init(&ctx->mutex);
++      INIT_LIST_HEAD(&ctx->link);
+       spin_lock_init(&ctx->stale.lock);
+       INIT_LIST_HEAD(&ctx->stale.engines);
+@@ -746,10 +747,6 @@ __create_context(struct drm_i915_private
+       for (i = 0; i < ARRAY_SIZE(ctx->hang_timestamp); i++)
+               ctx->hang_timestamp[i] = jiffies - CONTEXT_FAST_HANG_JIFFIES;
+-      spin_lock(&i915->gem.contexts.lock);
+-      list_add_tail(&ctx->link, &i915->gem.contexts.list);
+-      spin_unlock(&i915->gem.contexts.lock);
+-
+       return ctx;
+ err_free:
+@@ -937,6 +934,7 @@ static int gem_context_register(struct i
+                               struct drm_i915_file_private *fpriv,
+                               u32 *id)
+ {
++      struct drm_i915_private *i915 = ctx->i915;
+       struct i915_address_space *vm;
+       int ret;
+@@ -955,8 +953,16 @@ static int gem_context_register(struct i
+       /* And finally expose ourselves to userspace via the idr */
+       ret = xa_alloc(&fpriv->context_xa, id, ctx, xa_limit_32b, GFP_KERNEL);
+       if (ret)
+-              put_pid(fetch_and_zero(&ctx->pid));
++              goto err_pid;
++
++      spin_lock(&i915->gem.contexts.lock);
++      list_add_tail(&ctx->link, &i915->gem.contexts.list);
++      spin_unlock(&i915->gem.contexts.lock);
++
++      return 0;
++err_pid:
++      put_pid(fetch_and_zero(&ctx->pid));
+       return ret;
+ }
diff --git a/queue-5.8/drm-kfd-fix-a-system-crash-issue-during-gpu-recovery.patch b/queue-5.8/drm-kfd-fix-a-system-crash-issue-during-gpu-recovery.patch
new file mode 100644 (file)
index 0000000..f8acda7
--- /dev/null
@@ -0,0 +1,69 @@
+From 66a5710beaf42903d553378f609166034bd219c7 Mon Sep 17 00:00:00 2001
+From: Dennis Li <Dennis.Li@amd.com>
+Date: Wed, 2 Sep 2020 12:57:59 +0800
+Subject: drm/kfd: fix a system crash issue during GPU recovery
+
+From: Dennis Li <Dennis.Li@amd.com>
+
+commit 66a5710beaf42903d553378f609166034bd219c7 upstream.
+
+The crash log as the below:
+
+[Thu Aug 20 23:18:14 2020] general protection fault: 0000 [#1] SMP NOPTI
+[Thu Aug 20 23:18:14 2020] CPU: 152 PID: 1837 Comm: kworker/152:1 Tainted: G           OE     5.4.0-42-generic #46~18.04.1-Ubuntu
+[Thu Aug 20 23:18:14 2020] Hardware name: GIGABYTE G482-Z53-YF/MZ52-G40-00, BIOS R12 05/13/2020
+[Thu Aug 20 23:18:14 2020] Workqueue: events amdgpu_ras_do_recovery [amdgpu]
+[Thu Aug 20 23:18:14 2020] RIP: 0010:evict_process_queues_cpsch+0xc9/0x130 [amdgpu]
+[Thu Aug 20 23:18:14 2020] Code: 49 8d 4d 10 48 39 c8 75 21 eb 44 83 fa 03 74 36 80 78 72 00 74 0c 83 ab 68 01 00 00 01 41 c6 45 41 00 48 8b 00 48 39 c8 74 25 <80> 78 70 00 c6 40 6d 01 74 ee 8b 50 28 c6 40 70 00 83 ab 60 01 00
+[Thu Aug 20 23:18:14 2020] RSP: 0018:ffffb29b52f6fc90 EFLAGS: 00010213
+[Thu Aug 20 23:18:14 2020] RAX: 1c884edb0a118914 RBX: ffff8a0d45ff3c00 RCX: ffff8a2d83e41038
+[Thu Aug 20 23:18:14 2020] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff8a0e2e4178c0
+[Thu Aug 20 23:18:14 2020] RBP: ffffb29b52f6fcb0 R08: 0000000000001b64 R09: 0000000000000004
+[Thu Aug 20 23:18:14 2020] R10: ffffb29b52f6fb78 R11: 0000000000000001 R12: ffff8a0d45ff3d28
+[Thu Aug 20 23:18:14 2020] R13: ffff8a2d83e41028 R14: 0000000000000000 R15: 0000000000000000
+[Thu Aug 20 23:18:14 2020] FS:  0000000000000000(0000) GS:ffff8a0e2e400000(0000) knlGS:0000000000000000
+[Thu Aug 20 23:18:14 2020] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+[Thu Aug 20 23:18:14 2020] CR2: 000055c783c0e6a8 CR3: 00000034a1284000 CR4: 0000000000340ee0
+[Thu Aug 20 23:18:14 2020] Call Trace:
+[Thu Aug 20 23:18:14 2020]  kfd_process_evict_queues+0x43/0xd0 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  kfd_suspend_all_processes+0x60/0xf0 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  kgd2kfd_suspend.part.7+0x43/0x50 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  kgd2kfd_pre_reset+0x46/0x60 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  amdgpu_amdkfd_pre_reset+0x1a/0x20 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  amdgpu_device_gpu_recover+0x377/0xf90 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  ? amdgpu_ras_error_query+0x1b8/0x2a0 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  amdgpu_ras_do_recovery+0x159/0x190 [amdgpu]
+[Thu Aug 20 23:18:14 2020]  process_one_work+0x20f/0x400
+[Thu Aug 20 23:18:14 2020]  worker_thread+0x34/0x410
+
+When GPU hang, user process will fail to create a compute queue whose
+struct object will be freed later, but driver wrongly add this queue to
+queue list of the proccess. And then kfd_process_evict_queues will
+access a freed memory, which cause a system crash.
+
+v2:
+The failure to execute_queues should probably not be reported to
+the caller of create_queue, because the queue was already created.
+Therefore change to ignore the return value from execute_queues.
+
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Signed-off-by: Dennis Li <Dennis.Li@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+@@ -1287,7 +1287,7 @@ static int create_queue_cpsch(struct dev
+       if (q->properties.is_active) {
+               increment_queue_count(dqm, q->properties.type);
+-              retval = execute_queues_cpsch(dqm,
++              execute_queues_cpsch(dqm,
+                               KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
+       }
diff --git a/queue-5.8/i2c-i801-fix-resume-bug.patch b/queue-5.8/i2c-i801-fix-resume-bug.patch
new file mode 100644 (file)
index 0000000..e8568e4
--- /dev/null
@@ -0,0 +1,73 @@
+From 66d402e2e9455cf0213c42b97f22a0493372d7cc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Volker=20R=C3=BCmelin?= <vr_qemu@t-online.de>
+Date: Tue, 1 Sep 2020 15:22:21 +0200
+Subject: i2c: i801: Fix resume bug
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Volker RĂ¼melin <vr_qemu@t-online.de>
+
+commit 66d402e2e9455cf0213c42b97f22a0493372d7cc upstream.
+
+On suspend the original host configuration gets restored. The
+resume routine has to undo this, otherwise the SMBus master
+may be left in disabled state or in i2c mode.
+
+[JD: Rebased on v5.8, moved the write into i801_setup_hstcfg.]
+
+Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de>
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/i2c/busses/i2c-i801.c |   21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-i801.c
++++ b/drivers/i2c/busses/i2c-i801.c
+@@ -1706,6 +1706,16 @@ static inline int i801_acpi_probe(struct
+ static inline void i801_acpi_remove(struct i801_priv *priv) { }
+ #endif
++static unsigned char i801_setup_hstcfg(struct i801_priv *priv)
++{
++      unsigned char hstcfg = priv->original_hstcfg;
++
++      hstcfg &= ~SMBHSTCFG_I2C_EN;    /* SMBus timing */
++      hstcfg |= SMBHSTCFG_HST_EN;
++      pci_write_config_byte(priv->pci_dev, SMBHSTCFG, hstcfg);
++      return hstcfg;
++}
++
+ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
+ {
+       unsigned char temp;
+@@ -1826,14 +1836,10 @@ static int i801_probe(struct pci_dev *de
+               return err;
+       }
+-      pci_read_config_byte(priv->pci_dev, SMBHSTCFG, &temp);
+-      priv->original_hstcfg = temp;
+-      temp &= ~SMBHSTCFG_I2C_EN;      /* SMBus timing */
+-      if (!(temp & SMBHSTCFG_HST_EN)) {
++      pci_read_config_byte(priv->pci_dev, SMBHSTCFG, &priv->original_hstcfg);
++      temp = i801_setup_hstcfg(priv);
++      if (!(priv->original_hstcfg & SMBHSTCFG_HST_EN))
+               dev_info(&dev->dev, "Enabling SMBus device\n");
+-              temp |= SMBHSTCFG_HST_EN;
+-      }
+-      pci_write_config_byte(priv->pci_dev, SMBHSTCFG, temp);
+       if (temp & SMBHSTCFG_SMB_SMI_EN) {
+               dev_dbg(&dev->dev, "SMBus using interrupt SMI#\n");
+@@ -1959,6 +1965,7 @@ static int i801_resume(struct device *de
+ {
+       struct i801_priv *priv = dev_get_drvdata(dev);
++      i801_setup_hstcfg(priv);
+       i801_enable_host_notify(&priv->adapter);
+       return 0;
diff --git a/queue-5.8/revert-alsa-hda-fix-silent-audio-output-and-corrupted.patch b/queue-5.8/revert-alsa-hda-fix-silent-audio-output-and-corrupted.patch
new file mode 100644 (file)
index 0000000..9a1289c
--- /dev/null
@@ -0,0 +1,31 @@
+From 0342d2342b24547ff8ec3e12f9148a9fd681481f Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 21 Sep 2020 13:55:28 +0200
+Subject: Revert "ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 8e83bd51016a35492c58e28312420e60ba8873f1 which is
+commit 15cbff3fbbc631952c346744f862fb294504b5e2 upstream.
+
+It causes know regressions and will be reverted in Linus's tree soon.
+
+Reported-by: Hans de Goede <hdegoede@redhat.com>
+Cc: Dan Crawford <dnlcrwfrd@gmail.com>
+Cc: Takashi Iwai <tiwai@suse.de>
+Link: https://lore.kernel.org/r/7efd2fe5-bf38-7f85-891a-eee3845d1493@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -2467,7 +2467,6 @@ static const struct snd_pci_quirk alc882
+       SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950),
+       SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
+       SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
+-      SND_PCI_QUIRK(0x1462, 0x9c37, "MSI X570-A PRO", ALC1220_FIXUP_CLEVO_P950),
+       SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
+       SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
+       SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
index 4a4e8c8b787a413a9430d395e53a988cf763edb5..16756cb9b7540879babb3eeec879a261c85a982f 100644 (file)
@@ -80,3 +80,15 @@ locking-lockdep-fix-used-in-nmi-inversions.patch
 efi-efibc-check-for-efivars-write-capability.patch
 locking-percpu-rwsem-use-this_cpu_-inc-dec-for-read_.patch
 x86-unwind-fp-fix-fp-unwinding-in-ret_from_fork.patch
+drm-kfd-fix-a-system-crash-issue-during-gpu-recovery.patch
+drm-i915-gem-delay-tracking-the-gem-context-until-it-is-registered.patch
+drm-i915-filter-wake_flags-passed-to-default_wake_function.patch
+usb-quirks-add-usb_quirk_ignore_remote_wakeup-quirk-for-byd-zhaoxin-notebook.patch
+usb-uas-fix-disconnect-by-unplugging-a-hub.patch
+usblp-fix-race-between-disconnect-and-read.patch
+usb-typec-ucsi-acpi-increase-command-completion-timeout-value.patch
+usb-typec-ucsi-prevent-mode-overrun.patch
+i2c-i801-fix-resume-bug.patch
+revert-alsa-hda-fix-silent-audio-output-and-corrupted.patch
+alsa-hda-fixup-headset-for-asus-gx502-laptop.patch
+alsa-hda-realtek-the-mic-on-a-redmibook-doesn-t-work.patch
diff --git a/queue-5.8/usb-quirks-add-usb_quirk_ignore_remote_wakeup-quirk-for-byd-zhaoxin-notebook.patch b/queue-5.8/usb-quirks-add-usb_quirk_ignore_remote_wakeup-quirk-for-byd-zhaoxin-notebook.patch
new file mode 100644 (file)
index 0000000..0ae3263
--- /dev/null
@@ -0,0 +1,35 @@
+From bcea6dafeeef7d1a6a8320a249aabf981d63b881 Mon Sep 17 00:00:00 2001
+From: Penghao <penghao@uniontech.com>
+Date: Mon, 7 Sep 2020 10:30:26 +0800
+Subject: USB: quirks: Add USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for BYD zhaoxin notebook
+
+From: Penghao <penghao@uniontech.com>
+
+commit bcea6dafeeef7d1a6a8320a249aabf981d63b881 upstream.
+
+Add a USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for the BYD zhaoxin notebook.
+This notebook come with usb touchpad. And we would like to disable
+touchpad wakeup on this notebook by default.
+
+Signed-off-by: Penghao <penghao@uniontech.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200907023026.28189-1-penghao@uniontech.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/quirks.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -397,6 +397,10 @@ static const struct usb_device_id usb_qu
+       /* Generic RTL8153 based ethernet adapters */
+       { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM },
++      /* SONiX USB DEVICE Touchpad */
++      { USB_DEVICE(0x0c45, 0x7056), .driver_info =
++                      USB_QUIRK_IGNORE_REMOTE_WAKEUP },
++
+       /* Action Semiconductor flash disk */
+       { USB_DEVICE(0x10d6, 0x2200), .driver_info =
+                       USB_QUIRK_STRING_FETCH_255 },
diff --git a/queue-5.8/usb-typec-ucsi-acpi-increase-command-completion-timeout-value.patch b/queue-5.8/usb-typec-ucsi-acpi-increase-command-completion-timeout-value.patch
new file mode 100644 (file)
index 0000000..937603a
--- /dev/null
@@ -0,0 +1,48 @@
+From 130a96d698d7bee9f339832d1e47ab26aad8dbf1 Mon Sep 17 00:00:00 2001
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Date: Wed, 16 Sep 2020 12:00:33 +0300
+Subject: usb: typec: ucsi: acpi: Increase command completion timeout value
+
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+
+commit 130a96d698d7bee9f339832d1e47ab26aad8dbf1 upstream.
+
+UCSI specification quite clearly states that if a command
+can't be completed in 10ms, the firmware must notify
+about BUSY condition. Unfortunately almost none of the
+platforms (the firmware on them) generate the BUSY
+notification even if a command can't be completed in time.
+
+The driver already considered that, and used a timeout
+value of 5 seconds, but processing especially the alternate
+mode discovery commands takes often considerable amount of
+time from the firmware, much more than the 5 seconds. That
+happens especially after bootup when devices are already
+connected to the USB Type-C connector. For now on those
+platforms the alternate mode discovery has simply failed
+because of the timeout.
+
+To improve the situation, increasing the timeout value for
+the command completion to 1 minute. That should give enough
+time for even the slowest firmware to process the commands.
+
+Fixes: f56de278e8ec ("usb: typec: ucsi: acpi: Move to the new API")
+Cc: stable@vger.kernel.org
+Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20200916090034.25119-2-heikki.krogerus@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/ucsi/ucsi_acpi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/typec/ucsi/ucsi_acpi.c
++++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
+@@ -78,7 +78,7 @@ static int ucsi_acpi_sync_write(struct u
+       if (ret)
+               goto out_clear_bit;
+-      if (!wait_for_completion_timeout(&ua->complete, msecs_to_jiffies(5000)))
++      if (!wait_for_completion_timeout(&ua->complete, 60 * HZ))
+               ret = -ETIMEDOUT;
+ out_clear_bit:
diff --git a/queue-5.8/usb-typec-ucsi-prevent-mode-overrun.patch b/queue-5.8/usb-typec-ucsi-prevent-mode-overrun.patch
new file mode 100644 (file)
index 0000000..d74d7cf
--- /dev/null
@@ -0,0 +1,84 @@
+From 386e15a650447f53de3d2d8819ce9393f31650a4 Mon Sep 17 00:00:00 2001
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Date: Wed, 16 Sep 2020 12:00:34 +0300
+Subject: usb: typec: ucsi: Prevent mode overrun
+
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+
+commit 386e15a650447f53de3d2d8819ce9393f31650a4 upstream.
+
+Sometimes the embedded controller firmware does not
+terminate the list of alternate modes that the partner
+supports in its response to the GET_ALTERNATE_MODES command.
+Instead the firmware returns the supported alternate modes
+over and over again until the driver stops requesting them.
+
+If that happens, the number of modes for each alternate mode
+will exceed the maximum 6 that is defined in the USB Power
+Delivery specification. Making sure that can't happen by
+adding a check for it.
+
+This fixes NULL pointer dereference that is caused by the
+overrun.
+
+Fixes: ad74b8649beaf ("usb: typec: ucsi: Preliminary support for alternate modes")
+Cc: stable@vger.kernel.org
+Reported-by: Zwane Mwaikambo <zwanem@gmail.com>
+Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20200916090034.25119-3-heikki.krogerus@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/ucsi/ucsi.c |   22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/typec/ucsi/ucsi.c
++++ b/drivers/usb/typec/ucsi/ucsi.c
+@@ -216,14 +216,18 @@ void ucsi_altmode_update_active(struct u
+                                           con->partner_altmode[i] == altmode);
+ }
+-static u8 ucsi_altmode_next_mode(struct typec_altmode **alt, u16 svid)
++static int ucsi_altmode_next_mode(struct typec_altmode **alt, u16 svid)
+ {
+       u8 mode = 1;
+       int i;
+-      for (i = 0; alt[i]; i++)
++      for (i = 0; alt[i]; i++) {
++              if (i > MODE_DISCOVERY_MAX)
++                      return -ERANGE;
++
+               if (alt[i]->svid == svid)
+                       mode++;
++      }
+       return mode;
+ }
+@@ -258,8 +262,11 @@ static int ucsi_register_altmode(struct
+                       goto err;
+               }
+-              desc->mode = ucsi_altmode_next_mode(con->port_altmode,
+-                                                  desc->svid);
++              ret = ucsi_altmode_next_mode(con->port_altmode, desc->svid);
++              if (ret < 0)
++                      return ret;
++
++              desc->mode = ret;
+               switch (desc->svid) {
+               case USB_TYPEC_DP_SID:
+@@ -292,8 +299,11 @@ static int ucsi_register_altmode(struct
+                       goto err;
+               }
+-              desc->mode = ucsi_altmode_next_mode(con->partner_altmode,
+-                                                  desc->svid);
++              ret = ucsi_altmode_next_mode(con->partner_altmode, desc->svid);
++              if (ret < 0)
++                      return ret;
++
++              desc->mode = ret;
+               alt = typec_partner_register_altmode(con->partner, desc);
+               if (IS_ERR(alt)) {
diff --git a/queue-5.8/usb-uas-fix-disconnect-by-unplugging-a-hub.patch b/queue-5.8/usb-uas-fix-disconnect-by-unplugging-a-hub.patch
new file mode 100644 (file)
index 0000000..ef17c78
--- /dev/null
@@ -0,0 +1,63 @@
+From 325b008723b2dd31de020e85ab9d2e9aa4637d35 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Wed, 16 Sep 2020 11:40:25 +0200
+Subject: USB: UAS: fix disconnect by unplugging a hub
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit 325b008723b2dd31de020e85ab9d2e9aa4637d35 upstream.
+
+The SCSI layer can go into an ugly loop if you ignore that a device is
+gone. You need to report an error in the command rather than in the
+return value of the queue method.
+
+We need to specifically check for ENODEV. The issue goes back to the
+introduction of the driver.
+
+Fixes: 115bb1ffa54c3 ("USB: Add UAS driver")
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200916094026.30085-2-oneukum@suse.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/storage/uas.c |   14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/storage/uas.c
++++ b/drivers/usb/storage/uas.c
+@@ -662,8 +662,7 @@ static int uas_queuecommand_lck(struct s
+       if (devinfo->resetting) {
+               cmnd->result = DID_ERROR << 16;
+               cmnd->scsi_done(cmnd);
+-              spin_unlock_irqrestore(&devinfo->lock, flags);
+-              return 0;
++              goto zombie;
+       }
+       /* Find a free uas-tag */
+@@ -699,6 +698,16 @@ static int uas_queuecommand_lck(struct s
+               cmdinfo->state &= ~(SUBMIT_DATA_IN_URB | SUBMIT_DATA_OUT_URB);
+       err = uas_submit_urbs(cmnd, devinfo);
++      /*
++       * in case of fatal errors the SCSI layer is peculiar
++       * a command that has finished is a success for the purpose
++       * of queueing, no matter how fatal the error
++       */
++      if (err == -ENODEV) {
++              cmnd->result = DID_ERROR << 16;
++              cmnd->scsi_done(cmnd);
++              goto zombie;
++      }
+       if (err) {
+               /* If we did nothing, give up now */
+               if (cmdinfo->state & SUBMIT_STATUS_URB) {
+@@ -709,6 +718,7 @@ static int uas_queuecommand_lck(struct s
+       }
+       devinfo->cmnd[idx] = cmnd;
++zombie:
+       spin_unlock_irqrestore(&devinfo->lock, flags);
+       return 0;
+ }
diff --git a/queue-5.8/usblp-fix-race-between-disconnect-and-read.patch b/queue-5.8/usblp-fix-race-between-disconnect-and-read.patch
new file mode 100644 (file)
index 0000000..272c196
--- /dev/null
@@ -0,0 +1,34 @@
+From 9cdabcb3ef8c24ca3a456e4db7b012befb688e73 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Thu, 17 Sep 2020 12:34:27 +0200
+Subject: usblp: fix race between disconnect() and read()
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit 9cdabcb3ef8c24ca3a456e4db7b012befb688e73 upstream.
+
+read() needs to check whether the device has been
+disconnected before it tries to talk to the device.
+
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Reported-by: syzbot+be5b5f86a162a6c281e6@syzkaller.appspotmail.com
+Link: https://lore.kernel.org/r/20200917103427.15740-1-oneukum@suse.com
+Cc: stable <stable@vger.kernel.org>
+---
+ drivers/usb/class/usblp.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/class/usblp.c
++++ b/drivers/usb/class/usblp.c
+@@ -827,6 +827,11 @@ static ssize_t usblp_read(struct file *f
+       if (rv < 0)
+               return rv;
++      if (!usblp->present) {
++              count = -ENODEV;
++              goto done;
++      }
++
+       if ((avail = usblp->rstatus) < 0) {
+               printk(KERN_ERR "usblp%d: error %d reading from printer\n",
+                   usblp->minor, (int)avail);