Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: Correct libusb timeout handling
The documentation for libusb_bulk_transfer() specifies that in the event that the read or write request is split into multiple chunks, some of these may still be transferred despite a LIBUSB_ERROR_TIMEOUT is returned. In the transition to libusb this detail was missed and completed read transfers are sometimes considred to be timeouts and the data discarded, obviously resulting in failure to continue. Consider the "transferred" value in the event of timeout, to avoid this. Although not yet spotted in testing, the same logic is introduced for the write path. Signed-off-by: Bjorn Andersson <[email protected]>
- Loading branch information