diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-07-27 19:03:50 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-28 21:31:12 (GMT) |
commit | d3512f63494678dc58e44a20c56278718fd58969 (patch) | |
tree | cee686068d51aa2e6c581b0d16cd9032a3119dc1 | |
parent | 66e49d8774fa03539713e8f91169c37c05df1e94 (diff) | |
download | linux-d3512f63494678dc58e44a20c56278718fd58969.tar.xz |
USB: xhci: Don't oops if the host doesn't halt.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/xhci-hcd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 764995f..8c3a074 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -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); |