From patchwork Wed Oct 18 23:45:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ughreja, Rakesh A" X-Patchwork-Id: 10014927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9ED5F60215 for ; Wed, 18 Oct 2017 15:59:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E49B29401 for ; Wed, 18 Oct 2017 15:59:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 803DB2940A; Wed, 18 Oct 2017 15:59:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B0AD29401 for ; Wed, 18 Oct 2017 15:59:14 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3E68C267480; Wed, 18 Oct 2017 17:59:12 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B0A0C267486; Wed, 18 Oct 2017 17:59:10 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by alsa0.perex.cz (Postfix) with ESMTP id 7CB75266EE0 for ; Wed, 18 Oct 2017 17:59:05 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 18 Oct 2017 08:59:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.43,397,1503385200"; d="scan'208"; a="1207221980" Received: from raughrej-desk.iind.intel.com ([10.223.84.131]) by fmsmga001.fm.intel.com with ESMTP; 18 Oct 2017 08:59:02 -0700 From: "Ughreja, Rakesh A" To: alsa-devel@alsa-project.org Date: Thu, 19 Oct 2017 05:15:25 +0530 Message-Id: <1508370325-3118-1-git-send-email-rakesh.a.ughreja@intel.com> X-Mailer: git-send-email 2.7.4 Cc: tiwai@suse.de, vinod.koul@intel.com, Rakesh Ughreja Subject: [alsa-devel] [PATCH v2] ALSA: hda: Abort capability probe on invalid capability X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rakesh Ughreja Due to bugs in BIOS it's possible that the HDA capability link list is not constructed properly. This may lead to driver going into unknown state. So whenever driver discovers unknown HDA capability, log it as error and stop traversing the link list further. Signed-off-by: Rakesh Ughreja --- sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c index 978dc18..8f7d0d9 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/hdac_controller.c @@ -314,7 +314,8 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus) break; default: - dev_dbg(bus->dev, "Unknown capability %d\n", cur_cap); + dev_err(bus->dev, "Unknown capability %d\n", cur_cap); + cur_cap = 0; break; }