Hans de Goede 98bc7b8d12 Don't print an error when libusb_cancel_transfer() fails with NOT_FOUND
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>
2012-04-19 06:44:37 +02:00
2007-12-02 22:54:59 +00:00
2007-12-02 22:54:59 +00:00
2010-05-04 19:01:59 -03:00
2008-06-15 15:30:02 -05:00

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)
S
Description
A cross-platform library to access USB devices
Readme 4 MiB
Languages
C 91.7%
C++ 3.1%
CMake 1.6%
Batchfile 1.1%
Makefile 1%
Other 1.5%