Skip to content

Commit

Permalink
USB: xhci: Don't oops if the host doesn't halt.
Browse files Browse the repository at this point in the history
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sarah Sharp authored and Greg Kroah-Hartman committed Jul 28, 2009
1 parent 66e49d8 commit d3512f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/usb/host/xhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ int xhci_reset(struct xhci_hcd *xhci)
u32 state;

state = xhci_readl(xhci, &xhci->op_regs->status);
BUG_ON((state & STS_HALT) == 0);
if ((state & STS_HALT) == 0) {
xhci_warn(xhci, "Host controller not halted, aborting reset.\n");
return 0;
}

xhci_dbg(xhci, "// Reset the HC\n");
command = xhci_readl(xhci, &xhci->op_regs->command);
Expand Down

0 comments on commit d3512f6

Please sign in to comment.