From patchwork Wed Jan 23 16:27:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Menzel X-Patchwork-Id: 156388 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp907309jaa; Wed, 23 Jan 2019 08:27:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN4bQHVUIs9QrgJasxtbdzZFV8S+tVeVHcm2j3ZKVy3rmj1GnIPTg27ZsVnIMYbRo+m/RKnf X-Received: by 2002:a63:a112:: with SMTP id b18mr2543229pgf.440.1548260875339; Wed, 23 Jan 2019 08:27:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548260875; cv=none; d=google.com; s=arc-20160816; b=OI/rjCMAqCnQXvXghshZyxfEYeVLXqYc8N10wmSiNTZOJ7cPauGHNZICsswVc2ZV7S vqwROklHOXO2RVie6eQOHTOdeA/GWsGMV9V4R2Ao3urDcPApfroxe/5XC+E49Y/BaXOJ YqmdqCQMEDOMNQNTKrPALYWVUhzQm+rUtGa9pkAdykEJO6Hjm1tws6JU5x7TN2d39LuD zzlhTrG0agIZG1NY47wRMqhnrc3GGTd0YGocCx6j/xipbSOXWINV4xYfOwO5P0up+/Hr VlGt1vfGx6ENFQumljL3ocWieM11jDZxA0Z8wIs0yH1fd0f4jD7xufv+yU5boLjBqoQx yYrg== 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:references:cc:to:from:subject; bh=yWXDV6Mcsy52O+/rWYNdKXeQjlbcby9+fHVtv3GVrU8=; b=w1s/cYka9wCuxPj1UyW6FvKqEKvHq36djwO+bLKMt9I3QbCtbpdaWoIhraqKC4+F91 6cyZox6mBx5Ri2hMn1ICeSa21BVqIKdGpjcZF2/0NU6iJCumX+t7fblJWjFYvCv/R7+k BPiPzRez41MKCV6pA3gqurJJiVexTQXKY73sqj5+svQ940qDcqd0BjB+g+PAUlhz6Y3j nu/YiGl0U/g0p6Z39gkQZVKsLtE2lpDenYge++gAFCtecS0PlpuZ/5EbW8laZc2iTC3y rzs1Cg1u8jo90AkeQxhYTdiJqqTrpOAgPggD4i1F3j3VTQCJu6cz3asBjXXRml4aHIyK btXA== 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 r39si19386345pld.434.2019.01.23.08.27.55; Wed, 23 Jan 2019 08:27:55 -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 S1726236AbfAWQ1y (ORCPT + 15 others); Wed, 23 Jan 2019 11:27:54 -0500 Received: from mx3.molgen.mpg.de ([141.14.17.11]:59327 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725994AbfAWQ1y (ORCPT ); Wed, 23 Jan 2019 11:27:54 -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 9962620135342E; Wed, 23 Jan 2019 17:27:51 +0100 (CET) Subject: [PATCH] ipmi:pci: Blacklist a Realtek "IPMI" device From: Paul Menzel To: stable@vger.kernel.org Cc: 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> Message-ID: Date: Wed, 23 Jan 2019 17:27:51 +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: <9ca94005-e2e4-cd5a-67bd-30c3d8680281@molgen.mpg.de> 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 --- 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..6d18f8090cea 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;