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, 1 Jul 2020 15:33:04 +0000 (16:33 +0100)
commit8ab601e9d61faee3235205b6e43027f8827122ba
tree81a932e58e596181d2b192fac68e484cb1aca911
parentf071b38e12f51e65fe77a18b4977700e3824ab88
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