On Sat, 20 Dec 2003, David Brownell wrote: > Seems like the essence of as163 is to shift costs around a bit, > using device_register (instead of device_initialize + device_add) > because interface->dev.complete only fires on paths where the > refcount goes to zero ... and since that's the only mechanism > provided in the driver core to handle problem drivers which return > from disconnect() without releasing all references. > > Seems reasonable to me. Does this help with that "reset into > new firmware" path?
No, this is an entirely separate issue. It was triggered by Greg's "don't delete parents before deleting their children" patch to lib/kobject.c; the old code worked fine before that change was made. I have opened a discussion (on LKML, not linux-usb-devel) about his patch; see http://marc.theaimsgroup.com/?l=linux-kernel&m=107176751008943&w=2 and http://marc.theaimsgroup.com/?l=linux-kernel&m=107184872622094&w=2 If Greg decides to modify his patch, maybe as163 won't be needed at all. > Couldn't you just call device_unregister_wait(&interface->dev)? > > That looks to do all the completion stuff for you. I suspect that > a lot of code should be calling that _wait version. Yes. And you're undoubtedly right. There must be lots of modules that got converted to the driver model without adding some form of protection against exiting before their struct device/driver's have been released. Alan Stern ------------------------------------------------------- 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