aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-05-04 11:55:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:29:47 -0400
commit3c519b846c4d5edf7c94d1eede42445a815bf65c (patch)
treea07857a8eb61d8bd1ed6e01ee6bde1df3fe78354 /drivers/usb/host/ehci-hub.c
parent6bc6cff52e0c4c4c876b1b8a5750041da61ad42b (diff)
USB: EHCI: fix handover for designated full-speed ports
This patch (as895) fixes up a loose end in the port-handover code for the USB-Persist facility. A special case occurs when a high-speed device is attached to a port which the user has designated to run at full-speed only; the port must be disabled before the handover can take place. 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-hub.c')
-rw-r--r--drivers/usb/host/ehci-hub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 3e80de7c7f5b..27291f502651 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -60,11 +60,13 @@ static void ehci_handover_companion_ports(struct ehci_hcd *ehci)
60 while (port--) { 60 while (port--) {
61 if (test_bit(port, &ehci->owned_ports)) { 61 if (test_bit(port, &ehci->owned_ports)) {
62 reg = &ehci->regs->port_status[port]; 62 reg = &ehci->regs->port_status[port];
63 status = ehci_readl(ehci, reg); 63 status = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
64 64
65 /* Port already owned by companion? */ 65 /* Port already owned by companion? */
66 if (status & PORT_OWNER) 66 if (status & PORT_OWNER)
67 clear_bit(port, &ehci->owned_ports); 67 clear_bit(port, &ehci->owned_ports);
68 else if (test_bit(port, &ehci->companion_ports))
69 ehci_writel(ehci, status & ~PORT_PE, reg);
68 else 70 else
69 ehci_hub_control(hcd, SetPortFeature, 71 ehci_hub_control(hcd, SetPortFeature,
70 USB_PORT_FEAT_RESET, port + 1, 72 USB_PORT_FEAT_RESET, port + 1,