aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vmware
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2019-08-25 18:46:10 +0000
committerHiroki Sato <hrs@FreeBSD.org>2019-08-25 18:46:10 +0000
commit639eac208771e9eb3d1141882514be35377abeee (patch)
tree6771d7d235e6b33010703ec2db3e23e14e331ee7 /sys/dev/vmware
parentbabc4e81450eb00be7419ca97ed29a98febc3b03 (diff)
Notes
Diffstat (limited to 'sys/dev/vmware')
-rw-r--r--sys/dev/vmware/vmci/vmci.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/dev/vmware/vmci/vmci.c b/sys/dev/vmware/vmci/vmci.c
index d2e6f9b30e01..91fcb39ed6ed 100644
--- a/sys/dev/vmware/vmci/vmci.c
+++ b/sys/dev/vmware/vmci/vmci.c
@@ -73,6 +73,16 @@ static driver_t vmci_driver = {
static devclass_t vmci_devclass;
DRIVER_MODULE(vmci, pci, vmci_driver, vmci_devclass, 0, 0);
MODULE_VERSION(vmci, VMCI_VERSION);
+const struct {
+ uint16_t vendor;
+ uint16_t device;
+ const char *desc;
+} vmci_ids[] = {
+ { VMCI_VMWARE_VENDOR_ID, VMCI_VMWARE_DEVICE_ID,
+ "VMware Virtual Machine Communication Interface" },
+};
+MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, vmci, vmci_ids,
+ nitems(vmci_ids));
MODULE_DEPEND(vmci, pci, 1, 1, 1);
@@ -112,10 +122,9 @@ static int
vmci_probe(device_t dev)
{
- if (pci_get_vendor(dev) == VMCI_VMWARE_VENDOR_ID &&
- pci_get_device(dev) == VMCI_VMWARE_DEVICE_ID) {
- device_set_desc(dev,
- "VMware Virtual Machine Communication Interface");
+ if (pci_get_vendor(dev) == vmci_ids[0].vendor &&
+ pci_get_device(dev) == vmci_ids[0].device) {
+ device_set_desc(dev, vmci_ids[0].desc);
return (BUS_PROBE_DEFAULT);
}