caif_virtio: Use vringh_notify_enable correctly
authorSjur Brændeland <sjur.brandeland@stericsson.com>
Sun, 24 Mar 2013 03:49:44 +0000 (14:19 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 24 Mar 2013 03:59:14 +0000 (14:29 +1030)
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>
drivers/net/caif/caif_virtio.c

index f6caa1eb4cd65ea9fe0acf38ba62a3ecbe5760cc..fb80765e258e45ef68c6111db62ebc44af6de3e3 100644 (file)
@@ -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);