https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256296

--- Comment #5 from Sergii <sergii.dmyt...@3mdeb.com> ---
Created attachment 225431
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=225431&action=edit
Bug reproducer

> Sergii is it possible to open device again after closing? It should not be 
> possible to transfer to a device that is not opened.. so 
> LIBUSB_ERROR_NO_DEVICE may indicate that device is not opened and there is 
> nowhere to tranfer to.

Yes, device can be opened. Transfer is done after opening the device, that's
not the issue.

> Asynchronous transfers may be put on some sort of list and close function 
> should verify the list before closing..? Can you verify with the application? 
> :-)

Actually looks like the first time the error happens even without any
transactions (no libusb_submit_transfer() calls). The device is opened, some
info calls are done, it's closed, second thread wakes up, finds that 32 bytes
are available to read and marks the device as gone.

I've made a simple example where the behaviour manifests itself in debugger
almost every time. Setting breakpoints helps with that. In fwupd breakpoint on
libusb_close() isn't necessary.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to