--- - branch: MAIN date: Sat Jan 29 21:36:12 UTC 2022 files: - new: '1.155' old: '1.154' path: src/sys/dev/usb/xhci.c pathrev: src/sys/dev/usb/xhci.c@1.155 type: modified id: 20220129T213612Z.51acfd724d6b009c29e4a2de43e4646848c76fa0 log: | xhci(4): Fix handling of endpoint reset/stop. Use the same asynchronous task resetting a stalled/halted endpoint and stopping a running endpoint -- either way we need to put the endpoint back into a known state and, if there are transfers waiting to run, start them up again. - xhci_abortx must not drop the pipe (bus) lock -- usbdi(9) requires this. So arrange to stop the endpoint and empty the queue asynchronously. - If the xhci softint claims an xfer for completion with usbd_xfer_trycomplete, it must call usb_transfer_complete without ever releasing the pipe (bus) lock -- it can't claim the xfer and then defer the usb_transfer_complete to a task. So arrange to reset the endpoint asynchronously, hold up new transfers until the endpoint has been reset, and then do usb_transfer_complete immediately. module: src subject: 'CVS commit: src/sys/dev/usb' unixtime: '1643492172' user: riastradh