diff options
author | Heinz Graalfs <graalfs@linux.vnet.ibm.com> | 2013-10-29 09:39:48 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-10-29 11:28:12 +1030 |
commit | 5b1bf7cb673ade0ab5c75f200dce911d9fb91c21 (patch) | |
tree | c90e760edaf94d91d94ff366e881fe5562e4478d /include/linux/virtio.h | |
parent | 46f9c2b925ac12e5ad8b8b7c90c71dacc9d5db37 (diff) |
virtio_ring: let virtqueue_{kick()/notify()} return a bool
virtqueue_{kick()/notify()} should exploit the new host notification API.
If the notify call returned with a negative value the host kick failed
(e.g. a kick triggered after a device was hot-unplugged). In this case
the virtqueue is set to 'broken' and false is returned, otherwise true.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r-- | include/linux/virtio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 36d36cc89329..9b4de15fcb2f 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -51,11 +51,11 @@ int virtqueue_add_sgs(struct virtqueue *vq, void *data, gfp_t gfp); -void virtqueue_kick(struct virtqueue *vq); +bool virtqueue_kick(struct virtqueue *vq); bool virtqueue_kick_prepare(struct virtqueue *vq); -void virtqueue_notify(struct virtqueue *vq); +bool virtqueue_notify(struct virtqueue *vq); void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len); |