Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235445
b: refs/heads/master
c: c6cc27c
h: refs/heads/master
i:
  235443: 8693f27
v: v3
  • Loading branch information
Sarah Sharp committed Mar 14, 2011
1 parent 80fa1a2 commit 8b3b68e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 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: b320937972d456db2a46fdcbc6bebc4dcdc9daa4
refs/heads/master: c6cc27c782e3a64cced0fcf1d6f492c8d8881c76
10 changes: 8 additions & 2 deletions trunk/drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,15 @@ void xhci_quiesce(struct xhci_hcd *xhci)
*/
int xhci_halt(struct xhci_hcd *xhci)
{
int ret;
xhci_dbg(xhci, "// Halt the HC\n");
xhci_quiesce(xhci);

return handshake(xhci, &xhci->op_regs->status,
ret = handshake(xhci, &xhci->op_regs->status,
STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
if (!ret)
xhci->xhc_state |= XHCI_STATE_HALTED;
return ret;
}

/*
Expand All @@ -129,6 +133,8 @@ int xhci_start(struct xhci_hcd *xhci)
xhci_err(xhci, "Host took too long to start, "
"waited %u microseconds.\n",
XHCI_MAX_HALT_USEC);
if (!ret)
xhci->xhc_state &= ~XHCI_STATE_HALTED;
return ret;
}

Expand Down Expand Up @@ -1212,7 +1218,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
if (ret || !urb->hcpriv)
goto done;
temp = xhci_readl(xhci, &xhci->op_regs->status);
if (temp == 0xffffffff) {
if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) {
xhci_dbg(xhci, "HW died, freeing TD.\n");
urb_priv = urb->hcpriv;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/host/xhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,7 @@ struct xhci_hcd {
* There are no reports of xHCI host controllers that display this issue.
*/
#define XHCI_STATE_DYING (1 << 0)
#define XHCI_STATE_HALTED (1 << 1)
/* Statistics */
int error_bitmask;
unsigned int quirks;
Expand Down

0 comments on commit 8b3b68e

Please sign in to comment.