- That epnum_to_ep_desc() result shouldn't be used without a bit more locking; else the config could change from under usbfs.
...
I cc'd Duncan Sands, who's got a devio.c patch in the works that'll fix a bunch of such stuff.
Hi Dave, I'm sorry that my patch is slow in coming - I'm busy testing it (will wonders never cease?). Problems are showing up in
Testing is usually the under-estimated 80% of development time! And I'm not surprised that particular patch is taking a while, especially this time of year.
usb_set_configuration. Can you please tell me - how (and where) is a driver's disconnect method called? I ask because in some situations
Disconnection is only triggered through the driver model, somewhere in the device_del() and/or device_release_driver() paths. That's a point that's very easy to miss (non-obvious).
There's also a complication (suffered almost entirely by usbfs) in the existence of a sort of "half bound" state for driver bindings established through usb_driver_claim_interface().
usbfs's disconnect method is not being called. The only place I see is in usb_unbind_interface. usb_unbind_interface seems to be passed to sysfs in usb_register: new_driver->driver.remove = usb_unbind_interface; When does that get called? I guess it gets called by (for example) usb_disable_device when it does device_del(&interface->dev); Is that right?
One other place is from usb_driver_release_interface(), but that won't happen unless the driver model was used to claim the interface. That locking patch of mine (in the latest 2.6 BK trees) cleans up some of those cases; but not all.
In particular I didn't remove usb_interface.driver -- so usbcore would use only usb_interface.dev.driver -- because once I started down that path, I was sure I'd end up touching way too much of the usbfs code. Just like you're already doing ... but you're actually set up to test after such changes! ;)
If you need to have disconnect() called in all cases, feel free to get rid of usb_interface.driver ... it needs to go someday, and I'd guess that's making trouble for you.
I can't see the CDC (ACM, Ethernet) or audio (ALSA, OSS) drivers getting into trouble with that any time soon, but those are the only other users of the claim/release calls righ now.
- Dave
Thanks,
Duncan.
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel