From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, openipmi-developer@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>,
it+lkml@molgen.mpg.de
Subject: [PATCH v2] ipmi:pci: Blacklist a Realtek "IPMI" device
Date: Wed, 23 Jan 2019 17:44:57 +0100 [thread overview]
Message-ID: <cc8b4831-73bf-5f18-ebaa-e0fa6c3d5366@molgen.mpg.de> (raw)
In-Reply-To: <20190123163211.GA31955@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 1918 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>
---
v2: Use tabs. Sorry for messing that up.
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..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;
--
2.17.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]
next prev parent reply other threads:[~2019-01-23 16:45 UTC|newest]
Thread overview: 7+ 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 ` [PATCH] ipmi:pci: Blacklist a Realtek "IPMI" device Paul Menzel
2019-01-23 16:32 ` Greg KH
2019-01-23 16:44 ` Paul Menzel [this message]
2019-01-24 17:53 ` [PATCH v2] " Greg KH
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=cc8b4831-73bf-5f18-ebaa-e0fa6c3d5366@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=gregkh@linuxfoundation.org \
--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®