v3 USB-IMPLEMENTATION-PLAN supersedes v2 (archived). Comprehensive
audit-driven roadmap with 9 phases (P1–P9) to make USB a first-class
citizen in Red Bear OS:
P1: Trait unification (all 4 controllers implement UsbHostController)
+ panic hardening (usbscsid 0 panics, xhcid <20 unwraps)
+ remove 3 empty stubs (usbaudiod, acmd, ecmd)
P2: xHCI core — 51-quirk table, HCCPARAMS2 parsing, 36-code error
recovery (babble, transaction error, stall, split)
P3: Hub driver — full enumeration (wHubDelay, power timing, USB 3 SS)
+ interrupt-driven change detection + port LED
P4: Storage — UAS protocol, multi-LUN, SYNCHRONIZE_CACHE, UNMAP, mass-storage
quirks applied at runtime
P5: HID — report descriptor parser, usage→evdev mapping, LED sync, quirks,
multi-touch
P6: Class driver completeness — CDC ACM, CDC NCM, USB Audio, USB-serial
(FTDI/CP210x/PL2303/CH341), compliance test driver
P7: Power management — USB 2.0 LPM, USB 3.0 U1/U2/U3, runtime PM autosuspend
P8: Validation — hardware matrix ≥10 rows + 6 new QEMU scripts
+ error-injection tests
P9: Modern USB scope ADR (host-only; already written in v2 §12)
Linux 7.1 is the implementation of excellence — every feature has a
concrete cross-reference (file:line) and a 'port line-by-line' strategy
when implementation detail is in doubt.
USB-VALIDATION-RUNBOOK v3 replaces v2 (archived): test matrix with
per-phase exit gates, operator runbook for failures.
Stale items cleared:
- v2 active plan archived as USB-IMPLEMENTATION-PLAN-v2-2026-07.md
- v2 active runbook archived as USB-VALIDATION-RUNBOOK-2026-07.md
- archived/README.md supersession table extended
P1 USB 3.x hub correctness verified against codebase:
- packet-size handling (bytes vs shift exponent) in baseline
- HubDescriptorV2/V3 separate reading paths in usbhubd
- Slot context hub bit + port count correctly set
- SET_HUB_DEPTH issued for USB 3 hubs
- TTT not applicable to USB 3 (TT is USB 2.0 split-transaction)
- TODOs about interface_desc/alternate_setting on USB 3 hubs
are safe — passing None matches upstream behavior
P5 Modern USB Scope Decision (ADR):
- Host-only for foreseeable future
- Explicitly excluded: device mode, OTG, USB-C PD, alt-modes,
USB4, Thunderbolt, xHCI DbC
- Reviewed per release branch cut
Update §5 phases table: P0-A1 ✅ committed (base fork cbd40e0d, parent
a2998c2d).
Update §6 validation table: test-xhci-irq-qemu.sh now greps for actual
reactor log lines (not fictitious strings).
Update §7 durability log: base fork now has two USB commits (one from
P0-A1), not one. The "first USB-focused commit since dd08b76" is
now cbd40e0d.
Add §11 — implementation handoff appendix with per-phase concrete
targets: upstream commit SHAs, files to touch per phase, git-landing
rules, validation scripts to write, and dependency graph (P0-B2 depends
on P0-B1; P0-A2 through P0-A4 are independent of B; P0-B1 is unblocked).
Replace v1 (now archived/USB-IMPLEMENTATION-PLAN-v1-2026-04.md) with a
comprehensive v2 that re-audits every daemon against local/sources/base/
HEAD, aligns with Redox 0.x USB HEAD (Jan-Jul 2026), and reorganizes
phases around bare-metal correctness gaps.
Key v1→v2 corrections:
- xHCI interrupts are *not* restored in production (main.rs:141 hardcodes
Polling). This was the biggest v1 overstatement. P0-A1 now fixes it.
- uhcid/ohcid are 35-line stubs, not "ownership-grade". P0-B2 gives them
real enumeration over usb-core.
- ehcid does not auto-spawn class drivers. P0-B1 adds that.
- The base fork carries only one USB commit. The 88-fix claim lived in
patch carriers that path-sourced recipes don't apply. v2 records this
honestly and recommends per-feature commits on submodule/base.
Also:
- USB-VALIDATION-RUNBOOK.md restored from archived/ (operationally current).
- local/AGENTS.md: operator override allowing agents to create submodules
when really necessary (2026-07-07), with a 4-point necessity test.
- archived/README.md supersession table updated with v1 plan and XHCID plan.
Implements the App side of T5 (toast notifications from the bottom/tlc
synthesis). render_toast() overlay can be wired in a follow-up pass.
- App.toast: Option<String> field
- App.toast_expires: Option<Instant> field
- App.flash_toast(msg): sets toast with 3s auto-dismiss
- App.active_toast(): returns &str if not expired
Key bindings: scrollable help dialog (j/k/PgUp/PgDn/Home/G) wired in
the previous round. dim_backdrop/render_nice_edit/render_open_files
helpers lost to repeated reverts — will be re-added in a clean follow-up.
Updates six documentation files to point readers to the new
input-stack observability evidence and changelog entry. No
content claims are altered — only "see also" pointers and inventory
updates.
- CHANGELOG.md: new 2026-06-30 entry documenting the input-stack
fix (commit de9d1f4 in local/sources/base/), the git server
docs rewrite (commit 0c60adc6b), and the build-system
hardening addendum (commit 41045fd2f). Includes the verified
end-to-end interactive login evidence from the rebuilt ISO.
- local/docs/boot-logs/README.md: add the new
REDBEAR-MINI-BOOT-PS2D-INPUTD-LOG-FIX.md file to the
inventory table.
- local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md:
see-also pointer in the inputd validation deliverables
section.
- local/docs/REDBEAR-BOOT-EXPERIENCE-PLAN.md: see-also pointer
in the bootanim handoff section, noting that step 6
(REBIND_DISPLAY drm to inputd) now has companion
observability via the new inputd startup log.
- local/docs/USB-IMPLEMENTATION-PLAN.md: see-also pointer in
the HID producer modernization section, noting that the fix
lets operators distinguish "usbhidd dead" from
"usbhidd alive but not enumerated by XHCI".
- local/docs/GREETER-LOGIN-IMPLEMENTATION-PLAN.md: see-also
pointer in the service wiring section, noting that the greeter
can rely on the new inputd/ps2d startup lines being present
before inputd -A 3 runs.
Consolidate the active desktop path around redbear-full while landing the greeter/session stack and the runtime fixes needed to keep Wayland and KWin bring-up moving forward.