From 947475a2ed35f701c823c8b15e02872dfd8ec3b8 Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Tue, 7 Jul 2026 18:17:53 +0300 Subject: [PATCH] =?UTF-8?q?USB:=20EP=5FLIMIT=5FQUIRK=20enforcement=20?= =?UTF-8?q?=E2=80=94=20cap=20endpoints=20at=2015=20for=20Panther=20Point?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-referenced with Linux 7.1 xhci-pci.c EP_LIMIT_QUIRK. Intel Panther Point (0x9c31) xHCI controllers have a hardware bug where endpoints beyond 15 are unreliable. When the quirk is active, cap endpoints per device at 15 instead of 31 (the xHCI architectural limit). Without this, devices with many interfaces (USB audio interfaces, composite devices) will experience random failures. Quirk enforcement count: 6→7/50 (EP_LIMIT_QUIRK added). --- drivers/usb/xhcid/src/xhci/scheme.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/xhcid/src/xhci/scheme.rs b/drivers/usb/xhcid/src/xhci/scheme.rs index 28c350cde3..8252198133 100644 --- a/drivers/usb/xhcid/src/xhci/scheme.rs +++ b/drivers/usb/xhcid/src/xhci/scheme.rs @@ -1339,8 +1339,13 @@ impl Xhci { } new_context_entries += 1; - if endp_desc_count >= 31 { - warn!("endpoints length {} >= 31", endp_desc_count); + // Linux 7.1 EP_LIMIT_QUIRK: Intel Panther Point (0x9c31) + // controllers have a hardware bug that limits the number + // of endpoints per device to 15. Cap at 15 when quirked. + let max_endp = if self.quirks.contains(crate::xhci::quirks::XhciQuirks::EP_LIMIT_QUIRK) { 15 } else { 31 }; + if endp_desc_count >= max_endp { + warn!("endpoints length {} >= {} (EP_LIMIT_QUIRK={})", endp_desc_count, max_endp, + self.quirks.contains(crate::xhci::quirks::XhciQuirks::EP_LIMIT_QUIRK)); return Err(Error::new(EIO)); }