return virtnet_napi_enable(vq, napi);
}
+static void virtnet_napi_tx_disable(struct napi_struct *napi)
+{
+ if (napi->weight)
+ napi_disable(napi);
+}
+
static void refill_work(struct work_struct *work)
{
struct virtnet_info *vi =
for (i = 0; i < vi->max_queue_pairs; i++) {
napi_disable(&vi->rq[i].napi);
- napi_disable(&vi->sq[i].napi);
+ virtnet_napi_tx_disable(&vi->sq[i].napi);
}
return 0;
if (netif_running(vi->dev)) {
for (i = 0; i < vi->max_queue_pairs; i++) {
napi_disable(&vi->rq[i].napi);
- napi_disable(&vi->sq[i].napi);
+ virtnet_napi_tx_disable(&vi->sq[i].napi);
}
}
}