Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275819
b: refs/heads/master
c: f69e312
h: refs/heads/master
i:
  275817: 001f820
  275815: c18c330
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Nov 14, 2011
1 parent d2a4e02 commit 3d2f5b9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 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: 97ff22ee3b4cb3a334f7385e269773141aed702f
refs/heads/master: f69e3120df82391a0ee8118e0a156239a06b2afb
29 changes: 14 additions & 15 deletions trunk/drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
u32 command, temp = 0;
struct usb_hcd *hcd = xhci_to_hcd(xhci);
struct usb_hcd *secondary_hcd;
int retval;
int retval = 0;

/* Wait a bit if either of the roothubs need to settle from the
* transition into bus suspend.
Expand All @@ -809,6 +809,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
xhci->bus_state[1].next_statechange))
msleep(100);

set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
set_bit(HCD_FLAG_HW_ACCESSIBLE, &xhci->shared_hcd->flags);

spin_lock_irq(&xhci->lock);
if (xhci->quirks & XHCI_RESET_ON_RESUME)
hibernated = true;
Expand Down Expand Up @@ -878,20 +881,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
return retval;
xhci_dbg(xhci, "Start the primary HCD\n");
retval = xhci_run(hcd->primary_hcd);
if (retval)
goto failed_restart;

xhci_dbg(xhci, "Start the secondary HCD\n");
retval = xhci_run(secondary_hcd);
if (!retval) {
set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
set_bit(HCD_FLAG_HW_ACCESSIBLE,
&xhci->shared_hcd->flags);
xhci_dbg(xhci, "Start the secondary HCD\n");
retval = xhci_run(secondary_hcd);
}
failed_restart:
hcd->state = HC_STATE_SUSPENDED;
xhci->shared_hcd->state = HC_STATE_SUSPENDED;
return retval;
goto done;
}

/* step 4: set Run/Stop bit */
Expand All @@ -910,11 +906,14 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
* Running endpoints by ringing their doorbells
*/

set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
set_bit(HCD_FLAG_HW_ACCESSIBLE, &xhci->shared_hcd->flags);

spin_unlock_irq(&xhci->lock);
return 0;

done:
if (retval == 0) {
usb_hcd_resume_root_hub(hcd);
usb_hcd_resume_root_hub(xhci->shared_hcd);
}
return retval;
}
#endif /* CONFIG_PM */

Expand Down

0 comments on commit 3d2f5b9

Please sign in to comment.