Re: [PATCH] usb: xhci: Fix isochronous scheduling regression

From: Alan Stern

Date: Fri Aug 21 2026 - 10:50:23 EST


On Fri, Aug 21, 2026 at 11:47:06AM +0200, Michal Pecio wrote:
> Fix this by using the best criteria we can muster, taken from ehci-hcd.

Maybe it's time to correct the hcd_periodic_completion_in_progress()
implementation.

For instance, we could add an atomic giveback_count field to the
usb_host_endpoint struct. The HCD would increment the field (while
still holding its private lock) before doing a giveback, and
__usb_hcd_giveback_urb() would decrement the field after calling the
completion handler.

What do you think?

Alan Stern