@@ -712,8 +712,13 @@ void netvsc_device_remove(struct hv_device *device)
712712 for (i = 0 ; i < net_device -> num_chn ; i ++ ) {
713713 /* See also vmbus_reset_channel_cb(). */
714714 /* only disable enabled NAPI channel */
715- if (i < ndev -> real_num_rx_queues )
715+ if (i < ndev -> real_num_rx_queues ) {
716+ netif_queue_set_napi (ndev , i , NETDEV_QUEUE_TYPE_TX ,
717+ NULL );
718+ netif_queue_set_napi (ndev , i , NETDEV_QUEUE_TYPE_RX ,
719+ NULL );
716720 napi_disable (& net_device -> chan_table [i ].napi );
721+ }
717722
718723 netif_napi_del (& net_device -> chan_table [i ].napi );
719724 }
@@ -1826,6 +1831,10 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device,
18261831 netdev_dbg (ndev , "hv_netvsc channel opened successfully\n" );
18271832
18281833 napi_enable (& net_device -> chan_table [0 ].napi );
1834+ netif_queue_set_napi (ndev , 0 , NETDEV_QUEUE_TYPE_RX ,
1835+ & net_device -> chan_table [0 ].napi );
1836+ netif_queue_set_napi (ndev , 0 , NETDEV_QUEUE_TYPE_TX ,
1837+ & net_device -> chan_table [0 ].napi );
18291838
18301839 /* Connect with the NetVsp */
18311840 ret = netvsc_connect_vsp (device , net_device , device_info );
@@ -1844,6 +1853,8 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device,
18441853
18451854close :
18461855 RCU_INIT_POINTER (net_device_ctx -> nvdev , NULL );
1856+ netif_queue_set_napi (ndev , 0 , NETDEV_QUEUE_TYPE_TX , NULL );
1857+ netif_queue_set_napi (ndev , 0 , NETDEV_QUEUE_TYPE_RX , NULL );
18471858 napi_disable (& net_device -> chan_table [0 ].napi );
18481859
18491860 /* Now, we can close the channel safely */
0 commit comments