mirror of
https://github.com/utmapp/libusb.git
synced 2026-12-01 07:43:16 -10:00
utm-edition
darwin_cancel_transfer() routes bulk, interrupt and isochronous transfers to darwin_abort_transfers(), which already knows how to abort a single bulk stream with AbortStreamsPipe(). LIBUSB_TRANSFER_TYPE_BULK_STREAM was missing from the switch, so libusb_cancel_transfer() returned LIBUSB_ERROR_INVALID_PARAM for every stream transfer. USB Attached SCSI uses the command tag as the bulk stream id, so a redirection host cancels stream transfers constantly. When the cancel is not applied the transfer stays in flight on the host controller and the guest's command never completes, which surfaces as a 30 second SCSI timeout and a device reset in the guest. A caller that cancels its transfers and waits for them to complete, as usbredirhost does when it releases a device, waits forever while a stream transfer is pending, and USB Attached SCSI keeps one pending on its status pipe. Assisted-by: OpenCode:deepseek-v4.1-flash Assisted-by: Claude:claude-fable-5-2
libusb
libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD, Haiku and Solaris userspace. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).
libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.
libusb homepage: http://libusb.info/
Developers will wish to consult the API documentation: http://api.libusb.info
Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info
- Hans de Goede [email protected]
- Xiaofan Chen [email protected]
- Ludovic Rousseau [email protected]
- Nathan Hjelm [email protected]
- Chris Dickens [email protected]
(Please use the mailing list rather than mailing developers directly)
Description
A cross-platform library to access USB devices
6.1 MiB
0 Stars
1 Watchers
0 Forks
Languages
C
94%
C++
3%
M4
1.3%
Makefile
1.1%
Shell
0.6%