Skip to content

Conversation

P33M
Copy link
Contributor

@P33M P33M commented Dec 2, 2022

This one's pretty horrible, but in the absence of a hub firmware update it'll have to do for now.

Spinning is unavoidable but not sufficient (the hardware can still cause babble by itself). There will be a maximum of 125us delay if submitting only one URB to the endpoint at once. Generally multiple URBs are pipelined to maintain throughput.

The integrated USB2.0 hub in the VL805 chipset has a bug where it
incorrectly determines the remaining available frame time before the
host next sends a SOF packet with an incremented frame_number.

See the USB2.0 specification sections 11.3 and 11.14.2.3.

The hub's non-periodic TT handler can transmit the IN/OUT handshake
token too late, so a following 64-byte DATA0/1 packet causes the ACK
handshake to collide with the propagated SOF. This causes port babble.

Avoid ringing doorbells for vulnerable endpoints during uFrame 7 if the
TR is Idle to stop one source of babble. An IN transfer for a Running TR
may happen at any time, so there's not much we can do about that.

Ideally a hub firmware update to properly implement frame timeouts is
needed, and to avoid spinning for up to 125us when submitting TDs to
Idle rings.

Signed-off-by: Jonathan Bell <[email protected]>
@pelwell pelwell merged commit c2e04f6 into raspberrypi:rpi-5.15.y Dec 5, 2022
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Dec 6, 2022
kernel: media: i2c: ov7251: Add module param to select ext trig mode
See: raspberrypi/linux#5260

kernel: usb: xhci: add XHCI_VLI_HUB_TT_QUIRK
See: raspberrypi/linux#5262
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Dec 6, 2022
kernel: media: i2c: ov7251: Add module param to select ext trig mode
See: raspberrypi/linux#5260

kernel: usb: xhci: add XHCI_VLI_HUB_TT_QUIRK
See: raspberrypi/linux#5262
timg236 added a commit to timg236/rpi-eeprom that referenced this pull request Jan 5, 2023
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
XECDesign pushed a commit to XECDesign/rpi-eeprom that referenced this pull request Jan 6, 2023
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
timg236 added a commit to timg236/rpi-eeprom that referenced this pull request Jan 13, 2023
This commit updates the VL805 firmware to vl805-000138c0.bin
See raspberrypi/linux#5262
timg236 added a commit to timg236/rpi-eeprom that referenced this pull request Jan 18, 2023
Interesting changes since the last default release
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
bmiddha pushed a commit to bmiddha/rpi-eeprom that referenced this pull request Jan 28, 2023
This commit updates the VL805 firmware to vl805-000138c0.bin
See raspberrypi/linux#5262
bmiddha pushed a commit to bmiddha/rpi-eeprom that referenced this pull request Jan 28, 2023
Interesting changes since the last default release
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
@eMPee584
Copy link

.. Would this quirk be applicable to other architectures too?
Asking because I've been having severe troubles with my VL805 on debian amd64 kernels > 5.19 ..

@P33M
Copy link
Contributor Author

P33M commented Apr 11, 2023

The patch is architecture-agnostic. I have no reason to believe that the TT bug is fixed in any other version of non-Pi4 VL805 firmware.

@P33M P33M deleted the vli_tt_bugfix branch April 11, 2023 14:30
@eMPee584
Copy link

So would you consider this fit for mainline inclusion? What symptom does it fix?

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