|
|
9ae3a8 |
From 2160ddf46b85b84d271e450383151ff288958622 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 11 Jul 2014 14:20:41 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 08/43] usb: parallelize usb3 streams
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1405088470-24115-9-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 59844
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.1 qemu-kvm PATCH 08/37] usb: parallelize usb3 streams
|
|
|
9ae3a8 |
Bugzilla: 1075846
|
|
|
9ae3a8 |
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
usb3 bulk endpoints with streams are implicitly pipelined now,
|
|
|
9ae3a8 |
so the requests will actually be processed in parallel. Also
|
|
|
9ae3a8 |
allow them to complete out-of-order.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Fixes stalls in the uas driver.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Cc: qemu-stable@nongnu.org
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit c96c41ed0d38d68a6c8b6f84751afebafeae31be)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/usb/core.c | 7 ++++---
|
|
|
9ae3a8 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/usb/core.c | 7 ++++---
|
|
|
9ae3a8 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/usb/core.c b/hw/usb/core.c
|
|
|
9ae3a8 |
index 05948ca..31960c2 100644
|
|
|
9ae3a8 |
--- a/hw/usb/core.c
|
|
|
9ae3a8 |
+++ b/hw/usb/core.c
|
|
|
9ae3a8 |
@@ -403,7 +403,7 @@ void usb_handle_packet(USBDevice *dev, USBPacket *p)
|
|
|
9ae3a8 |
p->ep->halted = false;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- if (QTAILQ_EMPTY(&p->ep->queue) || p->ep->pipeline) {
|
|
|
9ae3a8 |
+ if (QTAILQ_EMPTY(&p->ep->queue) || p->ep->pipeline || p->stream) {
|
|
|
9ae3a8 |
usb_process_one(p);
|
|
|
9ae3a8 |
if (p->status == USB_RET_ASYNC) {
|
|
|
9ae3a8 |
/* hcd drivers cannot handle async for isoc */
|
|
|
9ae3a8 |
@@ -420,7 +420,8 @@ void usb_handle_packet(USBDevice *dev, USBPacket *p)
|
|
|
9ae3a8 |
* When pipelining is enabled usb-devices must always return async,
|
|
|
9ae3a8 |
* otherwise packets can complete out of order!
|
|
|
9ae3a8 |
*/
|
|
|
9ae3a8 |
- assert(!p->ep->pipeline || QTAILQ_EMPTY(&p->ep->queue));
|
|
|
9ae3a8 |
+ assert(p->stream || !p->ep->pipeline ||
|
|
|
9ae3a8 |
+ QTAILQ_EMPTY(&p->ep->queue));
|
|
|
9ae3a8 |
if (p->status != USB_RET_NAK) {
|
|
|
9ae3a8 |
usb_packet_set_state(p, USB_PACKET_COMPLETE);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
@@ -434,7 +435,7 @@ void usb_packet_complete_one(USBDevice *dev, USBPacket *p)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
USBEndpoint *ep = p->ep;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- assert(QTAILQ_FIRST(&ep->queue) == p);
|
|
|
9ae3a8 |
+ assert(p->stream || QTAILQ_FIRST(&ep->queue) == p);
|
|
|
9ae3a8 |
assert(p->status != USB_RET_ASYNC && p->status != USB_RET_NAK);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if (p->status != USB_RET_SUCCESS ||
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|