-
Notifications
You must be signed in to change notification settings - Fork 5.2k
More dwc3 quirks #6457
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
Merged
Merged
More dwc3 quirks #6457
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add two quirk properties that control whether or not the controller issues many more handshakes to FS/HS Async endpoints in a single (micro)frame. Enabling these can significantly increase throughput for endpoints that frequently respond with NAKs. Signed-off-by: Jonathan Bell <[email protected]>
If a device frequently NAKs, it can exhaust the scheduled handshakes in a frame. It will then not get polled by the controller until the next frame interval. This is most noticeable on FS devices as the controller schedules a small set of transactions only once per full-speed frame. Setting the ENH_PER_NAK_FS/LS bits in the GUCTL1 register increases the number of transactions that can be scheduled to Async (Control/Bulk) endpoints in the respective frame time. In the FS case, this only applies to FS devices directly connected to root ports. Signed-off-by: Jonathan Bell <[email protected]>
There seem to be only benefits, and no downsides. Signed-off-by: Jonathan Bell <[email protected]>
For platforms that have xHCI controllers attached over PCIe, and non-coherent routes to main memory, a theoretical race exists between posting new TRBs to a ring, and writing to the doorbell register. In a contended system, write traffic from the CPU may be stalled before the memory controller, whereas the CPU to Endpoint route is separate and not likely to be contended. Similarly, the DMA route from the endpoint to main memory may be separate and uncontended. Therefore the xHCI can receive a doorbell write and find a stale view of a transfer ring. In cases where only a single TRB is ping-ponged at a time, this can cause the endpoint to not get polled at all. Adding a readl() before the write forces a round-trip transaction across PCIe, definitively serialising the CPU along the PCI producer-consumer ordering rules. Signed-off-by: Jonathan Bell <[email protected]>
pelwell
approved these changes
Nov 6, 2024
fyi this also applies cleanly to 6.12, will do so... |
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Nov 8, 2024
See: raspberrypi/linux#6458 kernel: dmaengine: dw-axi-dmac: Allow client-chosen width See: raspberrypi/linux#6377 kernel: drm/vc4: Allow option to transpose the output on the writeback connector See: raspberrypi/linux#6312 kernel: raspberrypi/linux#6454 See: raspberrypi/linux#6454 kernel: More dwc3 quirks See: raspberrypi/linux#6457 kernel: mmc: quirks: add more broken Kingston Canvas Go! SD card date ranges See: raspberrypi/linux#6447
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Nov 8, 2024
See: raspberrypi/linux#6458 kernel: dmaengine: dw-axi-dmac: Allow client-chosen width See: raspberrypi/linux#6377 kernel: drm/vc4: Allow option to transpose the output on the writeback connector See: raspberrypi/linux#6312 kernel: raspberrypi/linux#6454 See: raspberrypi/linux#6454 kernel: More dwc3 quirks See: raspberrypi/linux#6457 kernel: mmc: quirks: add more broken Kingston Canvas Go! SD card date ranges See: raspberrypi/linux#6447
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
More fallout from #6141 - I'm not sure why it was just the BT dongle that tripped over the TRB race - but the suspicious conditions are all met - only a single TRB is ever posted, and there's very little other activity on the bus at the same time as interrupt/control transfers are posted in lockstep.