wch/usbfs host: full-speed isochronous bInterval 9-16 rejected
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start at hcd_edpt_open() in src/portable/wch/usbfs/hcd_wch_usbfs.c around lines 736-740, where the full-speed isochronous bInterval range is checked, and compare with tu_edpt_validate() to see why the gap exists. Read USB 2.0 §9.6.6 and p75 on poll rates, then look at how the resulting period feeds the frame/deadline arithmetic in the same file. Done means bInterval 9..16 is accepted with the period clamped to 128 frames; since the report was not reproduced on hardware, check what tests or HCD-level harnesses exist before claiming the fix verified, and cross-reference #4522.
Written by the indexing model from the issue text.
Description
hcd_edpt_open() rejects a full-speed isochronous endpoint unless bInterval is 1..8 (https://github.com/hathach/tinyusb/blob/490eb4ec9/src/portable/wch/usbfs/hcd_wch_usbfs.c#L736-L740). USB 2.0 §9.6.6 allows 1..16 for full-/high-speed isochronous endpoints, and tu_edpt_validate() does not check it, so a compliant device with bInterval 9..16 fails to open.
Found syncing 490eb4ec9 into adafruit/Adafruit_TinyUSB_Arduino#642 (review comment by CodeRabbit), verified against the spec.
Introduced by: the WCH USBFS host isochronous support (4a397cb94 / a76e22cbc); not present at 53c1d1473.
Remaining work: accept 9..16 and clamp the period to 128 frames. USB 2.0 p75: an isochronous endpoint "must be prepared to handle poll rates faster than the one specified", so polling more often is legal and avoids widening the deadline arithmetic.
Why deferred: found on the downstream sync PR, which carries upstream bytes only. Not reproduced on hardware.
Related: #4522 — other bInterval validation.
- Dominant language
- C
- Stars
- 7.3k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 67
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
follow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
area9innovation/flow9#1805 ·
Maintainers usually reply within 3 days
-
AI:Robustness triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open5gs/open5gs#5246 · 1 comment ·
Maintainers usually reply within 1 day