host: local data toggle reset unsupported on rp2040, pio-usb, WCH USBFS, MAX3421E, RUSB2 and non-halted OHCI EDs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- backend-api-design, embedded-iot
Direzione di ricerca
Read the HCD implementations named in the issue: hcd_rp2040.c, hcd_ch32_usbfs.c, hcd_max3421.c, hcd_pio_usb.c, hcd_rusb2.c, and ohci.c, along with each controller’s reference manual and errata. Then validate tuh_msc_reset() on hardware for each board family, followed by TEST UNIT READY and a known-data read without re-enumeration. The work is done when all six HCD cases pass validation and their ports are removed from the unsupported list in docs/reference/class/msc.rst.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up from #4009, which adds tuh_msc_reset() (BOT Reset Recovery). After each CLEAR_FEATURE(ENDPOINT_HALT) it
calls the new usbh_edpt_clear_stall() → hcd_edpt_clear_stall() to reset the host toggle to DATA0 (USB 2.0
§9.4.5). On the HCDs below this returns false, so tuh_msc_reset() always fails and leaves the interface fenced.
Remaining work
| HCD | State in #4009 | What a fix needs |
|---|---|---|
rp2040 (hcd_rp2040.c) |
false (was panic()) |
ep->next_pid = 0 on the idle endpoint; it is loaded into USB_BUF_CTRL_DATA1_PID when the buffer is armed |
WCH USBFS (hcd_ch32_usbfs.c) |
false; the old body, which sent its own blocking CLEAR_FEATURE, is kept as send_clear_stall_sync() for the internal STALL path |
edpt_info->data_toggle = 0; it feeds the HOST_TX_CTRL/HOST_RX_CTRL TOG bits in hardware_start_xfer() |
MAX3421E (hcd_max3421.c) |
false (unchanged) |
ep->data_toggle = 0; it becomes the HCTL_SNDTOG0/1/RCVTOG0/1 write |
pio-usb (hcd_pio_usb.c) |
false (was a no-op true) |
endpoint_t.data_id lives in the Pico-PIO-USB library; needs a library accessor (the library is not modified from TinyUSB) |
RUSB2 (hcd_rusb2.c) |
false; orphan addr_to_pipectr() removed |
The old body had two defects (below); rewrite with the documented sequence |
OHCI (ohci.c) |
refuses unless the ED is halted | Set sKip, wait a frame so the HC is not processing the ED, write toggleCarry, clear sKip |
RUSB2 evidence (old body, removed in #4009)
addr_to_pipectr()indexed_hcd.ep[dev_addr]; every writer and reader uses[dev_addr - 1](:326,:561,
:650). For address 1 it resolved to DCPCTR (another device's row is 0), so SQCLR hit the control pipe and the
bulk pipe's toggle was never reset; address 4 indexed past the array.- SQCLR was written while an OUT pipe could still be at PID=BUF. RA6M5 HW UM Rev 1.50 (Calibre 5584) §28.2.35 p866
Note 2: set PID to NAK and wait for PBUSY=0 before SQCLR. Lookups5c099c15f415,7ecc06fec180.
OHCI evidence
OHCI 1.0a §4.2.3 (Calibre 774, printed p18 / PDF p32): the HCD writes HeadP/toggleCarry/Halted only while the ED is
halted, skipped or unlinked. Reset Recovery clears both endpoints, which are normally not halted. Lookup
c73480a67748. No runtime failure was observed; #4009 refuses that case conservatively.
Acceptance
- Each HCD's change is checked against its reference manual and errata.
tuh_msc_reset()is validated on hardware for each board family: an idle reset between real commands, then TEST
UNIT READY and a known-data read without re-enumeration.- Each port is removed from the unsupported list in
docs/reference/class/msc.rst.
Why deferred
#4009 makes the fenced interface recoverable where the HCD already resets the toggle. Each change here alters
register or toggle state per port and needs its own hardware validation.
- Lingua principale
- C
- Stelle
- 7.3k
- Fork
- 1.6k
- Merge medio
- 1g 19h
- PR unite (30g)
- 67
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
follow-up Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutForse già presa @hathach l’ha presa 16 giorni fa. Apertafollow-up Prio 📌
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsForse già presa @hathach l’ha presa 16 giorni fa. Apertafollow-up Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
followup Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hathach/tinyusb
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
rofl0r/proxychains-ng#631 ·
-
RP2350: enabling secure boot via rescue fails with 6400 (BOOTKEY written as 33 bytes in ECC mode)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
pcqpcq/open-source-android-apps#619 ·
I maintainer di solito rispondono entro 1 giorno
-
Can't link with minizip-ngAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni