aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest
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 /drivers/lguest
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 'drivers/lguest')
-rw-r--r--drivers/lguest/lguest_device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index df44d962626d..4babed899d59 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -228,7 +228,8 @@ extern void lguest_setup_irq(unsigned int irq);
228 * function. */ 228 * function. */
229static struct virtqueue *lg_find_vq(struct virtio_device *vdev, 229static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
230 unsigned index, 230 unsigned index,
231 void (*callback)(struct virtqueue *vq)) 231 void (*callback)(struct virtqueue *vq),
232 const char *name)
232{ 233{
233 struct lguest_device *ldev = to_lgdev(vdev); 234 struct lguest_device *ldev = to_lgdev(vdev);
234 struct lguest_vq_info *lvq; 235 struct lguest_vq_info *lvq;
@@ -263,7 +264,7 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
263 /* OK, tell virtio_ring.c to set up a virtqueue now we know its size 264 /* OK, tell virtio_ring.c to set up a virtqueue now we know its size
264 * and we've got a pointer to its pages. */ 265 * and we've got a pointer to its pages. */
265 vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN, 266 vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN,
266 vdev, lvq->pages, lg_notify, callback); 267 vdev, lvq->pages, lg_notify, callback, name);
267 if (!vq) { 268 if (!vq) {
268 err = -ENOMEM; 269 err = -ENOMEM;
269 goto unmap; 270 goto unmap;