summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2015-03-03 17:32:10 +0100
committerMarek Vasut <marex@denx.de>2015-04-14 05:48:12 +0200
commit5dc4538bf3fea0baf4ca2e4191e0e62991fbd779 (patch)
tree7e1eca9ac3823c36cf93a7a8af46e21cc45a60b9 /drivers
parent7e9cb7962f401439c9f107878100810b138f6ab9 (diff)
downloadtalos-obmc-uboot-5dc4538bf3fea0baf4ca2e4191e0e62991fbd779.tar.gz
talos-obmc-uboot-5dc4538bf3fea0baf4ca2e4191e0e62991fbd779.zip
usb: dwc3: add a workaround for too small OUT requests
DWC3 hangs on OUT requests smaller than maxpacket size, so HACK the request length to be at least equal to maxpacket size. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc3/gadget.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index de4d90859c..7c342c63ec 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -975,6 +975,14 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
req->epnum = dep->number;
/*
+ * DWC3 hangs on OUT requests smaller than maxpacket size,
+ * so HACK the request length
+ */
+ if (dep->direction == 0 &&
+ req->request.length < dep->endpoint.maxpacket)
+ req->request.length = dep->endpoint.maxpacket;
+
+ /*
* We only add to our list of requests now and
* start consuming the list once we get XferNotReady
* IRQ.
OpenPOWER on IntegriCloud