-
Notifications
You must be signed in to change notification settings - Fork 5.2k
xhci: Use more event ring segment table entries #3147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
val |= ERST_NUM_SEGS; | ||
val2 = readl(&xhci->ir_set->erst_size); | ||
val2 &= ERST_SIZE_MASK; | ||
val2 |= val; | ||
xhci_dbg_trace(xhci, trace_xhci_dbg_init, | ||
"// Write ERST size = %i to ir_set 0 (some bits preserved)", | ||
val); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The swapping of val and val2 (just to use them in order?) is a bit gratuitous, and it breaks/non-obviously-fixes this debug output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bits 31:16 are RsvdP (reserved, preserve anyway) but this now truncates the register if any of the reserved bits are used. Debug should use val2 - will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And swap val and val2? Plz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx
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 <[email protected]>
kernel: configs: Enable building the DS28E17 driver module See: raspberrypi/linux#3141 kernel: ARM: dts: bcm2711-rpi-4-b: I2C aliases and pulls See: https://www.raspberrypi.org/forums/posting.php?mode=reply&f=107&t=248439 kernel: xhci: Use more event ring segment table entries See: raspberrypi/linux#3147 kernel: dwc_otg: use align_buf for small IN control transfers See: raspberrypi/linux#3150
kernel: configs: Enable building the DS28E17 driver module See: raspberrypi/linux#3141 kernel: ARM: dts: bcm2711-rpi-4-b: I2C aliases and pulls See: https://www.raspberrypi.org/forums/posting.php?mode=reply&f=107&t=248439 kernel: xhci: Use more event ring segment table entries See: raspberrypi/linux#3147 kernel: dwc_otg: use align_buf for small IN control transfers See: raspberrypi/linux#3150
Just a heads-up: I've upstreamed this commit, it is now queued for v6.7-rc1 and can hence be omitted when you update your tree to that kernel version. https://git.kernel.org/mnyman/xhci/c/26a23e0dd061 Thanks! |
@l1k that's good to hear. I'll drop this commit when the upstream version appears. |
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 [email protected]