| Previous | Next |
| kIOUSBPipeStalled | kIOUSBTransactionTimeout |
kIOUSBTransactionReturned
An in-flight request was handed back to the caller
kIOUSBTransactionReturned is a completion result for an outstanding pipe operation that was returned before ordinary successful completion. In the documented IOUSBFamily pipe-stall path, clearing a pipe returns outstanding transactions with this status and still delivers their asynchronous callbacks. It therefore marks a lifecycle transition for a queued request, not proof that a protocol command succeeded or failed at the device.
The important question is what caused the return: pipe recovery, cancellation, close, configuration change, or another transition. Treating the result as ordinary success can leak protocol state; treating it as evidence that no bytes moved can be wrong for a higher-level operation unless its completion fields and protocol framing are examined.
How to handle the completion
- Correlate the callback with the initiating action, pipe state change, endpoint, direction, and request generation number.
- Keep request memory and higher-level operation state valid until the callback runs, even if the caller has already started recovery.
- Complete or cancel every affected request before reusing the pipe, then decide whether replay is safe from the device protocol's idempotence rules.
- Record remaining length and protocol acknowledgement separately from the IOReturn value.
References
- IOUSB interface reference: returned outstanding transactions
- IOUSBFamily source: pipe state and completion handling
- libusb: completion and cancellation of asynchronous transfers
Looking for a different code? Search another status or error code.
