From 0f5331610034fe3e06251ae7fa5275472e70ae36 Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Wed, 8 Jul 2026 00:44:09 +0300 Subject: [PATCH] =?UTF-8?q?USB:=20P1=20BROKEN=5FSTREAMS=20behavioral=20qui?= =?UTF-8?q?rk=20=E2=80=94=20skip=20stream=20allocation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IMPROVEMENT-PLAN.md §10.1: critical quirk enforcement. Fresco Logic FL1009 and Etron EJ168 controllers have broken stream support. When BROKEN_STREAMS quirk is active, force usb_log_max_streams to None, which prevents stream context array allocation in configure_endpoints_once(). Previously the quirk was declared and logged at init but had no runtime effect — streams were still allocated, causing crashes on these controllers. Cross-referenced with Linux 7.1 xhci-pci.c BROKEN_STREAMS enforcement in xhci_alloc_streams(). --- drivers/usb/xhcid/src/xhci/scheme.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/xhcid/src/xhci/scheme.rs b/drivers/usb/xhcid/src/xhci/scheme.rs index 11b6e1e788..e51ba78cb7 100644 --- a/drivers/usb/xhcid/src/xhci/scheme.rs +++ b/drivers/usb/xhcid/src/xhci/scheme.rs @@ -1419,7 +1419,11 @@ impl Xhci { let endp_num_xhc = Self::endp_num_to_dci(endp_num, endp_desc); - let usb_log_max_streams = endp_desc.log_max_streams(); + let usb_log_max_streams = if self.quirks.contains(crate::xhci::quirks::XhciQuirks::BROKEN_STREAMS) { + None // BROKEN_STREAMS: skip stream context array allocation entirely + } else { + endp_desc.log_max_streams() + }; // TODO: Secondary streams. let primary_streams = if let Some(log_max_streams) = usb_log_max_streams {