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

Signed-off-by: Mathias Nyman <>
Signed-off-by: Greg Kroah-Hartman <>
(cherry picked from commit f8f80be501aa2f10669585c3e328fad079d8cb3a)
Signed-off-by: Raghuram Hegde <>
Signed-off-by: Chethan T N <>
Signed-off-by: Benson Leung <>

TEST=Power up Chromebook and connect to a LE device. Connection shall succeed.

Change-Id: Id79d10f6a49329a7c7aa5cfe48a7f271215e8b60
Commit-Ready: Benson Leung <>
Tested-by: Benson Leung <>
Reviewed-by: Sean Paul <>
Reviewed-by: Chethan Tumkur Narayan <>
Reviewed-by: Todd Broch <>
(cherry picked from commit dbace4e4145352938cabe88910ba5de00fe9b8e6)
Reviewed-by: Yoni Shavit <>
Tested-by: Yoni Shavit <>
2 files changed