summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorSameer Pujar <spujar@nvidia.com>2018-12-26 13:34:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-13 12:05:29 +0300
commite9e68f76701c67ab34c586523635352fdf722edf (patch)
tree996f8fd74e3e4d543c1afc665a96e414e9212620 /sound/pci
parent64b9976a624d46058ff337560f0a07b4afe4326b (diff)
downloadlinux-e9e68f76701c67ab34c586523635352fdf722edf.tar.xz
ALSA: hda/tegra: clear pending irq handlers
commit 63d2a9ec310d8bcc955574220d4631aa55c1a80c upstream. Even after disabling interrupts on the module, it could be possible that irq handlers are still running. System hang is seen during suspend path. It was found that, there were pending writes on the HDA bus and clock was disabled by that time. Above mentioned issue is fixed by clearing any pending irq handlers before disabling clocks and returning from hda suspend. Suggested-by: Mohan Kumar <mkumard@nvidia.com> Suggested-by: Dara Ramesh <dramesh@nvidia.com> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_tegra.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 17fd81736d3d..039fbbb1e53c 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -249,10 +249,12 @@ static int hda_tegra_suspend(struct device *dev)
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data;
struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
+ struct hdac_bus *bus = azx_bus(chip);
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
azx_stop_chip(chip);
+ synchronize_irq(bus->irq);
azx_enter_link_reset(chip);
hda_tegra_disable_clocks(hda);