Giova c1c01e6593 darwin: allow cancelling bulk stream transfers
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
2026-11-10 22:18:40 -08:00
2022-01-20 22:27:37 +01:00
2021-10-31 17:44:55 +01:00
2020-12-19 13:29:38 -08:00
2022-01-21 18:32:23 +01:00
2022-01-31 13:57:06 +01:00
2007-12-02 22:54:59 +00:00
2016-07-24 20:00:00 -06:00
2020-08-23 17:32:06 +02:00
2020-03-25 00:09:26 -07:00
2020-08-23 17:32:06 +02:00
2016-07-24 20:02:31 -06:00

libusb

Build Status Build Status Coverity Scan Build Status

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

(Please use the mailing list rather than mailing developers directly)

S
Description
A cross-platform library to access USB devices
Readme LGPL-2.1
6.1 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 94%
C++ 3%
M4 1.3%
Makefile 1.1%
Shell 0.6%