diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-06-25 14:02:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:37 -0400 |
commit | 4147200d25c423e627ab4487530b3d9f2ef829c8 (patch) | |
tree | 7261fbfd97782482d18333f1b0e9de0e2e4bf968 /drivers/usb/host/ehci-hub.c | |
parent | 057c58bfb1dc9bbb75b8ba3b6c6336cfca63b9d0 (diff) |
USB: add do_wakeup parameter for PCI HCD suspend
This patch (as1385) adds a "do_wakeup" parameter to the pci_suspend
method used by PCI-based host controller drivers. ehci-hcd in
particular needs to know whether or not to enable wakeup when
suspending a controller. Although that information is currently
available through device_may_wakeup(), when support is added for
runtime suspend this will no longer be true.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 0931f5a7dec4..1292a5b2197a 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -107,7 +107,7 @@ static void ehci_handover_companion_ports(struct ehci_hcd *ehci) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, | 109 | static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, |
110 | bool suspending) | 110 | bool suspending, bool do_wakeup) |
111 | { | 111 | { |
112 | int port; | 112 | int port; |
113 | u32 temp; | 113 | u32 temp; |
@@ -117,8 +117,7 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, | |||
117 | * when the controller is suspended or resumed. In all other | 117 | * when the controller is suspended or resumed. In all other |
118 | * cases they don't need to be changed. | 118 | * cases they don't need to be changed. |
119 | */ | 119 | */ |
120 | if (!ehci_to_hcd(ehci)->self.root_hub->do_remote_wakeup || | 120 | if (!ehci_to_hcd(ehci)->self.root_hub->do_remote_wakeup || do_wakeup) |
121 | device_may_wakeup(ehci_to_hcd(ehci)->self.controller)) | ||
122 | return; | 121 | return; |
123 | 122 | ||
124 | /* clear phy low-power mode before changing wakeup flags */ | 123 | /* clear phy low-power mode before changing wakeup flags */ |