https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256296
Bug ID: 256296
Summary: "No Device" error after using asynchronous API of
libusb once
Product: Base System
Version: Unspecified
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: usb
Assignee: [email protected]
Reporter: [email protected]
Background information
----------------------
fwupd project is using libgusb, which is a Glib wrapper for libusb.
libgusb uses asynchronous API of libusb with events handled in a separate
thread.
fwupd works with devices by opening them, performing operations and then
closing.
How the failure occurs
----------------------
fwupd closes a device before all events of the operation have been processed.
This means that when libusb10_handle_events_sub() eventually processes related
event, the device gets marked as gone (device_is_gone field). On all future
calls libusb_submit_transfer() fails with LIBUSB_ERROR_NO_DEVICE because that
flag is set.
Effectively this means that a device can be used only once in such a way.
As I understand libgusb uses the API as intended and it is implementation of
libusb which shouldn't prevent repeated use of a device. Maybe it should wait
before closing or just reset the flag on opening the device.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[email protected]"