Re: [PATCH 2/2] usb: dwc3: ep0: don't change to configured state too early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Jul 2013, Felipe Balbi wrote:

> Hi,
> 
> On Tue, Jul 23, 2013 at 12:53:53PM -0400, Alan Stern wrote:
> > > > I see.  Doesn't the mass-storage gadget also use delayed status when
> > > > going into the _un_configured state?
> > > 
> > > no it doesn't, we bail out early if config number is zero, look at
> > > composite.c and you'll see in case of configuration zero, we just make
> > > sure to disable all endpoints and don't call ->set_alt():
> > 
> > This is my fault, for not being more familiar with the composite
> > framework, and no doubt I will regret asking this, but...
> > 
> > Doesn't that approach leave the function drivers sitting around with
> > all their resources still allocated?  When do those resources get
> > deallocated?  When the gadget disconnects from the host?
> 
> which resources are you talking about ? Endpoints ? ->disable() should
> make sure to disable the endpoints, but it will only free the endpoints
> when the gadget driver is unbound.
> 
> struct usb_requests will also be freed at ->disable() time.
> 
> Does this answer your question ?

Yeah, I was mainly wondering about the usb_requests.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux