[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 20/38] usb: parallelize usb3 streams
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 20/38] usb: parallelize usb3 streams |
Date: |
Wed, 25 Sep 2013 07:57:48 -0500 |
From: Gerd Hoffmann <address@hidden>
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: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit c96c41ed0d38d68a6c8b6f84751afebafeae31be)
Signed-off-by: Michael Roth <address@hidden>
---
hw/usb/core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 05948ca..31960c2 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 ||
--
1.7.9.5
- [Qemu-stable] [PATCH 14/38] target-i386: fix disassembly with PAE=1, PG=0, (continued)
- [Qemu-stable] [PATCH 14/38] target-i386: fix disassembly with PAE=1, PG=0, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 13/38] block: expect errors from bdrv_co_is_allocated, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 12/38] Revert "usb-hub: report status changes only once", Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 16/38] exec: fix writing to MMIO area with non-power-of-two length, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 18/38] exec: always use MADV_DONTFORK, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 21/38] w32: Fix access to host devices (regression), Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 17/38] virtio_pci: fix level interrupts with irqfd, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 19/38] xhci: reset port when disabling slot, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 20/38] usb: parallelize usb3 streams,
Michael Roth <=
- [Qemu-stable] [PATCH 23/38] Revert "memory: Return -1 again on reads from unsigned regions", Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 24/38] exec: check offset_within_address_space for register subpage, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 22/38] memory: Provide separate handling of unassigned io ports accesses, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 28/38] pc: Initializing ram_memory under Xen., Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 25/38] ne2000: mark I/O as LITTLE_ENDIAN, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 31/38] pcnet-pci: mark I/O and MMIO as LITTLE_ENDIAN, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 30/38] qapi-types.py: Fix enum struct sizes on i686, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 36/38] tci: Fix qemu-alpha on 32 bit hosts (wrong assertions), Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 34/38] kvmvapic: Enter inactive state on hardware reset, Michael Roth, 2013/09/25
- [Qemu-stable] [PATCH 29/38] pc_q35: Initialize Xen., Michael Roth, 2013/09/25