Skip to content
Snippets Groups Projects
Commit eb9d4673 authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

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: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 7c308b7e
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment