Commit 6f445784 authored by Takashi Iwai's avatar Takashi Iwai

Revert "ALSA: hda: Drop workaround for a hang at shutdown again"

This reverts commit 8fc8e903.

It was expected that the fixes in HD-audio codec side would make the
workaround redundant, but unfortunately it doesn't seem sufficing.
Resurrect the workaround for now.

Fixes: 8fc8e903 ("ALSA: hda: Drop workaround for a hang at shutdown again")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
Link: https://lore.kernel.org/r/20210913124330.24530-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 64794d6d
...@@ -883,10 +883,11 @@ static unsigned int azx_get_pos_skl(struct azx *chip, struct azx_dev *azx_dev) ...@@ -883,10 +883,11 @@ static unsigned int azx_get_pos_skl(struct azx *chip, struct azx_dev *azx_dev)
return azx_get_pos_posbuf(chip, azx_dev); return azx_get_pos_posbuf(chip, azx_dev);
} }
static void azx_shutdown_chip(struct azx *chip) static void __azx_shutdown_chip(struct azx *chip, bool skip_link_reset)
{ {
azx_stop_chip(chip); azx_stop_chip(chip);
azx_enter_link_reset(chip); if (!skip_link_reset)
azx_enter_link_reset(chip);
azx_clear_irq_pending(chip); azx_clear_irq_pending(chip);
display_power(chip, false); display_power(chip, false);
} }
...@@ -895,6 +896,11 @@ static void azx_shutdown_chip(struct azx *chip) ...@@ -895,6 +896,11 @@ static void azx_shutdown_chip(struct azx *chip)
static DEFINE_MUTEX(card_list_lock); static DEFINE_MUTEX(card_list_lock);
static LIST_HEAD(card_list); static LIST_HEAD(card_list);
static void azx_shutdown_chip(struct azx *chip)
{
__azx_shutdown_chip(chip, false);
}
static void azx_add_card_list(struct azx *chip) static void azx_add_card_list(struct azx *chip)
{ {
struct hda_intel *hda = container_of(chip, struct hda_intel, chip); struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
...@@ -2357,7 +2363,7 @@ static void azx_shutdown(struct pci_dev *pci) ...@@ -2357,7 +2363,7 @@ static void azx_shutdown(struct pci_dev *pci)
return; return;
chip = card->private_data; chip = card->private_data;
if (chip && chip->running) if (chip && chip->running)
azx_shutdown_chip(chip); __azx_shutdown_chip(chip, true);
} }
/* PCI IDs */ /* PCI IDs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment