• David Brownell's avatar
    [PATCH] EHCI suspend/resume updates · 59f13fee
    David Brownell authored
    This patch much improves suspend/resume behavior of EHCI, as tested with
    "echo suspend > /sys/power/state" and "echo disk > /sys/power/state".
    
     - Quiescing the controller has to handle a case where the software has
       finished shutting down periodic and async schedules, but the hardware
       hasn't yet finished its part.
    
     - When suspending the root hub, be more by-the-book so that resumes
       behave better.
    
     - When resuming after suspend-to-disk, or in general when no port is
       suspended, the driver re-uses the initialization logic.  That logic
       needed to understand that resources don't need re-allocation, and
       that a few things need to be reset to the default state.
    
     - More code paths needed to notice a suspended controller, and stop
       right away.
    
     - To shut down the controller, start with the root hub ports and
       work up from there.
    
    Tested by writing "suspend" or "disk" to /sys/power/state; several
    systems resumed OK, at least given the associated usbcore patches.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    59f13fee
ehci-hub.c 14.2 KB