-
David Brownell authored
Makes usbcore handle some suspend scenarios more consistently, especially when talking with root hubs. - Use usb_device->state, not device->power.power_state. (The driver model power_state is still needed for interfaces.) With USB_SUSPEND=n, there are also cases where the HCD_STATE_SUSPENDED needs to be used instead of testing for USB_STATE_SUSPENDED. - Updates usb_device->state for root hubs during suspend/resume. - Fixes a locking bug (extra "up") that got merged recently, affecting CONFIG_USB_SUSPEND. - Recover one of the "HC died" cases better. - Root hub timer updates, handling various suspend transitions more consistently: don't duplicate earlier submit checks, only work when hub is configured, address various submit/resume races. Together, these help hubs work better regardless of whether USB_SUSPEND has been enabled (that's the only way USB_STATE_SUSPENDED appears), and whether or not the HCD is marked as suspended (or maybe Alan would want to call that "half suspended"). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
8df93ce6