mirror of
https://github.com/RPCS3/libusb.git
synced 2026-07-22 00:55:23 -04:00
98bc7b8d125c2756deadfc889dcefd4e6f2fcd02
As stated in the documentation for libusb_cancel_transfer(), LIBUSB_ERROR_NOT_FOUND is an expected return value for libusb_cancel_transfer() under certain circumstances, so printing an error every time this happens is undesirable. Even more so because under Linux IOCTL_USBFS_DISCARDURB sets errno to EINVAL when the kernel can't not find the urb in the kernel's urbs-in-flight list, which means that the urb has already completed at the host controller level but it has not necessarily been reaped yet. IOW under Linux libusb_cancel_transfer() may yield a result of LIBUSB_ERROR_NOT_FOUND *before* the transfer's callback has been called! In conclusion there is no way for applications to avoid calling libusb_cancel_transfer() on already completed transfers, and these errors can and do happen frequently for some USB traffic. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libusb ====== libusb is a library for USB device access from Linux, Mac OS X and Windows userspace. It is written in C and licensed under the LGPL-2.1 (see COPYING). libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. See the PORTING file for some information, if you fancy a challenge :) libusb homepage: http://libusb.org/ Developers will wish to consult the API documentation: http://libusb.sourceforge.net/api-1.0/ Use the mailing list for questions, comments, etc: https://sourceforge.net/mailarchive/forum.php?forum_name=libusb-devel - Daniel Drake <dsd@gentoo.org> - Peter Stuge <peter@stuge.se> (use the mailing list rather than mailing developers directly)
Description
Languages
C
91.7%
C++
3.1%
CMake
1.6%
Batchfile
1.1%
Makefile
1%
Other
1.5%