Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Baolin Wang
Hi Felipe, On 19 September 2016 at 17:58, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 1a33308..c9026ce 100644 --- a/drivers/usb/dwc3/gadget.c +++

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Baolin Wang
Hi Felipe, On 19 September 2016 at 17:58, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 1a33308..c9026ce 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1441,6

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >>> index 1a33308..c9026ce 100644 >>> --- a/drivers/usb/dwc3/gadget.c >>> +++ b/drivers/usb/dwc3/gadget.c >>> @@ -1441,6 +1441,15 @@ static int dwc3_gadget_run_stop(struct dwc3

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >>> index 1a33308..c9026ce 100644 >>> --- a/drivers/usb/dwc3/gadget.c >>> +++ b/drivers/usb/dwc3/gadget.c >>> @@ -1441,6 +1441,15 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, >>> int is_on,

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-17 Thread Baolin Wang
Hi Felipe, On 9 September 2016 at 19:03, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> index 057739d..22787b6 100644 >> --- a/drivers/usb/dwc3/core.c >> +++

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-17 Thread Baolin Wang
Hi Felipe, On 9 September 2016 at 19:03, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> index 057739d..22787b6 100644 >> --- a/drivers/usb/dwc3/core.c >> +++ b/drivers/usb/dwc3/core.c >> @@ -999,6 +999,7 @@ static int

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-09 Thread Felipe Balbi
Hi, Baolin Wang writes: > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index 057739d..22787b6 100644 > --- a/drivers/usb/dwc3/core.c > +++ b/drivers/usb/dwc3/core.c > @@ -999,6 +999,7 @@ static int dwc3_probe(struct platform_device *pdev) >

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-09 Thread Felipe Balbi
Hi, Baolin Wang writes: > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index 057739d..22787b6 100644 > --- a/drivers/usb/dwc3/core.c > +++ b/drivers/usb/dwc3/core.c > @@ -999,6 +999,7 @@ static int dwc3_probe(struct platform_device *pdev) > goto err0; > >

[PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-09 Thread Baolin Wang
When we change the USB function with configfs dynamically, we possibly met this situation: one core is doing the control transfer, another core is trying to unregister the USB gadget from userspace, we must wait for completing this control tranfer, or it will hang the controller to set the

[PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-09 Thread Baolin Wang
When we change the USB function with configfs dynamically, we possibly met this situation: one core is doing the control transfer, another core is trying to unregister the USB gadget from userspace, we must wait for completing this control tranfer, or it will hang the controller to set the