Re: [PATCH 1/2] usb: xhci: fix isoc silent reschedule creating stream gap on CFC controllers
From: Dylan Robinson
Date: Thu May 07 2026 - 13:01:49 EST
On Thu, May 7, 2026 at 8:12 AM Mathias Nyman
<mathias.nyman@xxxxxxxxxxxxxxx> wrote:
> ep->next_frame_id should be used for frame ID calculation after
> the first URB is enqueued and endpoint running.
Agreed.
> Hmm, looks like we are doing way too much checking here.
> All the above are done with spin_lock_irqsave() held, meaning there
> shouldn't be any delay by preemptions or interrupts.
>
> re-reading the MFINDEX (microframe index) register for every TD in this
> URB looks like a waste of time.
Ah, I missed the spinlock, but I agree that the current implementation
involves unnecessary checks.
> (I'm confident that the non-preemtable loop queuing TRBs
> does a cycle faster than shortest isoc interval (125us)
That's good. I think a related issue to watch out for is preemption
occurring between URB submissions.
For example, snd-usb-audio submits multiple 1ms URBs at startup. If
preemption occurs between these URB submissions the first URB might
complete before the next one gets enqueued.
While working on an experimental audio driver to avoid this issue, I
found that many test systems required the first submitted URB to
contain more than 10 ms of transfers in order to reliably submit a
second URB before the stream underruns.
> Can I ask you to test some additional patches if I write them?
> I don't have a good setup with frame sensitive usb devices to test this
I would be happy to test some patches!
Dylan