Skip to content

Commit

Permalink
caif_virtio: Use vringh_notify_enable correctly
Browse files Browse the repository at this point in the history
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 <sjur.brandeland@stericsson.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Sjur Brændeland authored and Rusty Russell committed Mar 24, 2013
1 parent cf994e0 commit b2273be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/caif/caif_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota)

/* 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);
Expand Down

0 comments on commit b2273be

Please sign in to comment.