[PATCH] export usb_set_device_state(), use in ohci
This patch is mostly cleanup, but it all helps make PM_SUSPEND_DISK start to behave better. This exports the new usb_set_device_state() routine for the virtual root hubs, and uses it in OHCI during resume after power-off to replace some HC-private code doing almost the same thing. Note that all HCDs will likely need the same kind of suspend-to-disk support (though it's different when BIOS kicks in). Some systems even power-off during suspend-to-ram (to save extra power), which is why OHCI already has this logic! Related updates: - Use usb_set_device_state() immediately when an HC dies, making khubd handle disconnect processing instead of a workqueue. So now drivers won't self-deadlock in this should-be-rare path, when disconnect() calls flush_scheduled_work(). - Don't warn about "Unlink after no-IRQ" for the the root hub's status URB ... like when suspending an HCD that never enumerated a device. - Minor IRQ handler cleanup, including more accurate tracking of whether this driver ever returned IRQ_HANDLED (shared IRQs don't count). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
Please register or sign in to comment