]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: xhci: ensure skipped isoc TDs are returned when isoc ring is stopped
authorNiklas Neronin <niklas.neronin@linux.intel.com>
Wed, 26 Jun 2024 12:48:29 +0000 (15:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jun 2024 14:08:06 +0000 (16:08 +0200)
commitd56b0b2ab142940b06eac56dcb3ab1ab88df38a2
treebe5cae1f42436f94ea9af522b2a20dfcb7622dc1
parent21b224d7475751a398dfb811e4f987671ef37ade
usb: xhci: ensure skipped isoc TDs are returned when isoc ring is stopped

Missed service event tells the driver that the hardware wasn't able to
process some queued isoc TDs in their right time slots, and some TDs will
be skipped. The driver sets a 'skip' flag to indicate that the next
transfer event after this event will point to some future TD instead of
the next queued TD. Once the driver receives the next event, it will skip
and give back all those hardware skipped TDs.

However, should this subsequent event be a stop endpoint which does not
point to the next pending TD, the driver fails to return the skipped TDs.
Instead, it loops for a period before outputting an erroneous message.

Fix this by repositioning the 'stop endpoint' check to follow the isoc
skip check, ensuring the skipped TDs are properly returned.

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240626124835.1023046-16-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c