From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9WH1-0004m3-Gn for qemu-devel@nongnu.org; Thu, 06 Sep 2012 03:13:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9WGo-0006Lh-KN for qemu-devel@nongnu.org; Thu, 06 Sep 2012 03:13:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9WGo-0006L1-B3 for qemu-devel@nongnu.org; Thu, 06 Sep 2012 03:12:58 -0400 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 q867Cvcr019208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Sep 2012 03:12:57 -0400 From: Gerd Hoffmann Date: Thu, 6 Sep 2012 09:12:05 +0200 Message-Id: <1346915575-12369-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1346915575-12369-1-git-send-email-kraxel@redhat.com> References: <1346915575-12369-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 04/54] usb-core: Allow the first packet of a pipelined ep to complete immediately List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann From: Hans de Goede This can happen with usb-redir live-migration when the packet gets re-queued after the migration and the original queuing from the migration source side has already finished. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb/core.c b/hw/usb/core.c index fe431d0..b9f1f7a 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -398,7 +398,7 @@ int usb_handle_packet(USBDevice *dev, USBPacket *p) * When pipelining is enabled usb-devices must always return async, * otherwise packets can complete out of order! */ - assert(!p->ep->pipeline); + assert(!p->ep->pipeline || QTAILQ_EMPTY(&p->ep->queue)); if (ret != USB_RET_NAK) { p->result = ret; usb_packet_set_state(p, USB_PACKET_COMPLETE); -- 1.7.1