aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2018-02-15 17:58:26 -0500
committerCorey Minyard <cminyard@mvista.com>2018-03-13 07:58:47 -0400
commitbc48fa1b9d3b04106055b27078da824cd209865a (patch)
tree68b48c746f9291aeb10600a6c777b7eec38d51d3
parent4876234acc5441e325f262eec48672ee7f4a0cc6 (diff)
ipmi:pci: Blacklist a Realtek "IPMI" device
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>
-rw-r--r--drivers/char/ipmi/ipmi_si_pci.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_si_pci.c b/drivers/char/ipmi/ipmi_si_pci.c
index b1c055540b26..f54ca6869ed2 100644
--- a/drivers/char/ipmi/ipmi_si_pci.c
+++ b/drivers/char/ipmi/ipmi_si_pci.c
@@ -62,12 +62,24 @@ static int ipmi_pci_probe_regspacing(struct si_sm_io *io)
62 return DEFAULT_REGSPACING; 62 return DEFAULT_REGSPACING;
63} 63}
64 64
65static struct pci_device_id ipmi_pci_blacklist[] = {
66 /*
67 * This is a "Virtual IPMI device", whatever that is. It appears
68 * as a KCS device by the class, but it is not one.
69 */
70 { PCI_VDEVICE(REALTEK, 0x816c) },
71 { 0, }
72};
73
65static int ipmi_pci_probe(struct pci_dev *pdev, 74static int ipmi_pci_probe(struct pci_dev *pdev,
66 const struct pci_device_id *ent) 75 const struct pci_device_id *ent)
67{ 76{
68 int rv; 77 int rv;
69 struct si_sm_io io; 78 struct si_sm_io io;
70 79
80 if (pci_match_id(ipmi_pci_blacklist, pdev))
81 return -ENODEV;
82
71 memset(&io, 0, sizeof(io)); 83 memset(&io, 0, sizeof(io));
72 io.addr_source = SI_PCI; 84 io.addr_source = SI_PCI;
73 dev_info(&pdev->dev, "probing via PCI"); 85 dev_info(&pdev->dev, "probing via PCI");