Hi,
Expose xhci_stop_endpoint_sync() which is a synchronous variant of xhci_queue_stop_endpoint(). This is useful for client drivers that are using the secondary interrupters, and need to stop/clean up the current session. The stop endpoint command handler will also take care of cleaning up the ring.
I'm not entirely sure what you meant by "cleaning up the ring" (maybe a comment would be in order?), but I see nothing being done here after the command completes and FYI xhci-ring.c will not run the default handler if the command is queued with a completion, like here.
At least that's the case for certain command types and there is probably a story behind each of them. I know that xhci_stop_device() queues a Stop EP with completion (and also a few without(?)). Maybe it's a bug...
Regards, Michal