Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/utilities/hv_util.c
Show First 20 Lines • Show All 402 Lines • ▼ Show 20 Lines | hv_util_attach(device_t dev) | ||||
if (service->init != NULL) { | if (service->init != NULL) { | ||||
ret = service->init(service); | ret = service->init(service); | ||||
if (ret) { | if (ret) { | ||||
ret = ENODEV; | ret = ENODEV; | ||||
goto error0; | goto error0; | ||||
} | } | ||||
} | } | ||||
/* | |||||
* These services are not performance critical and do not need | |||||
* batched reading. Furthermore, some services such as KVP can | |||||
* only handle one message from the host at a time. | |||||
* Turn off batched reading for all util drivers before we open the | |||||
* channel. | |||||
*/ | |||||
hv_set_channel_read_state(hv_dev->channel, FALSE); | |||||
ret = hv_vmbus_channel_open(hv_dev->channel, 4 * PAGE_SIZE, | ret = hv_vmbus_channel_open(hv_dev->channel, 4 * PAGE_SIZE, | ||||
4 * PAGE_SIZE, NULL, 0, | 4 * PAGE_SIZE, NULL, 0, | ||||
service->callback, hv_dev->channel); | service->callback, hv_dev->channel); | ||||
if (ret) | if (ret) | ||||
goto error0; | goto error0; | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |