Skip to contentSkip to conversation

ALSA: hda/tegra: clear pending irq handlers

PATCH Applied Sameer Pujar 2 participants 2 messages Dec 26, 2018 – Jan 1, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/tegra: clear pending irq handlers

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.

---
 sound/pci/hda/hda_tegra.c | 2 ++
 1 file changed, 2 insertions(+)
sound/pci/hda/hda_tegra.c +2 -0
index 83befd8..97a176d 100644
@@ -234,10 +234,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);
 
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 6 lines · Sameer Pujar

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.

Quoted 6 lines

Above mentioned issue is fixed by clearing any pending irq handlers before disabling clocks and returning from hda suspend.

Applied, thanks.

Takashi