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.smir...@gmail.com>
---
 drivers/usb/host/xhci-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
index 657a49f8a..8a00b8854 100644
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -1248,7 +1248,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)
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to