hv_connection.c (295309) | hv_connection.c (295964) |
---|---|
1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 234 unchanged lines hidden (view full) --- 243 cleanup: 244 245 hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; 246 247 mtx_destroy(&hv_vmbus_g_connection.channel_lock); 248 mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); 249 250 if (hv_vmbus_g_connection.interrupt_page != NULL) { | 1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 234 unchanged lines hidden (view full) --- 243 cleanup: 244 245 hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; 246 247 mtx_destroy(&hv_vmbus_g_connection.channel_lock); 248 mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); 249 250 if (hv_vmbus_g_connection.interrupt_page != NULL) { |
251 contigfree( 252 hv_vmbus_g_connection.interrupt_page, 253 PAGE_SIZE, 254 M_DEVBUF); | 251 free(hv_vmbus_g_connection.interrupt_page, M_DEVBUF); |
255 hv_vmbus_g_connection.interrupt_page = NULL; 256 } 257 258 free(hv_vmbus_g_connection.monitor_page_1, M_DEVBUF); 259 free(hv_vmbus_g_connection.monitor_page_2, M_DEVBUF); 260 261 if (msg_info) { 262 sema_destroy(&msg_info->wait_sema); --- 11 unchanged lines hidden (view full) --- 274hv_vmbus_disconnect(void) { 275 int ret = 0; 276 hv_vmbus_channel_unload msg; 277 278 msg.message_type = HV_CHANNEL_MESSAGE_UNLOAD; 279 280 ret = hv_vmbus_post_message(&msg, sizeof(hv_vmbus_channel_unload)); 281 | 252 hv_vmbus_g_connection.interrupt_page = NULL; 253 } 254 255 free(hv_vmbus_g_connection.monitor_page_1, M_DEVBUF); 256 free(hv_vmbus_g_connection.monitor_page_2, M_DEVBUF); 257 258 if (msg_info) { 259 sema_destroy(&msg_info->wait_sema); --- 11 unchanged lines hidden (view full) --- 271hv_vmbus_disconnect(void) { 272 int ret = 0; 273 hv_vmbus_channel_unload msg; 274 275 msg.message_type = HV_CHANNEL_MESSAGE_UNLOAD; 276 277 ret = hv_vmbus_post_message(&msg, sizeof(hv_vmbus_channel_unload)); 278 |
282 contigfree(hv_vmbus_g_connection.interrupt_page, PAGE_SIZE, M_DEVBUF); | 279 free(hv_vmbus_g_connection.interrupt_page, M_DEVBUF); |
283 284 mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); 285 286 free(hv_vmbus_g_connection.channels, M_DEVBUF); 287 hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; 288 289 return (ret); 290} --- 122 unchanged lines hidden --- | 280 281 mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); 282 283 free(hv_vmbus_g_connection.channels, M_DEVBUF); 284 hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; 285 286 return (ret); 287} --- 122 unchanged lines hidden --- |