Files
RedBear-OS/local/recipes/drivers
vasilito 5d0e41dff2 ohcid: P0-B2 — fix control transfer following Linux 7.1 ohci-q.c
Rewrite the control_transfer function following Linux 7.1 ohci-q.c
PIPE_CONTROL pattern exactly:

  · Dummy TD at ED tail (Linux: ed->hwTailP = dummy)
  · TD chain via hwNextTD (Linux: td_fill model)
  · Toggle sequence: DATA0 → DATA1 → DATA1
    (Linux: TD_T_DATA0, TD_T_DATA1, TD_T_DATA1)
  · DoneHead polling with zero-acknowledge
    (Linux: hcca->done_head = 0)
  · Kickstart via OHCI_CLF (Linux: cmdstatus write)
  · hwBE = data + len - 1 (Linux: td->hwBE formula)

  · Separate data buffer and output buffer parameters to avoid
    borrow conflicts in the copy-back path
  · Use MmioRegion (same as ehcid) for MMIO access
  · Use usize::wrapping_add/sub for physical address arithmetic

Compiles cleanly (cargo check passes).  Completes P0-B2 from
USB-IMPLEMENTATION-PLAN.md v2 — both UHCI and OHCI now have real
compiling drivers replacing the old 35-line stubs.
2026-07-07 02:03:00 +03:00
..