A focused patch series that stabilises and modernises the Haiku OS USB stack.
The work started from a critical review of the whole stack in July 2026 (core,
EHCI/XHCI, OHCI/UHCI, usb_raw, and architectural gaps) and follows a strict
order: stable first, modern second.
These are patches against upstream Haiku core USB code — not a device driver and not tied to any specific machine. They benefit every USB device; the isochronous-transfer work in particular is the groundwork that USB webcams (UVC) and USB audio need to stream reliably.
The living source of truth for the effort is usb_roadmap.md.
patches/— the series asgit format-patchfiles (0001…0018), in apply order. Each commit follows the conventionUSB: [USB-STAB-nn] …/USB: [USB-ROB-nn] …so the log doubles as a progress diary.usb_roadmap.md— the prioritised roadmap: every task has a stable ID, a severity, a status, and (when done) its commit and how it was verified.
Phase 0 — stability (USB-STAB-*), e.g.:
- fix a bool-to-pointer cast in
set_pipe_policy - fix a waiter-count leak on allocation timeout
- take the lock before the double-free check in
Deallocate - free the raw device under
gDeviceListLock - validate descriptor length while parsing configurations
- guard against zero
packet_countin UHCI isochronous - abort EHCI isochronous transfers on host system error
Phase — robustness / isochronous (USB-ROB-*), e.g.:
- let
isochronous_transfer_datacarry siTDs - fix the
ehci_sitdhardware layout and add field defines - implement
WriteIsochronousDescriptorChainfor OUT transfers
Files touched live under src/add-ons/kernel/bus_managers/usb/,
src/add-ons/kernel/busses/usb/ (ehci, uhci, xhci) and
src/add-ons/kernel/drivers/bus/usb/usb_raw.cpp.
Against a Haiku source checkout:
cd /path/to/haiku
git am /path/to/haiku-usb-stack/patches/*.patch(or review/apply individually with git apply / patch -p1).
The end goal for these is upstream submission to Haiku (review.haiku-os.org). This repo is the staging area and the roadmap tracker.
MIT — see LICENSE. The patches modify Haiku source
(© 2002–2024 Haiku, Inc. and contributors), which is MIT-licensed.