| #
20056f0e
|
| 11-Jul-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_get_platform_descriptor
This adds a function introduced in libusb 1.0.27 to parse platform-specific USB descriptors, enabling access to vendor- or OS-specific information.
libusb: implement libusb_get_platform_descriptor
This adds a function introduced in libusb 1.0.27 to parse platform-specific USB descriptors, enabling access to vendor- or OS-specific information.
Approved by: lwhsu (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51242
show more ...
|
| #
315dec5c
|
| 05-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: Add missing misc class in LIBUSB_CLASS
Reviewed by: emaste Approved by: markj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.fr
libusb: Add missing misc class in LIBUSB_CLASS
Reviewed by: emaste Approved by: markj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51738
show more ...
|
| #
87206568
|
| 05-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_wrap_sys_device
The libusb_wrap_sys_device function can wrap an opened fd from the system into a libusb handler. However, in FreeBSD's libusb implementation, a USB device co
libusb: implement libusb_wrap_sys_device
The libusb_wrap_sys_device function can wrap an opened fd from the system into a libusb handler. However, in FreeBSD's libusb implementation, a USB device contains two fds: one for control transfers and another for normal (bulk, interrupt, isochronous) transfers.
This design makes it impossible for FreeBSD to implement this function without exposing a different structure in libusb.h to provide two fds. Therefore, we return LIBUSB_ERROR_NOT_SUPPORTED to maintain API compatibility.
Approved by: makrj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51739
show more ...
|
| #
b0d5c1cf
|
| 05-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_pollfds_handle_timeouts
This function tells applications who maintain the pollfds themselves if they should handle the timeout for each xfer themselves. In FreeBSD, the time
libusb: implement libusb_pollfds_handle_timeouts
This function tells applications who maintain the pollfds themselves if they should handle the timeout for each xfer themselves. In FreeBSD, the timeout for each xfer is handled by kernel and doesn't need a special timer to do so. Therefore, we return 1 to indicate that it is handled by libusb internally.
Approved by: lwhsu (mentor), markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51742
show more ...
|
| #
c43a8504
|
| 05-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: add libusb_supported_speed enum
Approved by: lwhsu (mentor), markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51743
|
| #
8ddbb5e8
|
| 05-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: add libusb_usb_2_0_extension_attributes
Approved by: lwhsu (mentor), markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51745
|
| #
2525f9f8
|
| 06-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: add missing function signature to header
Approved by: markj (mentor), lwhsu (mentor) Fixes: 3eda34934097 ("libusb: implement libusb_fill_bulk_stream_transfer") Sponsored by: The FreeBSD
libusb: add missing function signature to header
Approved by: markj (mentor), lwhsu (mentor) Fixes: 3eda34934097 ("libusb: implement libusb_fill_bulk_stream_transfer") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51754
show more ...
|
| #
3eda3493
|
| 09-Jul-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_fill_bulk_stream_transfer
Bulk streams are essentially bulk transfers with a stream ID. All requirements from both libusb20 and the kernel are already handled; we just need
libusb: implement libusb_fill_bulk_stream_transfer
Bulk streams are essentially bulk transfers with a stream ID. All requirements from both libusb20 and the kernel are already handled; we just need to set the stream ID.
Approved by: markj (mentor), lwhsu(mentor) Differential Revision: https://reviews.freebsd.org/D51226
show more ...
|
| #
776e26f5
|
| 09-Jul-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_dev_mem_{alloc,free}
libusb provides an API to create DMA buffers for USB packets from the kernel. However, this feature is only available on Linux. On unsupported platforms
libusb: implement libusb_dev_mem_{alloc,free}
libusb provides an API to create DMA buffers for USB packets from the kernel. However, this feature is only available on Linux. On unsupported platforms, the allocation function returns NULL, and the free function returns 'not supported'.
Approved by: markj (mentor), lwhsu(mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51222
show more ...
|
| #
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 ...
|
| #
1c675fb3
|
| 09-Jul-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_free_pollfds
libusb provides an API that frees the storage for pollfds regardless of their contents. It does not check whether the file descriptors inside are already closed
libusb: implement libusb_free_pollfds
libusb provides an API that frees the storage for pollfds regardless of their contents. It does not check whether the file descriptors inside are already closed.
Approved by: markj (mentor), lwhsu(mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51221
show more ...
|
| #
99d5cf25
|
| 12-Jun-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_setlocale to support different locale of error message
Upstream libusb identifies languages using only the first two characters of the language code. We adopt the same appro
libusb: implement libusb_setlocale to support different locale of error message
Upstream libusb identifies languages using only the first two characters of the language code. We adopt the same approach to maintain API compatibility.
Currently, only English and Mandarin are supported, as other languages are not yet implemented.
Reviewed by: kevans Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50820
show more ...
|
| #
bca5df45
|
| 04-Jun-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: replace LOG_LEVEL with DEBUG_LEVEL
The libusb set debug level by libusb_log_level instead of libusb_debug_level. We switch to libusb_log_level for better compatibility with the upstream libu
libusb: replace LOG_LEVEL with DEBUG_LEVEL
The libusb set debug level by libusb_log_level instead of libusb_debug_level. We switch to libusb_log_level for better compatibility with the upstream libusb.
Additionally, The upstream libusb has an option allows user to override the log function with a user-defined callback. To support the callback function with a single string without va_arg, we refactor the log facility as a function instead of a macro and parse all va_args inside.
The legacy debug_level enum has been removed to enforce maintainer migrate from their deprecated source code.
Reviewed by: kevans Approved by: markj (mentor), lwhsu (mentor) MFC after: 2 weeks Sponsored by: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50680
show more ...
|
| #
f84a0da4
|
| 07-Jun-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: rename bNumDeviceCapabilities to bNumDeviceCaps for compatibility with libusb
THe member bNumDeviceCapabilities is referred to as bNumDeviceCaps in the upstream libusb project.
To improve c
libusb: rename bNumDeviceCapabilities to bNumDeviceCaps for compatibility with libusb
THe member bNumDeviceCapabilities is referred to as bNumDeviceCaps in the upstream libusb project.
To improve compatibility, we are renaming the member accordingly.
For backward compatibility, a mocro will be defined to map bNumDeviceCapabilities to bNumDeviceCaps.
See: https://github.com/libusb/libusb/commit/02ebafc85d3f219842cbabaf78abc8100b6656e5
Reviewed by: kevans Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50740
show more ...
|
| #
4c556a4e
|
| 12-Jun-2025 |
Aymeric Wibo <obiwac@gmail.com> |
libusb: implement `libusb_get_parent`
Newer versions of drivers such as libwacom (graphics tablets) or libfprint (fingerprint scanners) call g_usb_device_get_parent. This in turn calls libusb_get_p
libusb: implement `libusb_get_parent`
Newer versions of drivers such as libwacom (graphics tablets) or libfprint (fingerprint scanners) call g_usb_device_get_parent. This in turn calls libusb_get_parent on platforms which implement it, and returns NULL on platforms that don't. This patch implements this function on FreeBSD.
Reviewed by: bapt, kevans Differential Revision: https://reviews.freebsd.org/D46992
show more ...
|
| #
f938c0a9
|
| 15-May-2025 |
SHENGYI HUNG <aokblast@FreeBSD.org> |
libusb: add SUPER_PLUS in speed enum.
Summary: Some application(like usbmuxd) start to use LIBUSB_SPEED_SUPER_PLUS now. Though we don't have the corresponding infra in kernel right now, it is harmle
libusb: add SUPER_PLUS in speed enum.
Summary: Some application(like usbmuxd) start to use LIBUSB_SPEED_SUPER_PLUS now. Though we don't have the corresponding infra in kernel right now, it is harmless to have this enum value in userspace to prevent the compile error
Reviewed By: bapt Sponsored By: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50359
show more ...
|
| #
2a3a8eb9
|
| 12-Jan-2024 |
Ting-Hsuan Huang <felixhuang07@gmail.com> |
libusb(3): Fix link in comment
Event: Advanced UNIX Programming Course (Fall’23) at NTHU. Pull Request: https://github.com/freebsd/freebsd-src/pull/1042
|
| #
2a63c3be
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
4c6bcffd
|
| 26-Jan-2023 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
libusb(3): Implement libusb_init_context() and the needed structures and definitions.
Differential Revision: https://reviews.freebsd.org/D38212 MFC after: 1 week Sponsored by: NVIDIA Networking
|
| #
aa87aa52
|
| 02-Oct-2022 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
libusb(3): Implement libusb_interrupt_event_handler() by exposing existing function.
MFC after: 1 week Sponsored by: NVIDIA Networking
|
| #
04391da3
|
| 09-Jun-2020 |
Kyle Evans <kevans@FreeBSD.org> |
libusb: improve compatibility
Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API. Descriptions and functionality for these derived from the documentation at [0]. The current
libusb: improve compatibility
Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API. Descriptions and functionality for these derived from the documentation at [0]. The current set of capabilities are all supported by libusb.
These were detected as missing after updating net/freerdp to 2.1.1, which attempted to use both.
[0] http://libusb.sourceforge.net/api-1.0/group__libusb__misc.html
Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25194
show more ...
|
| #
20056f0e
|
| 11-Jul-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_get_platform_descriptor
This adds a function introduced in libusb 1.0.27 to parse platform-specific USB descriptors, enabling access to vendor- or OS-specific information.
libusb: implement libusb_get_platform_descriptor
This adds a function introduced in libusb 1.0.27 to parse platform-specific USB descriptors, enabling access to vendor- or OS-specific information.
Approved by: lwhsu (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51242
show more ...
|
| #
315dec5c
|
| 05-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: Add missing misc class in LIBUSB_CLASS
Reviewed by: emaste Approved by: markj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.fr
libusb: Add missing misc class in LIBUSB_CLASS
Reviewed by: emaste Approved by: markj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51738
show more ...
|
| #
87206568
|
| 05-Aug-2025 |
ShengYi Hung <aokblast@FreeBSD.org> |
libusb: implement libusb_wrap_sys_device
The libusb_wrap_sys_device function can wrap an opened fd from the system into a libusb handler. However, in FreeBSD's libusb implementation, a USB device co
libusb: implement libusb_wrap_sys_device
The libusb_wrap_sys_device function can wrap an opened fd from the system into a libusb handler. However, in FreeBSD's libusb implementation, a USB device contains two fds: one for control transfers and another for normal (bulk, interrupt, isochronous) transfers.
This design makes it impossible for FreeBSD to implement this function without exposing a different structure in libusb.h to provide two fds. Therefore, we return LIBUSB_ERROR_NOT_SUPPORTED to maintain API compatibility.
Approved by: makrj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51739
show more ...
|