usb: host: tegra: Fix resuming low speed devices from lp0
authorBenoit Goby <benoit@android.com>
Tue, 18 Jan 2011 20:56:16 +0000 (12:56 -0800)
committerBenoit Goby <benoit@android.com>
Wed, 19 Jan 2011 01:14:04 +0000 (17:14 -0800)
Change-Id: I9576853bbe0fae52c5c2cfab26ce8f2017077d4e
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/host/ehci-tegra.c

index 2341904808bce0d2d5a5f6ce046a78e10a33ac9f..db61c60ffbab72115a2e1308c9a60d0e7e7cda33 100644 (file)
@@ -265,7 +265,7 @@ static int tegra_usb_resume(struct usb_hcd *hcd)
                goto restart;
        }
 
-       tegra_ehci_phy_restore_start(tegra->phy);
+       tegra_ehci_phy_restore_start(tegra->phy, context->port_speed);
 
        /* Check if the phy resume from LP0. When the phy resume from LP0
         * USB register will be reset. */
@@ -341,10 +341,13 @@ static int tegra_usb_resume(struct usb_hcd *hcd)
        }
 
        tegra_ehci_phy_restore_end(tegra->phy);
+
        return 0;
 
 restart:
-       tegra_ehci_phy_restore_end(tegra->phy);
+       if (context->valid)
+               tegra_ehci_phy_restore_end(tegra->phy);
+
        tegra_ehci_restart(hcd);
        return 0;
 }