]> git.kernelconcepts.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)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:55 +0000 (10:06 +0200)
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 cc305c71ac3d489d469ec4ca34a03c7861bf122f..c8f16f0a41de6c1ab60fb02878d3ccf373b3b20a 100644 (file)
@@ -304,6 +304,15 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
                                                USB_PORT_STAT_HIGH_SPEED)
                                fs_idle_delay = true;
                        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;
                }
        }