From b53818df80b27a95e42b8a4302678e779f8b4042 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 7 Apr 2008 14:30:28 +1000 Subject: [PATCH] --- yaml --- r: 88186 b: refs/heads/master c: 2557a933b795c1988c721ebb871cd735128bb9cb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/virtio/virtio_ring.c | 3 --- trunk/include/linux/virtio.h | 5 ++++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 73b1a62bf3e5..491e694a6a31 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4cac04dd63fa3b202ee313ed1afbbd135ab887ee +refs/heads/master: 2557a933b795c1988c721ebb871cd735128bb9cb diff --git a/trunk/drivers/virtio/virtio_ring.c b/trunk/drivers/virtio/virtio_ring.c index aa714028641e..c2fa5c630813 100644 --- a/trunk/drivers/virtio/virtio_ring.c +++ b/trunk/drivers/virtio/virtio_ring.c @@ -214,10 +214,7 @@ static void vring_disable_cb(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); - START_USE(vq); - BUG_ON(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT); vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; - END_USE(vq); } static bool vring_enable_cb(struct virtqueue *_vq) diff --git a/trunk/include/linux/virtio.h b/trunk/include/linux/virtio.h index 12c18ac1b973..e7d10845b3c1 100644 --- a/trunk/include/linux/virtio.h +++ b/trunk/include/linux/virtio.h @@ -41,6 +41,8 @@ struct virtqueue * Returns NULL or the "data" token handed to add_buf. * @disable_cb: disable callbacks * vq: the struct virtqueue we're talking about. + * Note that this is not necessarily synchronous, hence unreliable and only + * useful as an optimization. * @enable_cb: restart callbacks after disable_cb. * vq: the struct virtqueue we're talking about. * This re-enables callbacks; it returns "false" if there are pending @@ -48,7 +50,8 @@ struct virtqueue * checking for more work, and enabling callbacks. * * Locking rules are straightforward: the driver is responsible for - * locking. No two operations may be invoked simultaneously. + * locking. No two operations may be invoked simultaneously, with the exception + * of @disable_cb. * * All operations can be called in any context. */