nvdev 196 drivers/net/hyperv/hyperv_net.h struct netvsc_device *nvdev, nvdev 202 drivers/net/hyperv/hyperv_net.h struct netvsc_device *nvdev, nvdev 204 drivers/net/hyperv/hyperv_net.h int rndis_filter_open(struct netvsc_device *nvdev); nvdev 205 drivers/net/hyperv/hyperv_net.h int rndis_filter_close(struct netvsc_device *nvdev); nvdev 208 drivers/net/hyperv/hyperv_net.h void rndis_filter_update(struct netvsc_device *nvdev); nvdev 210 drivers/net/hyperv/hyperv_net.h struct netvsc_device *nvdev); nvdev 214 drivers/net/hyperv/hyperv_net.h struct netvsc_device *nvdev, nvdev 922 drivers/net/hyperv/hyperv_net.h struct netvsc_device __rcu *nvdev; nvdev 37 drivers/net/hyperv/netvsc.c struct netvsc_device *nv_dev = rtnl_dereference(net_device_ctx->nvdev); nvdev 63 drivers/net/hyperv/netvsc.c struct netvsc_device *nvdev = nvdev 74 drivers/net/hyperv/netvsc.c rdev = nvdev->extension; nvdev 76 drivers/net/hyperv/netvsc.c ret = rndis_set_subchannel(rdev->ndev, nvdev, NULL); nvdev 81 drivers/net/hyperv/netvsc.c for (i = 1; i < nvdev->num_chn; i++) nvdev 82 drivers/net/hyperv/netvsc.c netif_napi_del(&nvdev->chan_table[i].napi); nvdev 84 drivers/net/hyperv/netvsc.c nvdev->max_chn = 1; nvdev 85 drivers/net/hyperv/netvsc.c nvdev->num_chn = 1; nvdev 116 drivers/net/hyperv/netvsc.c struct netvsc_device *nvdev nvdev 120 drivers/net/hyperv/netvsc.c kfree(nvdev->extension); nvdev 121 drivers/net/hyperv/netvsc.c vfree(nvdev->recv_buf); nvdev 122 drivers/net/hyperv/netvsc.c vfree(nvdev->send_buf); nvdev 123 drivers/net/hyperv/netvsc.c kfree(nvdev->send_section_map); nvdev 126 drivers/net/hyperv/netvsc.c vfree(nvdev->chan_table[i].mrc.slots); nvdev 128 drivers/net/hyperv/netvsc.c kfree(nvdev); nvdev 131 drivers/net/hyperv/netvsc.c static void free_netvsc_device_rcu(struct netvsc_device *nvdev) nvdev 133 drivers/net/hyperv/netvsc.c call_rcu(&nvdev->rcu, free_netvsc_device); nvdev 619 drivers/net/hyperv/netvsc.c = rtnl_dereference(net_device_ctx->nvdev); nvdev 634 drivers/net/hyperv/netvsc.c RCU_INIT_POINTER(net_device_ctx->nvdev, NULL); nvdev 907 drivers/net/hyperv/netvsc.c = rcu_dereference_bh(ndev_ctx->nvdev); nvdev 1025 drivers/net/hyperv/netvsc.c struct netvsc_device *nvdev, nvdev 1052 drivers/net/hyperv/netvsc.c if (++mrc->first == nvdev->recv_completion_cnt) nvdev 1057 drivers/net/hyperv/netvsc.c if (unlikely(nvdev->destroy)) nvdev 1058 drivers/net/hyperv/netvsc.c wake_up(&nvdev->wait_drain); nvdev 1064 drivers/net/hyperv/netvsc.c static void recv_comp_slot_avail(const struct netvsc_device *nvdev, nvdev 1068 drivers/net/hyperv/netvsc.c u32 count = nvdev->recv_completion_cnt; nvdev 1080 drivers/net/hyperv/netvsc.c struct netvsc_device *nvdev, u16 q_idx, nvdev 1083 drivers/net/hyperv/netvsc.c struct netvsc_channel *nvchan = &nvdev->chan_table[q_idx]; nvdev 1088 drivers/net/hyperv/netvsc.c recv_comp_slot_avail(nvdev, mrc, &filled, &avail); nvdev 1091 drivers/net/hyperv/netvsc.c send_recv_completions(ndev, nvdev, nvchan); nvdev 1092 drivers/net/hyperv/netvsc.c recv_comp_slot_avail(nvdev, mrc, &filled, &avail); nvdev 1105 drivers/net/hyperv/netvsc.c if (++mrc->next == nvdev->recv_completion_cnt) nvdev 1427 drivers/net/hyperv/netvsc.c rcu_assign_pointer(net_device_ctx->nvdev, net_device); nvdev 1432 drivers/net/hyperv/netvsc.c RCU_INIT_POINTER(net_device_ctx->nvdev, NULL); nvdev 86 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev; nvdev 95 drivers/net/hyperv/netvsc_drv.c nvdev = rcu_dereference(ndev_ctx->nvdev); nvdev 96 drivers/net/hyperv/netvsc_drv.c if (nvdev) nvdev 97 drivers/net/hyperv/netvsc_drv.c rndis_filter_update(nvdev); nvdev 114 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndev_ctx->nvdev); nvdev 121 drivers/net/hyperv/netvsc_drv.c ret = rndis_filter_open(nvdev); nvdev 127 drivers/net/hyperv/netvsc_drv.c rdev = nvdev->extension; nvdev 130 drivers/net/hyperv/netvsc_drv.c netvsc_tx_enable(nvdev, net); nvdev 147 drivers/net/hyperv/netvsc_drv.c static int netvsc_wait_until_empty(struct netvsc_device *nvdev) nvdev 156 drivers/net/hyperv/netvsc_drv.c for (i = 0; i < nvdev->num_chn; i++) { nvdev 158 drivers/net/hyperv/netvsc_drv.c = nvdev->chan_table[i].channel; nvdev 164 drivers/net/hyperv/netvsc_drv.c napi_synchronize(&nvdev->chan_table[i].napi); nvdev 201 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev); nvdev 204 drivers/net/hyperv/netvsc_drv.c netvsc_tx_disable(nvdev, net); nvdev 207 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 210 drivers/net/hyperv/netvsc_drv.c ret = rndis_filter_close(nvdev); nvdev 216 drivers/net/hyperv/netvsc_drv.c ret = netvsc_wait_until_empty(nvdev); nvdev 874 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev); nvdev 876 drivers/net/hyperv/netvsc_drv.c if (nvdev) { nvdev 877 drivers/net/hyperv/netvsc_drv.c channel->max_combined = nvdev->max_chn; nvdev 878 drivers/net/hyperv/netvsc_drv.c channel->combined_count = nvdev->num_chn; nvdev 886 drivers/net/hyperv/netvsc_drv.c (struct netvsc_device *nvdev) nvdev 895 drivers/net/hyperv/netvsc_drv.c if (nvdev) { nvdev 896 drivers/net/hyperv/netvsc_drv.c dev_info->num_chn = nvdev->num_chn; nvdev 897 drivers/net/hyperv/netvsc_drv.c dev_info->send_sections = nvdev->send_section_cnt; nvdev 898 drivers/net/hyperv/netvsc_drv.c dev_info->send_section_size = nvdev->send_section_size; nvdev 899 drivers/net/hyperv/netvsc_drv.c dev_info->recv_sections = nvdev->recv_section_cnt; nvdev 900 drivers/net/hyperv/netvsc_drv.c dev_info->recv_section_size = nvdev->recv_section_size; nvdev 902 drivers/net/hyperv/netvsc_drv.c memcpy(dev_info->rss_key, nvdev->extension->rss_key, nvdev 916 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev) nvdev 923 drivers/net/hyperv/netvsc_drv.c if (cancel_work_sync(&nvdev->subchan_work)) nvdev 924 drivers/net/hyperv/netvsc_drv.c nvdev->num_chn = 1; nvdev 928 drivers/net/hyperv/netvsc_drv.c netvsc_tx_disable(nvdev, ndev); nvdev 930 drivers/net/hyperv/netvsc_drv.c ret = rndis_filter_close(nvdev); nvdev 937 drivers/net/hyperv/netvsc_drv.c ret = netvsc_wait_until_empty(nvdev); nvdev 947 drivers/net/hyperv/netvsc_drv.c rndis_filter_device_remove(hdev, nvdev); nvdev 957 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev; nvdev 961 drivers/net/hyperv/netvsc_drv.c nvdev = rndis_filter_device_add(hdev, dev_info); nvdev 962 drivers/net/hyperv/netvsc_drv.c if (IS_ERR(nvdev)) nvdev 963 drivers/net/hyperv/netvsc_drv.c return PTR_ERR(nvdev); nvdev 965 drivers/net/hyperv/netvsc_drv.c if (nvdev->num_chn > 1) { nvdev 966 drivers/net/hyperv/netvsc_drv.c ret = rndis_set_subchannel(ndev, nvdev, dev_info); nvdev 970 drivers/net/hyperv/netvsc_drv.c nvdev->max_chn = 1; nvdev 971 drivers/net/hyperv/netvsc_drv.c nvdev->num_chn = 1; nvdev 976 drivers/net/hyperv/netvsc_drv.c nvdev->tx_disable = false; nvdev 983 drivers/net/hyperv/netvsc_drv.c ret = rndis_filter_open(nvdev); nvdev 987 drivers/net/hyperv/netvsc_drv.c rdev = nvdev->extension; nvdev 997 drivers/net/hyperv/netvsc_drv.c rndis_filter_device_remove(hdev, nvdev); nvdev 1006 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev); nvdev 1016 drivers/net/hyperv/netvsc_drv.c if (!nvdev || nvdev->destroy) nvdev 1019 drivers/net/hyperv/netvsc_drv.c if (nvdev->nvsp_version < NVSP_PROTOCOL_VERSION_5) nvdev 1022 drivers/net/hyperv/netvsc_drv.c if (count > nvdev->max_chn) nvdev 1025 drivers/net/hyperv/netvsc_drv.c orig = nvdev->num_chn; nvdev 1027 drivers/net/hyperv/netvsc_drv.c device_info = netvsc_devinfo_get(nvdev); nvdev 1034 drivers/net/hyperv/netvsc_drv.c ret = netvsc_detach(net, nvdev); nvdev 1113 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndevctx->nvdev); nvdev 1118 drivers/net/hyperv/netvsc_drv.c if (!nvdev || nvdev->destroy) nvdev 1121 drivers/net/hyperv/netvsc_drv.c device_info = netvsc_devinfo_get(nvdev); nvdev 1133 drivers/net/hyperv/netvsc_drv.c ret = netvsc_detach(ndev, nvdev); nvdev 1191 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rcu_dereference_rtnl(ndev_ctx->nvdev); nvdev 1215 drivers/net/hyperv/netvsc_drv.c for (i = 0; i < nvdev->num_chn; i++) { nvdev 1216 drivers/net/hyperv/netvsc_drv.c const struct netvsc_channel *nvchan = &nvdev->chan_table[i]; nvdev 1249 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev; nvdev 1255 drivers/net/hyperv/netvsc_drv.c nvdev = rcu_dereference(ndev_ctx->nvdev); nvdev 1256 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 1268 drivers/net/hyperv/netvsc_drv.c for (i = 0; i < nvdev->num_chn; i++) { nvdev 1269 drivers/net/hyperv/netvsc_drv.c const struct netvsc_channel *nvchan = &nvdev->chan_table[i]; nvdev 1304 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev); nvdev 1312 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 1321 drivers/net/hyperv/netvsc_drv.c err = rndis_filter_set_device_mac(nvdev, addr->sa_data); nvdev 1384 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev); nvdev 1386 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 1393 drivers/net/hyperv/netvsc_drv.c + NETVSC_QUEUE_STATS_LEN(nvdev) nvdev 1404 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev); nvdev 1413 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 1423 drivers/net/hyperv/netvsc_drv.c for (j = 0; j < nvdev->num_chn; j++) { nvdev 1424 drivers/net/hyperv/netvsc_drv.c qstats = &nvdev->chan_table[j].tx_stats; nvdev 1434 drivers/net/hyperv/netvsc_drv.c qstats = &nvdev->chan_table[j].rx_stats; nvdev 1461 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev); nvdev 1465 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 1480 drivers/net/hyperv/netvsc_drv.c for (i = 0; i < nvdev->num_chn; i++) { nvdev 1551 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev); nvdev 1553 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 1558 drivers/net/hyperv/netvsc_drv.c info->data = nvdev->num_chn; nvdev 1649 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *ndev = rtnl_dereference(ndc->nvdev); nvdev 1675 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *ndev = rtnl_dereference(ndc->nvdev); nvdev 1708 drivers/net/hyperv/netvsc_drv.c static void __netvsc_get_ringparam(struct netvsc_device *nvdev, nvdev 1713 drivers/net/hyperv/netvsc_drv.c ring->rx_pending = nvdev->recv_section_cnt; nvdev 1714 drivers/net/hyperv/netvsc_drv.c ring->tx_pending = nvdev->send_section_cnt; nvdev 1716 drivers/net/hyperv/netvsc_drv.c if (nvdev->nvsp_version <= NVSP_PROTOCOL_VERSION_2) nvdev 1721 drivers/net/hyperv/netvsc_drv.c ring->rx_max_pending = max_buf_size / nvdev->recv_section_size; nvdev 1723 drivers/net/hyperv/netvsc_drv.c / nvdev->send_section_size; nvdev 1730 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndevctx->nvdev); nvdev 1732 drivers/net/hyperv/netvsc_drv.c if (!nvdev) nvdev 1735 drivers/net/hyperv/netvsc_drv.c __netvsc_get_ringparam(nvdev, ring); nvdev 1742 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndevctx->nvdev); nvdev 1748 drivers/net/hyperv/netvsc_drv.c if (!nvdev || nvdev->destroy) nvdev 1752 drivers/net/hyperv/netvsc_drv.c __netvsc_get_ringparam(nvdev, &orig); nvdev 1763 drivers/net/hyperv/netvsc_drv.c device_info = netvsc_devinfo_get(nvdev); nvdev 1771 drivers/net/hyperv/netvsc_drv.c ret = netvsc_detach(ndev, nvdev); nvdev 1794 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev = rtnl_dereference(ndevctx->nvdev); nvdev 1799 drivers/net/hyperv/netvsc_drv.c if (!nvdev || nvdev->destroy) nvdev 1815 drivers/net/hyperv/netvsc_drv.c ret = rndis_filter_set_offload_params(ndev, nvdev, &offloads); nvdev 1906 drivers/net/hyperv/netvsc_drv.c net_device = rtnl_dereference(ndev_ctx->nvdev); nvdev 2001 drivers/net/hyperv/netvsc_drv.c if (!rtnl_dereference(net_device_ctx->nvdev)) nvdev 2178 drivers/net/hyperv/netvsc_drv.c netvsc_dev = rtnl_dereference(net_device_ctx->nvdev); nvdev 2227 drivers/net/hyperv/netvsc_drv.c netvsc_dev = rtnl_dereference(net_device_ctx->nvdev); nvdev 2266 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev; nvdev 2319 drivers/net/hyperv/netvsc_drv.c nvdev = rndis_filter_device_add(dev, device_info); nvdev 2320 drivers/net/hyperv/netvsc_drv.c if (IS_ERR(nvdev)) { nvdev 2321 drivers/net/hyperv/netvsc_drv.c ret = PTR_ERR(nvdev); nvdev 2338 drivers/net/hyperv/netvsc_drv.c if (nvdev->num_chn > 1) nvdev 2339 drivers/net/hyperv/netvsc_drv.c schedule_work(&nvdev->subchan_work); nvdev 2349 drivers/net/hyperv/netvsc_drv.c if (nvdev->nvsp_version >= NVSP_PROTOCOL_VERSION_2) nvdev 2354 drivers/net/hyperv/netvsc_drv.c nvdev->tx_disable = false; nvdev 2370 drivers/net/hyperv/netvsc_drv.c rndis_filter_device_remove(dev, nvdev); nvdev 2386 drivers/net/hyperv/netvsc_drv.c struct netvsc_device *nvdev; nvdev 2399 drivers/net/hyperv/netvsc_drv.c nvdev = rtnl_dereference(ndev_ctx->nvdev); nvdev 2400 drivers/net/hyperv/netvsc_drv.c if (nvdev) nvdev 2401 drivers/net/hyperv/netvsc_drv.c cancel_work_sync(&nvdev->subchan_work); nvdev 2411 drivers/net/hyperv/netvsc_drv.c if (nvdev) nvdev 2412 drivers/net/hyperv/netvsc_drv.c rndis_filter_device_remove(dev, nvdev); nvdev 261 drivers/net/hyperv/rndis_filter.c struct netvsc_device *nvdev, nvdev 264 drivers/net/hyperv/rndis_filter.c struct rndis_device *dev = nvdev->extension; nvdev 379 drivers/net/hyperv/rndis_filter.c struct netvsc_device *nvdev, nvdev 449 drivers/net/hyperv/rndis_filter.c ret = netvsc_recv_callback(ndev, nvdev, nvchan); nvdev 498 drivers/net/hyperv/rndis_filter.c struct netvsc_device *nvdev, nvdev 527 drivers/net/hyperv/rndis_filter.c u32 nvsp_version = nvdev->nvsp_version; nvdev 644 drivers/net/hyperv/rndis_filter.c int rndis_filter_set_device_mac(struct netvsc_device *nvdev, nvdev 647 drivers/net/hyperv/rndis_filter.c struct rndis_device *rdev = nvdev->extension; nvdev 710 drivers/net/hyperv/rndis_filter.c struct netvsc_device *nvdev, nvdev 713 drivers/net/hyperv/rndis_filter.c struct rndis_device *rdev = nvdev->extension; nvdev 720 drivers/net/hyperv/rndis_filter.c u32 vsp_version = nvdev->nvsp_version; nvdev 938 drivers/net/hyperv/rndis_filter.c void rndis_filter_update(struct netvsc_device *nvdev) nvdev 940 drivers/net/hyperv/rndis_filter.c struct rndis_device *rdev = nvdev->extension; nvdev 946 drivers/net/hyperv/rndis_filter.c struct netvsc_device *nvdev) nvdev 981 drivers/net/hyperv/rndis_filter.c nvdev->max_pkt = init_complete->max_pkt_per_msg; nvdev 982 drivers/net/hyperv/rndis_filter.c nvdev->pkt_align = 1 << init_complete->pkt_alignment_factor; nvdev 996 drivers/net/hyperv/rndis_filter.c static bool netvsc_device_idle(const struct netvsc_device *nvdev) nvdev 1000 drivers/net/hyperv/rndis_filter.c for (i = 0; i < nvdev->num_chn; i++) { nvdev 1001 drivers/net/hyperv/rndis_filter.c const struct netvsc_channel *nvchan = &nvdev->chan_table[i]; nvdev 1013 drivers/net/hyperv/rndis_filter.c static void rndis_filter_halt_device(struct netvsc_device *nvdev, nvdev 1035 drivers/net/hyperv/rndis_filter.c nvdev->destroy = true; nvdev 1041 drivers/net/hyperv/rndis_filter.c wait_event(nvdev->wait_drain, netvsc_device_idle(nvdev)); nvdev 1097 drivers/net/hyperv/rndis_filter.c nvscdev = rcu_dereference_raw(ndev_ctx->nvdev); nvdev 1128 drivers/net/hyperv/rndis_filter.c struct netvsc_device *nvdev, nvdev 1131 drivers/net/hyperv/rndis_filter.c struct nvsp_message *init_packet = &nvdev->channel_init_pkt; nvdev 1134 drivers/net/hyperv/rndis_filter.c struct rndis_device *rdev = nvdev->extension; nvdev 1143 drivers/net/hyperv/rndis_filter.c nvdev->num_chn - 1; nvdev 1156 drivers/net/hyperv/rndis_filter.c wait_for_completion(&nvdev->channel_init_wait); nvdev 1162 drivers/net/hyperv/rndis_filter.c nvdev->num_chn = 1 + nvdev 1166 drivers/net/hyperv/rndis_filter.c wait_event(nvdev->subchan_open, nvdev 1167 drivers/net/hyperv/rndis_filter.c atomic_read(&nvdev->open_chn) == nvdev->num_chn); nvdev 1170 drivers/net/hyperv/rndis_filter.c ndev_ctx->tx_table[i] = i % nvdev->num_chn; nvdev 1178 drivers/net/hyperv/rndis_filter.c netif_set_real_num_tx_queues(ndev, nvdev->num_chn); nvdev 1179 drivers/net/hyperv/rndis_filter.c netif_set_real_num_rx_queues(ndev, nvdev->num_chn); nvdev 1185 drivers/net/hyperv/rndis_filter.c struct netvsc_device *nvdev) nvdev 1195 drivers/net/hyperv/rndis_filter.c ret = rndis_query_hwcaps(rndis_device, nvdev, &hwcaps); nvdev 1274 drivers/net/hyperv/rndis_filter.c ret = rndis_filter_set_offload_params(net, nvdev, &offloads); nvdev 1442 drivers/net/hyperv/rndis_filter.c int rndis_filter_open(struct netvsc_device *nvdev) nvdev 1444 drivers/net/hyperv/rndis_filter.c if (!nvdev) nvdev 1447 drivers/net/hyperv/rndis_filter.c return rndis_filter_open_device(nvdev->extension); nvdev 1450 drivers/net/hyperv/rndis_filter.c int rndis_filter_close(struct netvsc_device *nvdev) nvdev 1452 drivers/net/hyperv/rndis_filter.c if (!nvdev) nvdev 1455 drivers/net/hyperv/rndis_filter.c return rndis_filter_close_device(nvdev->extension);