diff options
author | Rohith Seelaboyina <rseelaboyina@nvidia.com> | 2013-07-25 17:21:56 +0530 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2013-07-31 13:40:56 -0700 |
commit | 12ec9f88a730f1e27b0ef43955eb7e618bd5e447 (patch) | |
tree | 1dc65a943387375b07d4d547232d81fbfb2728e2 /drivers/usb | |
parent | a30c74cb9ef1e90d46c03436b9c8f4c4247516b5 (diff) |
usb: host: tegra: reduce delay in driver remove
Following are taken care:
1. Add check conditions before updating the pm_qos nodes
2. Reduce delay in driver remove path to sync
ehci_bus_resume, ehci_bus_suspend, ehci_remove
Bug 1316354
Bug 1331078
Change-Id: I51e251474a9def65286e7a6f8099ad9cdc40d0ea
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/253427
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 88b5f405efca..b6f08e872f47 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -387,6 +387,7 @@ static int tegra_ehci_bus_suspend(struct usb_hcd *hcd) EHCI_DBG("%s() BEGIN\n", __func__); #ifdef CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ +if (pm_qos_request_active(&tegra->boost_cpu_freq_req)) pm_qos_update_request(&tegra->boost_cpu_freq_req, PM_QOS_DEFAULT_VALUE); tegra->cpu_boost_in_work = false; @@ -412,6 +413,7 @@ static int tegra_ehci_bus_resume(struct usb_hcd *hcd) EHCI_DBG("%s() BEGIN\n", __func__); #ifdef CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ +if (pm_qos_request_active(&tegra->boost_cpu_freq_req)) pm_qos_update_request(&tegra->boost_cpu_freq_req, (s32)CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ * 1000); tegra->cpu_boost_in_work = false; @@ -709,16 +711,13 @@ static int tegra_ehci_remove(struct platform_device *pdev) tegra_usb_phy_power_on(tegra->phy); if (pdata->port_otg) { - timeout = jiffies + 5 * HZ; - - /* wait for devices connected to root hub to disconnect*/ - while (time_before(jiffies, timeout) && - rhdev && rhdev->children[0]) - ; - - /* wait for any control packets sent to root hub to complete */ - msleep(1000); + while (rhdev && rhdev->children[0]) { + if (time_after(jiffies, timeout)) + break; + msleep(20); + cpu_relax(); + } } usb_remove_hcd(hcd); |