diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-03-10 12:28:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-17 17:06:27 +0100 |
commit | f1d28b1310bbec94afe3d293726cf1a6fd7d22be (patch) | |
tree | 739b41bb6a52edbfb89f93f3ae35e940e8e7f6c4 /sound | |
parent | ebbb9bbe35ae1356fd1b982407837fe256e57769 (diff) | |
download | linux-stable-f1d28b1310bbec94afe3d293726cf1a6fd7d22be.tar.gz linux-stable-f1d28b1310bbec94afe3d293726cf1a6fd7d22be.tar.bz2 linux-stable-f1d28b1310bbec94afe3d293726cf1a6fd7d22be.zip |
ALSA: hda: Flush pending unsolicited events before suspend
commit 13661fc48461282e43fe8f76bf5bf449b3d40687 upstream.
The HD-audio controller driver processes the unsolicited events via
its work asynchronously, and this might be pending when the system
goes to suspend. When a lengthy event handling like ELD byte reads is
running, this might trigger unexpected accesses among suspend/resume
procedure, typically seen with Nvidia driver that still requires the
handling via unsolicited event verbs for ELD updates.
This patch adds the flush of unsol_work to assure that pending events
are processed before going into suspend.
Buglink: https://bugzilla.suse.com/show_bug.cgi?id=1182377
Reported-and-tested-by: Abhishek Sahu <abhsahu@nvidia.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210310112809.9215-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 145f4ff47d54..d244616d28d8 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1026,6 +1026,8 @@ static int azx_prepare(struct device *dev) chip = card->private_data; chip->pm_prepared = 1; + flush_work(&azx_bus(chip)->unsol_work); + /* HDA controller always requires different WAKEEN for runtime suspend * and system suspend, so don't use direct-complete here. */ |