xhci: add quirk for host controllers that don't update endpoint DCS
authorJonathan Bell <jonathan@raspberrypi.org>
Thu, 11 Jul 2019 16:55:43 +0000 (17:55 +0100)
committerPhil Elwell <pelwell@users.noreply.github.com>
Fri, 12 Jul 2019 10:12:54 +0000 (11:12 +0100)
commite95c533eba52d1879d94bdd1ede00548ad1cf622
tree7369443dece3c12c3a3377967ee693bef602f8a3
parent9bf5cd2dc5bf4680ec14b372fae5b457c6ccb497
xhci: add quirk for host controllers that don't update endpoint DCS

Seen on a VLI VL805 PCIe to USB controller. For non-stream endpoints
at least, if the xHC halts on a particular TRB due to an error then
the DCS field in the Out Endpoint Context maintained by the hardware
is not updated with the current cycle state.

Using the quirk XHCI_EP_CTX_BROKEN_DCS and instead fetch the DCS bit
from the TRB that the xHC stopped on.

See: https://github.com/raspberrypi/linux/issues/3060

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h