Skip to content
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

drivers: usb: xhci: set HID bit in streaming endpoint contexts #6461

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

P33M
Copy link
Contributor

@P33M P33M commented Nov 11, 2024

This fixes @naushir's reboot IO errors and also stops shallow IO depths from getting spurious NAKed packets.

The rationale in the commit message applies globally, which is why this isn't an RP1-specific quirk. I believe the VL805 implements this field as ignored-1.

The xHC may commence Host Initiated Data Moves for streaming endpoints -
see USB3.2 spec s8.12.1.4.2.4. However, this behaviour is typically
counterproductive as the submission of UAS URBs in {Status, Data,
Command} order and 1 outstanding IO per stream ID means the device never
enters Move Data after a HIMD for Status or Data stages with the same
stream ID. For OUT transfers this is especially inefficient as the host
will start transmitting multiple bulk packets as a burst, all of which
get NAKed by the device - wasting bandwidth.

Also, some buggy UAS adapters don't properly handle the EP flow control
state this creates - e.g. RTL9210.

Set Host Initiated Data Move Disable to always defer stream selection to
the device. xHC implementations may treat this field as "don't care,
forced to 1" anyway - xHCI 1.2 s4.12.1.

Signed-off-by: Jonathan Bell <[email protected]>
@naushir
Copy link
Contributor

naushir commented Nov 11, 2024

Tested and this fixes my issue, LGTM!

@pelwell pelwell merged commit 66aef6c into raspberrypi:rpi-6.6.y Nov 11, 2024
12 checks passed
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Nov 11, 2024
kernel: drivers: usb: xhci: set HID bit in streaming endpoint contexts
See: raspberrypi/linux#6461
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Nov 11, 2024
kernel: drivers: usb: xhci: set HID bit in streaming endpoint contexts
See: raspberrypi/linux#6461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants