On Thu, Apr 15, 2004 at 10:10:00AM -0400, Alan Stern wrote: > Greg: > > I just noticed your new usb_get/put_intf() functions. Creating them is a > tacit admission that drivers will need to continue using interfaces after > their disconnect() routine has returned. Is this wise? > > The current assumption in usbcore is that when disconnect() returns the > driver will have relinquished its interface and no URBs will be active. > The core is then free to bind another driver to that interface. If the > old driver is still using the interface, it's liable to cause problems.
Yes, but we can't guarantee that the driver is done with the device, or the interface after disconnect() is over. And we don't want to do that either, otherwise it makes the driver's lives a big pain. So, if you really want to give an interface to another driver, we need to just unregister it and create a new one. That way it will all "just work" properly. The reason I created those functions is we never completed the usb device -> usb interface conversion fully during 2.5. Drivers should not care at all about struct usb_device, which is not quite true today (we still need it for initializing urbs, but that's it.) Also, with your upcoming changes for making the interfaces individual structures, drivers can grab a reference to the interface instead of grabbing the reference to the device (like they do today.) I'll look over your interface changes tomorrow (too much real work to do these days) and let you know how that looks. thanks, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
