]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/host/ehci-hcd.c
Merge branch 'blk-end-request' of git://git.kernel.dk/linux-2.6-block
[karo-tx-linux.git] / drivers / usb / host / ehci-hcd.c
index c1514442883e4a4fecd2ff3d3fae3a18c80e8785..5f2d74ed5ad73a299480022938645551d5179b09 100644 (file)
@@ -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.
         */
        down_write(&ehci_cf_port_reset_rwsem);
        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);
        up_write(&ehci_cf_port_reset_rwsem);
 
        temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));