Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235443
b: refs/heads/master
c: 65b22f9
h: refs/heads/master
i:
  235441: fd6424e
  235439: 1b27a41
v: v3
  • Loading branch information
Sarah Sharp committed Mar 14, 2011
1 parent 7ab2ce3 commit 8693f27
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 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: f9de8151877b4f01cc8e124b0e213a6c6c78d970
refs/heads/master: 65b22f93fde320b34d43e4a3978e1b52b1bcc279
23 changes: 19 additions & 4 deletions trunk/drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,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;

/* Wait a bit if either of the roothubs need to settle from the
Expand Down Expand Up @@ -790,15 +791,29 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
xhci_dbg(xhci, "xhci_stop completed - status = %x\n",
xhci_readl(xhci, &xhci->op_regs->status));

xhci_dbg(xhci, "Initialize the HCD\n");
retval = xhci_init(hcd);
/* USB core calls the PCI reinit and start functions twice:
* first with the primary HCD, and then with the secondary HCD.
* If we don't do the same, the host will never be started.
*/
if (!usb_hcd_is_primary_hcd(hcd))
secondary_hcd = hcd;
else
secondary_hcd = xhci->shared_hcd;

xhci_dbg(xhci, "Initialize the xhci_hcd\n");
retval = xhci_init(hcd->primary_hcd);
if (retval)
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 HCD\n");
retval = xhci_run(hcd);
xhci_dbg(xhci, "Start the secondary HCD\n");
retval = xhci_run(secondary_hcd);
if (!retval)
set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
failed_restart:
hcd->state = HC_STATE_SUSPENDED;
return retval;
}
Expand Down

0 comments on commit 8693f27

Please sign in to comment.