]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/usb/host/ehci-hub.c
EHCI: only power off port if over-current is active
[linux-imx.git] / drivers / usb / host / ehci-hub.c
index d9e8d713f485cf5a8d044f3bf24544a2c80d1f43..bf2c8f65e1aefc6c4d89e9dfe15a9f4a804f090e 100644 (file)
@@ -816,10 +816,11 @@ static int ehci_hub_control (
                         * power switching; they're allowed to just limit the
                         * current.  khubd will turn the power back on.
                         */
-                       if (HCS_PPC (ehci->hcs_params)){
+                       if ((temp & PORT_OC) && HCS_PPC(ehci->hcs_params)) {
                                ehci_writel(ehci,
                                        temp & ~(PORT_RWC_BITS | PORT_POWER),
                                        status_reg);
+                               temp = ehci_readl(ehci, status_reg);
                        }
                }