]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
usb: host: tegra: fix usb-device reset in LP0 exit
authorJeetesh Burman <jburman@nvidia.com>
Fri, 4 Oct 2013 05:53:56 +0000 (11:23 +0530)
committerGerrit Code Review <gerrit2@nvidia.com>
Fri, 22 Nov 2013 06:12:07 +0000 (22:12 -0800)
While resuming from LP0, ehci getting reset that causes
ip address lost if usb-ethernet dongle is used for
network connection, this is happend because usb-ehci resume
functionality called twice and therefore USB_PORTSC_CCS bit
in register USB_PORTSC get changed, which causes reset command
sent to the utmi.

To maintain uniformity, changes also done in tegra_ehci_suspend.

In the tegra_ehci_probe, unnecessary tried to resume ehci. So,
removing resume functionality while probing ehci.

Bug 1355760

Change-Id: I6b170131704b36e722ed2b8ec2abb770770fd859
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
drivers/usb/host/ehci-tegra.c

index 09cd1b2ce93a895634e75a0dbcffae2e2ffb312a..7597fcb998789749a356f0169d9526814d816730 100644 (file)
@@ -603,7 +603,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
                goto fail_io;
        }
 
-       err = usb_phy_set_suspend(get_usb_phy(tegra->phy), 0);
+       err = tegra_usb_phy_power_on(tegra->phy);
        if (err) {
                dev_err(&pdev->dev, "failed to power on the phy\n");
                goto fail_phy;
@@ -673,7 +673,7 @@ static int tegra_ehci_resume(struct platform_device *pdev)
        struct tegra_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
        if (pdata->u_data.host.turn_off_vbus_on_lp0)
                tegra_usb_enable_vbus(tegra->phy, true);
-       return usb_phy_set_suspend(get_usb_phy(tegra->phy), 0);
+       return tegra_usb_phy_power_on(tegra->phy);
 }
 
 static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state)
@@ -686,7 +686,7 @@ static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state)
        if (tegra->bus_suspended_fail)
                return -EBUSY;
        else {
-               err = usb_phy_set_suspend(get_usb_phy(tegra->phy), 1);
+               err = tegra_usb_phy_power_off(tegra->phy);
                if (pdata->u_data.host.turn_off_vbus_on_lp0) {
                        tegra_usb_enable_vbus(tegra->phy, false);
                        tegra_usb_phy_pmc_disable(tegra->phy);