aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2018-06-08 16:59:37 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-25 21:44:43 +0800
commit379cacc5e566f7197bdeb1ea3e99219d3e880c0a (patch)
treed391ffe22874bd321799b99c3e75c208dbd59fec /include/linux/usb
parentLinux 4.18-rc2 (diff)
downloadlinux-dev-379cacc5e566f7197bdeb1ea3e99219d3e880c0a.tar.xz
linux-dev-379cacc5e566f7197bdeb1ea3e99219d3e880c0a.zip
USB: Report wakeup events on root-hub ports
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: Alan Stern <stern@rowland.harvard.edu> Suggested-by: Anshuman Gupta <anshuman.gupta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/hcd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 34a6ded6f319..97e2ddec18b1 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -322,6 +322,7 @@ struct hc_driver {
int (*bus_suspend)(struct usb_hcd *);
int (*bus_resume)(struct usb_hcd *);
int (*start_port_reset)(struct usb_hcd *, unsigned port_num);
+ unsigned long (*get_resuming_ports)(struct usb_hcd *);
/* force handover of high-speed port to full-speed companion */
void (*relinquish_port)(struct usb_hcd *, int);