* [PATCH virtio-next 1/2] caif_virtio: Use vringh_notify_enable correctly
@ 2013-03-22 15:24 Sjur Brændeland
2013-03-22 15:24 ` [PATCH virtio-next 2/2] caif_virtio: Check that vringh_config is not null Sjur Brændeland
0 siblings, 1 reply; 3+ messages in thread
From: Sjur Brændeland @ 2013-03-22 15:24 UTC (permalink / raw)
To: Rusty Russell
Cc: sjur, Linus Walleij, erwan.yvin, virtualization, davem,
Sjur Brændeland
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>
---
Hi,
This patch applies to Rusty's virtio-next branch.
Thanks,
Sjur
drivers/net/caif/caif_virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
1.7.9.5
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH virtio-next 2/2] caif_virtio: Check that vringh_config is not null
2013-03-22 15:24 [PATCH virtio-next 1/2] caif_virtio: Use vringh_notify_enable correctly Sjur Brændeland
@ 2013-03-22 15:24 ` Sjur Brændeland
2013-03-24 3:52 ` Rusty Russell
0 siblings, 1 reply; 3+ messages in thread
From: Sjur Brændeland @ 2013-03-22 15:24 UTC (permalink / raw)
To: Rusty Russell
Cc: sjur, Linus Walleij, erwan.yvin, virtualization, davem,
Sjur Brændeland
Check that vringh_config is not NULL before using it.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
Hi,
This patch applies to Rusty's virtio-next branch.
Thanks,
Sjur
drivers/net/caif/caif_virtio.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index fb80765..316b184 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -670,6 +670,10 @@ static int cfv_probe(struct virtio_device *vdev)
spin_lock_init(&cfv->tx_lock);
/* Get the RX virtio ring. This is a "host side vring". */
+ err = -ENODEV;
+ if (!vdev->vringh_config || !vdev->vringh_config->find_vrhs)
+ goto err;
+
err = vdev->vringh_config->find_vrhs(vdev, 1, &cfv->vr_rx, &vrh_cbs);
if (err)
goto err;
--
1.7.9.5
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH virtio-next 2/2] caif_virtio: Check that vringh_config is not null
2013-03-22 15:24 ` [PATCH virtio-next 2/2] caif_virtio: Check that vringh_config is not null Sjur Brændeland
@ 2013-03-24 3:52 ` Rusty Russell
0 siblings, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2013-03-24 3:52 UTC (permalink / raw)
Cc: sjur, Linus Walleij, erwan.yvin, virtualization, davem,
Sjur Brændeland
Sjur Brændeland <sjur.brandeland@stericsson.com> writes:
> Check that vringh_config is not NULL before using it.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Both applied.
Thanks,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-24 3:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 15:24 [PATCH virtio-next 1/2] caif_virtio: Use vringh_notify_enable correctly Sjur Brændeland
2013-03-22 15:24 ` [PATCH virtio-next 2/2] caif_virtio: Check that vringh_config is not null Sjur Brændeland
2013-03-24 3:52 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).