[PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-31 Thread Baolin Wang
Instead of just delaying for 100us, we should actually wait for End Transfer Command Complete interrupt before moving on. Note that this should only be done if we're dealing with one of the core revisions that actually require the interrupt before moving on. [ felipe.ba...@linux.intel.com: minor i

Re: [PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-11-01 Thread Felipe Balbi
Hi, Baolin Wang writes: > Changes since v1: > - Move the suspend checking to right place to avoid checking twice. there is still one problem > @@ -1736,12 +1739,38 @@ static int dwc3_gadget_stop(struct usb_gadget *g) > { > struct dwc3 *dwc = gadget_to_dwc(g); > unsign

Re: [PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-11-01 Thread Baolin Wang
Hi, On 1 November 2016 at 19:01, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Changes since v1: >> - Move the suspend checking to right place to avoid checking twice. > > there is still one problem > >> @@ -1736,12 +1739,38 @@ static int dwc3_gadget_stop(struct usb_gadget *g) >> { >>

Re: [PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-11-01 Thread Felipe Balbi
Hi, Baolin Wang writes: > Hi, > > On 1 November 2016 at 19:01, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang writes: >>> Changes since v1: >>> - Move the suspend checking to right place to avoid checking twice. >> >> there is still one problem >> >>> @@ -1736,12 +1739,38 @@ static int dwc3_

Re: [PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-11-01 Thread Baolin Wang
Hi, On 1 November 2016 at 19:36, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Hi, >> >> On 1 November 2016 at 19:01, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Baolin Wang writes: Changes since v1: - Move the suspend checking to right place to avoid checking twice. >>> >>> th