Adding my responses to David's... On Sun, 3 Apr 2005, 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? Yes. Although if the driver is bound to one of those interfaces, the configuration won't change until after the driver's disconnect() method returns. > For example, > suppose the configuration changes, changing the set of interfaces. > Will the old set of interfaces continue to exist and be accessible > (if useless) via the referenced usb device, until the reference > is dropped? No, they won't continue to exist. An interface is deallocated when the last reference to it -- not to its device -- is dropped. > Or is it necessary to take references to individual > interfaces (via the not EXPORTed usb_get_intf)? If you want to be able to use a pointer to the interface, then usb_get_intf is what you need. But of course you shouldn't do anything significant (like sending an URB to the interface) once it's a zombie. The reason usb_get_intf isn't exported is because drivers aren't expected to use interfaces unless they are bound to them. The assumption is that drivers will contain sufficient internal interlocks so that they won't need to refer to an interface once they've unbound from it. Alan Stern ------------------------------------------------------- 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