[PATCH 0/2] xhci: Fix isochronous scheduling gaps on CFC controllers

From: Nicola Lunghi

Date: Mon May 04 2026 - 19:33:32 EST


This series addresses a long-standing issue where the xHCI driver introduces frame-aligned gaps in isochronous streams during timing fluctuations.
While many USB devices handle these gaps with a minor glitch, professional interfaces like the MOTU 1248 lose internal channel
synchronization when these gaps occur.

I have identified two specific code paths in xhci-ring.c where these gaps are created:

Silent Rescheduling:
When a start frame is "late," the driver adds a +1 frame offset, creating an explicit hole in the stream.

Ring Drain Race:
On CFC-capable controllers, the driver falls back to ASAP scheduling if the ring is momentarily empty,
resulting in a jump to a future frame instead of continuing sequentially.

Impact on MOTU 1248:
The MOTU 1248 is particularly sensitive to stream continuity. The two situations described above cause a
shift in the output channels, where audio intended for one set of channels is routed to the wrong physical outputs until the device is reset.

Proposed Solution:
This series modifies the xHCI driver to prefer sequential scheduling on modern CFC-capable controllers:

- Patch 1 removes the silent start_frame_id + 1 reschedule, returning -EINVAL to allow the use of the TRB_SIA (Schedule Immediate After) flag.
- Patch 2 expands the CFC sequential condition to check if a periodic completion is in progress, covering the
"ring drain" race where a new URB is submitted just as the previous one finishes.

These changes build upon recent work by Michał Pecio regarding missed TD
handling.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=220748

Nicola Lunghi (2):
usb: xhci: fix isoc silent reschedule creating stream gap on CFC
controllers
usb: xhci: fix CFC sequential scheduling lost on ring drain race

drivers/usb/host/xhci-ring.c | 42 +++++++++++++++++++++++++-----------
1 file changed, 29 insertions(+), 13 deletions(-)

--
2.51.0