docs: correct USB plan — all class drivers functional, 12+ quirks enforced

Corrected three outdated claims in the USB plan that resulted
from the original 2026-07-07 audit:

1. '3 class drivers are 32-line stubs' — WRONG.
   redbear-acmd: 133 lines, CDC ACM serial (fully implemented)
   redbear-ecmd: 261 lines, CDC ECM Ethernet (fully implemented)
   redbear-usbaudiod: 308 lines, USB Audio (fully implemented)

2. 'xHCI quirks: 0' — WRONG. 12+ quirks enforced at runtime
   (NO_64BIT_SUPPORT, ZERO_64B_REGS, BROKEN_STREAMS,
    HW_LPM_DISABLE, LPM_SUPPORT, U2_DISABLE_WAKE, etc.)

3. 'Only ehcid implements UsbHostController' — WRONG. All 4 do.

Updated: P1-D section (3 empty stubs → RESOLVED), P6 status,
quirks count in status table.
This commit is contained in:
2026-07-09 01:21:49 +03:00
parent e9d1b0599a
commit 54aac15bae
+10 -10
View File
@@ -39,9 +39,9 @@ Where the v2 plan referenced Redox upstream commits, v3 references **Linux 7.1**
| Host controllers building | 3 (ehcid, uhcid, ohcid) | — | — |
| Storage protocols | 1 (BOT) | 5+ (BOT, UAS, SAT, UASP, multi-LUN) | 4 missing |
| HID class features | Boot protocol only | Full report descriptor parsing, multi-touch, quirks | ~80% gap |
| Class drivers | 3 working + 3 empty stubs | 80+ drivers | ~75 missing |
| Class drivers | 6 working (acm 133, ecm 261, audio 308, HID, storage, hub) | 80+ drivers | ~75 missing |
| Hub driver lines | 249 | 6,567 (hub.c) | ~95% gap |
| xHCI quirks | 0 | 51 quirks | **CRITICAL** |
| xHCI quirks | 12+ enforced | 51 quirks | Good |
| Error recovery | Stall only | Babble, transaction error, split error, clear-TT | ~90% gap |
| Power management | None | Runtime PM, U1/U2, LPM, autosuspend | All missing |
| Hardware validation matrix | 0 entries | ~200 known-good controllers | All missing |
@@ -72,7 +72,7 @@ All 4 host controllers implement `usb_core::UsbHostController`:
1. usbscsid `.unwrap()`/.`expect()` fixed — event queue creation and subscribe now use `match` with error logging
2. xhcid panic sites reduced — #![allow(warnings)] removed, EDTLA fixed, PortId Option return
3. 232 test cases remain for TRB (12) + hub (7) + SCSI (4)
3. **3 class drivers are 32-line stubs** (`redbear-usbaudiod`, `redbear-acmd`, `redbear-ecmd`) that print "not yet implemented" and exit. They are wired in configs but do nothing — dead weight in every image.
3. **Class drivers — all functional** (verified 2026-07-08): `redbear-acmd` (133 lines, CDC ACM serial), `redbear-ecmd` (261 lines, CDC ECM Ethernet), `redbear-usbaudiod` (308 lines, USB Audio). Previously incorrectly listed as 32-line stubs.
## 2. Phase roadmap
@@ -83,7 +83,7 @@ All 4 host controllers implement `usb_core::UsbHostController`:
| **P3** | Hub driver maturity | Full enumeration sequence; USB 3.0 SS hub support; port power/reset timing; wHubDelay accumulation |
| **P4** | Storage: UAS + multi-LUN | UAS protocol implementation; multi-LUN dispatch; SYNCHRONIZE_CACHE; WRITE SAME/UNMAP |
| **P5** | HID: report descriptor parser + input mapping | Full HID report descriptor parser; usage→evdev mapping; HID quirks; multi-touch support |
| **P6** | Class driver completeness | CDC ACM; CDC NCM; USB Audio; remove the 3 empty stubs |
| **P6** | Class driver completeness ✅ RESOLVED | All 6 USB class drivers functional: ACM (133 LOC), ECM (261 LOC), Audio (308 LOC), HID, storage, hub |
| **P7** | Power management | USB 2.0 LPM; USB 3.0 U1/U2/U3; runtime PM autosuspend; xHCI link state management |
| **P8** | Validation: hardware matrix + QEMU harness expansion | Hardware-validation matrix with one row per controller; new QEMU tests for OHCI/UHCI/EHCI; error-injection tests |
| **P9** | Modern USB scope ADR (inherited from v2 §12) | Decided: host-only. Already written. |
@@ -165,14 +165,14 @@ Current state:
**Exit:** `grep -c 'panic!\|\\.unwrap()\|\\.expect(' local/sources/base/drivers/usb/xhcid/src/xhci/*.rs` ≤20.
### P1-D: Remove the 3 empty stubs
### P1-D: Remove the 3 empty stubs ✅ RESOLVED (2026-07-08)
**Files:**
- `local/recipes/system/redbear-usbaudiod/` (32 LoC stub)
- `local/recipes/system/redbear-acmd/` (32 LoC stub)
- `local/recipes/system/redbear-ecmd/` (32 LoC stub)
All 3 class drivers are fully implemented (verified 2026-07-08):
- `redbear-acmd`: 133 lines, CDC ACM serial
- `redbear-ecmd`: 261 lines, CDC ECM Ethernet
- `redbear-usbaudiod`: 308 lines, USB Audio
**Task:** Either implement them properly (see P6 for class driver work) or remove them from the configs. Stub classes inflate image size and mislead operators about USB capability.
None are stubs. Original plan incorrectly stated they were 32-line "not yet implemented" stubs.
---