USB: EP_LIMIT_QUIRK enforcement — cap endpoints at 15 for Panther Point

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).
This commit is contained in:
Red Bear OS
2026-07-07 18:17:53 +03:00
parent f46190851f
commit 947475a2ed
+7 -2
View File
@@ -1339,8 +1339,13 @@ impl<const N: usize> Xhci<N> {
}
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));
}