From 233ccc41f4a172c7d36496927d48006bec2bf486 Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 20 Jul 2026 21:10:19 +0900 Subject: [PATCH] docs: record P6-A completion + endpoint-indexing bug-class audit (2026-07-20) acmd global-index fix + serial-state/SEND_BREAK (f505d18a89), ecmd/usbaudiod address-vs-index fix (08097d5a2d), usbhidd per-config reset (94a99f02). bot.rs assigned to UAS workstream. Multi-port IAD remains open. --- local/docs/USB-IMPLEMENTATION-PLAN.md | 37 ++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/local/docs/USB-IMPLEMENTATION-PLAN.md b/local/docs/USB-IMPLEMENTATION-PLAN.md index 80a129ced3..c5adeb9dd7 100644 --- a/local/docs/USB-IMPLEMENTATION-PLAN.md +++ b/local/docs/USB-IMPLEMENTATION-PLAN.md @@ -580,16 +580,39 @@ UAS uses 4 endpoints (cmd BULK OUT, status BULK IN, data-in BULK IN, data-out BU **Reference:** `local/reference/linux-7.1/drivers/usb/class/cdc-acm.c` (2,186 lines). -**Files:** `local/recipes/system/redbear-acmd/` (currently stub). +**Files:** `local/recipes/system/redbear-acmd/`. + +**Status (2026-07-20):** substantially complete (`f505d18a89`). **Bug-class +fix:** acmd used per-interface endpoint positions while xhcid keys endpoints +by global enumeration index — on two-interface ACM devices it opened the +wrong endpoints entirely. Same latent class fixed in redbear-ecmd and +redbear-usbaudiod (`08097d5a2d`, endpoint-address ≠ enumeration index) and +usbhidd multi-config counting (base `94a99f02`). usbhidd/ecmd/usbaudiod were +correct-by-coincidence on single-interface/sequential-address devices; +acmd was outright broken. Line coding, DTR/RTS, SEND_BREAK, and SERIAL_STATE +monitoring (interrupt-IN thread → scheme `state` file) implemented. + +**Remaining:** multi-port modems (IAD interface grouping — structural); +runtime validation needs an ACM device (QEMU has no CDC ACM emulation). + +**Endpoint-indexing bug class — audit result (2026-07-20):** + +| Driver | Was | Status | +|---|---|---| +| redbear-acmd | per-interface position → wrong endpoints | ✅ fixed `f505d18a89` | +| redbear-ecmd | `ep.address & 0x0F` (coincides when sequential) | ✅ fixed `08097d5a2d` | +| redbear-usbaudiod | `ep.address & 0x0F` | ✅ fixed `08097d5a2d` | +| usbhidd | global but no per-config reset | ✅ fixed base `94a99f02` | +| usbscsid/bot.rs | per-interface `position()+1` (single-interface devices coincide) | **open — assigned to UAS workstream (C1) for bot.rs + uas.rs pipe discovery** | **Tasks:** -1. Implement a real CDC ACM class driver (`redbear-cdc-acmd` or just keep the name and add code). -2. Line coding: baud rate, parity, stop bits, data bits. -3. Flow control: RTS/CTS, DTR/DSR via control transfers. -4. Break signaling. -5. Multi-port modems (data + control + notification interfaces). -6. Expose `/scheme/tty` for userspace clients (replacing the stub `redbear-acmd` admin CLI). +1. ~~Implement a real CDC ACM class driver~~ ✅ (2026-07-08, P1-D) +2. ~~Line coding: baud rate, parity, stop bits, data bits~~ ✅ +3. ~~Flow control: RTS/CTS, DTR/DSR via control transfers~~ ✅ (RTS/DTR via SET_CONTROL_LINE_STATE; CTS/DSR via SERIAL_STATE monitor) +4. ~~Break signaling~~ ✅ (SEND_BREAK 0x23) +5. Multi-port modems (data + control + notification interfaces) — **open** +6. ~~Expose `/scheme/tty` for userspace clients~~ ✅ (`/scheme/ttys/usbACM_` + `state` file) **Exit:** an FTDI USB-serial adapter or Arduino appears as a TTY device.