From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39540C3A5A2 for ; Sun, 22 Sep 2019 19:00:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 097942190F for ; Sun, 22 Sep 2019 19:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569178802; bh=XVOD64NLFfzI9rE1FouGmQQ3XmG0h12oUjaJb84NWGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=D54QS0wPUUoyAQuECKMea9bLX2GvMuwpCa1lnTA+dYpuReyNSz15l55yZnvYHgoeU 2+6c2Lb86DMkgCKIt3ePVsTg9m0hmOs9YZ9hxf5srI+Z5WuuC8wOcTJsJQO3+r1E0X ZuoXLsdWTAm2WNY+99O6DJXfDynqMRLGcUkVhxFk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408295AbfIVTAB (ORCPT ); Sun, 22 Sep 2019 15:00:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:35282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438916AbfIVS7w (ORCPT ); Sun, 22 Sep 2019 14:59:52 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC8DE21479; Sun, 22 Sep 2019 18:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569178791; bh=XVOD64NLFfzI9rE1FouGmQQ3XmG0h12oUjaJb84NWGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BvPHTPU2dbv8H4eLOdr8eTCgBBlWFDeHyVmqjm8gFg3HvtIgSLr3oz8OyTNOZzxK6 zuFWU+Av0T4x1kOoZWxFXWXMl44OoXMt7B3mOutsopH05mM9SdNayz13PpA4iGQVAR rqIwoP5VYrK1rbJTYBP5iVupSmSEAOmC2hkvLSUM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Takashi Iwai , Sasha Levin Subject: [PATCH AUTOSEL 4.9 13/60] ALSA: hda - Show the fatal CORB/RIRB error more clearly Date: Sun, 22 Sep 2019 14:58:46 -0400 Message-Id: <20190922185934.4305-13-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190922185934.4305-1-sashal@kernel.org> References: <20190922185934.4305-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai [ 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 --- sound/pci/hda/hda_controller.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 85dbe2420248d..c5e82329348b3 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c @@ -866,10 +866,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; -- 2.20.1