audit 0.21.0: rusb2 DCD/HCD follow-ups
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 5/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c
- Lĩnh vực
- embedded-iot
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 7.3k
- Fork
- 1.6k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 67
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
follow-up Prio 📌
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutCó thể đã có người làm @hathach đã nhận 16 ngày trước. Đang mởfollow-up Prio 📌
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsCó thể đã có người làm @hathach đã nhận 16 ngày trước. Đang mởfollow-up Prio 📌
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
followup Prio 📌
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hathach/tinyusb
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
rofl0r/proxychains-ng#631 ·
-
RP2350: enabling secure boot via rescue fails with 6400 (BOOTKEY written as 33 bytes in ECC mode)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
pcqpcq/open-source-android-apps#619 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Can't link with minizip-ngĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày