ACK: [PATCH 1/1] ipmi:pci: Blacklist a Realtek "IPMI" device

Stefan Bader stefan.bader at canonical.com
Mon Jan 7 18:12:35 UTC 2019


On 13.12.18 16:12, Kai-Heng Feng wrote:
> From: Corey Minyard <cminyard at mvista.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1808353
> 
> 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 at endlessm.com>
> Signed-off-by: Corey Minyard <cminyard at mvista.com>
> Tested-by: Daniel Drake <drake at endlessm.com>
> (cherry picked from commit bc48fa1b9d3b04106055b27078da824cd209865a)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
>  drivers/char/ipmi/ipmi_si_pci.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_pci.c b/drivers/char/ipmi/ipmi_si_pci.c
> index 27dd11c49d21..fff1e0fcc8c9 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_VDEVICE(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");
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190107/46935bf2/attachment.sig>


More information about the kernel-team mailing list