• David Brownell's avatar
    [PATCH] root hub updates (greater half) · f3f3253d
    David Brownell authored
    This patch associates hub suspend and resume logic (including for root hubs)
    with CONFIG_PM -- instead of CONFIG_USB_SUSPEND as before -- thereby unifying
    two troublesome versions of suspend logic into just one.  It'll be easier to
    keep things right from now on.
    
      - Now usbcore _always_ calls hcd->hub_suspend as needed, instead of
        only when USB_SUSPEND is enabled:
         * Those root hub methods are now called from hub suspend/resume;
           no more skipping between layers during device suspend/resume;
         * It now handles cases allowed by sysfs or autosuspended root hubs,
           by forcing the hub interface to resume too.
    
      - All devices, including virtual root hubs, now get the same treatment
        on their resume paths ... including re-activating all their interfaces.
    
    Plus it gets rid of those stub copies of usb_{suspend,resume}_device(), and
    updates the Kconfig to match the new definition of USB_SUSPEND:  it provides
    (a) selective suspend, downstream from hubs; and (b) remote wakeup, upstream
    from any device configuration which supports it.
    
    This calls for minor followup patches for most HCDs (and their PCI glue).
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    
     drivers/usb/core/Kconfig |   11 ++-
     drivers/usb/core/hub.c   |  163 +++++++++++++++++++++++++----------------------
     2 files changed, 97 insertions(+), 77 deletions(-)
    f3f3253d
hub.c 81.2 KB