Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/vmbus.c
Show First 20 Lines • Show All 1,011 Lines • ▼ Show 20 Lines | vmbus_child_pnpinfo_str(device_t dev, device_t child, char *buf, size_t buflen) | ||||
strlcat(buf, " deviceid=", buflen); | strlcat(buf, " deviceid=", buflen); | ||||
hyperv_guid2str(&dev_ctx->device_id, guidbuf, sizeof(guidbuf)); | hyperv_guid2str(&dev_ctx->device_id, guidbuf, sizeof(guidbuf)); | ||||
strlcat(buf, guidbuf, buflen); | strlcat(buf, guidbuf, buflen); | ||||
return (0); | return (0); | ||||
} | } | ||||
struct hv_device * | struct hv_device * | ||||
hv_vmbus_child_device_create(hv_guid type, hv_guid instance, | hv_vmbus_child_device_create(struct hv_vmbus_channel *channel) | ||||
hv_vmbus_channel *channel) | |||||
{ | { | ||||
hv_device *child_dev; | hv_device *child_dev; | ||||
/* | /* | ||||
* Allocate the new child device | * Allocate the new child device | ||||
*/ | */ | ||||
child_dev = malloc(sizeof(hv_device), M_DEVBUF, M_WAITOK | M_ZERO); | child_dev = malloc(sizeof(hv_device), M_DEVBUF, M_WAITOK | M_ZERO); | ||||
child_dev->channel = channel; | child_dev->channel = channel; | ||||
memcpy(&child_dev->class_id, &type, sizeof(hv_guid)); | child_dev->class_id = channel->ch_guid_type; | ||||
memcpy(&child_dev->device_id, &instance, sizeof(hv_guid)); | child_dev->device_id = channel->ch_guid_inst; | ||||
return (child_dev); | return (child_dev); | ||||
} | } | ||||
void | void | ||||
hv_vmbus_child_device_register(struct vmbus_softc *sc, | hv_vmbus_child_device_register(struct vmbus_softc *sc, | ||||
struct hv_device *child_dev) | struct hv_device *child_dev) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 293 Lines • Show Last 20 Lines |