From patchwork Mon Apr 27 12:32:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 20144 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3RCYYhW011301 for ; Mon, 27 Apr 2009 12:34:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754677AbZD0Med (ORCPT ); Mon, 27 Apr 2009 08:34:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754618AbZD0Mec (ORCPT ); Mon, 27 Apr 2009 08:34:32 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53963 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754536AbZD0Mec (ORCPT ); Mon, 27 Apr 2009 08:34:32 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3RCXd7s016911; Mon, 27 Apr 2009 08:33:39 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3RCXct0018218; Mon, 27 Apr 2009 08:33:38 -0400 Received: from redhat.com (vpn-10-134.str.redhat.com [10.32.10.134]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3RCXZTj008456; Mon, 27 Apr 2009 08:33:36 -0400 Date: Mon, 27 Apr 2009 15:32:37 +0300 From: "Michael S. Tsirkin" To: Rusty Russell , virtualization@lists.linux-foundation.org, Anthony Liguori , kvm@vger.kernel.org, avi@redhat.com Subject: [PATCH 4/8] virtio_console: add request_vqs/free_vqs calls Message-ID: <20090427123237.GA1179@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Add request_vqs/free_vqs calls to virtio_console. These will be required for MSI support. Signed-off-by: Michael S. Tsirkin --- 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: