]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2019 19:53:05 +0000 (04:53 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2019 19:53:05 +0000 (04:53 +0900)
added patches:
alsa-ac97-fix-of-node-refcount-unbalance.patch
alsa-hda-don-t-trigger-jackpoll_work-in-azx_resume.patch

queue-5.0/alsa-ac97-fix-of-node-refcount-unbalance.patch [new file with mode: 0644]
queue-5.0/alsa-hda-don-t-trigger-jackpoll_work-in-azx_resume.patch [new file with mode: 0644]
queue-5.0/series

diff --git a/queue-5.0/alsa-ac97-fix-of-node-refcount-unbalance.patch b/queue-5.0/alsa-ac97-fix-of-node-refcount-unbalance.patch
new file mode 100644 (file)
index 0000000..aac2f9c
--- /dev/null
@@ -0,0 +1,35 @@
+From 31d2350d602511efc9ef626b848fe521233b0387 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 18 Feb 2019 14:38:06 +0100
+Subject: ALSA: ac97: Fix of-node refcount unbalance
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 31d2350d602511efc9ef626b848fe521233b0387 upstream.
+
+ac97_of_get_child_device() take the refcount of the node explicitly
+via of_node_get(), but this leads to an unbalance.  The
+for_each_child_of_node() loop itself takes the refcount for each
+iteration node, hence you don't need to take the extra refcount
+again.
+
+Fixes: 2225a3e6af78 ("ALSA: ac97: add codecs devicetree binding")
+Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/ac97/bus.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/ac97/bus.c
++++ b/sound/ac97/bus.c
+@@ -84,7 +84,7 @@ ac97_of_get_child_device(struct ac97_con
+               if ((idx != of_property_read_u32(node, "reg", &reg)) ||
+                   !of_device_is_compatible(node, compat))
+                       continue;
+-              return of_node_get(node);
++              return node;
+       }
+       return NULL;
diff --git a/queue-5.0/alsa-hda-don-t-trigger-jackpoll_work-in-azx_resume.patch b/queue-5.0/alsa-hda-don-t-trigger-jackpoll_work-in-azx_resume.patch
new file mode 100644 (file)
index 0000000..9833df2
--- /dev/null
@@ -0,0 +1,71 @@
+From 744c67ffeb06f2d2493f4049ba0bd19698ce0adf Mon Sep 17 00:00:00 2001
+From: Hui Wang <hui.wang@canonical.com>
+Date: Tue, 19 Mar 2019 09:28:43 +0800
+Subject: ALSA: hda - Don't trigger jackpoll_work in azx_resume
+
+From: Hui Wang <hui.wang@canonical.com>
+
+commit 744c67ffeb06f2d2493f4049ba0bd19698ce0adf upstream.
+
+The commit 3baffc4a84d7 (ALSA: hda/intel: Refactoring PM code) changed
+the behaviour of azx_resume(), it triggers the jackpoll_work after
+applying this commit.
+
+This change introduced a new issue, all codecs are runtime active
+after S3, and will not call runtime_suspend() automatically.
+
+The root cause is the jackpoll_work calls snd_hda_power_up/down_pm,
+and it calls up_pm before snd_hdac_enter_pm is called, while calls
+the down_pm in the middle of enter_pm and leave_pm is called. This
+makes the dev->power.usage_count unbalanced after S3.
+
+To fix it, let azx_resume() don't trigger jackpoll_work as before
+it did.
+
+Fixes: 3baffc4a84d7 ("ALSA: hda/intel: Refactoring PM code")
+Signed-off-by: Hui Wang <hui.wang@canonical.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_intel.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -947,7 +947,7 @@ static void __azx_runtime_suspend(struct
+       display_power(chip, false);
+ }
+-static void __azx_runtime_resume(struct azx *chip)
++static void __azx_runtime_resume(struct azx *chip, bool from_rt)
+ {
+       struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
+       struct hdac_bus *bus = azx_bus(chip);
+@@ -964,7 +964,7 @@ static void __azx_runtime_resume(struct
+       azx_init_pci(chip);
+       hda_intel_init_chip(chip, true);
+-      if (status) {
++      if (status && from_rt) {
+               list_for_each_codec(codec, &chip->bus)
+                       if (status & (1 << codec->addr))
+                               schedule_delayed_work(&codec->jackpoll_work,
+@@ -1016,7 +1016,7 @@ static int azx_resume(struct device *dev
+                       chip->msi = 0;
+       if (azx_acquire_irq(chip, 1) < 0)
+               return -EIO;
+-      __azx_runtime_resume(chip);
++      __azx_runtime_resume(chip, false);
+       snd_power_change_state(card, SNDRV_CTL_POWER_D0);
+       trace_azx_resume(chip);
+@@ -1081,7 +1081,7 @@ static int azx_runtime_resume(struct dev
+       chip = card->private_data;
+       if (!azx_has_pm_runtime(chip))
+               return 0;
+-      __azx_runtime_resume(chip);
++      __azx_runtime_resume(chip, true);
+       /* disable controller Wake Up event*/
+       azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
index d626eeee60acd697d56b2615d3a588fe610da2d4..d3a0fd2fb9db5dcae3bb907f7a718e0b21a5fba4 100644 (file)
@@ -29,3 +29,5 @@ objtool-move-objtool_file-struct-off-the-stack.patch
 irqchip-gic-v3-its-fix-comparison-logic-in-lpi_range_cmp.patch
 clocksource-drivers-riscv-fix-clocksource-mask.patch
 smb3-fix-smb3.1.1-guest-mounts-to-samba.patch
+alsa-hda-don-t-trigger-jackpoll_work-in-azx_resume.patch
+alsa-ac97-fix-of-node-refcount-unbalance.patch