]> err.no Git - linux-2.6/blobdiff - drivers/virtio/virtio_ring.c
V4L/DVB (7851): Fix FW_LOADER depencency at v4l/dvb
[linux-2.6] / drivers / virtio / virtio_ring.c
index aa714028641e630b068f683fc67e6707d6c6a853..937a49d6772cc5271d22ef48cb14df6bf56c07f7 100644 (file)
@@ -184,6 +184,11 @@ static void *vring_get_buf(struct virtqueue *_vq, unsigned int *len)
 
        START_USE(vq);
 
+       if (unlikely(vq->broken)) {
+               END_USE(vq);
+               return NULL;
+       }
+
        if (!more_used(vq)) {
                pr_debug("No more buffers in queue\n");
                END_USE(vq);
@@ -214,10 +219,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)