Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static int | static int | ||||
vmbus_child_pnpinfo_str(device_t dev, device_t child, char *buf, size_t buflen) | vmbus_child_pnpinfo_str(device_t dev, device_t child, char *buf, size_t buflen) | ||||
{ | { | ||||
char guidbuf[40]; | char guidbuf[40]; | ||||
struct hv_device *dev_ctx = device_get_ivars(child); | struct hv_device *dev_ctx = device_get_ivars(child); | ||||
if (dev_ctx == NULL) | |||||
return (0); | |||||
strlcat(buf, "classid=", buflen); | strlcat(buf, "classid=", buflen); | ||||
snprintf_hv_guid(guidbuf, sizeof(guidbuf), &dev_ctx->class_id); | snprintf_hv_guid(guidbuf, sizeof(guidbuf), &dev_ctx->class_id); | ||||
strlcat(buf, guidbuf, buflen); | strlcat(buf, guidbuf, buflen); | ||||
strlcat(buf, " deviceid=", buflen); | strlcat(buf, " deviceid=", buflen); | ||||
snprintf_hv_guid(guidbuf, sizeof(guidbuf), &dev_ctx->device_id); | snprintf_hv_guid(guidbuf, sizeof(guidbuf), &dev_ctx->device_id); | ||||
strlcat(buf, guidbuf, buflen); | strlcat(buf, guidbuf, buflen); | ||||
▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | vmbus_attach(device_t dev) | ||||
* If the system has already booted and thread | * If the system has already booted and thread | ||||
* scheduling is possible indicated by the global | * scheduling is possible indicated by the global | ||||
* cold set to zero, we just call the driver | * cold set to zero, we just call the driver | ||||
* initialization directly. | * initialization directly. | ||||
*/ | */ | ||||
if (!cold) | if (!cold) | ||||
vmbus_bus_init(); | vmbus_bus_init(); | ||||
bus_generic_probe(dev); | |||||
return (0); | return (0); | ||||
} | } | ||||
static void | static void | ||||
vmbus_init(void) | vmbus_init(void) | ||||
{ | { | ||||
if (vm_guest != VM_GUEST_HV) | if (vm_guest != VM_GUEST_HV) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |