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 <[email protected]>
---
 drivers/usb/host/ehci-hub.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 47b858f..d14827d 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -301,6 +301,15 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
 
                if (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;
                }
        }
-- 
1.7.8


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to