UPSTREAM: xhci: Use soft retry to recover faster from transaction errors

Use soft retry to recover from a USB Transaction Errors that are caused by
temporary error conditions. The USB device is not aware that the xHC
has halted the endpoint, and will be waiting for another retry

A Soft Retry perform additional retries and recover from an error which has
caused the xHC to halt an endpoint.

Soft retry has some limitations:
Soft Retry attempts shall not be performed on Isoch endpoints
Soft Retry attempts shall not be performed if the device is behind a TT in
a HS Hub

Software shall limit the number of unsuccessful Soft Retry attempts to
prevent an infinite loop.

For more details on Soft retry see xhci specs  4.6.8.1

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f8f80be501aa2f10669585c3e328fad079d8cb3a)
Signed-off-by: Raghuram Hegde <raghuram.hegde@intel.com>
Signed-off-by: Chethan T N <chethan.tumkur.narayan@intel.com>
Signed-off-by: Benson Leung <bleung@chromium.org>

BUG=b:123767576
TEST=Power up Chromebook and connect to a LE device. Connection shall succeed.

Change-Id: Id79d10f6a49329a7c7aa5cfe48a7f271215e8b60
Reviewed-on: https://chromium-review.googlesource.com/1522767
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Chethan Tumkur Narayan <chethan.tumkur.narayan@intel.corp-partner.google.com>
Reviewed-by: Todd Broch <tbroch@chromium.org>
(cherry picked from commit dbace4e4145352938cabe88910ba5de00fe9b8e6)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1544369
Reviewed-by: Yoni Shavit <yshavit@chromium.org>
Tested-by: Yoni Shavit <yshavit@chromium.org>
2 files changed