aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/hcd-pci.c1
-rw-r--r--drivers/usb/host/ehci-pci.c10
-rw-r--r--drivers/usb/host/ohci-hcd.c12
-rw-r--r--drivers/usb/host/ohci-pci.c4
4 files changed, 17 insertions, 10 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 99432785f43..507741ed448 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -128,6 +128,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
128 } 128 }
129 129
130 pci_set_master(dev); 130 pci_set_master(dev);
131 device_set_wakeup_enable(&dev->dev, 1);
131 132
132 retval = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED); 133 retval = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED);
133 if (retval != 0) 134 if (retval != 0)
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 6af47a0937b..bdc6e86e1f8 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -219,15 +219,19 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
219 /* Serial Bus Release Number is at PCI 0x60 offset */ 219 /* Serial Bus Release Number is at PCI 0x60 offset */
220 pci_read_config_byte(pdev, 0x60, &ehci->sbrn); 220 pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
221 221
222 /* Workaround current PCI init glitch: wakeup bits aren't 222 /* Keep this around for a while just in case some EHCI
223 * being set from PCI PM capability. 223 * implementation uses legacy PCI PM support. This test
224 * can be removed on 17 Dec 2009 if the dev_warn() hasn't
225 * been triggered by then.
224 */ 226 */
225 if (!device_can_wakeup(&pdev->dev)) { 227 if (!device_can_wakeup(&pdev->dev)) {
226 u16 port_wake; 228 u16 port_wake;
227 229
228 pci_read_config_word(pdev, 0x62, &port_wake); 230 pci_read_config_word(pdev, 0x62, &port_wake);
229 if (port_wake & 0x0001) 231 if (port_wake & 0x0001) {
232 dev_warn(&pdev->dev, "Enabling legacy PCI PM\n");
230 device_init_wakeup(&pdev->dev, 1); 233 device_init_wakeup(&pdev->dev, 1);
234 }
231 } 235 }
232 236
233#ifdef CONFIG_USB_SUSPEND 237#ifdef CONFIG_USB_SUSPEND
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 8aa3f4556a3..65a9609f4ad 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) {
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index 8380cc2e961..8b28ae7865b 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -355,9 +355,9 @@ static int __devinit ohci_pci_start (struct usb_hcd *hcd)
355 355
356 /* RWC may not be set for add-in PCI cards, since boot 356 /* RWC may not be set for add-in PCI cards, since boot
357 * firmware probably ignored them. This transfers PCI 357 * firmware probably ignored them. This transfers PCI
358 * PM wakeup capabilities (once the PCI layer is fixed). 358 * PM wakeup capabilities.
359 */ 359 */
360 if (device_may_wakeup(&pdev->dev)) 360 if (device_can_wakeup(&pdev->dev))
361 ohci->hc_control |= OHCI_CTRL_RWC; 361 ohci->hc_control |= OHCI_CTRL_RWC;
362 } 362 }
363#endif /* CONFIG_PM */ 363#endif /* CONFIG_PM */