87858756ca
New API for HCI drivers to synchronize hardware completion interrupts, synchronous aborts, and asynchronous timeouts: - When submitting an xfer to hardware, call usbd_xfer_schedule_timeout(xfer). - On HCI completion interrupt for xfer completion: if (!usbd_xfer_trycomplete(xfer)) return; /* timed out or aborted, ignore it */ - In upm_abort methods, call usbd_xfer_abort(xfer). For HCI drivers that use this API (not needed in drivers that don't, or for xfers like root intr xfers that don't use it): - New ubm_abortx method serves role of former *hci_abort_xfer, but without any logic for wrangling timeouts/callouts/tasks -- caller in usbd_xfer_abort has already handled them. - New ubm_dying method, returns true if the device is in the process of detaching, used by the timeout logic. Converted and tested: - ehci - ohci Converted and compile-tested: - ahci (XXX did this ever work?) - dwc2 - motg (XXX missing usbd_xfer_schedule_timeout in motg_*_start?) - uhci - xhci Not changed: - slhci (sys/dev/ic/sl811hs.c) -- doesn't use a separate per-xfer callout for timeouts (XXX but maybe should?) - ugenhc (sys/rump/dev/lib/libugenhc/ugenhc.c) -- doesn't manage its own transfer timeouts - vhci -- times transfers out only on detach; could be adapted easily if we wanted to use the xfer->ux_callout |
||
---|---|---|
.. | ||
bsd | ||
gpl2/dts | ||
isc/atheros_hal | ||
mit/xen-include-public/dist/xen/include/public |