diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2010-12-15 23:47:14 +0300 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-03-14 04:23:36 +0300 |
commit | 20b67cf51fa606442bb343afad0ee1a393a6afb3 (patch) | |
tree | 1d85e8b93aff185211d065a5113beaeb68cfcb26 /drivers/usb/host/xhci.c | |
parent | 5308a91b9fc1a8f94b860c2589b06908a97cba7e (diff) | |
download | linux-20b67cf51fa606442bb343afad0ee1a393a6afb3.tar.xz |
xhci: Refactor bus suspend state into a struct.
There are several variables in the xhci_hcd structure that are related to
bus suspend and resume state. There are a couple different port status
arrays that are accessed by port index. Move those variables into a
separate structure, xhci_bus_state. Stash that structure in xhci_hcd.
When we have two roothhubs that can be suspended and resumed separately,
we can have two xhci_bus_states, and index into the port arrays in each
structure with the fake roothub port index (not the real hardware port
index).
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index a95108cba7d4..8d45bbde3da4 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -694,7 +694,10 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) struct usb_hcd *hcd = xhci_to_hcd(xhci); int retval; - if (time_before(jiffies, xhci->next_statechange)) + /* Wait a bit if the bus needs to settle from the transistion to + * suspend. + */ + if (time_before(jiffies, xhci->bus_state[0].next_statechange)) msleep(100); spin_lock_irq(&xhci->lock); |