ALSA: hda - Fix regression of HD-audio controller fallback modes
authorTakashi Iwai <tiwai@suse.de>
Sun, 8 Mar 2015 17:29:50 +0000 (18:29 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Mar 2015 07:41:13 +0000 (08:41 +0100)
commitcffdcecf3679466936a48d99fbf7c0a0d5c14bd8
treef373e6537fc2acf5a241b167a59006e57dafe799
parent84539b0b6e1554aff26bf225b12781fa1c0a6a27
ALSA: hda - Fix regression of HD-audio controller fallback modes

The commit [702d8370923a: ALSA: hda - Don't take unresponsive D3
transition too serious] introduced a conditional fallback behavior to
the HD-audio controller depending on the flag set.  However, it
introduced a silly bug, too, that the flag was evaluated in a reverse
way.  This resulted in a regression of HD-audio controller driver
where it can't go to the fallback mode at communication errors.

Unfortunately (or fortunately?) this didn't come up until recently
because the affected code path is an error handling that happens only
on an unstable hardware chip.  Most of recent chips work stably, thus
they didn't hit this problem.  Now, we've got a regression report with
a VIA chip, and this seems indeed requiring the fallback to the
polling mode, and finally the bug was revealed.

The fix is a oneliner to remove the wrong logical NOT in the check.
(Lesson learned - be careful about double negation.)

The bug should be backported to stable, but the patch won't be
applicable to 3.13 or earlier because of the code splits.  The stable
fix patches for earlier kernels will be posted later manually.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94021
Fixes: 702d8370923a ('ALSA: hda - Don't take unresponsive D3 transition too serious')
Cc: <stable@vger.kernel.org> # v3.14+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_controller.c