diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-12-17 17:20:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 13:00:12 -0500 |
commit | 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e (patch) | |
tree | c7b59ccb00a69eb02188d9f0e40eec001078917f /drivers/usb/host/ohci-hcd.c | |
parent | a0d4922da2e4ccb0973095d8d29f36f6b1b5f703 (diff) |
USB: automatically enable wakeup for PCI host controllers
This patch (as1193b) enables wakeup during initialization for all PCI
host controllers, and it removes some code (and comments!) that are no
longer needed now that the PCI core automatically initializes wakeup
settings for all new devices.
The idea is that the bus should initialize wakeup, and the bus glue
or controller driver should enable it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 8aa3f4556a32..65a9609f4ad6 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -589,13 +589,15 @@ static int ohci_run (struct ohci_hcd *ohci) | |||
589 | /* also: power/overcurrent flags in roothub.a */ | 589 | /* also: power/overcurrent flags in roothub.a */ |
590 | } | 590 | } |
591 | 591 | ||
592 | /* Reset USB nearly "by the book". RemoteWakeupConnected was | 592 | /* Reset USB nearly "by the book". RemoteWakeupConnected has |
593 | * saved if boot firmware (BIOS/SMM/...) told us it's connected, | 593 | * to be checked in case boot firmware (BIOS/SMM/...) has set up |
594 | * or if bus glue did the same (e.g. for PCI add-in cards with | 594 | * wakeup in a way the bus isn't aware of (e.g., legacy PCI PM). |
595 | * PCI PM support). | 595 | * If the bus glue detected wakeup capability then it should |
596 | * already be enabled. Either way, if wakeup should be enabled | ||
597 | * but isn't, we'll enable it now. | ||
596 | */ | 598 | */ |
597 | if ((ohci->hc_control & OHCI_CTRL_RWC) != 0 | 599 | if ((ohci->hc_control & OHCI_CTRL_RWC) != 0 |
598 | && !device_may_wakeup(hcd->self.controller)) | 600 | && !device_can_wakeup(hcd->self.controller)) |
599 | device_init_wakeup(hcd->self.controller, 1); | 601 | device_init_wakeup(hcd->self.controller, 1); |
600 | 602 | ||
601 | switch (ohci->hc_control & OHCI_CTRL_HCFS) { | 603 | switch (ohci->hc_control & OHCI_CTRL_HCFS) { |