ALSA: hda: Clear RIRB status before reading WP
authorMohan Kumar <mkumard@nvidia.com>
Thu, 6 Feb 2020 10:10:53 +0000 (15:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 18:40:06 +0000 (20:40 +0200)
commit60bc60dd7f0712f4d3823af3a9d47373c1e951bd
tree44a08a6169fe317d3e001d61c5c98a06606da3a0
parent154e9494bffb1d202e8c5da6d5833dcac76095ac
ALSA: hda: Clear RIRB status before reading WP

[ Upstream commit 6d011d5057ff88ee556c000ac6fe0be23bdfcd72 ]

RIRB interrupt status getting cleared after the write pointer is read
causes a race condition, where last response(s) into RIRB may remain
unserviced by IRQ, eventually causing azx_rirb_get_response to fall
back to polling mode. Clearing the RIRB interrupt status ahead of
write pointer access ensures that this condition is avoided.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Link: https://lore.kernel.org/r/1580983853-351-1-git-send-email-viswanathl@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/hda_controller.c