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

--- Comment #9 from Ludovic Rousseau <ludovic.rousseau+free...@gmail.com> ---
When the USB device is removed libusb10_handle_events_sub() will call
libusb10_cancel_all_transfer() at
https://github.com/freebsd/freebsd/blob/master/lib/libusb/libusb10_io.c#L170

libusb10_cancel_all_transfer() will then call libusb20_tr_close() at
https://github.com/freebsd/freebsd/blob/master/lib/libusb/libusb10.c#L1570

libusb20_tr_close() will then reset the variable fields at
https://github.com/freebsd/freebsd/blob/master/lib/libusb/libusb20.c#L142

So when libusb_cancel_transfer() is called by my code the fields priv_sc0 and
priv_sc1 are already reset to 0 and libusb_cancel_transfer() returns
LIBUSB_ERROR_NOT_FOUND in
https://github.com/freebsd/freebsd/blob/master/lib/libusb/libusb10.c#L1547

I can test any patch you propose to fix the issue.

-- 
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