Re: [PATCH] usb: dwc3: gadget: fix burst size corruption

2014-05-02 Thread Zhuang Jin Can
Hi, On Thu, May 01, 2014 at 10:15:00AM -0500, Felipe Balbi wrote: On Thu, May 01, 2014 at 09:45:17AM -0400, Alan Stern wrote: On Thu, 1 May 2014, Zhuang Jin Can wrote: again, you found a bug on the gadget driver. Fix that. composite.c guarantees that for those functions which don't

Re: [PATCH] usb: dwc3: gadget: fix burst size corruption

2014-05-01 Thread Zhuang Jin Can
On Wed, Apr 30, 2014 at 03:03:53PM -0500, Felipe Balbi wrote: On Thu, May 01, 2014 at 03:16:04AM -0400, Zhuang Jin Can wrote: endpoint.maxburst may be 0 if a gadget doesn't call config_ep_by_speed() to update it from the companion descriptor. And endpoint.maxburst - 1 returns 1b which

Re: [PATCH] usb: dwc3: gadget: fix burst size corruption

2014-05-01 Thread Alan Stern
On Thu, 1 May 2014, Zhuang Jin Can wrote: again, you found a bug on the gadget driver. Fix that. composite.c guarantees that for those functions which don't pass bMaxBurst, gadget-maxburst will be set to *at least* 1. I agree the real fix should be in the gadget driver. The patch

Re: [PATCH] usb: dwc3: gadget: fix burst size corruption

2014-05-01 Thread Felipe Balbi
Hi, On Thu, May 01, 2014 at 09:45:17AM -0400, Alan Stern wrote: On Thu, 1 May 2014, Zhuang Jin Can wrote: again, you found a bug on the gadget driver. Fix that. composite.c guarantees that for those functions which don't pass bMaxBurst, gadget-maxburst will be set to *at least* 1.

[PATCH] usb: dwc3: gadget: fix burst size corruption

2014-04-30 Thread Zhuang Jin Can
endpoint.maxburst may be 0 if a gadget doesn't call config_ep_by_speed() to update it from the companion descriptor. And endpoint.maxburst - 1 returns 1b which wrongly sets bit 26 of endpoint parameter 0. This sets a wrong endpoint state and will cause Get Endpoint State command can't get the

Re: [PATCH] usb: dwc3: gadget: fix burst size corruption

2014-04-30 Thread Felipe Balbi
On Thu, May 01, 2014 at 03:16:04AM -0400, Zhuang Jin Can wrote: endpoint.maxburst may be 0 if a gadget doesn't call config_ep_by_speed() to update it from the companion descriptor. And endpoint.maxburst - 1 returns 1b which wrongly sets bit 26 of endpoint parameter 0. This sets a wrong