summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-04-18 20:25:45 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-04-18 20:25:45 +0530
commitfb8784626891796895d6ca081ae8cccce8e1fd2d (patch)
treee4f1ca0bd43a50fd66360be303f5e198ff65aeb9 /drivers/usb/host/ehci-tegra.c
parentff0c39b5f39aa8883182fde7b06c9a3a79e62bf4 (diff)
EHCI: keep track of ports being resumed and indicate in hub_status_data
This patch (as1537) adds a bit-array to ehci-hcd for keeping track of which ports are undergoing a resume transition. If any of the bits are set when ehci_hub_status_data() is called, the routine will return a nonzero value even if no ports have any status changes pending. This will allow usbcore to handle races between root-hub suspend and port wakeup. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Sarah Sharp <sarah.a.sharp@linux.intel.com> CC: Chen Peter-B29397 <B29397@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Conflicts: drivers/usb/host/ehci-tegra.c Change-Id: I30669c6e4ceb78c26209bcadf4d9647141741898
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 7f17c2c4d319..fd35be72f67f 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -421,6 +421,7 @@ static int tegra_ehci_hub_control(
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
/* start resume signaling */
ehci_writel(ehci, temp | PORT_RESUME, status_reg);
+ set_bit(wIndex-1, &ehci->resuming_ports);
ehci->reset_done[wIndex-1] = jiffies + msecs_to_jiffies(25);
/* whoever resumes must GetPortStatus to complete it!! */
@@ -471,7 +472,7 @@ static int tegra_ehci_hub_control(
if (hsic && (wIndex == 0))
tegra_usb_phy_bus_reset(tegra->phy);
}
-
+ clear_bit(wIndex-1, &ehci->resuming_ports);
break;
}
case USB_PORT_FEAT_POWER: