]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
xhci: Warn when hosts don't halt.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 16 Mar 2012 19:58:20 +0000 (12:58 -0700)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 11 Apr 2012 15:28:54 +0000 (08:28 -0700)
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>
drivers/usb/host/xhci.c

index e1963d4a430f2952c8383b5a25fff8debc6c0014..f68bc15d21e8a0aef7244d6e6011f4650a9eaad6 100644 (file)
@@ -106,6 +106,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;
 }