From patchwork Tue Feb 28 14:36:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 143468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 87C32B6F9F for ; Wed, 29 Feb 2012 01:37:19 +1100 (EST) Received: from localhost ([::1]:48249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2OAz-0005rk-Hj for incoming@patchwork.ozlabs.org; Tue, 28 Feb 2012 09:37:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2OAo-0005qk-Dq for qemu-devel@nongnu.org; Tue, 28 Feb 2012 09:37:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2OAe-0006Us-8A for qemu-devel@nongnu.org; Tue, 28 Feb 2012 09:37:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2OAe-0006UW-09 for qemu-devel@nongnu.org; Tue, 28 Feb 2012 09:36:52 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1SEaotu017619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Feb 2012 09:36:50 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1SEan7O030331; Tue, 28 Feb 2012 09:36:49 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 4AC1740CA5; Tue, 28 Feb 2012 15:36:48 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2012 15:36:48 +0100 Message-Id: <1330439808-524-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: erik.rull@rdsoftware.de, Gerd Hoffmann Subject: [Qemu-devel] [PATCH] usb: queue can have async packets too X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/usb.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/usb.c b/hw/usb.c index 57fc5e3..fc41d62 100644 --- a/hw/usb.c +++ b/hw/usb.c @@ -356,6 +356,9 @@ void usb_packet_complete(USBDevice *dev, USBPacket *p) while (!QTAILQ_EMPTY(&ep->queue)) { p = QTAILQ_FIRST(&ep->queue); + if (p->state == USB_PACKET_ASYNC) { + break; + } assert(p->state == USB_PACKET_QUEUED); ret = usb_process_one(p); if (ret == USB_RET_ASYNC) {