xhci: Use more event ring segment table entries
authorJonathan Bell <jonathan@raspberrypi.org>
Tue, 13 Aug 2019 14:53:29 +0000 (15:53 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 27 Jan 2021 19:13:02 +0000 (19:13 +0000)
commit0a4b2be7701c318a3610c890df83bc94a858eff7
tree40a63d66e5c2d4e62b71519930b937a75a93e506
parentd09380349ad0bb4f3cc83d002d7ba888399a8fe0
xhci: Use more event ring segment table entries

Users have reported log spam created by "Event Ring Full" xHC event
TRBs. These are caused by interrupt latency in conjunction with a very
busy set of devices on the bus. The errors are benign, but throughput
will suffer as the xHC will pause processing of transfers until the
event ring is drained by the kernel. Expand the number of event TRB slots
available by increasing the number of event ring segments in the ERST.

Controllers have a hardware-defined limit as to the number of ERST
entries they can process, so make the actual number in use
min(ERST_MAX_SEGS, hw_max).

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