From: Sjur Brændeland Date: Sun, 24 Mar 2013 03:49:44 +0000 (+1030) Subject: caif_virtio: Use vringh_notify_enable correctly X-Git-Tag: upstream/snapshot3+hdmi~5216^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2273be8d2df7b77165a70930064aeb9e8faebfa;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git caif_virtio: Use vringh_notify_enable correctly Check on the correct return value from vringh_notify_enable_kern(). It returns false if more packets are available, not true. Signed-off-by: Sjur Brændeland Signed-off-by: Rusty Russell --- diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c index f6caa1e..fb80765 100644 --- a/drivers/net/caif/caif_virtio.c +++ b/drivers/net/caif/caif_virtio.c @@ -318,7 +318,7 @@ exit: /* Really out of patckets? (stolen from virtio_net)*/ napi_complete(napi); - if (unlikely(vringh_notify_enable_kern(cfv->vr_rx)) && + if (unlikely(!vringh_notify_enable_kern(cfv->vr_rx)) && napi_schedule_prep(napi)) { vringh_notify_disable_kern(cfv->vr_rx); __napi_schedule(napi);