usb: ehci: tegra: remove reschedule rh_timer
authorJay Cheng <jacheng@nvidia.com>
Thu, 6 Jan 2011 05:16:18 +0000 (00:16 -0500)
committerBenoit Goby <benoit@android.com>
Mon, 10 Jan 2011 01:21:58 +0000 (17:21 -0800)
Reschedule rh_timer may cause usb device resume fail, as rh_timer may be
timeout and send USB_REQ_GET_STATUS SETUP control transfer by the time when
the device is handling clear suspend feature, which in turn the device may
drop clear suspend feature request.

Actually on port resume case, the host driver don't need to reschedule
rh_timer to check port status. The host driver will check port status right
after suspend feature is cleared.

Change-Id: I6205e97af49ed4349b6215b851f6b5f1394258d8
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
drivers/usb/host/ehci-tegra.c

index 262bbb01228b9c991a4e220f972303b02184cb3e..0e9b6458da846e60f0ef36a7b6edbc23978ef066 100644 (file)
@@ -151,11 +151,7 @@ static int tegra_ehci_hub_control(
 
                tegra_usb_phy_preresume(tegra->phy);
 
-               /* reschedule root hub polling during resume signaling */
                ehci->reset_done[wIndex-1] = jiffies + msecs_to_jiffies(25);
-               /* check the port again */
-               mod_timer(&ehci_to_hcd(ehci)->rh_timer,
-                               ehci->reset_done[wIndex-1]);
 
                temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
                /* start resume signalling */
@@ -173,6 +169,8 @@ static int tegra_ehci_hub_control(
                if (handshake(ehci, status_reg, PORT_SUSPEND, 0, 2000))
                        pr_err("%s: timeout waiting for PORT_SUSPEND\n", __func__);
 
+               ehci->reset_done[wIndex-1] = 0;
+
                tegra->port_resuming = 1;
                goto done;
        }