On Wed, Apr 06, 2005 at 07:28:27PM +0200, Duncan Sands wrote:
> > On Sunday 03 April 2005 8:33 am, Duncan Sands wrote:
> > > Suppose a driver has taken a reference to a usb device (usb_get_dev).
> > > Can the list of interfaces shift around underneath it?  For example,
> > > suppose the configuration changes, changing the set of interfaces.
> > 
> > Yes, exactly.  As of last year sometime, usbcore will finally make
> > sure that all drivers are unbound from the old config (and all URBs
> > sent to it are canceled) before it sets up the new one.
> > 
> > 
> > > Will the old set of interfaces continue to exist and be accessible
> > > (if useless) via the referenced usb device, until the reference
> > > is dropped?  Or is it necessary to take references to individual
> > > interfaces (via the not EXPORTed usb_get_intf)?
> > 
> > When a driver gets a disconnect(interface) call, it must stop using
> > all those references ... though it's just barely OK to drop such
> > a reference (with the also-not-exported usb_put_intf!) after that
> > disconnect() returns.
> 
> I know this has always been your position (don't do anything after
> disconnect) - but then what's the point of reference counting?  I
> thought Greg's vision of how things should be was: as long as you
> have a reference to an interface, then it is usable (in the sense
> that things will not explode if you try to use it), though most
> operations will fail after disconnect (eg: sending an urb).  Has
> that gone down the tube?  Or is it rather that it never came up
> the tube in the first place?

No, that is the way it should work.  If not, please let me know and I'll
fix it.

thanks,

greg k-h


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to