search for: virtqueue_callback

Displaying 4 results from an estimated 4 matches for "virtqueue_callback".

2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 5d34764..7b7435d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -197,6 +197,7 @@ static int virtblk_probe(struct virtio_device *vdev) u64 cap; u32 v; u32 blk_size, sg_elems; + virtqueue_callback *callback[] = { blk_done }; if (index_to_minor(index) >= 1 << MINORBITS) return -ENOSPC; @@ -224,11 +225,9 @@ static int virtblk_probe(struct virtio_device *vdev) sg_init_table(vblk->sg, vblk->sg_elems); /* We expect one virtqueue, for output. */ - vblk->vq = vdev-&gt...
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 5d34764..7b7435d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -197,6 +197,7 @@ static int virtblk_probe(struct virtio_device *vdev) u64 cap; u32 v; u32 blk_size, sg_elems; + virtqueue_callback *callback[] = { blk_done }; if (index_to_minor(index) >= 1 << MINORBITS) return -ENOSPC; @@ -224,11 +225,9 @@ static int virtblk_probe(struct virtio_device *vdev) sg_init_table(vblk->sg, vblk->sg_elems); /* We expect one virtqueue, for output. */ - vblk->vq = vdev-&gt...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...p_del_vq(info->vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[] - void (*callbacks)[](struct virtqueue *)) + struct virtqueue *vqs[], + virtqueue_callback *callbacks[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vectors; + + err = vp_request_vectors(vdev, vectors); + if (err) + goto error_request; for (i = 0; i < nvqs; ++i) { vqs[i] = vp_...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...p_del_vq(info->vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[] - void (*callbacks)[](struct virtqueue *)) + struct virtqueue *vqs[], + virtqueue_callback *callbacks[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vectors; + + err = vp_request_vectors(vdev, vectors); + if (err) + goto error_request; for (i = 0; i < nvqs; ++i) { vqs[i] = vp_...