Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-20 Thread Baolin Wang
Hi, On 19 October 2016 at 18:09, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> >> We should not check the DWC3_EP_ENABLED flag, since we will clear all >> flags in __dwc3_gadget_ep_disable() after setting >>

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-19 Thread Felipe Balbi
Hi, Baolin Wang writes: >> Baolin Wang writes: >>> Sure. The problem I met was, when we change the USB function with >>> configfs frequently, sometimes it will hang the system to crash. The >>> reason is, we will start end transfer command when

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Baolin Wang
Hi, On 18 October 2016 at 16:21, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Sure. The problem I met was, when we change the USB function with >> configfs frequently, sometimes it will hang the system to crash. The >> reason is,

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Felipe Balbi
Hi, Baolin Wang writes: >> >> 8< >> >> From f3fa94f3171709f787a30e3c5ce69a668960b66e Mon Sep 17 00:00:00 2001 >> >> From: Felipe Balbi >> >> Date: Thu,

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Peter Chen
On Tue, Oct 18, 2016 at 10:19:38AM +0300, Felipe Balbi wrote: > > Hi, > > Alan Stern writes: > >> Baolin Wang writes: > >> >> Felipe Balbi writes: > >> >>> Instead of just delaying for 100us, we should > >> >>>

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Baolin Wang
On 18 October 2016 at 16:21, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >>> Alan Stern writes: > Baolin Wang writes: > >> Felipe Balbi

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Felipe Balbi
Hi, Baolin Wang writes: >> Alan Stern writes: Baolin Wang writes: >> Felipe Balbi writes: >>> Instead of just delaying for 100us, we should >>> actually wait for End

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Baolin Wang
Hi, On 18 October 2016 at 15:19, Felipe Balbi wrote: > > Hi, > > Alan Stern writes: >>> Baolin Wang writes: >>> >> Felipe Balbi writes: >>> >>> Instead of just delaying for 100us, we

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Felipe Balbi
Hi, Alan Stern writes: >> Baolin Wang writes: >> >> Felipe Balbi writes: >> >>> Instead of just delaying for 100us, we should >> >>> actually wait for End Transfer Command Complete >> >>> interrupt before moving

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-17 Thread Peter Chen
On Mon, Oct 17, 2016 at 12:51:48PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > > On Mon, Oct 17, 2016 at 11:06:49AM +0300, Felipe Balbi wrote: > >> > >> Hi Baolin, > >> > >> Baolin Wang writes: > >> >> Felipe Balbi

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-17 Thread Alan Stern
On Mon, 17 Oct 2016, Felipe Balbi wrote: > Hi Baolin, > > Baolin Wang writes: > >> Felipe Balbi writes: > >>> Instead of just delaying for 100us, we should > >>> actually wait for End Transfer Command Complete > >>> interrupt before moving

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-17 Thread Felipe Balbi
Hi, Peter Chen writes: > On Mon, Oct 17, 2016 at 11:06:49AM +0300, Felipe Balbi wrote: >> >> Hi Baolin, >> >> Baolin Wang writes: >> >> Felipe Balbi writes: >> >>> Instead of just delaying for 100us, we should >>

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-17 Thread Peter Chen
On Mon, Oct 17, 2016 at 11:06:49AM +0300, Felipe Balbi wrote: > > Hi Baolin, > > Baolin Wang writes: > >> Felipe Balbi writes: > >>> Instead of just delaying for 100us, we should > >>> actually wait for End Transfer Command Complete > >>>

usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-17 Thread Felipe Balbi
Hi Baolin, Baolin Wang writes: >> Felipe Balbi writes: >>> 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

Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-16 Thread Baolin Wang
Hi Felipe, On 14 October 2016 at 19:04, Felipe Balbi wrote: > > Hi, > > Felipe Balbi writes: >> Instead of just delaying for 100us, we should >> actually wait for End Transfer Command Complete >> interrupt before moving on. Note that

Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-14 Thread Felipe Balbi
Hi, Felipe Balbi writes: > 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

[PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-14 Thread Felipe Balbi
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. Reported-by: Baolin Wang