From: Takashi Iwai Date: Fri, 26 Jul 2019 09:42:34 +0000 (+0200) Subject: ALSA: hda - Show the fatal CORB/RIRB error more clearly X-Git-Tag: v5.2.19~251 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0294075e5872f37b0e5bb5de036923df116f6fa6;p=users%2Fdwmw2%2Flinux.git ALSA: hda - Show the fatal CORB/RIRB error more clearly [ Upstream commit dd65f7e19c6961ba6a69f7c925021b7a270cb950 ] The last fallback of CORB/RIRB communication error recovery is to turn on the single command mode, and this last resort usually means that something is really screwed up. Instead of a normal dev_err(), show the error more clearly with dev_WARN() with the caller stack trace. Also, show the bus-reset fallback also as an error, too. Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index dd96def48a3a1..1158bcf551488 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c @@ -869,10 +869,13 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr, */ if (hbus->allow_bus_reset && !hbus->response_reset && !hbus->in_reset) { hbus->response_reset = 1; + dev_err(chip->card->dev, + "No response from codec, resetting bus: last cmd=0x%08x\n", + bus->last_cmd[addr]); return -EAGAIN; /* give a chance to retry */ } - dev_err(chip->card->dev, + dev_WARN(chip->card->dev, "azx_get_response timeout, switching to single_cmd mode: last cmd=0x%08x\n", bus->last_cmd[addr]); chip->single_cmd = 1;