aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_config.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-13 00:16:35 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:46:36 -0400
commit9499f5e7ed5224c40706f0cec6542a9916bc7606 (patch)
tree3e4e1b36d3d549ea356e88e6e44359a887c6ee01 /include/linux/virtio_config.h
parentef688e151c00e5d529703be9a04fd506df8bc54e (diff)
virtio: add names to virtqueue struct, mapping from devices to queues.
Add a linked list of all virtqueues for a virtio device: this helps for debugging and is also needed for upcoming interface change. Also, add a "name" field for clearer debug messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r--include/linux/virtio_config.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index bf8ec283b23..9fae274751e 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -55,7 +55,8 @@
55 * @find_vq: find a virtqueue and instantiate it. 55 * @find_vq: find a virtqueue and instantiate it.
56 * vdev: the virtio_device 56 * vdev: the virtio_device
57 * index: the 0-based virtqueue number in case there's more than one. 57 * index: the 0-based virtqueue number in case there's more than one.
58 * callback: the virqtueue callback 58 * callback: the virtqueue callback
59 * name: the virtqueue name (mainly for debugging)
59 * Returns the new virtqueue or ERR_PTR() (eg. -ENOENT). 60 * Returns the new virtqueue or ERR_PTR() (eg. -ENOENT).
60 * @del_vq: free a virtqueue found by find_vq(). 61 * @del_vq: free a virtqueue found by find_vq().
61 * @get_features: get the array of feature bits for this device. 62 * @get_features: get the array of feature bits for this device.
@@ -77,7 +78,8 @@ struct virtio_config_ops
77 void (*reset)(struct virtio_device *vdev); 78 void (*reset)(struct virtio_device *vdev);
78 struct virtqueue *(*find_vq)(struct virtio_device *vdev, 79 struct virtqueue *(*find_vq)(struct virtio_device *vdev,
79 unsigned index, 80 unsigned index,
80 void (*callback)(struct virtqueue *)); 81 void (*callback)(struct virtqueue *),
82 const char *name);
81 void (*del_vq)(struct virtqueue *vq); 83 void (*del_vq)(struct virtqueue *vq);
82 u32 (*get_features)(struct virtio_device *vdev); 84 u32 (*get_features)(struct virtio_device *vdev);
83 void (*finalize_features)(struct virtio_device *vdev); 85 void (*finalize_features)(struct virtio_device *vdev);