]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commit
usb: xhci: Add workaround for fixing ep stream ring hang issue
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Fri, 30 Jun 2017 10:28:08 +0000 (15:58 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 10 Jul 2017 07:37:57 +0000 (09:37 +0200)
commit1797c9ea0a60db2be72fd7fff26774d60602ede7
tree652439a5be409c566f6bddde273aa28e7f7a7d3f
parent398aae325808842616890d311eb67d3daf8be737
usb: xhci: Add workaround for fixing ep stream ring hang issue

Dwc3 host controller has an issue with BULK IN stream rings where
it stops processing the TD's present in the endpoint stream ring
(once in a while) even after ringing the stream DoorBell register.
Since host controller doesn't process TD's in stream ring, no transfer
events are generated by the controller, resulting in a hang issue.

This patch solves the above said problem by adding a timeout handler for
every BULK IN stream ring. After timer expires, timeout handler will be
called and from that stop command on the same endpoint stream ring will
be issued and urb will be given back with urb->status set to -EAGAIN.
The UAS driver checks the urb status as -EAGAIN and re-submit the same
urb which was timedout.

NOTE: As we have already added support for usb Host streaming, this fix is
required to fix the hang issue that occurs when UAS capable device is
connected. This fix is expected to change after the HW team comes with an
alternate workaround for this issue.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h