audit 0.21.0: rusb2 DCD/HCD follow-ups
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
- 5/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- embedded-iot
Direzione di ricerca
Start in src/portable/renesas/rusb2/dcd_rusb2.c around the cited lines (941, 952, 956, 967, 1135, 1179) and rusb2_common.h, treating the four numbered defects as separate workstreams. The first pass is source reading plus the H1-H7 manual/errata lookups; hardware verification on the listed RA boards is required before completion. Done means each ownership or bookkeeping mismatch is resolved or explicitly deferred, with tests or board evidence for MTP reset, vendor alt changes, MSC reset, and video SET_INTERFACE.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Deferred defects found in the repository audit of 0.21.0..ad7c83db8 (batch port-rusb2). Each was validated against the source at ad7c83db8 and judged real but too large, or too hardware-dependent, for the audit PR's contained fixes.
1. OUT stall retains queued and its buffer; clear-stall re-arms them. usbd_edpt_abort() therefore releases USBD ownership while reception remains armed. MTP reset provides a concrete caller with replacement reception delayed until ACK. Vendor cancellation also uses stall/clear directly.
- Where:
dcd_rusb2.c:1135,:1179 - Verdict: valid; source ownership violation. MSC immediately replaces the receive in some paths, so its async-buffer corruption example is not established universally.; introduced: Yes for bulk OUT re-arm; failure to retire stall bookkeeping is older.; severity: medium
- Hardware/spec dependence: Proof needs no hardware assumption; safe cancellation implementation needs H2.
- Overlap: #3962 partial: abort API migration, not a complete repair of direct stall/clear callers. #346 concerns already-queued events, a different defect.
- Remaining work and verification: Distinguish cancellation from non-stalled toggle reset, covering direct stall/clear callers as well as the optional abort hook. Verify MTP reset before ACK, vendor alt changes, MSC reset, and ordinary clear-halt reception on
ra4m1_ek/ra6m5_ek.
2. Re-open resets hardware but preserves transfer bookkeeping and BEMP enable/state. usbd_edpt_open() does not release BUSY; ISO_ALLOC close is a no-op. Video bulk re-open at video_device.c:898 is a concrete caller.
- Where:
dcd_rusb2.c:941,:952,:956 - Verdict: valid lifecycle mismatch; exact subsequent interrupt outcome unverified. Clearing only
_dcd.pipe[]would not fix the USBD ownership problem.; introduced: Yes: pipe reuse/ISO_ALLOC introduced here; generic video re-open ownership problems also exist elsewhere.; severity: medium - Hardware/spec dependence: Software-state mismatch established; reset/BEMP consequences need H2/H4.
- Overlap: #4428 partial: same video/USBD problem demonstrated on RP2040, not RUSB2 bookkeeping.
- Remaining work and verification: Coordinate re-open cancellation, DCD state and USBD claim release. Exercise SET_INTERFACE during bulk video and notification transfers, then confirm subsequent submissions work.
3. Re-open bypasses type-based pipe allocation when an endpoint address changes transfer type.
- Where:
dcd_rusb2.c:941,:967 - Verdict: valid allocation inconsistency: it can select a pipe outside the driver’s own
find_pipe(new_type)set. The hardware failure and an in-tree bulk↔interrupt caller remain unverified.; introduced: Yes,7b1eb4f86.; severity: medium - Hardware/spec dependence: Capability/consequence needs H6; no covering claim.
- Overlap: None found.
- Remaining work and verification: Validate a custom alternate-setting descriptor that reuses an address across types; then reject unsupported changes or safely reallocate. Include ownership cleanup from C-F2.
4. On mini-module aliases, non-control transfers overwrite CFIFOSEL, but status completion uses its ISEL bit as the EP0 event direction. An IN status arm followed by data-pipe access can therefore be reported as EP0 OUT. usbd_control_xfer_cb() then treats it as data rather than ACK.
- Where:
dcd_rusb2.c:467,:541;rusb2_common.h:18 - Verdict: valid source-state defect; physical interleaving unverified. Unlike C-F3’s default trigger, it does not require multi-packet DCD submissions.; introduced: Older on M23; newly exposed on additional mini-module parts by
839fa380a.; severity: medium - Hardware/spec dependence: Register/interleaving confirmation needs H5.
- Overlap: PR #3824 does not fully cover it; no matching issue found.
- Remaining work and verification: Preserve the armed EP0 status direction independently of shared FIFO selection. Test control-OUT/no-data requests concurrent with bulk/interrupt traffic on
ra2a1_ekor another mini-module board; none is listed in the checked farm roster.
Adjudication notes: port-rusb2
Claims still needing read-doc:
- H1 — FIFO readiness: For RA USBFS/USBHS and RX63X/65X/72N, does BSTS reliably mean an IN buffer plane is CPU-writable, including double buffering and ISO? What selection/deselection settling and BRDY retry guarantees apply?
- H2 — reset, halt and receive ownership: Check base manuals and errata for ACLRM/SQCLR, PID, PBUSY, CURPIPE and hold-time requirements in endpoint open, bus reset, cancellation and host toggle reset. Does ACLRM preserve BRDYSTS? What must non-halted CLEAR_FEATURE preserve? This covers S-F05/F06/F10 and C-F1/F2/F4/F8.
- H3 — register-access reductions: Are PIPESEL/PIPECFG/PIPEMAXP and repeated PIPEnCTR reads side-effect-free in every affected variant? Which ordering requirements must configuration or arming extraction preserve?
- H4 — completion flags: Verify BEMPSTS latching independent of BEMPENB, safe duplicate/conditional clears, and INBUFM/BSTS versus BRDY/BEMP completion for bulk, interrupt and ISO.
- H5 — CFIFO and EP0: For RA2A1, RA4E2, RA6E2 and RA6T3, verify CFIFOSEL sharing, ISEL/MBW changes during an EP0 transfer and status completion. For all supported variants, establish DTLN validity after selection and how an accepted zero-length packet is distinguished from an empty buffer.
- H6 — pipe capabilities: Verify permissible transfer types and buffer configurations per pipe, including mini-module differences, and descriptor/type changes across alternate settings.
- H7 — PHY clocks: Verify supported PHY reference sources and CLKSEL encodings, including the alleged 48 MHz option, for RA6M3/RA6M5 and supported RA8 variants. Separately confirm feature-based controller availability; a USBFS-only build fix must not weaken USBHS clock validation.
Not verified: firmware builds, unit tests, hardware execution, timing measurements, or complete manual/errata coverage. The only executable reproduction was preprocessing the exact clock-selection block, not compiling a board. read-doc metadata lookup 44edc5fbe5b1 found RA6M5 manual book 5584 and errata entries; no page-level claim verification was completed. Existing issue citations were treated as tracking evidence, not substituted for claim records. No files were edited and nothing was published.
- 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
-
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
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
area9innovation/flow9#1805 ·
I maintainer di solito rispondono entro 3 giorni
-
AI:Robustness triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open5gs/open5gs#5246 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno