From: Sarah Sharp Date: Mon, 27 Jul 2009 19:03:50 +0000 (-0700) Subject: USB: xhci: Don't oops if the host doesn't halt. X-Git-Tag: v2.6.31-rc5~71^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3512f63494678dc58e44a20c56278718fd58969;p=platform%2Fupstream%2Fkernel-adaptation-pc.git USB: xhci: Don't oops if the host doesn't halt. Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- 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);