[PATCH] USB: disconnect cleanup, new HCD callback
Here's a streamlined version: doesn't require the unlink cleanup, and expects the *hci-hcd updates later. Smaller, and sanity checked against all three major HCDs. - reverts that unlink() patch: disconnect() callbacks can continue to act like they always have. - adds new "disable that endpoint" support, necessary for safely changing configurations or altsettings as well as physical disconnect (which is almost the same as setting config to zero, except for ep0). - NEW BEHAVIOUR: usbcore cleans up after drivers that return from disconnect() with urbs still linked, by using the new "disable that endpoint" support. Because it doesn't have any *hci-hcd updates, the hardware synch needed by EHCI and OHCI (not UHCI) still gets done through the bus->deallocate(dev) call ... not where we've ever needed it, but 2.3-compatible (and finally fixable). That gets rid of some problematic disconnect scenarios, and other fixes can be phased in over time: the *hci-hcd updates to relocate the hardware synch point so it always happens in a task context, and disabling endpoints before their configs change (invalidating all HC state).
Showing
Please register or sign in to comment