Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-03-02 Thread Felipe Balbi
Hi, Alan Stern writes: >> Alan Stern writes: >> >> So I am not sure how the Gadget driver can figure out that it needs to >> >> usb_ep_queue() another request for status stage when handling the >> >> no-data control? >> > >> > Gadget

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-03-02 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> > Baolin Wang writes: >>> (One possible approach would be to have the setup routine return >>> different values for explicit and implicit status stages -- for >>> example, return 1 if it wants to submit

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-03-02 Thread Baolin Wang
Hi, On 28 February 2017 at 06:11, Alan Stern wrote: > On Tue, 21 Feb 2017, Baolin Wang wrote: > >> On 17 February 2017 at 16:04, Felipe Balbi wrote: >> > >> > Hi, >> > >> > Baolin Wang writes: >> (One possible approach

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-28 Thread Alan Stern
On Tue, 28 Feb 2017, Felipe Balbi wrote: > > Hi, > > Alan Stern writes: > >> So I am not sure how the Gadget driver can figure out that it needs to > >> usb_ep_queue() another request for status stage when handling the > >> no-data control? > > > > Gadget drivers

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-28 Thread Felipe Balbi
Hi, Alan Stern writes: >> So I am not sure how the Gadget driver can figure out that it needs to >> usb_ep_queue() another request for status stage when handling the >> no-data control? > > Gadget drivers already queue status-stage requests for no-data > control-OUT

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-27 Thread Alan Stern
On Tue, 21 Feb 2017, Baolin Wang wrote: > On 17 February 2017 at 16:04, Felipe Balbi wrote: > > > > Hi, > > > > Baolin Wang writes: > (One possible approach would be to have the setup routine return > different values for explicit and implicit

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-21 Thread Baolin Wang
On 17 February 2017 at 16:04, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: (One possible approach would be to have the setup routine return different values for explicit and implicit status stages -- for example, return 1 if it

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-19 Thread Baolin Wang
On 17 February 2017 at 16:04, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: (One possible approach would be to have the setup routine return different values for explicit and implicit status stages -- for example, return 1 if it

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-17 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> (One possible approach would be to have the setup routine return >>> different values for explicit and implicit status stages -- for >>> example, return 1 if it wants to submit an explicit status request. >>> That wouldn't be very different

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-16 Thread Baolin Wang
On 23 January 2017 at 19:57, Felipe Balbi wrote: > > Hi, > > Alan Stern writes: >> On Mon, 16 Jan 2017, Felipe Balbi wrote: >> >>> > The gadget driver never calls usb_ep_queue in order to receive the next >>> > SETUP packet; the UDC driver takes care

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-23 Thread Felipe Balbi
Hi, Alan Stern writes: > On Mon, 16 Jan 2017, Felipe Balbi wrote: > >> > The gadget driver never calls usb_ep_queue in order to receive the next >> > SETUP packet; the UDC driver takes care of SETUP handling >> > automatically. >> >> yeah, that's another thing I'd

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Alan Stern
On Mon, 16 Jan 2017, Felipe Balbi wrote: > > The gadget driver never calls usb_ep_queue in order to receive the next > > SETUP packet; the UDC driver takes care of SETUP handling > > automatically. > > yeah, that's another thing I'd like to change. Currently, we have no > means to either try to

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Baolin Wang
Hi, On 17 January 2017 at 18:39, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >>> Baolin Wang writes: When handing the SETUP packet by composite_setup(), we will release the dwc->lock. If we get the

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Felipe Balbi
Hi, Baolin Wang writes: >> Baolin Wang writes: >>> When handing the SETUP packet by composite_setup(), we will release the >>> dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup >>> function, which means we

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 20:06, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Hi, >> >> On 16 January 2017 at 19:29, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Baolin Wang writes: Hi, On

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Felipe Balbi
Hi, Alan Stern writes: > On Mon, 16 Jan 2017, Felipe Balbi wrote: > >> Another point here is that the really robust way of fixing this is to >> get rid of USB_GADGET_DELAYED_STATUS altogether and just make sure >> gadget drivers know how to queue

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Alan Stern
On Mon, 16 Jan 2017, Felipe Balbi wrote: > Another point here is that the really robust way of fixing this is to > get rid of USB_GADGET_DELAYED_STATUS altogether and just make sure > gadget drivers know how to queue requests for all three phases of a > Control Transfer. >

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Felipe Balbi
Hi, Baolin Wang writes: > Hi, > > On 16 January 2017 at 19:29, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang writes: >>> Hi, >>> >>> On 16 January 2017 at 18:56, Felipe Balbi wrote: Hi,

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 19:29, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Hi, >> >> On 16 January 2017 at 18:56, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Baolin Wang writes: When handing the

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Felipe Balbi
Hi, Baolin Wang writes: > Hi, > > On 16 January 2017 at 18:56, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang writes: >>> When handing the SETUP packet by composite_setup(), we will release the >>> dwc->lock. If we get the

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 18:56, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> When handing the SETUP packet by composite_setup(), we will release the >> dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup >> function, which

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Felipe Balbi
Hi, Baolin Wang writes: > When handing the SETUP packet by composite_setup(), we will release the > dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup > function, which means we need to delay handling the STATUS phase. this sentence needs a little

[PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-14 Thread Baolin Wang
When handing the SETUP packet by composite_setup(), we will release the dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup function, which means we need to delay handling the STATUS phase. But during the lock release period, maybe the request for handling delay STATUS phase