diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-02-19 23:29:13 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-22 08:11:18 +0100 |
commit | e77f11086a5616adfafa6c4c784c4be969eb8570 (patch) | |
tree | 217047bd23bbd3b10d2e071ca8bc5bc29091a716 /drivers | |
parent | cd6dcd5cc16ff12abc03bda614e2a13fd349777f (diff) | |
download | barebox-e77f11086a5616adfafa6c4c784c4be969eb8570.tar.gz barebox-e77f11086a5616adfafa6c4c784c4be969eb8570.tar.xz |
usb: xhci-hcd: Always wait for "Response Data" completion
Xhci_submit_control() submits TRB_DATA with TRB_IOC flag regardless of
the vlaue of req->requesttype, so we shouldn't gate waiting for the
event that will result from it with "req->requesttype &
USB_DIR_IN". Failing to do this will result in unstable USB
performance and will eventually cause the controller to fail
completely.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/xhci-hcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 91ddcbb303..855dc47c52 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -1246,7 +1246,7 @@ static int xhci_submit_control(struct usb_device *udev, unsigned long pipe, xhci_print_trb(xhci, &trb, "Request Status"); xhci_virtdev_issue_transfer(vdev, 0, &trb, true); - if (length > 0 && req->requesttype & USB_DIR_IN) { + if (length > 0) { ret = xhci_wait_for_event(xhci, TRB_TRANSFER, &trb); xhci_print_trb(xhci, &trb, "Response Data "); if (ret == -COMP_SHORT_TX) |