This could also be entirely solved by making the requirements that: (1) The core or HCD will unlink all URBs for a removed device when it's removed
I've wanted to see this for some time. It's now easy enough to do for anything using the hcd.c code, since it has a list of those urbs. In fact I'd like to see this done before driver->disconnect() is called.
But that'd leave an issue with urbs getting submitted later. Today the synchronization point is "return from disconnect", so that unlinking urbs before then won't eliminate all the complication.
If we could set usb_device->dev.state to DEVICE_GONE before we start(2) The mid- and high-level drivers will not submit any more URBs to the removed device once the disconnect() routine has ended.
to disconect(), we could do even better: we could guarantee that any
new urb submissions would fail, so even a driver _trying_ to do the
wrong thing wouldn't be able to do so.
If Greg's reading this thread, I wonder if he'd comment on what it'd
mean to call device_unregister() earlier in usb_disconnect() ... like
right at the top, not the last thing. The docs imply that'd be OK.
- Dave
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel