aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/core.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-09-03 12:48:49 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-09-11 07:42:59 +0200
commit9c1f67654ab611553bbfca54a1e0922728c25760 (patch)
tree4bdc0542ec2c1648a69eff6b48db712f5fc02d0a /hw/usb/core.c
parentc13a9e61366cc3e28299d8faeb65e65c6e5964cf (diff)
usb-core: Allow the first packet of a pipelined ep to complete immediately
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 <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/core.c')
-rw-r--r--hw/usb/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/core.c b/hw/usb/core.c
index fe431d02d9..b9f1f7a8be 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);