diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-05-04 11:52:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:29:47 -0400 |
commit | 383975d765523a56dc43a6cd6d52e9b376800cf2 (patch) | |
tree | d6ecbfe620d7d5fba372211d7af185e7c44e5097 /drivers/usb/host/ehci-pci.c | |
parent | 0458d5b4c9cc4ca0f62625d0144ddc4b4bc97a3c (diff) |
USB: EHCI, OHCI: handover changes
This patch (as887) changes the way ehci-hcd and ohci-hcd handle a loss
of VBUS power during suspend. In order for the USB-persist facility
to work correctly, it is necessary for low- and full-speed devices
attached to a high-speed port to be handed back to the companion
controller during resume processing.
This entails three changes: adding code to ehci-hcd to perform the
handover, removing code from ohci-hcd to turn off ports during
root-hub reinit, and adding code to ohci-hcd to turn on ports during
PCI controller resume. (Other bus glue resume methods for platforms
supporting high-speed controllers would need a similar change, if any
existed.)
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-pci.c')
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 966965f72338..a7816e392a85 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -312,13 +312,14 @@ static int ehci_pci_resume(struct usb_hcd *hcd) | |||
312 | ehci_work(ehci); | 312 | ehci_work(ehci); |
313 | spin_unlock_irq(&ehci->lock); | 313 | spin_unlock_irq(&ehci->lock); |
314 | 314 | ||
315 | /* here we "know" root ports should always stay powered */ | ||
316 | ehci_port_power(ehci, 1); | ||
317 | |||
318 | ehci_writel(ehci, ehci->command, &ehci->regs->command); | 315 | ehci_writel(ehci, ehci->command, &ehci->regs->command); |
319 | ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); | 316 | ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); |
320 | ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ | 317 | ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ |
321 | 318 | ||
319 | /* here we "know" root ports should always stay powered */ | ||
320 | ehci_port_power(ehci, 1); | ||
321 | ehci_handover_companion_ports(ehci); | ||
322 | |||
322 | hcd->state = HC_STATE_SUSPENDED; | 323 | hcd->state = HC_STATE_SUSPENDED; |
323 | return 0; | 324 | return 0; |
324 | } | 325 | } |