Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1321822ybz; Thu, 16 Apr 2020 07:11:29 -0700 (PDT) X-Google-Smtp-Source: APiQypLIzx0/m3HOE824OaERNQcWYf/tWPyrV3M5AQelmeuxnqu3Qw3NtFQE1CMseuW0lv3bX38f X-Received: by 2002:aa7:ca55:: with SMTP id j21mr28520475edt.86.1587046289605; Thu, 16 Apr 2020 07:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587046289; cv=none; d=google.com; s=arc-20160816; b=fx36A4bZ3A0j9XFxVqTcqnjo9l+5C4BY5hAyOHc0HioCL0LwIbA3Xv/+q8iMExagxd A/nC8+jsYYiva7MiQPMWopZTQnfwGT7i1rqQ1+YSBnPD8zUtx/1CJBFYNIw+pXNn+RCb CFnm6n0ddPv4I7Opmmtg3FSzWPaAefhZcYTmAbC/Nr255KsYnD7Xb1SMWXxAKn7usneK Y/Zxo4SDGE4s+nRggUN8Vclk54g27dBtUi88i9O0DgOgkHDz9nfqdWx7xWzvISTD4kCM 5PRqNl4lxijrHHnJYJwqwdsYNXQ5yLqac0tBsHLjvuFE0GkmfkLgOM14FWq9lt0XrNO0 sccA== 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=5yaMAVM3PVPz/A2mdBmlsIY5IUAvtTglElyGmNUo1Eg=; b=Yr2J2s2rlr2BSatwDfT2hR8xmrHwk5OKgg2CZm2rklSV6fierUkiaKK32ZB3h8zJ1e 0IUPQhbdCs2drTu8HKGInqw58EomNcMrAv0FFyNW3uDrT4/qlxKTXxkhh1VypQiwzdSJ YyNL+XyB9HhOW5Vicu3sQANfljLuAz6v4wfPJyPJGJtoaK4wKgLbqIZCH5ndA7TCdi/4 g7xuIbc9MnorwPmJlk2i/P/VPYkeDWS3VYSJuRxtplZ5jxy05KZ1y5XdgDuNhnAtsfI6 IF60pEoZKStCC97KK0OJ2CFT2ZHrToyJuolwNtBQ/3e73VBof5xIqDOi4763snlFxYjf fJOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ABz4bQq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si11931111edk.406.2020.04.16.07.10.56; Thu, 16 Apr 2020 07:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ABz4bQq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389575AbgDPOIH (ORCPT + 99 others); Thu, 16 Apr 2020 10:08:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:58904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2898512AbgDPNp2 (ORCPT ); Thu, 16 Apr 2020 09:45:28 -0400 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 7DD4F2076D; Thu, 16 Apr 2020 13:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587044728; bh=RRlpE48n10rU7DrCNdvYbj9VyjqQvnDeKoqNO2Fwrpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ABz4bQq4RSj2+etcOZVGTvhAwtB1yt/JWD4K43X+mDp7MxxGoy4NOECwTtmlDn3WH rRigTu0WzVE8RCFpj3LR2aW3TYYWcXHX8b1CdIxQ9wC6jYIIn1ayioY3A51fJeFntX AMi5avi7bhfOA6NXjAER4K8U9yDeZaHLf5OzFYLw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.4 076/232] ALSA: hda: Add driver blacklist Date: Thu, 16 Apr 2020 15:22:50 +0200 Message-Id: <20200416131324.732913863@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131316.640996080@linuxfoundation.org> References: <20200416131316.640996080@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: Takashi Iwai commit 3c6fd1f07ed03a04debbb9a9d782205f1ef5e2ab upstream. The recent AMD platform exposes an HD-audio bus but without any actual codecs, which is internally tied with a USB-audio device, supposedly. It results in "no codecs" error of HD-audio bus driver, and it's nothing but a waste of resources. This patch introduces a static blacklist table for skipping such a known bogus PCI SSID entry. As of writing this patch, the known SSIDs are: * 1043:874f - ASUS ROG Zenith II / Strix * 1462:cb59 - MSI TRX40 Creator * 1462:cb60 - MSI TRX40 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206543 Cc: Link: https://lore.kernel.org/r/20200408140449.22319-2-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/hda_intel.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2024,6 +2024,17 @@ static void pcm_mmap_prepare(struct snd_ #endif } +/* Blacklist for skipping the whole probe: + * some HD-audio PCI entries are exposed without any codecs, and such devices + * should be ignored from the beginning. + */ +static const struct snd_pci_quirk driver_blacklist[] = { + SND_PCI_QUIRK(0x1043, 0x874f, "ASUS ROG Zenith II / Strix", 0), + SND_PCI_QUIRK(0x1462, 0xcb59, "MSI TRX40 Creator", 0), + SND_PCI_QUIRK(0x1462, 0xcb60, "MSI TRX40", 0), + {} +}; + static const struct hda_controller_ops pci_hda_ops = { .disable_msi_reset_irq = disable_msi_reset_irq, .pcm_mmap_prepare = pcm_mmap_prepare, @@ -2059,6 +2070,11 @@ static int azx_probe(struct pci_dev *pci bool schedule_probe; int err; + if (snd_pci_quirk_lookup(pci, driver_blacklist)) { + dev_info(&pci->dev, "Skipping the blacklisted device\n"); + return -ENODEV; + } + if (dev >= SNDRV_CARDS) return -ENODEV; if (!enable[dev]) {