Repository navigation
Fix for #4685 - #4755
Merged
Merged
Fix for #4685#4755
Conversation
Don't calculate space based on the number of TRBs in the current segment, as it's OK to wrap to the start (and flip the cycle state bit). Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
…lers Certain transfer ring access patterns can cause the controller to hang fetching TRBs for a USB2.0 endpoint. - If two USB2.0 endpoints are active at once and - Both endpoints are traversing a Link TRB where the following segment has a lower page address and - One of the endpoints is a Bulk IN and - The other endpoint is an Interrupt IN Then the Interrupt IN endpoint can end up not getting polled. It is unclear what the precise failure mode is, as the controller seems to haphazardly and repeatedly fetch TRBs for both endpoints but does not advance the Interrupt endpoint transfer. As a workaround, add a quirk that initially constrains all USB2.0 transfer rings to a single segment in size. If for any reason a device driver queues up enough outstanding transfers to fill the ring segment, then the ring will be expanded. This has not been seen to occur with UMS or UVC drivers, which aggressively queue buffers. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Dec 3, 2021
See: raspberrypi/linux#4755 kernel: DPI panel configuration See: raspberrypi/linux#4753 kernel: KMS 7" DSI panel and touchscreen fixes See: raspberrypi/linux#4750 kernel: drm/vc4: Hold pm_runtime for vc4 See: raspberrypi/linux#4706
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Dec 3, 2021
See: raspberrypi/linux#4755 kernel: DPI panel configuration See: raspberrypi/linux#4753 kernel: KMS 7" DSI panel and touchscreen fixes See: raspberrypi/linux#4750 kernel: drm/vc4: Hold pm_runtime for vc4 See: raspberrypi/linux#4706
Contributor
Author
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
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.
I don't have exactly the same hardware setup as the linked issue, but my equivalent testcase (Asix dongle with a modified interrupt endpoint interval) no longer fails with this patch applied.
While the failure was only seen when a bulk IN and interrupt IN endpoint were both active, there's no proof that the same thing can't occur with combinations of bulk IN and some other periodic endpoint type, so applying the segment restriction globally hedges against other random breakages.