On Mon, 22 Jul 2013, Felipe Balbi wrote: > before changing to configured state, we need > to wait until gadget driver has had a chance > to process the request. > > In case of USB_GADGET_DELAYED_STATUS, that means > we need to defer usb_gadget_set_state() until > the upcoming usb_ep_queue(). > > Reported-by: Alan Stern <st...@rowland.harvard.edu> > Signed-off-by: Felipe Balbi <ba...@ti.com> > --- > drivers/usb/dwc3/ep0.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c > index 007651c..7fa93f4 100644 > --- a/drivers/usb/dwc3/ep0.c > +++ b/drivers/usb/dwc3/ep0.c > @@ -148,6 +148,7 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep, > > direction = !dwc->ep0_expect_in; > dwc->delayed_status = false; > + usb_gadget_set_state(&dwc->gadget, USB_STATE_CONFIGURED);
Isn't this overkill? Do you really want to call usb_gadget_set_state() every time the gadget driver queues a transfer on ep0? Or am I missing an important part of the context? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html