EHCI: add delay to bus_resume before accessing ports
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 15 Mar 2007 19:54:30 +0000 (15:54 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Apr 2007 20:28:35 +0000 (13:28 -0700)
This patch (as870) adds a delay to ehci-hcd's bus_resume routine.
Apparently there are controllers and/or BIOSes out there which need
such a delay to get the ports back into their correct state.  This
fixes Bugzilla #8190.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hub.c

index 1813b7cac294db103f01271406cb2d550c2195c0..f4d301bc83b9c8bf82d6a434fa2833f6aa3b1b13 100644 (file)
@@ -136,6 +136,10 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
        /* restore CMD_RUN, framelist size, and irq threshold */
        ehci_writel(ehci, ehci->command, &ehci->regs->command);
 
+       /* Some controller/firmware combinations need a delay during which
+        * they set up the port statuses.  See Bugzilla #8190. */
+       mdelay(8);
+
        /* manually resume the ports we suspended during bus_suspend() */
        i = HCS_N_PORTS (ehci->hcs_params);
        while (i--) {