aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/virtio_blk.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-06-13 00:16:36 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:46:36 -0400
commitd2a7ddda9ffb1c8961abff6714b0f1eb925c120f (patch)
tree1090884fd260d042255255467367e4e6b6193e5d /drivers/block/virtio_blk.c
parent9499f5e7ed5224c40706f0cec6542a9916bc7606 (diff)
virtio: find_vqs/del_vqs virtio operations
This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (+ lguest/9p compile fixes)
Diffstat (limited to 'drivers/block/virtio_blk.c')
-rw-r--r--drivers/block/virtio_blk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index db55a50d9f6a..07d8e595e51f 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -288,7 +288,7 @@ static int virtblk_probe(struct virtio_device *vdev)
288 sg_init_table(vblk->sg, vblk->sg_elems); 288 sg_init_table(vblk->sg, vblk->sg_elems);
289 289
290 /* We expect one virtqueue, for output. */ 290 /* We expect one virtqueue, for output. */
291 vblk->vq = vdev->config->find_vq(vdev, 0, blk_done, "requests"); 291 vblk->vq = virtio_find_single_vq(vdev, blk_done, "requests");
292 if (IS_ERR(vblk->vq)) { 292 if (IS_ERR(vblk->vq)) {
293 err = PTR_ERR(vblk->vq); 293 err = PTR_ERR(vblk->vq);
294 goto out_free_vblk; 294 goto out_free_vblk;
@@ -388,7 +388,7 @@ out_put_disk:
388out_mempool: 388out_mempool:
389 mempool_destroy(vblk->pool); 389 mempool_destroy(vblk->pool);
390out_free_vq: 390out_free_vq:
391 vdev->config->del_vq(vblk->vq); 391 vdev->config->del_vqs(vdev);
392out_free_vblk: 392out_free_vblk:
393 kfree(vblk); 393 kfree(vblk);
394out: 394out:
@@ -409,7 +409,7 @@ static void virtblk_remove(struct virtio_device *vdev)
409 blk_cleanup_queue(vblk->disk->queue); 409 blk_cleanup_queue(vblk->disk->queue);
410 put_disk(vblk->disk); 410 put_disk(vblk->disk);
411 mempool_destroy(vblk->pool); 411 mempool_destroy(vblk->pool);
412 vdev->config->del_vq(vblk->vq); 412 vdev->config->del_vqs(vdev);
413 kfree(vblk); 413 kfree(vblk);
414} 414}
415 415