Index: head/sys/dev/hyperv/netvsc/hv_net_vsc.h =================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h @@ -893,7 +893,6 @@ */ typedef struct netvsc_dev_ { struct hv_device *dev; - int num_outstanding_sends; /* Send buffer allocated by us but manages by NetVSP */ void *send_buf; Index: head/sys/dev/hyperv/netvsc/hv_net_vsc.c =================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c @@ -117,7 +117,7 @@ * permit incoming packets if and only if there * are outstanding sends. */ - if (net_dev->destroy && net_dev->num_outstanding_sends == 0) { + if (net_dev->destroy) { return (NULL); } @@ -723,11 +723,6 @@ /* Stop outbound traffic ie sends and receives completions */ net_dev->destroy = TRUE; - /* Wait for all send completions */ - while (net_dev->num_outstanding_sends) { - DELAY(100); - } - hv_nv_disconnect_from_vsp(net_dev); /* At this point, no one should be accessing net_dev except in here */ @@ -805,8 +800,6 @@ net_vsc_pkt->compl.send.send_completion_context); } - - atomic_subtract_int(&net_dev->num_outstanding_sends, 1); } } @@ -818,14 +811,9 @@ int hv_nv_on_send(struct hv_device *device, netvsc_packet *pkt) { - netvsc_dev *net_dev; nvsp_msg send_msg; int ret; - net_dev = hv_nv_get_outbound_net_device(device); - if (!net_dev) - return (ENODEV); - send_msg.hdr.msg_type = nvsp_msg_1_type_send_rndis_pkt; if (pkt->is_data_pkt) { /* 0 is RMC_DATA */ @@ -851,10 +839,6 @@ HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); } - /* Record outstanding send only if send_packet() succeeded */ - if (ret == 0) - atomic_add_int(&net_dev->num_outstanding_sends, 1); - return (ret); }