From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTOf9-00062W-6n for qemu-devel@nongnu.org; Thu, 05 Mar 2015 00:49:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTOf6-0001xm-4c for qemu-devel@nongnu.org; Thu, 05 Mar 2015 00:49:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTOf5-0001x0-TX for qemu-devel@nongnu.org; Thu, 05 Mar 2015 00:49:32 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t255nVTr012894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Mar 2015 00:49:31 -0500 From: Jason Wang Date: Thu, 5 Mar 2015 13:48:43 +0800 Message-Id: <1425534531-6305-7-git-send-email-jasowang@redhat.com> In-Reply-To: <1425534531-6305-1-git-send-email-jasowang@redhat.com> References: <1425534531-6305-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PATCH V3 06/14] virtio-serial-bus: switch to bus specific queue limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Amit Shah , Jason Wang Cc: Amit Shah Signed-off-by: Jason Wang --- hw/char/virtio-serial-bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 37a6f44..f280e95 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -26,6 +26,8 @@ #include "hw/virtio/virtio-serial.h" #include "hw/virtio/virtio-access.h" +#define VIRTIO_SERIAL_BUS_QUEUE_MAX 64 + struct VirtIOSerialDevices { QLIST_HEAD(, VirtIOSerial) devices; } vserdevices; @@ -942,7 +944,7 @@ static void virtio_serial_device_realize(DeviceState *dev, Error **errp) } /* Each port takes 2 queues, and one pair is for the control queue */ - max_supported_ports = VIRTIO_PCI_QUEUE_MAX / 2 - 1; + max_supported_ports = VIRTIO_SERIAL_BUS_QUEUE_MAX / 2 - 1; if (vser->serial.max_virtserial_ports > max_supported_ports) { error_setg(errp, "maximum ports supported: %u", max_supported_ports); -- 2.1.0