Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: xhci-hcd: Add get_resuming_ports method

This patch adds support for the new get_resuming_ports HCD method to
the xhci-hcd driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alan Stern and committed by
Greg Kroah-Hartman
8f9cc83c 00d423c8

+14
+11
drivers/usb/host/xhci-hub.c
··· 1684 1684 return 0; 1685 1685 } 1686 1686 1687 + unsigned long xhci_get_resuming_ports(struct usb_hcd *hcd) 1688 + { 1689 + struct xhci_hcd *xhci = hcd_to_xhci(hcd); 1690 + struct xhci_bus_state *bus_state; 1691 + 1692 + bus_state = &xhci->bus_state[hcd_index(hcd)]; 1693 + 1694 + /* USB3 port wakeups are reported via usb_wakeup_notification() */ 1695 + return bus_state->resuming_ports; /* USB2 ports only */ 1696 + } 1697 + 1687 1698 #endif /* CONFIG_PM */
+1
drivers/usb/host/xhci.c
··· 5081 5081 .hub_status_data = xhci_hub_status_data, 5082 5082 .bus_suspend = xhci_bus_suspend, 5083 5083 .bus_resume = xhci_bus_resume, 5084 + .get_resuming_ports = xhci_get_resuming_ports, 5084 5085 5085 5086 /* 5086 5087 * call back when device connected and addressed
+2
drivers/usb/host/xhci.h
··· 2110 2110 #ifdef CONFIG_PM 2111 2111 int xhci_bus_suspend(struct usb_hcd *hcd); 2112 2112 int xhci_bus_resume(struct usb_hcd *hcd); 2113 + unsigned long xhci_get_resuming_ports(struct usb_hcd *hcd); 2113 2114 #else 2114 2115 #define xhci_bus_suspend NULL 2115 2116 #define xhci_bus_resume NULL 2117 + #define xhci_get_resuming_ports NULL 2116 2118 #endif /* CONFIG_PM */ 2117 2119 2118 2120 u32 xhci_port_state_to_neutral(u32 state);