Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/vmbus/hv_connection.c
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/** | /** | ||||
* Send a disconnect request on the partition service connection | * Send a disconnect request on the partition service connection | ||||
*/ | */ | ||||
int | int | ||||
hv_vmbus_disconnect(void) | hv_vmbus_disconnect(void) | ||||
{ | { | ||||
int ret = 0; | |||||
hv_vmbus_channel_unload msg; | |||||
msg.message_type = HV_CHANNEL_MESSAGE_UNLOAD; | |||||
ret = hv_vmbus_post_message(&msg, sizeof(hv_vmbus_channel_unload)); | |||||
mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); | mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); | ||||
free(hv_vmbus_g_connection.channels, M_DEVBUF); | free(hv_vmbus_g_connection.channels, M_DEVBUF); | ||||
hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; | hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; | ||||
return (ret); | return (0); | ||||
} | } | ||||
static __inline void | static __inline void | ||||
vmbus_event_flags_proc(volatile u_long *event_flags, int flag_cnt) | vmbus_event_flags_proc(volatile u_long *event_flags, int flag_cnt) | ||||
{ | { | ||||
int f; | int f; | ||||
for (f = 0; f < flag_cnt; ++f) { | for (f = 0; f < flag_cnt; ++f) { | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |