Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1594515ybv; Thu, 20 Feb 2020 23:57:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwrozoU8FWTWEDouB6KKTXiM3VVDDSrxJu6kQJAwwEuOftCuYa0xUyMRdutKpYhAcRWc0Db X-Received: by 2002:a9d:6452:: with SMTP id m18mr26232067otl.366.1582271868291; Thu, 20 Feb 2020 23:57:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582271868; cv=none; d=google.com; s=arc-20160816; b=rurVtAir9f6xmZFAjETXWLSMjk/gE1FOEM20/DQ9Tvj/OAg0sbqMwE4ZvT7O1ZWMrJ COfZK9NQZ6U77ZaU4ZurzULSSDeD2VFe1Fne1IzDZk4uIRbzlhjUqqyxZ+3RMdQyy99y qGBRZQSfB7rb5AeqhzPwpK4d0PmYuK8h2Qoi/oPHG9SLIHWpUgejPZSJWcWv3amN+7To wbRkGLL2oMkVwPcv65PDX8jgNVBncigAMk+Mfb6tYd5wk9WwKWKWCtg2rm/azJPbjAUV 42tjYl49VtFtC1IO1sB5ZPuECUr6zk4EGvEQ+kLkTDazfXJnsZaSWWeoiL1ZmG/nokmc ZfKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kg/1QQ5ZtYTlisURLIhHW6n/s8xIw7c8+BWmmi7+Wps=; b=lnxvaLTPjQr2LjpOQr4gfUjIC0Bzz0HaBnKiJxhE9vRe8SMiiRA6maw/MOe8Gnaq7m I80O2Ntm9yg17bBWuaxQfV8K0bDReiMTafsXCpjqExGSoLG7V/4qruk4Nvs25SmxZ91n 0DF9x0hdMrocwCyuafuHrF2JBjZRKjiox/+0TbzIhSd4vNjYFBMT30pwEQK5EG6HT4OF BAJJp6yYCxiOdcc6wtsXo4yV4c8EU5f23rdbrxvOb29Q5CQsU6Xwg1bgtESwkwTJ45uL Sb1Ggl3V4dj85k/5Fh3Z1+5yO3IxAip06PwyrozqgaowCAYDkn793A4QpsSKzqnpm1my k1AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jiqQJpmG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si1127024otr.8.2020.02.20.23.57.36; Thu, 20 Feb 2020 23:57:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jiqQJpmG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730641AbgBUH5c (ORCPT + 99 others); Fri, 21 Feb 2020 02:57:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:57050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730629AbgBUH53 (ORCPT ); Fri, 21 Feb 2020 02:57:29 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EF9692073A; Fri, 21 Feb 2020 07:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582271849; bh=Q1AXNF7/YBceLKM0t6wsQ+e5+2pz9pwHhqbAUEzue1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jiqQJpmGAuihlPtKoOi3JQy6pPk+6mVIiAM3mj2BuJxbXfcE1zTS8FJ3v67mT5NO8 rbkIBC6cf5wk/upzOsui5/DGYJI8/NqsPJLdgNZv768kouwR6xKPk1aaTkCuC5uc1n XVVpshGI+dwGQ5oGxoqxGIOMRV5uakeg1f8nPAxU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai Vehmanen , Takashi Iwai , Sasha Levin Subject: [PATCH 5.5 314/399] ALSA: hda/hdmi - add retry logic to parse_intel_hdmi() Date: Fri, 21 Feb 2020 08:40:39 +0100 Message-Id: <20200221072431.990812034@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072402.315346745@linuxfoundation.org> References: <20200221072402.315346745@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai Vehmanen [ Upstream commit 2928fa0a97ebb9549cb877fdc99aed9b95438c3a ] The initial snd_hda_get_sub_node() can fail on certain devices (e.g. some Chromebook models using Intel GLK). The failure rate is very low, but as this is is part of the probe process, end-user impact is high. In observed cases, related hardware status registers have expected values, but the node query still fails. Retrying the node query does seem to help, so fix the problem by adding retry logic to the query. This does not impact non-Intel platforms. BugLink: https://github.com/thesofproject/linux/issues/1642 Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200120160117.29130-4-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_hdmi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index bde50414029d9..4f195c7d966a9 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2862,9 +2862,12 @@ static int alloc_intel_hdmi(struct hda_codec *codec) /* parse and post-process for Intel codecs */ static int parse_intel_hdmi(struct hda_codec *codec) { - int err; + int err, retries = 3; + + do { + err = hdmi_parse_codec(codec); + } while (err < 0 && retries--); - err = hdmi_parse_codec(codec); if (err < 0) { generic_spec_free(codec); return err; -- 2.20.1