Files
RedBear-OS/local/recipes/system/redbear-quirks/source/quirks.d/25-xhci.toml
T
vasilito 788fdeddff configs + quirks.d/25-xhci: R7 audit fixes (boot order race + xHCI typo)
Two findings from the R7 comprehensive review:

1. Boot order race (CRITICAL)
   00_driver_manager.service and 00_acpid.service both have the
   00_ prefix and no explicit dependency. If driver-manager
   enumerates PCI before acpid publishes /scheme/acpi/dmi, every
   device gets empty quirk_flags because
   redox_driver_sys::quirks::dmi::read_dmi_info() returns Err(())
   when the file doesn't exist yet. The OR-accumulation is frozen
   at enumeration time so hotplug won't pick up later-published
   DMI data.

   Fix: add 00_acpid.service to requires_weak for both
   00_driver_manager.service (redbear-device-services.toml) and
   13_iommu.service (redbear-mini.toml + redbear-full.toml).

2. xHCI typo (CRITICAL)
   quirks.d/25-xhci.toml:38 has 'broken_port_pec' which doesn't
   exist in the flag name table. The correct flag is
   'broken_port_ped' (Port Enabled/Disabled, bit 25 in
   XhciControllerQuirkFlags). The typo causes the flag to be
   silently dropped at runtime, leaving Intel ICH6 xHCI
   (vendor=0x8086, device=0x1E31) without the intended
   BROKEN_PORT_PED quirk.

   Fix: corrected typo to 'broken_port_ped'.
2026-06-08 03:43:20 +03:00

108 lines
3.8 KiB
TOML

# xHCI controller quirk entries — Phase R7 (2026-06-07).
# Source: Linux 7.1 drivers/usb/host/xhci-pci.c + drivers/usb/host/xhci.h
#
# Flag bit map (see XhciControllerQuirkFlags in redox-driver-sys):
# bit 1: RESET_EP_QUIRK
# bit 4: SPURIOUS_SUCCESS
# bit 6: BROKEN_MSI
# bit 7: RESET_ON_RESUME
# bit 9: AVOID_BEI
# bit 11: SLOW_SUSPEND
# bit 13: SPURIOUS_REBOOT
# bit 17: BROKEN_STREAMS
# bit 19: BROKEN_STREAMS (alt)
# bit 22: SSIC_PORT_UNUSED
# bit 24: MISSING_CAS
# bit 25: BROKEN_PORT_PED
# bit 29: HW_LPM_DISABLE
# bit 33: DEFAULT_PM_RUNTIME_ALLOW
# bit 35: SNPS_BROKEN_SUSPEND
# bit 38: DISABLE_SPARSE
# bit 41: BROKEN_D3COLD_S2I
# bit 44: RESET_TO_DEFAULT
#
# Compiled-in table is the canonical xHCI quirk source; this TOML overlay
# allows OS-image integrators to add or override flags for specific
# controller PCI IDs without recompiling redox-driver-sys.
# ============================================================================
# INTEL Panther Point / C600 — disable per-port USB 3.0 warm reset.
# Linux: xhci-pci.c::xhci_pci_probe (INTEL_PANTHERPOINT)
# Reason: PP has a hardware bug where warm port reset corrupts downstream
# device state; BIOS workaround forces cold reset path.
# ============================================================================
[[xhci_controller_quirk]]
vendor = 0x8086
device = 0x1E31
flags = ["broken_port_ped", "reset_to_default"]
# ============================================================================
# INTEL Lynx Point / Wildcat Point
# Linux: xhci-pci.c::xhci_pci_probe (INTEL_LYNXPOINT)
# Reason: xHCI port can return spurious successful status during reset.
# ============================================================================
[[xhci_controller_quirk]]
vendor = 0x8086
device = 0x8C31
flags = ["spurious_success", "spurious_reboot"]
# ============================================================================
# INTEL Sunrise Point / Cannon Lake / Ice Lake — disable MSI for stability.
# Linux: xhci-pci.c::xhci_pci_probe (INTEL_BROKEN_MSI)
# Reason: interrupt masking on these chips intermittently fails under load.
# ============================================================================
[[xhci_controller_quirk]]
vendor = 0x8086
device = 0xA12F
flags = ["broken_msi"]
# ============================================================================
# AMD Renoir / Yellow Carp — runtime PM quirks.
# Linux: xhci-pci.c::xhci_pci_probe (PCI_DEVICE_ID_AMD_RENOIR_XHCI)
# Reason: device needs default_pm_runtime_allow + broken_suspend to
# maintain USB functionality across suspend/resume cycles.
# ============================================================================
[[xhci_controller_quirk]]
vendor = 0x1022
device = 0x1639
flags = ["default_pm_runtime_allow", "snps_broken_suspend"]
# ============================================================================
# AMD Renoir 0x15E0 / 0x15E1 — Synopsys-based xHCI controllers.
# Linux: xhci-pci.c::xhci_pci_probe (PCI_DEVICE_ID_AMD_RENOIR_XHCI_2/3)
# ============================================================================
[[xhci_controller_quirk]]
vendor = 0x1022
device = 0x15E0
flags = ["snps_broken_suspend"]
[[xhci_controller_quirk]]
vendor = 0x1022
device = 0x15E1
flags = ["snps_broken_suspend"]
# ============================================================================
# Intel Tiger Lake-PCH / Alder Lake-PCH — device ID additions.
# Linux: xhci-pci.c::xhci_pci_probe (INTEL_TGL, INTEL_ALDER_LAKE_PCH)
# ============================================================================
[[xhci_controller_quirk]]
vendor = 0x8086
device = 0x9A13
flags = ["reset_to_default"]
[[xhci_controller_quirk]]
vendor = 0x8086
device = 0x51E0
flags = ["reset_to_default"]
[[xhci_controller_quirk]]
vendor = 0x8086
device = 0x54EE
flags = ["reset_to_default"]