CHROMIUM: xhci: crude USB resume fix for Stout (temporary)
authorJulius Werner <jwerner@chromium.org>
Thu, 31 Jan 2013 02:02:45 +0000 (18:02 -0800)
committerChromeBot <chrome-bot@google.com>
Fri, 1 Feb 2013 21:55:36 +0000 (13:55 -0800)
commitca0c93ee94a10e3bc7385396f73a8f455eaaf33e
tree235f2900b3af3d0c77376c6824fcd1ec58ff8378
parent18739cad8cedb2dcdc1501f6cbc1dd6ab1d85acb
CHROMIUM: xhci: crude USB resume fix for Stout (temporary)

Stout's USB 3.0 ports show a variety of nasty issues after resume, some
of which are more reproducible than others. They all have in common that
the host controller bails with "Device not responding to set address."
during enumeration. A trace pulled from a USB cable showed that the host
controller just fills the bus with garbage and does not even generate
correct SOF sequences.

This seems like a large and time-consuming problem that could hide
anywhere in the USB software or hardware stack. With Stout being close
to release, we need an interim solution to make it usable while we find
the underlying problem.

This patch sets the XHCI_RESET_ON_RESUME quirk flag on Stout, which
makes device reenumeration after resume work, but it creates a new
issue that makes the host controller hang on the next suspend while
trying to save its state. This looks like an unrelated hardware bug...
but since we don't actually need to save state when we will reset
anyway, we can just add some code to skip that step in xhci_suspend().

This patch is intended to be temporary, and should be reverted as soon
as the root cause for this is found and fixed.

BUG=chrome-os-partner:16781
TEST=Plug a USB device into the yellow port on the right. Run lsusb. Run
powerd_suspend and wake the machine. Run lsusb again and ensure that the
output stayed the same.

Change-Id: Id21ab972c698d02c14937509f699c9bc659b70c0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42394
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci.c