Files
RedBear-OS/drivers/usb
Red Bear OS b244dbd0d9 usbhubd: P3 — power-on timing, USB 3 fix, polling interval
First P3 hub-driver maturity improvements, cross-referenced with
Linux 7.1 drivers/usb/core/hub.c:

  1. Power-on timing (hub_power_on + hub_power_on_good_delay)
     - reads bPwrOn2PwrGood (V2: power_on_good; V3: default 10)
     - sleeps power_on_good * 2ms after SET_FEATURE(PORT_POWER)
     - minimum floor: 100ms (matches Linux hub_power_on_good_delay)
     - logs the computed delay at startup

  2. USB 3 hub stall fix
     - ConfigureEndpointsReq no longer passes interface_desc or
       alternate_setting for USB 3 hubs
     - xHCI handles default-alt-0 derivation internally
     - resolves the two TODOs that documented the stall symptom

  3. SET_HUB_DEPTH with hub_depth() value
     - previously passed port_id.hub_depth().into() which was
       incorrect (returned route-string-derived depth)
     - now logs the depth value explicitly

  4. Polling interval tightened 1s -> 250ms
     - interrupt-driven detection remains a follow-up (P3 slice 2)
     - 250ms is a reasonable intermediate step for USB keyboard
       responsiveness

  5. wHubDelay recorded from V3 descriptor
     - extracted from hub_desc.delay field
     - displayed at startup; future P3 slices will accumulate
       through the hub tree per Linux hub_configure()

Cross-reference: Linux 7.1
  - drivers/usb/core/hub.c: hub_power_on()
  - drivers/usb/core/hub.c: hub_power_on_good_delay()
  - drivers/usb/core/hub.c: hub_activate()
  - include/linux/usb/ch11.h: HUB_SET_DEPTH = 0x0C
2026-07-07 11:51:10 +03:00
..