diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-04-14 12:17:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:53 -0400 |
commit | 58a97ffeb2297f154659f339d77eb3f32c4d8b3e (patch) | |
tree | 2ca171b7f720769007f9c9624b74ca4ad3442f02 /drivers/usb/host/isp116x-hcd.c | |
parent | b950bdbc67041412cb042e404938667204c7902c (diff) |
USB: HCDs use the do_remote_wakeup flag
When a USB device is suspended, whether or not it is enabled for
remote wakeup depends on the device_may_wakeup() setting. The setting
is then saved in the do_remote_wakeup flag.
Later on, however, the device_may_wakeup() value can change because of
user activity. So when testing whether a suspended device is or
should be enabled for remote wakeup, we should always test
do_remote_wakeup instead of device_may_wakeup(). This patch (as1076)
makes that change for root hubs in several places.
The patch also adjusts uhci-hcd so that when an autostopped controller
is suspended, the remote wakeup setting agrees with the value recorded
in the root hub's do_remote_wakeup flag.
And the patch adjusts ehci-hcd so that wakeup events on selectively
suspended ports (i.e., the bus itself isn't suspended) don't turn on
the PME# wakeup signal.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/isp116x-hcd.c')
-rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index 66d773c726f6..20b9a0d07420 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -1400,7 +1400,7 @@ static int isp116x_bus_suspend(struct usb_hcd *hcd) | |||
1400 | spin_unlock_irqrestore(&isp116x->lock, flags); | 1400 | spin_unlock_irqrestore(&isp116x->lock, flags); |
1401 | val &= (~HCCONTROL_HCFS & ~HCCONTROL_RWE); | 1401 | val &= (~HCCONTROL_HCFS & ~HCCONTROL_RWE); |
1402 | val |= HCCONTROL_USB_SUSPEND; | 1402 | val |= HCCONTROL_USB_SUSPEND; |
1403 | if (device_may_wakeup(&hcd->self.root_hub->dev)) | 1403 | if (hcd->self.root_hub->do_remote_wakeup) |
1404 | val |= HCCONTROL_RWE; | 1404 | val |= HCCONTROL_RWE; |
1405 | /* Wait for usb transfers to finish */ | 1405 | /* Wait for usb transfers to finish */ |
1406 | msleep(2); | 1406 | msleep(2); |