Home
last modified time | relevance | path

Searched hist:"0 c195942a8d6a8ec5451a267a9022fed48496ca0" (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/usb/host/
H A Dxhci-ring.c0c195942a8d6a8ec5451a267a9022fed48496ca0 Mon Sep 27 12:42:58 UTC 2021 Stefan Agner <stefan@agner.ch> UPSTREAM: usb: xhci: reset endpoint on USB stall

There are devices which cause a USB stall when trying to read strings.
Specifically Arduino Mega R3 stalls when trying to read the product
string.

The stall currently remains unhandled, and subsequent retries submit new
transfers on a stopped endpoint which ultimately cause a crash in
abort_td():
WARN halted endpoint, queueing URB anyway.
XHCI control transfer timed out, aborting...
Unexpected XHCI event TRB, skipping... (3affe040 00000000 13000000 02008401)
BUG at drivers/usb/host/xhci-ring.c:505/abort_td()!
BUG!
resetting ...

Linux seems to be able to recover from the stall by issuing a
TRB_RESET_EP command.

Introduce reset_ep() which issues a TRB_RESET_EP followed by setting the
transfer ring dequeue pointer via TRB_SET_DEQ. This allows to properly
recover from a USB stall error and continue communicating with the USB
device.

Change-Id: I3412ae470addfe67f71f2cbf4b1dfc8fcaf85c78
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit d5daa02d8d9e7c403a3339db1966e8413e64e408)