diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-08-27 15:25:24 +0200 |
---|---|---|
committer | SeokYeon Hwang <syeon.hwang@samsung.com> | 2013-11-07 13:48:35 +0900 |
commit | e8e136f51176910297b6df3fca6ad89911a0f2c4 (patch) | |
tree | b06ed401d97ec824c7ed9883bb14e226ba8baf94 | |
parent | b51bf4ba1cc0dbc1c6482cf717da20dbc264b8c0 (diff) | |
download | qemu-e8e136f51176910297b6df3fca6ad89911a0f2c4.tar.gz qemu-e8e136f51176910297b6df3fca6ad89911a0f2c4.tar.bz2 qemu-e8e136f51176910297b6df3fca6ad89911a0f2c4.zip |
usb: parallelize usb3 streams
usb3 bulk endpoints with streams are implicitly pipelined now,
so the requests will actually be processed in parallel. Also
allow them to complete out-of-order.
Fixes stalls in the uas driver.
Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit c96c41ed0d38d68a6c8b6f84751afebafeae31be)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | hw/usb/core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/usb/core.c b/hw/usb/core.c index 05948ca9a4..31960c28a8 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -403,7 +403,7 @@ void usb_handle_packet(USBDevice *dev, USBPacket *p) p->ep->halted = false; } - if (QTAILQ_EMPTY(&p->ep->queue) || p->ep->pipeline) { + if (QTAILQ_EMPTY(&p->ep->queue) || p->ep->pipeline || p->stream) { usb_process_one(p); if (p->status == USB_RET_ASYNC) { /* hcd drivers cannot handle async for isoc */ @@ -420,7 +420,8 @@ void 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 || QTAILQ_EMPTY(&p->ep->queue)); + assert(p->stream || !p->ep->pipeline || + QTAILQ_EMPTY(&p->ep->queue)); if (p->status != USB_RET_NAK) { usb_packet_set_state(p, USB_PACKET_COMPLETE); } @@ -434,7 +435,7 @@ void usb_packet_complete_one(USBDevice *dev, USBPacket *p) { USBEndpoint *ep = p->ep; - assert(QTAILQ_FIRST(&ep->queue) == p); + assert(p->stream || QTAILQ_FIRST(&ep->queue) == p); assert(p->status != USB_RET_ASYNC && p->status != USB_RET_NAK); if (p->status != USB_RET_SUCCESS || |