From 561354b69c5ae5e73b036b382988fda02bc9fb01 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 16:05:09 +0100 Subject: 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. --- rsnix/src/ehci.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rsnix/src/ehci.rs') 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); // DEBUG: run the one-boot transfer variant matrix (real-hardware bisection // of the EHCI System Error trigger). MATRIX_DONE gates it to one pass; // XFER_TWEAK flips construction variables inside ctl_xfer. -static DEBUG_MATRIX: bool = true; +// +// OFF in normal builds: with it on, `enumerate()` is replaced by the +// diagnostic matrix and returns false, i.e. the EHCI driver never brings a +// device up. Flip to true only when bisecting a hardware fault, and expect +// no USB input in that build. +static DEBUG_MATRIX: bool = false; static MATRIX_DONE: AtomicBool = AtomicBool::new(false); static XFER_TWEAK: AtomicU32 = AtomicU32::new(0); // Low-region (<1 MB) control QH for the matrix's low-region variant. -- cgit v1.2.3