[PATCH 4/8] virtio_console: add request_vqs/free_vqs calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add request_vqs/free_vqs calls to virtio_console.
These will be required for MSI support.

Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
---
 drivers/char/virtio_console.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index ff6f5a4..78c503f 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -199,13 +199,17 @@ static int __devinit virtcons_probe(struct virtio_device *dev)
 		goto fail;
 	}
 
+	err = virtio_request_vqs(vdev, 2);
+	if (err)
+		goto free;
+
 	/* Find the input queue. */
 	/* FIXME: This is why we want to wean off hvc: we do nothing
 	 * when input comes in. */
 	in_vq = vdev->config->find_vq(vdev, 0, hvc_handle_input);
 	if (IS_ERR(in_vq)) {
 		err = PTR_ERR(in_vq);
-		goto free;
+		goto free_vqs;
 	}
 
 	out_vq = vdev->config->find_vq(vdev, 1, NULL);
@@ -244,6 +248,8 @@ free_out_vq:
 	vdev->config->del_vq(out_vq);
 free_in_vq:
 	vdev->config->del_vq(in_vq);
+free_vqs:
+	virtio_free_vqs(vdev);
 free:
 	kfree(inbuf);
 fail:
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux