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)); }