Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376723
b: refs/heads/master
c: 77df9e0
h: refs/heads/master
i:
  376721: 01e0eab
  376719: ecef4f8
v: v3
  • Loading branch information
Tony Camuso authored and Sarah Sharp committed May 24, 2013
1 parent 7974896 commit b3f54a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88696ae432ce7321540ac53d9caab3de9118b094
refs/heads/master: 77df9e0b799b03e1d5d9c68062709af5f637e834
12 changes: 11 additions & 1 deletion trunk/drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
struct usb_hcd *hcd = xhci_to_hcd(xhci);
struct usb_hcd *secondary_hcd;
int retval = 0;
bool comp_timer_running = false;

/* Wait a bit if either of the roothubs need to settle from the
* transition into bus suspend.
Expand Down Expand Up @@ -993,6 +994,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)

/* If restore operation fails, re-initialize the HC during resume */
if ((temp & STS_SRE) || hibernated) {

if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) &&
!(xhci_all_ports_seen_u0(xhci))) {
del_timer_sync(&xhci->comp_mode_recovery_timer);
xhci_dbg(xhci, "Compliance Mode Recovery Timer deleted!\n");
}

/* Let the USB core know _both_ roothubs lost power. */
usb_root_hub_lost_power(xhci->main_hcd->self.root_hub);
usb_root_hub_lost_power(xhci->shared_hcd->self.root_hub);
Expand Down Expand Up @@ -1035,6 +1043,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
retval = xhci_init(hcd->primary_hcd);
if (retval)
return retval;
comp_timer_running = true;

xhci_dbg(xhci, "Start the primary HCD\n");
retval = xhci_run(hcd->primary_hcd);
if (!retval) {
Expand Down Expand Up @@ -1076,7 +1086,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
* to suffer the Compliance Mode issue again. It doesn't matter if
* ports have entered previously to U0 before system's suspension.
*/
if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && !comp_timer_running)
compliance_mode_recovery_timer_init(xhci);

/* Re-enable port polling. */
Expand Down

0 comments on commit b3f54a2

Please sign in to comment.