From patchwork Wed Jan 23 16:44:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Menzel X-Patchwork-Id: 156389 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp925861jaa; Wed, 23 Jan 2019 08:45:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN4RSS2UYs2dXo/HfXDMJmsf6i+JX+dr1xotQcge6JPzxKH07oskkNHMBimHQ5DdTmG5vqsb X-Received: by 2002:a17:902:2862:: with SMTP id e89mr2950401plb.158.1548261901784; Wed, 23 Jan 2019 08:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548261901; cv=none; d=google.com; s=arc-20160816; b=UmsNBquEFvbkLk0E0SaZvRFTDoFQXkDAiK8/UpIevnRuTLjpTA5pOJz0k7JjXGO7Ua HFigvvE2HCAMB2OizwMinxwZ1T/vHn5XzvtEhAix8+JOeKCfqPT+Tw4DcN4y/yypF8FS tmJIfBUeTcfaTFx2xQ6fipz36RT+EJAq8SBQTLWxliOrYx9HmPdNviRYvVRGAgfJAjcg hRtNYL0WH5kzgBzIxdIZlA32cfZy5FAj5Grn8xqm8tWZyyG061DEUhQxkNRwVP6Gdt2B cmAj4BW2ejheUYsnJ3iXEYGVXIFijgRdvSv3fWCEH6uOUQXc2p0OXCNAjxCnmly9d9Fr tQvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=E546Palv31sXDLiqvXYVaAKzPBqhw0to+OqDq+YuKQs=; b=Td1YLOJDImpI79jlkV2TrmCYe91Bc8vgPZ3fqmfg/ToNDW/zicay0bfkzFHKoQ0Dep +uCqrlOS2MDCEsjvc2WczMoqi/xMISxWzh1vQIYL7QkSiEbtnPKD2eVNRb4+0YUXj7nX ZbtFGXQxjDoZkZP0tR2EEleL+oZCxrBiqBF725kGXUpslMsKlXkcCygK947vDsTfprW3 j4VFHO6YnQchrk1OFs7gLkr/Kjh1m8HLgGn1VbzrlwqP/6z6jgT27X9GyZXuzRLHqWDI 0gZL0VVShfRwoorB/Xuba+S/DFiNVQVACM1QgJtXSvhyQRvhXwo2GqpkVXrPiVqLEjz9 1C7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 h6si21252925plk.231.2019.01.23.08.45.01; Wed, 23 Jan 2019 08:45:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725862AbfAWQpB (ORCPT + 15 others); Wed, 23 Jan 2019 11:45:01 -0500 Received: from mx3.molgen.mpg.de ([141.14.17.11]:37445 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725871AbfAWQpA (ORCPT ); Wed, 23 Jan 2019 11:45:00 -0500 Received: from keineahnung.molgen.mpg.de (keineahnung.molgen.mpg.de [141.14.17.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 246B120135342E; Wed, 23 Jan 2019 17:44:58 +0100 (CET) Subject: [PATCH v2] ipmi:pci: Blacklist a Realtek "IPMI" device To: Greg KH Cc: stable@vger.kernel.org, openipmi-developer@lists.sourceforge.net, LKML , it+lkml@molgen.mpg.de References: <8520014d-6805-ce87-143d-fffbeb94d11d@molgen.mpg.de> <78de72f8-e218-f91f-97b2-768ff5a920e4@acm.org> <9ca94005-e2e4-cd5a-67bd-30c3d8680281@molgen.mpg.de> <20190123163211.GA31955@kroah.com> From: Paul Menzel Message-ID: Date: Wed, 23 Jan 2019 17:44:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190123163211.GA31955@kroah.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Corey Minyard Date: Thu, 15 Feb 2018 16:58:26 -0600 [ upstream commit bc48fa1b9d3b04106055b27078da824cd209865a ] Realtek has some sort of "Virtual" IPMI device on the PCI bus as a KCS controller, but whatever it is, it's not one. Ignore it if seen. Reported-by: Chris Chiu Signed-off-by: Corey Minyard Tested-by: Daniel Drake [ Commit 13d0b35c (ipmi_si: Move PCI setup to another file) from Linux 4.15-rc1 has not been back ported, so the PCI code is still in `drivers/char/ipmi/ipmi_si_intf.c`, requiring to apply the commit manually. This fixes a 100 s boot delay on the HP EliteDesk 705 G4 MT with Linux 4.14.94. ] Signed-off-by: Paul Menzel --- v2: Use tabs. Sorry for messing that up. drivers/char/ipmi/ipmi_si_intf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.17.1 diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index c04aa11f0e21..a106cf7b5ee0 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2447,6 +2447,15 @@ static int ipmi_pci_probe_regspacing(struct smi_info *info) return DEFAULT_REGSPACING; } +static struct pci_device_id ipmi_pci_blacklist[] = { + /* + * This is a "Virtual IPMI device", whatever that is. It appears + * as a KCS device by the class, but it is not one. + */ + { PCI_VDEVICE(REALTEK, 0x816c) }, + { 0, } +}; + static int ipmi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2454,6 +2463,9 @@ static int ipmi_pci_probe(struct pci_dev *pdev, int class_type = pdev->class & PCI_ERMC_CLASSCODE_TYPE_MASK; struct smi_info *info; + if (pci_match_id(ipmi_pci_blacklist, pdev)) + return -ENODEV; + info = smi_info_alloc(); if (!info) return -ENOMEM;