aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2012-03-16 12:58:20 -0700
committerBen Hutchings <ben@decadent.org.uk>2012-10-17 03:48:24 +0100
commitb89d0660eba658f9afa5ddeabc742e07bcaabea7 (patch)
treeeec05332286b1a906f8895611dd42474d88e8f81
parent6a230d70aa30b1fd6780a3d885579f599843514d (diff)
downloadkernel_samsung_smdk4412-b89d0660eba658f9afa5ddeabc742e07bcaabea7.zip
kernel_samsung_smdk4412-b89d0660eba658f9afa5ddeabc742e07bcaabea7.tar.gz
kernel_samsung_smdk4412-b89d0660eba658f9afa5ddeabc742e07bcaabea7.tar.bz2
xhci: Warn when hosts don't halt.
commit 5af98bb06dee79d28c805f9fd0805ce791121784 upstream. Eric Fu reports a problem with his VIA host controller fetching a zeroed event ring pointer on resume from suspend. The host should have been halted, but we can't be sure because that code ignores the return value from xhci_halt(). Print a warning when the host controller refuses to halt within XHCI_MAX_HALT_USEC (currently 16 seconds). (Update: it turns out that the VIA host controller is reporting a halted state when it fetches the zeroed event ring pointer. However, we still need this warning for other host controllers.) Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 09872ee..48b048f 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -107,6 +107,9 @@ int xhci_halt(struct xhci_hcd *xhci)
STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
if (!ret)
xhci->xhc_state |= XHCI_STATE_HALTED;
+ else
+ xhci_warn(xhci, "Host not halted after %u microseconds.\n",
+ XHCI_MAX_HALT_USEC);
return ret;
}