]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00296519 USB: EHCI: wait more than 3ms until the device enters full-speed idle
authorPeter Chen <peter.chen@freescale.com>
Fri, 24 Jan 2014 06:59:30 +0000 (14:59 +0800)
committerPeter Chen <peter.chen@freescale.com>
Fri, 24 Jan 2014 09:23:58 +0000 (17:23 +0800)
If the high-speed device does not enter full-speed idle after
wakeup on disconnect logic has effected, there will be an
unexpected disconnect wakeup interrupt due to the bus is still SE0.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
drivers/usb/host/ehci-hub.c

index c17e60be06657e438c7e4c58f51600bcaf4fe3e1..8cca8e15e76f53eb3d87cd5ce5c5fadcecba422d 100644 (file)
@@ -289,6 +289,15 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
                        ehci_vdbg (ehci, "port %d, %08x -> %08x\n",
                                port + 1, t1, t2);
                        ehci_writel(ehci, t2, reg);
+                       if ((t2 & PORT_WKDISC_E)
+                               && (ehci_port_speed(ehci, t2) ==
+                                       USB_PORT_STAT_HIGH_SPEED))
+                               /*
+                                * If the high-speed device has not switched
+                                * to full-speed idle before WKDISC_E has
+                                * effected, there will be a WKDISC event.
+                                */
+                               mdelay(4);
                        changed = 1;
                }
        }