On Wed, Jul 24, 2013 at 02:01:27PM -0400, Alan Stern wrote:
> 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.

is this a signal for "you're good to go with your fix" ? :-)

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to