mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: stable@vger.kernel.org
Cc: openipmi-developer@lists.sourceforge.net,
	LKML <linux-kernel@vger.kernel.org>,
	it+lkml@molgen.mpg.de
Subject: [PATCH] ipmi:pci: Blacklist a Realtek "IPMI" device
Date: Wed, 23 Jan 2019 17:27:51 +0100	[thread overview]
Message-ID: <fe18b975-a577-8b09-c1cc-488356fc60a7@molgen.mpg.de> (raw)
In-Reply-To: <9ca94005-e2e4-cd5a-67bd-30c3d8680281@molgen.mpg.de>

[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]

From: Corey Minyard <cminyard@mvista.com>
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 <chiu@endlessm.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Tested-by: Daniel Drake <drake@endlessm.com>

[ 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 <pmenzel@molgen.mpg.de>
---
 drivers/char/ipmi/ipmi_si_intf.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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;
-- 
2.17.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

  reply	other threads:[~2019-01-23 16:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 16:17 ipmi_si: 90 s delay in system start with 4.14.94, but not 4.18.6 Paul Menzel
2019-01-22 20:58 ` Corey Minyard
2019-01-23 16:25   ` Paul Menzel
2019-01-23 16:27     ` Paul Menzel [this message]
2019-01-23 16:32       ` [PATCH] ipmi:pci: Blacklist a Realtek "IPMI" device Greg KH
2019-01-23 16:44         ` [PATCH v2] " Paul Menzel
2019-01-24 17:53           ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2018-02-20 17:52 ipmi_si fails to get BMC ID Chris Chiu
2018-02-26  2:50 ` [PATCH] ipmi:pci: Blacklist a Realtek "IPMI" device minyard
2018-02-26 14:34   ` Andy Shevchenko
2018-02-26 14:48     ` Corey Minyard
2018-03-13  7:27   ` Daniel Drake
2018-03-13 11:59     ` Corey Minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe18b975-a577-8b09-c1cc-488356fc60a7@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=it+lkml@molgen.mpg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®