diff options
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index e66de0c12fc1..fdc23678117b 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -302,10 +302,12 @@ static int virtnet_open(struct net_device *dev) | |||
302 | 302 | ||
303 | /* If all buffers were filled by other side before we napi_enabled, we | 303 | /* If all buffers were filled by other side before we napi_enabled, we |
304 | * won't get another interrupt, so process any outstanding packets | 304 | * won't get another interrupt, so process any outstanding packets |
305 | * now. virtnet_poll wants re-enable the queue, so we disable here. */ | 305 | * now. virtnet_poll wants re-enable the queue, so we disable here. |
306 | vi->rvq->vq_ops->disable_cb(vi->rvq); | 306 | * We synchronize against interrupts via NAPI_STATE_SCHED */ |
307 | netif_rx_schedule(vi->dev, &vi->napi); | 307 | if (netif_rx_schedule_prep(dev, &vi->napi)) { |
308 | 308 | vi->rvq->vq_ops->disable_cb(vi->rvq); | |
309 | __netif_rx_schedule(dev, &vi->napi); | ||
310 | } | ||
309 | return 0; | 311 | return 0; |
310 | } | 312 | } |
311 | 313 | ||