From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kishon Vijay Abraham I Date: Mon, 23 Feb 2015 19:54:43 +0530 Subject: [U-Boot] [PATCH 06/11] usb: dwc3: add a workaround for too small OUT requests In-Reply-To: <1424700152-8554-7-git-send-email-l.majewski@samsung.com> References: <1424700152-8554-1-git-send-email-l.majewski@samsung.com> <1424700152-8554-7-git-send-email-l.majewski@samsung.com> Message-ID: <54EB382B.20709@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Monday 23 February 2015 07:32 PM, Lukasz Majewski wrote: > From: Marek Szyprowski > > DWC3 hangs on OUT requests smaller than maxpacket size, > so HACK the request length to be at least equal to maxpacket size. Curious to know using which gadget this issue was seen. Thanks Kishon > > Signed-off-by: Marek Szyprowski > --- > drivers/usb/dwc3/gadget.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 01bc83b..f8a75d3 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -974,6 +974,12 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) > req->direction = dep->direction; > 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 >