docs(driver-manager): v5.2 records C1 OHCI closure + round-2 audit findings

v5.2 supersedes v5.1. Records:

C1 closure (commit 66300cb277):
- OHCI bulk_transfer now uses HC_BULK_HEAD_ED + CMD_BLF kick
- OHCI interrupt_transfer now uses HCCA.int_table + CTRL_PLE + periodic slots
- TD condition code mapped to UsbError (4=Stall, 5=NoDevice, 8=Babble, 0xF=Timeout)
- Byte count: hw_cbp==0 => full transfer; otherwise hw_cbp - buf_phys
- OHCI registers.rs expanded: CMD_CLF, CMD_BLF, CTRL_PLE, ED_DIR_*, TD_CC_*, HCCA_ALIGN, NUM_INT_SLOTS=32
- 15 new tests, all passing

Round-2 audit findings (commit 810b011fa8 was W1-W8; this round
confirms those were applied but found C1 was missed):
- Round-2 was a complete re-scan of local/recipes/{drivers,system,gpu}/,
  local/sources/base/drivers/
- The single CRITICAL gap (OHCI transfers) is now fixed
- Other findings (W1-W5 in the round-2 report) are documented
  limitations, host-test scaffolding, or upstream code - not Red Bear
  stubs to fix unilaterally

Verified no new warnings introduced: 'value assigned to dt_phys
is never read' and 'fields address and low_speed are never read'
are pre-existing warnings from the original control-transfer code
(same count as HEAD).
This commit is contained in:
kellito
2026-07-26 08:14:11 +09:00
parent 66300cb277
commit df4a748698
+25 -8
View File
@@ -1,14 +1,13 @@
# Red Bear OS — `pci-spawner` → `driver-manager` Migration Plan
**Document status:** v5.1 canonical planning authority (supersedes v5.0).
v5.1 records G-A4 closure: iwlwifi's `--daemon` mode now consumes the
`PCID_CLIENT_CHANNEL` channel contract that driver-manager passes, instead
of the legacy `PCID_DEVICE_PATH` path. v5.0 + v5.1 together close all of
G-A1 through G-A5 from the v4.8 audit and all v5.x implementation tracks
except the operator-only gates (v5.6 hardware validation).
**Document status:** v5.2 canonical planning authority (supersedes v5.1).
v5.2 records C1 closure (OHCI bulk + interrupt transfers) and the
round-2 stub audit findings. The round-2 audit confirmed the previous
W1-W8 pass did NOT touch the OHCI stubs; v5.2 fixes that gap.
v5.0 in turn superseded v4.9. v5.0 closed v5.3 (initnsmgr O_NONBLOCK) and
the W1-W8 stub-fix pass. v4.9 recorded v5.0, v5.1, v5.5 implementation.
v5.1 in turn superseded v5.0. v5.1 closed G-A4 (iwlwifi spawned-mode
channel contract). v5.0 closed v5.3 (initnsmgr O_NONBLOCK) and the
W1-W8 stub-fix pass. v4.9 recorded v5.0, v5.1, v5.5 implementation.
v4.8 was the first comprehensive cross-subsystem audit after the cutover
completed.
v4.8 is the first **comprehensive cross-subsystem audit** after the cutover
@@ -165,6 +164,24 @@ end-state once a freestanding thread-spawn helper is added to `redox_rt`.
`use std::fs` / `use std::path::Path` imports and from
`parse_linux_id_table(&Path)`. Refactored `main.rs` CLI path to use
the wrapper directly (single source of truth for file-reading + parsing).
- **C1 (OHCI bulk + interrupt transfers)**: `local/recipes/drivers/ohcid/`
- `main.rs:266-275` `bulk_transfer` and `main.rs:278-287` `interrupt_transfer`
were returning `Err(UsbError::Unsupported)` — the W1-W8 pass did NOT
touch these, confirmed by round-2 audit. Fix: implemented full OHCI
bulk-list and periodic-list transfer paths. `do_bulk_transfer` allocates
ED + dummy TD + data TD + DMA buffer, builds ED with direction from
`TransferDirection` (rejects `Setup`), kicks via `HC_CMD_STATUS` `CMD_BLF`
(1<<2), polls `HC_DONE_HEAD`. `do_interrupt_transfer` places ED in
`HCCA.int_table[slot]` using Linux-style balance pattern (interval-N ED
linked into every Nth slot; default slot 0 = every-frame for the
synchronous one-shot model), enables `CTRL_PLE` in `HC_CONTROL`. TD
condition code mapped to `UsbError`: 0=Ok, 4=Stall, 5=NoDevice,
8=Babble, 0xF=Timeout, others=DataError. Byte count: `hw_cbp==0` means
full transfer (`actual = data_len`); otherwise `actual = hw_cbp - buf_phys`.
registers.rs: added `CMD_CLF`, `CMD_BLF`, `CTRL_PLE`, `ED_DIR_IN/OUT`,
`ED_LOW_SPEED`, `ED_MAX_PKT_SHIFT`, `TD_DP_IN/OUT`, `TD_CC_*` for all 16
condition codes, `HCCA_ALIGN`, `HCCA_INT_TABLE_OFFSET`, `NUM_INT_SLOTS=32`.
15 new tests, all passing. Commit `66300cb277`.
- C2 (DRM caps): `redox-drm/scheme.rs` — replaced silent acceptance of
`DRM_CLIENT_CAP_STEREO_3D` / `UNIVERSAL_PLANES` / `ATOMIC` with
explicit `EOPNOTSUPP` rejection. Clients (Mesa/KWin) now fail fast