From 0963806c5198820c93dee6456a8fac5e336a224a Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Fri, 24 Jan 2014 14:59:30 +0800 Subject: [PATCH] ENGR00296519 USB: EHCI: wait more than 3ms until the device enters full-speed idle 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 --- drivers/usb/host/ehci-hub.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index cc305c71ac3d..c8f16f0a41de 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -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; } } -- 2.39.2