diff options
Diffstat (limited to 'sys/dev/hyperv/utilities/hv_heartbeat.c')
-rw-r--r-- | sys/dev/hyperv/utilities/hv_heartbeat.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/hyperv/utilities/hv_heartbeat.c b/sys/dev/hyperv/utilities/hv_heartbeat.c index 5f4fcf6..91561eb 100644 --- a/sys/dev/hyperv/utilities/hv_heartbeat.c +++ b/sys/dev/hyperv/utilities/hv_heartbeat.c @@ -36,9 +36,10 @@ #include <dev/hyperv/include/hyperv.h> #include "hv_util.h" +#include "vmbus_if.h" /* Heartbeat Service */ -static hv_guid service_guid = { .data = +static const hv_guid service_guid = { .data = {0x39, 0x4f, 0x16, 0x57, 0x15, 0x91, 0x78, 0x4e, 0xab, 0x55, 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d} }; @@ -60,7 +61,7 @@ hv_heartbeat_cb(void *context) softc = (hv_util_sc*)context; buf = softc->receive_buffer;; - channel = softc->hv_dev->channel; + channel = softc->channel; ret = hv_vmbus_channel_recv_packet(channel, buf, PAGE_SIZE, &recvlen, &requestid); @@ -93,16 +94,13 @@ hv_heartbeat_cb(void *context) static int hv_heartbeat_probe(device_t dev) { - const char *p = vmbus_get_type(dev); - if (resource_disabled("hvheartbeat", 0)) return ENXIO; - if (!memcmp(p, &service_guid, sizeof(hv_guid))) { + if (VMBUS_PROBE_GUID(device_get_parent(dev), dev, &service_guid) == 0) { device_set_desc(dev, "Hyper-V Heartbeat Service"); return BUS_PROBE_DEFAULT; } - return ENXIO; } |