Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/imcsmb/imcsmb_pci.c
Context not available. | |||||
}; | }; | ||||
static struct imcsmb_pci_device { | static struct imcsmb_pci_device { | ||||
uint16_t id; | uint16_t vendorid; | ||||
uint16_t deviceid; | |||||
char *name; | char *name; | ||||
} imcsmb_pci_devices[] = { | } imcsmb_pci_devices[] = { | ||||
{IMCSMB_PCI_DEV_ID_IMC0_SBX, | {PCI_VENDOR_INTEL, IMCSMB_PCI_DEV_ID_IMC0_SBX, | ||||
"Intel Sandybridge Xeon iMC 0 SMBus controllers" }, | "Intel Sandybridge Xeon iMC 0 SMBus controllers" }, | ||||
{IMCSMB_PCI_DEV_ID_IMC0_IBX, | {PCI_VENDOR_INTEL, IMCSMB_PCI_DEV_ID_IMC0_IBX, | ||||
"Intel Ivybridge Xeon iMC 0 SMBus controllers" }, | "Intel Ivybridge Xeon iMC 0 SMBus controllers" }, | ||||
{IMCSMB_PCI_DEV_ID_IMC0_HSX, | {PCI_VENDOR_INTEL, IMCSMB_PCI_DEV_ID_IMC0_HSX, | ||||
"Intel Haswell Xeon iMC 0 SMBus controllers" }, | "Intel Haswell Xeon iMC 0 SMBus controllers" }, | ||||
{IMCSMB_PCI_DEV_ID_IMC1_HSX, | {PCI_VENDOR_INTEL, IMCSMB_PCI_DEV_ID_IMC1_HSX, | ||||
"Intel Haswell Xeon iMC 1 SMBus controllers" }, | "Intel Haswell Xeon iMC 1 SMBus controllers" }, | ||||
{IMCSMB_PCI_DEV_ID_IMC0_BDX, | {PCI_VENDOR_INTEL, IMCSMB_PCI_DEV_ID_IMC0_BDX, | ||||
"Intel Broadwell Xeon iMC 0 SMBus controllers" }, | "Intel Broadwell Xeon iMC 0 SMBus controllers" }, | ||||
{IMCSMB_PCI_DEV_ID_IMC1_BDX, | {PCI_VENDOR_INTEL, IMCSMB_PCI_DEV_ID_IMC1_BDX, | ||||
"Intel Broadwell Xeon iMC 1 SMBus controllers" }, | "Intel Broadwell Xeon iMC 1 SMBus controllers" }, | ||||
{0, NULL}, | {0, 0, NULL}, | ||||
}; | }; | ||||
/* Device methods. */ | /* Device methods. */ | ||||
Context not available. | |||||
pci_dev_id = pci_get_device(dev); | pci_dev_id = pci_get_device(dev); | ||||
for (pci_device = imcsmb_pci_devices; | for (pci_device = imcsmb_pci_devices; | ||||
pci_device->name != NULL; | pci_device->name != NULL; | ||||
pci_device++) { | pci_device++) { | ||||
if (pci_dev_id == pci_device->id) { | if (pci_dev_id == pci_device->deviceid) { | ||||
device_set_desc(dev, pci_device->name); | device_set_desc(dev, pci_device->name); | ||||
rc = BUS_PROBE_DEFAULT; | rc = BUS_PROBE_DEFAULT; | ||||
goto out; | goto out; | ||||
Context not available. | |||||
}; | }; | ||||
DRIVER_MODULE(imcsmb_pci, pci, imcsmb_pci_driver, imcsmb_pci_devclass, 0, 0); | DRIVER_MODULE(imcsmb_pci, pci, imcsmb_pci_driver, imcsmb_pci_devclass, 0, 0); | ||||
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, imcsmb_pci, imcsmb_pci_devices, | |||||
sizeof(imcsmb_pci_devices[0]), nitems(imcsmb_pci_devices) - 1); | |||||
MODULE_DEPEND(imcsmb_pci, pci, 1, 1, 1); | MODULE_DEPEND(imcsmb_pci, pci, 1, 1, 1); | ||||
MODULE_VERSION(imcsmb_pci, 1); | MODULE_VERSION(imcsmb_pci, 1); | ||||
Context not available. |