Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/utilities/hv_heartbeat.c
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | vmbus_heartbeat_cb(struct vmbus_channel *chan, void *xsc) | ||||
} | } | ||||
hdr = data; | hdr = data; | ||||
/* | /* | ||||
* Update request, which will be echoed back as response. | * Update request, which will be echoed back as response. | ||||
*/ | */ | ||||
switch (hdr->ic_type) { | switch (hdr->ic_type) { | ||||
case VMBUS_ICMSG_TYPE_NEGOTIATE: | case VMBUS_ICMSG_TYPE_NEGOTIATE: | ||||
error = vmbus_ic_negomsg(sc, data, dlen); | error = vmbus_ic_negomsg(sc, data, &dlen); | ||||
if (error) | if (error) | ||||
return; | return; | ||||
break; | break; | ||||
case VMBUS_ICMSG_TYPE_HEARTBEAT: | case VMBUS_ICMSG_TYPE_HEARTBEAT: | ||||
/* Only ic_seq is a must */ | /* Only ic_seq is a must */ | ||||
if (dlen < VMBUS_ICMSG_HEARTBEAT_SIZE_MIN) { | if (dlen < VMBUS_ICMSG_HEARTBEAT_SIZE_MIN) { | ||||
device_printf(sc->ic_dev, "invalid heartbeat len %d\n", | device_printf(sc->ic_dev, "invalid heartbeat len %d\n", | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |