Skip to content

xhci: drop the VL805 XHCI_EP_CTX_BROKEN_DCS cycle-state quirk - #7754

Draft
popcornmix wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
popcornmix:issue7737
Draft

popcornmix wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
popcornmix:issue7737

Conversation

@popcornmix

Copy link
Copy Markdown
Collaborator

Fixes #7737.

Upstream 6328bdc ("usb: xhci: Don't trust the EP Context cycle bit when moving HW dequeue") already handles the VL805 not updating the endpoint DCS. The older downstream quirk still seeds the cycle state from the TRB at the hardware dequeue pointer. When a cancelled TD spans the cycle-toggling link TRB, that toggle is never counted. Set TR Dequeue then gets the wrong cycle bit and the endpoint stalls until a USB reset.

This removes the quirk, which matches rpi-7.3.y: that branch no longer sets XHCI_EP_CTX_BROKEN_DCS for the VL805.

Tested on a Pi 4 with a USB SD card reader, using the reproducer script from #7737:

  • rpi-6.18.y (6.18.62): stuck at cycle 31
  • with this change: 1000 cycles clean, and normal reads from the card still work (500 MB at 30 MB/s)

Upstream commit 6328bdc ("usb: xhci: Don't trust the EP Context
cycle bit when moving HW dequeue") fixed the VL805 DCS write-back problem
by seeding new_cycle from td->end_trb and counting link TRB toggles only
after end_trb.

The downstream quirk still seeds new_cycle from the TRB at the hardware
dequeue pointer, which can be before a cycle-toggling link TRB inside the
cancelled TD. That toggle is then never counted, Set TR Dequeue is given
the previous lap's cycle bit, and the endpoint stalls until a USB reset.

Remove the quirk; upstream's handling covers the VL805.

Link: raspberrypi#7737
Signed-off-by: Dom Cobley <dom@raspberrypi.com>
@popcornmix

Copy link
Copy Markdown
Collaborator Author

@P33M can you check

@P33M

P33M commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

I think the change is correct. Upstream fixed it a different way, now the downstream patch is unneccessary.

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.

Pi 4: VL805 bulk IN endpoint stuck forever after URB cancel on rpi-6.18.y

2 participants