From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQsVb-0000O1-7w for qemu-devel@nongnu.org; Thu, 26 Feb 2015 02:05:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQsVZ-0006AR-Po for qemu-devel@nongnu.org; Thu, 26 Feb 2015 02:05:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQsVZ-0006AI-In for qemu-devel@nongnu.org; Thu, 26 Feb 2015 02:05:17 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1Q75H85017749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 26 Feb 2015 02:05:17 -0500 From: Jason Wang Date: Thu, 26 Feb 2015 15:04:40 +0800 Message-Id: <1424934286-7099-6-git-send-email-jasowang@redhat.com> In-Reply-To: <1424934286-7099-1-git-send-email-jasowang@redhat.com> References: <1424934286-7099-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PATCH V2 05/11] 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 , mst@redhat.com 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); -- 1.9.1