#
9ca85565 |
| 09-Jul-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_hotplug_get_user_data
libusb provides a function to get the callback userdata for a given callback since this structure is opaque to libusb user.
Approved by: markj (men
libusb: implement libusb_hotplug_get_user_data
libusb provides a function to get the callback userdata for a given callback since this structure is opaque to libusb user.
Approved by: markj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51223
show more ...
|
Revision tags: release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2 |
|
#
4981b896 |
| 20-Jun-2025 |
SHENGYI HUNG <aokblast@FreeBSD.org> |
libusb: consider bad fd as a broken event
Application can use libusb_get_pollfds to get pollfds from libusb then close the fd themselves. This cause the hotplug thread unable to leave because it wil
libusb: consider bad fd as a broken event
Application can use libusb_get_pollfds to get pollfds from libusb then close the fd themselves. This cause the hotplug thread unable to leave because it will be consider as a invalid event then loop forever instead of a broken event that should be quit immediately.
Reviewed by: bapt Sponsored by: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50959
show more ...
|
#
4acd63a6 |
| 12-Jun-2025 |
SHENGYI HUNG <aokblast@FreeBSD.org> |
libusb: Fix netlink sysevent multicast group name
Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D50739
|
Revision tags: release/14.3.0 |
|
#
d2852659 |
| 05-May-2025 |
SHENGYI HUNG <aokblast@FreeBSD.org> |
libusb: Emit event after deregistering hotplug handler
The original implementation did not emit an event when a hotplug handler was deregistered. This omission causes issues for programs that follow
libusb: Emit event after deregistering hotplug handler
The original implementation did not emit an event when a hotplug handler was deregistered. This omission causes issues for programs that follow the best practices recommended by libusb—particularly those that use `libusb_hotplug_register_callback()` or similar functions in a loop while managing hotplug handlers dynamically.
Without emitting an event after deregistration, these programs can become stuck waiting indefinitely for an event that will never come, as the condition to break out of the wait loop is never satisfied.
See: https://github.com/libusb/libusb/blob/6c0ae1ab456da49e7805115e77ce0428ace4ea41/libusb/hotplug.c#L459
Reviewed by: bapt Sponsored By: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50170
show more ...
|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3 |
|
#
a92ce195 |
| 16-Jan-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
libusb: use the new snl_get_genl_mcast_group
|
#
9dc96d8b |
| 04-Jan-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
libusb: hotplug, use events instead of a timer when possible
Try to fetch events from nlsysevent or devd to determine when to scan the usb bus for devices addition or removal. if none are available
libusb: hotplug, use events instead of a timer when possible
Try to fetch events from nlsysevent or devd to determine when to scan the usb bus for devices addition or removal. if none are available fallback on the regular timer based (4s) scanner
if devd socket or netlink socket is closed or error fallback on the timer based method.
Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D48300
show more ...
|
#
ba5834b8 |
| 03-Jan-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
libusb: fix hotplug sigbus
When a hotplug callback has been registered, and the program using libusb is calling libusb_exit then the thread handler is set to NO_THREAD which result in the variable c
libusb: fix hotplug sigbus
When a hotplug callback has been registered, and the program using libusb is calling libusb_exit then the thread handler is set to NO_THREAD which result in the variable controlling the loop the be set to 0, it does a last pass through device available without having done a scan, which result in a sigbus after it tried to unregister all the devices.
directly break the loop instead and cleanup the list of devices
this fixes the tests with LGPLed libusb's hotplugtest program
MFC After: 3 days Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D48298
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
2a63c3be |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0 |
|
#
59abbffa |
| 31-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357270 through r357349.
|
#
cca46c5e |
| 30-Jan-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Add missing mutex unlock in failure case.
Differential Revision: https://reviews.freebsd.org/D23430 Submitted by: cem Reported by: Coverity Coverity CID: 1368773 MFC after: 3 days Sponsored by: Mell
Add missing mutex unlock in failure case.
Differential Revision: https://reviews.freebsd.org/D23430 Submitted by: cem Reported by: Coverity Coverity CID: 1368773 MFC after: 3 days Sponsored by: Mellanox Technologies
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7f49ce7a |
| 28-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349476
Sponsored by: The FreeBSD Foundation
|
#
a5b24a2b |
| 26-Jun-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Only call libusb_hotplug_enumerate() once from libusb_hotplug_register_callback(). Else when registering multiple filters the same USB device may appear twice in the list.
MFC after: 3 days Sponsore
Only call libusb_hotplug_enumerate() once from libusb_hotplug_register_callback(). Else when registering multiple filters the same USB device may appear twice in the list.
MFC after: 3 days Sponsored by: Mellanox Technologies
show more ...
|
#
a41b0ec1 |
| 26-Jun-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Fix support for LIBUSB_HOTPLUG_ENUMERATE in libusb. Currently all devices are enumerated regardless of of the LIBUSB_HOTPLUG_ENUMERATE flag. Make sure when the flag is not specified no arrival events
Fix support for LIBUSB_HOTPLUG_ENUMERATE in libusb. Currently all devices are enumerated regardless of of the LIBUSB_HOTPLUG_ENUMERATE flag. Make sure when the flag is not specified no arrival events are generated for currently enumerated devices.
MFC after: 3 days Sponsored by: Mellanox Technologies
show more ...
|
Revision tags: release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0 |
|
#
7bdc064b |
| 22-Jun-2016 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Implement libusb_hotplug_register_callback() and libusb_hotplug_deregister_callback() for the LibUSB v1.0 API and update the libusb(3) manual page.
Approved by: re (kib) Requested by: swills MFC aft
Implement libusb_hotplug_register_callback() and libusb_hotplug_deregister_callback() for the LibUSB v1.0 API and update the libusb(3) manual page.
Approved by: re (kib) Requested by: swills MFC after: 1 week
show more ...
|