History log of /src/lib/libusb/libusb.3 (Results 1 – 25 of 139)
Revision Date Author Comments
# 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 ...


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


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


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


# b74aaa1a 16-Oct-2024 Graham Percival <gperciva@tarsnap.com>

manuals: Fix dates

These were reported by `mandoc -T lint ...` as warnings.

Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne
MFC after: 3 days
Sponsored by: Tarsnap Backup

manuals: Fix dates

These were reported by `mandoc -T lint ...` as warnings.

Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne
MFC after: 3 days
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1475

show more ...


# fa9896e0 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line nroff pattern

Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/


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


# c6879c6c 23-Oct-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r339015 through r339669.


# 882764c1 11-Oct-2018 Mateusz Piotrowski <0mp@FreeBSD.org>

libusb(3): Update the link to the libusb homepage.

While here, pet mandoc & igor.

Reviewed by: bcr, hselasky
Approved by: re (kib), krion (mentor, implicit), mat (mentor, implicit)
Differential Rev

libusb(3): Update the link to the libusb homepage.

While here, pet mandoc & igor.

Reviewed by: bcr, hselasky
Approved by: re (kib), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17516

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


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


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


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


123456