diff options
author | Corey Minyard <cminyard@mvista.com> | 2018-02-26 12:46:26 -0600 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2018-02-26 12:55:00 -0600 |
commit | ad2575f8600d068edb10a9bef7f945482e3c5ca9 (patch) | |
tree | 4052c4b58b0e681a5832bd7273beede954bae78e /drivers/char | |
parent | 3b6d082f0dfc2b7b9def494d2ab67fd4d3862ea1 (diff) | |
download | linux-ad2575f8600d068edb10a9bef7f945482e3c5ca9.tar.bz2 |
ipmi:pci: Make the PCI defines consistent with normal Linux ones
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_pci.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/char/ipmi/ipmi_si_pci.c b/drivers/char/ipmi/ipmi_si_pci.c index 27dd11c49d21..ad4e20b94c08 100644 --- a/drivers/char/ipmi/ipmi_si_pci.c +++ b/drivers/char/ipmi/ipmi_si_pci.c @@ -17,16 +17,12 @@ module_param_named(trypci, si_trypci, bool, 0); MODULE_PARM_DESC(trypci, "Setting this to zero will disable the" " default scan of the interfaces identified via pci"); -#define PCI_ERMC_CLASSCODE 0x0C0700 -#define PCI_ERMC_CLASSCODE_MASK 0xffffff00 -#define PCI_ERMC_CLASSCODE_TYPE_MASK 0xff -#define PCI_ERMC_CLASSCODE_TYPE_SMIC 0x00 -#define PCI_ERMC_CLASSCODE_TYPE_KCS 0x01 -#define PCI_ERMC_CLASSCODE_TYPE_BT 0x02 +#define PCI_CLASS_SERIAL_IPMI 0x0c07 +#define PCI_CLASS_SERIAL_IPMI_SMIC 0x0c0700 +#define PCI_CLASS_SERIAL_IPMI_KCS 0x0c0701 +#define PCI_CLASS_SERIAL_IPMI_BT 0x0c0702 -#define PCI_HP_VENDOR_ID 0x103C -#define PCI_MMC_DEVICE_ID 0x121A -#define PCI_MMC_ADDR_CW 0x10 +#define PCI_DEVICE_ID_HP_MMC 0x121A static void ipmi_pci_cleanup(struct si_sm_io *io) { @@ -69,28 +65,27 @@ static int ipmi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int rv; - int class_type = pdev->class & PCI_ERMC_CLASSCODE_TYPE_MASK; struct si_sm_io io; memset(&io, 0, sizeof(io)); io.addr_source = SI_PCI; dev_info(&pdev->dev, "probing via PCI"); - switch (class_type) { - case PCI_ERMC_CLASSCODE_TYPE_SMIC: + switch (pdev->class) { + case PCI_CLASS_SERIAL_IPMI_SMIC: io.si_type = SI_SMIC; break; - case PCI_ERMC_CLASSCODE_TYPE_KCS: + case PCI_CLASS_SERIAL_IPMI_KCS: io.si_type = SI_KCS; break; - case PCI_ERMC_CLASSCODE_TYPE_BT: + case PCI_CLASS_SERIAL_IPMI_BT: io.si_type = SI_BT; break; default: - dev_info(&pdev->dev, "Unknown IPMI type: %d\n", class_type); + dev_info(&pdev->dev, "Unknown IPMI class: %x\n", pdev->class); return -ENOMEM; } @@ -138,8 +133,10 @@ static void ipmi_pci_remove(struct pci_dev *pdev) } static const struct pci_device_id ipmi_pci_devices[] = { - { PCI_DEVICE(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID) }, - { PCI_DEVICE_CLASS(PCI_ERMC_CLASSCODE, PCI_ERMC_CLASSCODE_MASK) }, + { PCI_VDEVICE(HP, PCI_DEVICE_ID_HP_MMC) }, + { PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_IPMI_SMIC, ~0) }, + { PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_IPMI_KCS, ~0) }, + { PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_IPMI_BT, ~0) }, { 0, } }; MODULE_DEVICE_TABLE(pci, ipmi_pci_devices); |