USB: ehci-platform: Support ehci reset after resume quirk
[firefly-linux-kernel-4.4.55.git] / drivers / usb / host / ehci-hcd.c
index 38bfeedae1d0f30cf990d6d5b2b4e450a5ca22e2..85e56d1abd2307a8620c6fcfa1211a4136f74faf 100644 (file)
@@ -1110,7 +1110,7 @@ int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup)
 EXPORT_SYMBOL_GPL(ehci_suspend);
 
 /* Returns 0 if power was preserved, 1 if power was lost */
-int ehci_resume(struct usb_hcd *hcd, bool hibernated)
+int ehci_resume(struct usb_hcd *hcd, bool force_reset)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci(hcd);
 
@@ -1124,12 +1124,12 @@ int ehci_resume(struct usb_hcd *hcd, bool hibernated)
                return 0;               /* Controller is dead */
 
        /*
-        * If CF is still set and we aren't resuming from hibernation
+        * If CF is still set and reset isn't forced
         * then we maintained suspend power.
         * Just undo the effect of ehci_suspend().
         */
        if (ehci_readl(ehci, &ehci->regs->configured_flag) == FLAG_CF &&
-                       !hibernated) {
+                       !force_reset) {
                int     mask = INTR_MASK;
 
                ehci_prepare_ports_for_controller_resume(ehci);