EHCI: only power off port if over-current is active
[profile/ivi/kernel-adaptation-intel-automotive.git] / drivers / usb / host / ehci-hub.c
index ea6184b..88cfb8f 100644 (file)
@@ -891,10 +891,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);
                        }
                }