Message ID | 1519613406-32237-1-git-send-email-minyard@acm.org |
---|---|
State | New |
Headers | show |
Series | ipmi:pci: Blacklist a Realtek "IPMI" device | expand |
On Mon, Feb 26, 2018 at 4:50 AM, <minyard@acm.org> wrote: > 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. > +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_DEVICE(PCI_VENDOR_ID_REALTEK, 0x816c) }, > + { 0, } { PCI_VDEVICE(REALTEK, 0x816c) }, { } ? > +}; > + if (pci_match_id(ipmi_pci_blacklist, pdev)) > + return -ENODEV; -- With Best Regards, Andy Shevchenko
On 02/26/2018 08:34 AM, Andy Shevchenko wrote: > On Mon, Feb 26, 2018 at 4:50 AM, <minyard@acm.org> wrote: > >> 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. >> +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_DEVICE(PCI_VENDOR_ID_REALTEK, 0x816c) }, >> + { 0, } > { PCI_VDEVICE(REALTEK, 0x816c) }, > { } > > ? That's better, thanks. -corey > >> +}; >> + if (pci_match_id(ipmi_pci_blacklist, pdev)) >> + return -ENODEV; >
Hi, On Mon, Feb 26, 2018 at 10:50 AM, <minyard@acm.org> wrote: > From: Corey Minyard <cminyard@mvista.com> > > 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> > --- > > I haven't heard anything from you on this. Here is a patch that should > blacklist that device, though I don't have a way to easily test it. > If you would prefer this, could you test it? Sorry for the slow response, and thanks for the patch! We have tested it here and it seems to be working fine now - the IPMI stuff no longer initializes system interfaces, and hence doesn't get in the way when going into suspend or reboot later. This is a consumer desktop platform, so if some kind of IPMI functionality is really present in the hardware then it is not really going to be relevant for the ordinary user. So it should be fine to just ignore the hardware as you have done. Thanks Daniel
On 03/13/2018 02:27 AM, Daniel Drake wrote: > Hi, > > On Mon, Feb 26, 2018 at 10:50 AM, <minyard@acm.org> wrote: >> From: Corey Minyard <cminyard@mvista.com> >> >> 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> >> --- >> >> I haven't heard anything from you on this. Here is a patch that should >> blacklist that device, though I don't have a way to easily test it. >> If you would prefer this, could you test it? > Sorry for the slow response, and thanks for the patch! > > We have tested it here and it seems to be working fine now - the IPMI > stuff no longer initializes system interfaces, and hence doesn't get > in the way when going into suspend or reboot later. Ok, thanks, I will add it with a "Tested-by" from you, if that is ok. -corey > > This is a consumer desktop platform, so if some kind of IPMI > functionality is really present in the hardware then it is not really > going to be relevant for the ordinary user. So it should be fine to > just ignore the hardware as you have done. > > Thanks > Daniel
diff --git a/drivers/char/ipmi/ipmi_si_pci.c b/drivers/char/ipmi/ipmi_si_pci.c index 27dd11c..d24990b 100644 --- a/drivers/char/ipmi/ipmi_si_pci.c +++ b/drivers/char/ipmi/ipmi_si_pci.c @@ -65,6 +65,15 @@ static int ipmi_pci_probe_regspacing(struct si_sm_io *io) 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_DEVICE(PCI_VENDOR_ID_REALTEK, 0x816c) }, + { 0, } +}; + static int ipmi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -72,6 +81,9 @@ static int ipmi_pci_probe(struct pci_dev *pdev, int class_type = pdev->class & PCI_ERMC_CLASSCODE_TYPE_MASK; struct si_sm_io io; + if (pci_match_id(ipmi_pci_blacklist, pdev)) + return -ENODEV; + memset(&io, 0, sizeof(io)); io.addr_source = SI_PCI; dev_info(&pdev->dev, "probing via PCI");