Commit:     1cb52658b4f5b10a9e91f8e1c21ca2bcc1b9a3ca
Parent:     5cf1973a44bd298e3cfce6f6af8faa8c9d0a6d55
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 13 16:22:30 2007 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed Nov 28 13:58:36 2007 -0800

    USB: fix up EHCI startup synchronization
    A recent patch added software synchronization during EHCI startup,
    so ports aren't switched away from the companion controllers after
    resets have started.  This patch adds a short delay letting hardware
    finish that port switching before any new resets begin ... so both
    ends of that hardware race window are closed.
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Cc: Dave Miller <[EMAIL PROTECTED]>
    Cc: Dely Sy <[EMAIL PROTECTED]>
    Cc: stable <[EMAIL PROTECTED]>
    Cc: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 drivers/usb/host/ehci-hcd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index c151444..5f2d74e 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -575,12 +575,15 @@ static int ehci_run (struct usb_hcd *hcd)
         * from the companions to the EHCI controller.  If any of the
         * companions are in the middle of a port reset at the time, it
         * could cause trouble.  Write-locking ehci_cf_port_reset_rwsem
-        * guarantees that no resets are in progress.
+        * guarantees that no resets are in progress.  After we set CF,
+        * a short delay lets the hardware catch up; new resets shouldn't
+        * be started before the port switching actions could complete.
        hcd->state = HC_STATE_RUNNING;
        ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
        ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
+       msleep(5);
        temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to