diff --git a/local/docs/USB-IMPLEMENTATION-PLAN.md b/local/docs/USB-IMPLEMENTATION-PLAN.md index 12d372cff3..0208dcfb9d 100644 --- a/local/docs/USB-IMPLEMENTATION-PLAN.md +++ b/local/docs/USB-IMPLEMENTATION-PLAN.md @@ -659,6 +659,17 @@ A `redbear-usbtest` tool that exercises: **Reference:** `linux-7.1/drivers/usb/host/xhci-port.h:135-173`, `xhci-hub.c`. +**Status (2026-07-20):** xhcid per-device enablement **implemented** (base fork +`2a3b0d4e`): full Linux xhci.c:4650 gate chain at attach +(`hw_lpm_support` && per-port HLC && device `USB_LPM_SUPPORT` in BOS && +non-hub && root-hub-direct), BESL vs HIRD parameter selection +(`calculate_hird_besl`, Linux xhci.c:4594), MEL Evaluate Context +(`change_max_exit_latency`, Linux xhci.c:4520), and the PORTHLPMC/PORTPMSC +programming sequence. LPM enable failure logs and continues (device works +in U0). Compile-verified; 3 BOS accessor unit tests. **Runtime validation +requires LPM-capable hardware** — QEMU's xHCI does not advertise HLC, so +the L1-entry exit criterion remains hardware-validation debt (P8-A). + **Status (2026-07-18):** Substrate done in P2-B — HLC/BLC/L1C parsed from the Supported Protocol capability (NOT `HCCPARAMS1`: an earlier plan version and driver accessor were wrong; HLC lives in the protocol caps port_info DWORD per @@ -670,8 +681,9 @@ defensive LPM clear runs on USB2 ports at attach when unsupported. 1. ~~Parse HLC~~ ✅ done (P2-B, protocol caps). 2. Implement `usb_set_device_initiated_lpm()` (port hardware LPM control via PORTSC.PORT_L1DEV). -3. xhcid: per-device `PORT_HLE` enablement at attach — gate chain per Linux xhci.c:4650: `!HW_LPM_DISABLE && hw_lpm_support && udev->lpm_capable && root-hub-direct && non-hub`, then BESL params + MEL Evaluate Context + `enable_lpm()`. +3. ~~xhcid: per-device `PORT_HLE` enablement at attach~~ ✅ done (2026-07-20, `2a3b0d4e`). 4. ehcid: implement via USBCMD.HIRD (Host Initiated Resume Duration). +5. Runtime L1-entry validation on LPM-capable hardware (P8-A hardware matrix). **Exit:** USB 2.0 devices on HWA LPM-capable hubs enter L1 state when idle. diff --git a/local/sources/base b/local/sources/base index 28afc1fefd..2a3b0d4e0a 160000 --- a/local/sources/base +++ b/local/sources/base @@ -1 +1 @@ -Subproject commit 28afc1fefdd1cd90dc117be735c7103b1fa1e56d +Subproject commit 2a3b0d4e0a0333bde577e780044f4e4187ce1a38