diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-28 15:36:06 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-03-07 12:28:05 +0100 |
commit | eb9d4673e3594baaa857a4c033fc7c21f4ea904b (patch) | |
tree | 7a30dbb1992716c84749a3fe073984edf9235df2 | |
parent | 7c308b7e38812b49e3e9eccdb74b01989cdf7b78 (diff) |
usb: queue can have async packets
This can happen today in case the ->complete() callback queues up the
next packet. Also we'll support pipelining soon, which allows to have
multiple packets per queue in flight (aka ASYNC) state.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | hw/usb.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |