summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pci.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2005-11-07 15:24:46 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 13:48:30 -0800
commit2c1c3c4cd5f796b1912c65aaf3bf48c0ddf11f5e (patch)
treed0adc25607629f4fbb9f45cc498f5c155d520291 /drivers/usb/host/ehci-pci.c
parent8d7802ed3c617120863f84346638d1cf1c96137b (diff)
downloadblackbird-op-linux-2c1c3c4cd5f796b1912c65aaf3bf48c0ddf11f5e.tar.gz
blackbird-op-linux-2c1c3c4cd5f796b1912c65aaf3bf48c0ddf11f5e.zip
[PATCH] USB: EHCI updates (4/4) driver model wakeup flags
This teaches the EHCI driver to use the new driver model wakeup flags, replacing the similar ones in the HCD glue. It also adds a workaround for the current glitch whereby PCI init doesn't init the wakeup flags from the PCI PM capabilities. (EHCI controllers don't worry about legacy mode; the PCI PM capability would always do the job.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r--drivers/usb/host/ehci-pci.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 13f73a836e45..ac088bc72f1c 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -210,7 +210,16 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
/* Serial Bus Release Number is at PCI 0x60 offset */
pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
- /* REVISIT: per-port wake capability (PCI 0x62) currently unused */
+ /* Workaround current PCI init glitch: wakeup bits aren't
+ * being set from PCI PM capability.
+ */
+ if (!device_can_wakeup(&pdev->dev)) {
+ u16 port_wake;
+
+ pci_read_config_word(pdev, 0x62, &port_wake);
+ if (port_wake & 0x0001)
+ device_init_wakeup(&pdev->dev, 1);
+ }
retval = ehci_pci_reinit(ehci, pdev);
done:
OpenPOWER on IntegriCloud