Correct the P3-A runtime-validation note and matrix row: the
intermittent apparent boot freeze is startup latency under load (guest
clock ~10-15x slower than wall), not a deadlock or an xhcid bug. A short
50-60s test timeout occasionally cuts the spawn+enumerate sequence,
producing a 'frozen' log while the guest is still running — proven by
18 boots (one apparent short-timeout loss), a 12s log-quiet 'freeze'
the guest resumed from, and every >=180s run enumerating fully. No fix
required beyond adequate test timeouts; no speculative kernel-deadlock
fix was implemented.
The usb-kbd behind the QEMU usb-hub now enumerates fully: debounce ->
port reset -> enable -> second debounce -> pre-attach -> attach ->
ATTACH 5.2 -> slot 3 -> addressed -> descriptors read -> HID class match
-> 'Loading subdriver "USB HID" for port 5.2' (class 3.1 proto 1,
keyboard boot protocol).
Root cause of the final stall: an unconditional SetPortFeature
(PORT_INDICATOR) for every connected+enabled port NAK-hung on QEMU's
indicator-less hub (no control-transfer timeout), blocking the flow
before the post-enable debounce. Now gated on
wHubCharacteristics.HUB_CHAR_PORTIND like Linux has_indicators.
test-usb-hub-qemu.sh: check #5 now requires the hub-child subdriver
line ('Loading subdriver "USB HID" for port <root>.<child>') so a
root-port HID (tablet) can no longer satisfy it — closes a false-
positive hole. Timeout raised to 360s for slow TT-path driver bring-up.
Docs (plan P3-A runtime validation + matrix): full hub + hub-child
chain recorded as QEMU-proven; remaining items (intermittent reactor
startup race, slow TT-path Evaluate Context) noted.
USB-IMPLEMENTATION-PLAN.md P3-A: record the 2026-07-19 QEMU runtime
validation (test-usb-hub-qemu.sh) — full usbhubd chain proven
(descriptor, EP1 change detection, initial scan, debounce, reset to
port-enable), the five latent bugs it surfaced and that were fixed
(scheme attach bootstrap, bitmap off-by-one, missing initial scan,
unbounded EP1 wait, debounce clear deadlock), QEMU's ClearPortFeature
stall handled gracefully by P2-C recovery, and the remaining gap:
hub-child device enumeration (usb-kbd to HID driver) blocked on
xhcid's hub-child attach path (debug-level; TT/route investigation)
plus an intermittent xhcid IRQ-reactor startup race.
HARDWARE-VALIDATION-MATRIX.md: hub row to QEMU-validated for the
enumeration chain, with the hub-child gap noted.
Track base pointer to bd379e07 (usbhubd debounce/reset-wait/U0-wait/
wHubDelay + SET_ISOCH_DELAY, HubDescriptorV3 device_removable fix).
USB-IMPLEMENTATION-PLAN.md: P3-A marked CORE COMPLETE with the full
Linux equivalence inventory and documented follow-ups (USB 2.0 bitmaps,
SS.Inactive warm-reset loop, multi-TT, hub LPM). Hub gap-table row
updated (249 -> ~700 LoC with Linux state machine).
HARDWARE-VALIDATION-MATRIX.md: hub row updated — enumeration core
complete with 14 unit tests; runtime hub proof tracked under P8-B.
Track base pointer to d20557f7 (xHCI 1.1+ feature gating: LEC/U3C/CIC
gates, HW LPM substrate with protocol-caps HLC detection, PORTPMSC
register-target fix, bogus HCCPARAMS1-HLC accessor removed).
Mark P2-B COMPLETE in USB-IMPLEMENTATION-PLAN.md with the full gating
inventory and Linux 7.1 cross-references. Per-device L1 enablement
(BESL, MEL Evaluate Context) explicitly deferred to P3 hub work.
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.