Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199828
b: refs/heads/master
c: 2d62f3e
h: refs/heads/master
v: v3
  • Loading branch information
Sarah Sharp authored and Greg Kroah-Hartman committed Jun 4, 2010
1 parent d04a195 commit ae15c1f
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 0c8a32dff4f9ebed3e067e52e12842d7d7e047a0
refs/heads/master: 2d62f3eea98354d61f90d6b115eecf9be5f4bdfe
13 changes: 12 additions & 1 deletion trunk/drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ int xhci_reset(struct xhci_hcd *xhci)
{
u32 command;
u32 state;
int ret;

state = xhci_readl(xhci, &xhci->op_regs->status);
if ((state & STS_HALT) == 0) {
Expand All @@ -130,7 +131,17 @@ int xhci_reset(struct xhci_hcd *xhci)
/* XXX: Why does EHCI set this here? Shouldn't other code do this? */
xhci_to_hcd(xhci)->state = HC_STATE_HALT;

return handshake(xhci, &xhci->op_regs->command, CMD_RESET, 0, 250 * 1000);
ret = handshake(xhci, &xhci->op_regs->command,
CMD_RESET, 0, 250 * 1000);
if (ret)
return ret;

xhci_dbg(xhci, "Wait for controller to be ready for doorbell rings\n");
/*
* xHCI cannot write to any doorbells or operational registers other
* than status until the "Controller Not Ready" flag is cleared.
*/
return handshake(xhci, &xhci->op_regs->status, STS_CNR, 0, 250 * 1000);
}


Expand Down

0 comments on commit ae15c1f

Please sign in to comment.