]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/virtio/virtio_ring.c
virtio: don't always force a notification when ring is full
[linux-2.6-omap-h63xx.git] / drivers / virtio / virtio_ring.c
index 72bf8bc090142f02a9065c0ff0448299a5e9a2e7..21d9a62767afb13e557b533852ca9827bb28cb18 100644 (file)
@@ -87,8 +87,11 @@ static int vring_add_buf(struct virtqueue *_vq,
        if (vq->num_free < out + in) {
                pr_debug("Can't add buf len %i - avail = %i\n",
                         out + in, vq->num_free);
-               /* We notify *even if* VRING_USED_F_NO_NOTIFY is set here. */
-               vq->notify(&vq->vq);
+               /* FIXME: for historical reasons, we force a notify here if
+                * there are outgoing parts to the buffer.  Presumably the
+                * host should service the ring ASAP. */
+               if (out)
+                       vq->notify(&vq->vq);
                END_USE(vq);
                return -ENOSPC;
        }