Re: [RFC PATCH 2/2] usb: dwc3: Add chained TRB support for ep0

2015-06-01 Thread Kishon Vijay Abraham I
Hi Felipe, On Friday 06 February 2015 08:18 PM, Felipe Balbi wrote: Hi, On Fri, Feb 06, 2015 at 05:25:35PM +0530, Kishon Vijay Abraham I wrote: dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two

Re: [RFC PATCH 2/2] usb: dwc3: Add chained TRB support for ep0

2015-06-01 Thread Felipe Balbi
Hi, On Mon, Jun 01, 2015 at 03:23:48PM +0530, Kishon Vijay Abraham I wrote: + transferred = transfer_size - length; + buf = (u8 *)buf + transferred; + ur-actual += transferred; this is dangerous. The extra size is because you *must* align OUT to

[RFC PATCH 2/2] usb: dwc3: Add chained TRB support for ep0

2015-02-06 Thread Kishon Vijay Abraham I
dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two chained TRBs is required to handle the transfer. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- *) Did eumeration testing with g_zero in kernel

Re: [RFC PATCH 2/2] usb: dwc3: Add chained TRB support for ep0

2015-02-06 Thread Felipe Balbi
Hi, On Fri, Feb 06, 2015 at 05:25:35PM +0530, Kishon Vijay Abraham I wrote: dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two chained TRBs is required to handle the transfer. Signed-off-by: Kishon