• Alan Stern's avatar
    USB: Report wakeup events on root-hub ports · 379cacc5
    Alan Stern authored
    When a USB device attached to a root-hub port sends a wakeup request
    to a sleeping system, we do not report the wakeup event to the PM
    core.  This is because a system resume involves waking up all
    suspended USB ports as quickly as possible; without the normal
    USB_RESUME_TIMEOUT delay, the host controller driver doesn't set the
    USB_PORT_STAT_C_SUSPEND flag and so usb_port_resume() doesn't realize
    that a wakeup request was received.
    However, some environments (such as Chrome OS) want to have all wakeup
    events reported so they can be ascribed to the appropriate device.  To
    accommodate these environments, this patch adds a new routine to the
    hub driver and a corresponding new HCD method to be used when a root
    hub resumes.  The HCD method returns a bitmap of ports that have
    initiated a wakeup signal but not yet completed resuming.  The hub
    driver can then report to the PM core that the child devices attached
    to these ports initiated a wakeup event.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Suggested-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
hcd.h 26.2 KB