summaryrefslogtreecommitdiffstats
path: root/rsnix/src/ehci.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-01 16:05:09 +0100
committersalmonik <salmonik@tuta.io>2026-11-01 16:05:09 +0100
commit561354b69c5ae5e73b036b382988fda02bc9fb01 (patch)
treee030b0c493637502f24e0f6e60ae2ca4418e0c03 /rsnix/src/ehci.rs
parentscripts: rebuild the dev loop around build.sh/run.sh (diff)
downloadrs-dos-561354b69c5ae5e73b036b382988fda02bc9fb01.tar.gz
rs-dos-561354b69c5ae5e73b036b382988fda02bc9fb01.zip
usb: re-enable EHCI, share HID keyboard decoding, fix boot protocol
- ehci: DEBUG_MATRIX was left true in be868a4, so every boot replaced enumeration with the one-shot diagnostic transfer matrix and returned false -- the EHCI driver never brought a device up. Default it off; flip it back on only when bisecting a controller fault. - new rsnix/src/hid.rs: boot-keyboard HID usage -> scancode-set-1 tables, the shared scancode FIFO, and a per-device report differ. UHCI now uses it instead of its own copy, so EHCI/xHCI keyboards can feed the same PS/2 decoder (`ps2::feed_scancode`). - uhci: SET_PROTOCOL now asks for the boot protocol (wValue 0) instead of report protocol (wValue 1). In report protocol the report layout is device-defined, but every driver parses boot reports.
Diffstat (limited to '')
-rw-r--r--rsnix/src/ehci.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/rsnix/src/ehci.rs b/rsnix/src/ehci.rs
index 6209155..8baa0ad 100644
--- a/rsnix/src/ehci.rs
+++ b/rsnix/src/ehci.rs
@@ -89,7 +89,12 @@ static QR_SHOWN: AtomicBool = AtomicBool::new(false);
89// DEBUG: run the one-boot transfer variant matrix (real-hardware bisection 89// DEBUG: run the one-boot transfer variant matrix (real-hardware bisection
90// of the EHCI System Error trigger). MATRIX_DONE gates it to one pass; 90// of the EHCI System Error trigger). MATRIX_DONE gates it to one pass;
91// XFER_TWEAK flips construction variables inside ctl_xfer. 91// XFER_TWEAK flips construction variables inside ctl_xfer.
92static DEBUG_MATRIX: bool = true; 92//
93// OFF in normal builds: with it on, `enumerate()` is replaced by the
94// diagnostic matrix and returns false, i.e. the EHCI driver never brings a
95// device up. Flip to true only when bisecting a hardware fault, and expect
96// no USB input in that build.
97static DEBUG_MATRIX: bool = false;
93static MATRIX_DONE: AtomicBool = AtomicBool::new(false); 98static MATRIX_DONE: AtomicBool = AtomicBool::new(false);
94static XFER_TWEAK: AtomicU32 = AtomicU32::new(0); 99static XFER_TWEAK: AtomicU32 = AtomicU32::new(0);
95// Low-region (<1 MB) control QH for the matrix's low-region variant. 100// Low-region (<1 MB) control QH for the matrix's low-region variant.