Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ichsmb/ichsmb_pci.c
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
#include <dev/pci/pcireg.h> | #include <dev/pci/pcireg.h> | ||||
#include <dev/smbus/smbconf.h> | #include <dev/smbus/smbconf.h> | ||||
#include <dev/ichsmb/ichsmb_var.h> | #include <dev/ichsmb/ichsmb_var.h> | ||||
#include <dev/ichsmb/ichsmb_reg.h> | #include <dev/ichsmb/ichsmb_reg.h> | ||||
/* PCI unique identifiers */ | /* PCI unique identifiers */ | ||||
#define PCI_VENDOR_INTEL 0x8086 | |||||
#define ID_82801AA 0x2413 | #define ID_82801AA 0x2413 | ||||
#define ID_82801AB 0x2423 | #define ID_82801AB 0x2423 | ||||
#define ID_82801BA 0x2443 | #define ID_82801BA 0x2443 | ||||
#define ID_82801CA 0x2483 | #define ID_82801CA 0x2483 | ||||
#define ID_82801DC 0x24C3 | #define ID_82801DC 0x24C3 | ||||
#define ID_82801EB 0x24D3 | #define ID_82801EB 0x24D3 | ||||
#define ID_82801FB 0x266A | #define ID_82801FB 0x266A | ||||
#define ID_82801GB 0x27da | #define ID_82801GB 0x27da | ||||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | |||||
DRIVER_MODULE(ichsmb, pci, ichsmb_pci_driver, ichsmb_pci_devclass, 0, 0); | DRIVER_MODULE(ichsmb, pci, ichsmb_pci_driver, ichsmb_pci_devclass, 0, 0); | ||||
static int | static int | ||||
ichsmb_pci_probe(device_t dev) | ichsmb_pci_probe(device_t dev) | ||||
{ | { | ||||
const struct ichsmb_device *device; | const struct ichsmb_device *device; | ||||
if (pci_get_vendor(dev) != PCI_VENDOR_INTEL) | if (pci_get_vendor(dev) != PCIV_INTEL) | ||||
return (ENXIO); | return (ENXIO); | ||||
for (device = ichsmb_devices; device->name != NULL; device++) { | for (device = ichsmb_devices; device->name != NULL; device++) { | ||||
if (pci_get_device(dev) == device->id) { | if (pci_get_device(dev) == device->id) { | ||||
device_set_desc(dev, device->name); | device_set_desc(dev, device->name); | ||||
return (ichsmb_probe(dev)); | return (ichsmb_probe(dev)); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |