On Wed, 12 Nov 2003, Duncan Sands wrote: > Hi Alan, looking through devio.c I see many problems. A basic problem is > that disconnect methods are now per-interface, but usbfs is still working > on the per-device model. For example, in driver_disconnect the whole > of ps->ifclaimed is reset to zero, not just the bit for the interface in question. > The same goes for the use of ps->dev = NULL to indicate disconnection. > That just doesn't mean anything any more - the device hasn't been disconnected, > just one interface. It seems to me that this is all easy to fix: > > (1) take a reference to the usb device in usbdev_open (drop it in usbdev_release). > (2) don't set ps->dev to NULL in driver_disconnect > (3) just clear the right bit, and use destroy_async_on_interface in driver_disconnect > > Et voila as they say around here.
usbfs and devio.c have got many problems. I'm sure that if you want to work on fixing them, everyone will appreciate it. > > Duncan. > > PS: I don't see what this has to do with my oopsen though :) The usbcore now automatically unbinds drivers _and_ sets the active configuration to NULL during disconnect processing. But devio.c didn't realize that and tried to use the NULL pointer. Alan Stern ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel