Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haiku USB Stack — stabilisation & modernisation patches

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.

What's here

  • patches/ — the series as git format-patch files (0001…0018), in apply order. Each commit follows the convention USB: [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.

Scope of the patches

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_count in UHCI isochronous
  • abort EHCI isochronous transfers on host system error

Phase — robustness / isochronous (USB-ROB-*), e.g.:

  • let isochronous_transfer_data carry siTDs
  • fix the ehci_sitd hardware layout and add field defines
  • implement WriteIsochronousDescriptorChain for 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.

Applying the patches

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.

License

MIT — see LICENSE. The patches modify Haiku source (© 2002–2024 Haiku, Inc. and contributors), which is MIT-licensed.

About

Haiku USB Stack

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors