Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
Show First 20 Lines • Show All 559 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
vmbus_chan_msgproc(struct vmbus_softc *sc, const struct vmbus_message *msg) | vmbus_chan_msgproc(struct vmbus_softc *sc, const struct vmbus_message *msg) | ||||
{ | { | ||||
vmbus_chanmsg_proc_t msg_proc; | vmbus_chanmsg_proc_t msg_proc; | ||||
uint32_t msg_type; | uint32_t msg_type; | ||||
msg_type = ((const struct vmbus_chanmsg_hdr *)msg->msg_data)->chm_type; | msg_type = ((const struct vmbus_chanmsg_hdr *)msg->msg_data)->chm_type; | ||||
if (msg_type >= HV_CHANNEL_MESSAGE_COUNT) { | if (msg_type >= VMBUS_CHANMSG_TYPE_MAX) { | ||||
device_printf(sc->vmbus_dev, "unknown message type 0x%x\n", | device_printf(sc->vmbus_dev, "unknown message type 0x%x\n", | ||||
msg_type); | msg_type); | ||||
return; | return; | ||||
} | } | ||||
msg_proc = vmbus_chanmsg_process[msg_type]; | msg_proc = vmbus_chanmsg_process[msg_type]; | ||||
if (msg_proc != NULL) | if (msg_proc != NULL) | ||||
msg_proc(sc, msg); | msg_proc(sc, msg); | ||||
} | } |