]> 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 e7d3d8def282968191e2bddf99109b00504c97e1..34053e795a838e7c44c5280157653c001a156ecc 100644 (file)
@@ -837,10 +837,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);
                        }
                }