Skip to content

Commit 92e156b

Browse files
committed
Update to v1.0.29 (latest master)
Merge commit 'c373a82858749858f64faddc08019524979a4d56'
2 parents a63a7e4 + c373a82 commit 92e156b

File tree

10 files changed

+50
-23
lines changed

10 files changed

+50
-23
lines changed

libusb/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ Nancy Li
152152
Nia Alarie
153153
Nicholas Corgan
154154
Niklas Gürtler
155+
Oleksand Radovenchyk
155156
Omri Iluz
156157
Orhan aib Kavrakoglu
157158
Orin Eman

libusb/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
For detailed information about the changes below, please see the git log
22
or visit: http://log.libusb.info
33

4+
2025-06-01: v1.0.29
5+
* Fix regression on macOS leading to timeouts in enumeration
6+
* LIBUSB_API_VERSION bump for the new functions in 1.0.28
7+
* Fix xusb regression displaying wrong error on claim failure
8+
49
2025-03-18: v1.0.28
510
* New libusb_get_ssplus_usb_device_capability_descriptor API
611
for query of SuperSpeed+ Capability Descriptors

libusb/README

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# libusb
22

3-
[![Build Status](https://travis-ci.org/libusb/libusb.svg?branch=master)](https://travis-ci.org/libusb/libusb)
4-
[![Build Status](https://ci.appveyor.com/api/projects/status/xvrfam94jii4a6lw?svg=true)](https://ci.appveyor.com/project/LudovicRousseau/libusb)
5-
[![Coverity Scan Build Status](https://scan.coverity.com/projects/2180/badge.svg)](https://scan.coverity.com/projects/libusb-libusb)
6-
73
libusb is a library for USB device access from Linux, macOS,
84
Windows, OpenBSD/NetBSD, Haiku, Solaris userspace, and WebAssembly
95
via WebUSB.

libusb/examples/xusb.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -982,25 +982,23 @@ static int test_device(uint16_t vid, uint16_t pid)
982982
libusb_set_auto_detach_kernel_driver(handle, 1);
983983
for (iface = 0; iface < nb_ifaces; iface++)
984984
{
985-
int ret;
986-
987985
printf("\nKernel driver attached for interface %d: ", iface);
988-
ret = libusb_kernel_driver_active(handle, iface);
989-
if (ret == 0)
986+
r = libusb_kernel_driver_active(handle, iface);
987+
if (r == 0)
990988
printf("none\n");
991-
else if (ret == 1)
989+
else if (r == 1)
992990
printf("yes\n");
993-
else if (ret == LIBUSB_ERROR_NOT_SUPPORTED)
991+
else if (r == LIBUSB_ERROR_NOT_SUPPORTED)
994992
printf("(not supported)\n");
995993
else
996-
perr("\n Failed (error %d) %s\n", ret,
997-
libusb_strerror((enum libusb_error) ret));
994+
perr("\n Failed (error %d) %s\n", r,
995+
libusb_strerror((enum libusb_error) r));
998996

999997
printf("\nClaiming interface %d...\n", iface);
1000998
r = libusb_claim_interface(handle, iface);
1001999
if (r != LIBUSB_SUCCESS) {
1002-
perr(" Failed (error %d) %s\n", ret,
1003-
libusb_strerror((enum libusb_error) ret));
1000+
perr(" Failed (error %d) %s\n", r,
1001+
libusb_strerror((enum libusb_error) r));
10041002
}
10051003
}
10061004

libusb/libusb/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct list_head active_contexts_list;
9292
*
9393
* \section gettingstarted Getting Started
9494
*
95-
* To begin reading the API documentation, start with the Modules page which
95+
* To begin reading the API documentation, start with the Topics page which
9696
* links to the different categories of libusb's functionality.
9797
*
9898
* One decision you will have to make is whether to use the synchronous

libusb/libusb/descriptor.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,21 @@ struct internal_ssplus_capability_descriptor {
10351035
};
10361036
/// @endcond
10371037

1038+
/** \ingroup libusb_desc
1039+
* Get a SuperSpeedPlus USB Device Capability descriptor
1040+
*
1041+
* Since version 1.0.28, \ref LIBUSB_API_VERSION >= 0x0100010B
1042+
*
1043+
* \param ctx the context to operate on, or NULL for the default context
1044+
* \param dev_cap Device Capability descriptor with a bDevCapabilityType of
1045+
* \ref libusb_bos_type::LIBUSB_BT_SUPERSPEED_PLUS_CAPABILITY
1046+
* LIBUSB_BT_SUPERSPEED_PLUS_CAPABILITY
1047+
* \param ssplus_usb_device_cap output location for the SuperSpeedPlus USB Device
1048+
* Capability descriptor. Only valid if 0 was returned. Must be freed with
1049+
* libusb_free_ssplus_usb_device_capability_descriptor() after use.
1050+
* \returns 0 on success
1051+
* \returns a LIBUSB_ERROR code on error
1052+
*/
10381053
int API_EXPORTED libusb_get_ssplus_usb_device_capability_descriptor(
10391054
libusb_context *ctx,
10401055
struct libusb_bos_dev_capability_descriptor *dev_cap,
@@ -1102,6 +1117,17 @@ int API_EXPORTED libusb_get_ssplus_usb_device_capability_descriptor(
11021117
return LIBUSB_SUCCESS;
11031118
}
11041119

1120+
/** \ingroup libusb_desc
1121+
* Free a SuperSpeedPlus USB Device Capability descriptor obtained from
1122+
* libusb_get_ssplus_usb_device_capability_descriptor().
1123+
* It is safe to call this function with a NULL ssplus_usb_device_cap
1124+
* parameter, in which case the function simply returns.
1125+
*
1126+
* Since version 1.0.28, \ref LIBUSB_API_VERSION >= 0x0100010B
1127+
*
1128+
* \param ssplus_usb_device_cap the SuperSpeedPlus USB Device Capability descriptor
1129+
* to free
1130+
*/
11051131
void API_EXPORTED libusb_free_ssplus_usb_device_capability_descriptor(
11061132
struct libusb_ssplus_usb_device_capability_descriptor *ssplus_usb_device_cap)
11071133
{

libusb/libusb/libusb.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ typedef SSIZE_T ssize_t;
166166
* <li>libusb version 1.0.25: LIBUSB_API_VERSION = 0x01000109
167167
* <li>libusb version 1.0.26: LIBUSB_API_VERSION = 0x01000109
168168
* <li>libusb version 1.0.27: LIBUSB_API_VERSION = 0x0100010A
169+
* <li>libusb version 1.0.28: LIBUSB_API_VERSION = 0x0100010A
170+
* <li>libusb version 1.0.29: LIBUSB_API_VERSION = 0x0100010B
169171
* </ul>
170172
*/
171-
#define LIBUSB_API_VERSION 0x0100010A
173+
#define LIBUSB_API_VERSION 0x0100010B
172174

173175
/** \def LIBUSBX_API_VERSION
174176
* \ingroup libusb_misc

libusb/libusb/os/darwin_usb.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,12 +2131,11 @@ static int darwin_reenumerate_device (struct libusb_device_handle *dev_handle, b
21312131
struct timespec delay = {.tv_sec = 0, .tv_nsec = 1000};
21322132
nanosleep (&delay, NULL);
21332133

2134-
struct timespec now;
2134+
struct timespec now, delta;
21352135
usbi_get_monotonic_time(&now);
2136-
long delta_sec = now.tv_sec - start.tv_sec;
2137-
long delta_nsec = now.tv_nsec - start.tv_nsec;
2138-
unsigned long long elapsed_us = (unsigned long long)delta_sec * USEC_PER_SEC +
2139-
(unsigned long long)delta_nsec / 1000ULL;
2136+
TIMESPEC_SUB(&now, &start, &delta);
2137+
unsigned long long elapsed_us = (unsigned long long)delta.tv_sec * USEC_PER_SEC +
2138+
(unsigned long long)delta.tv_nsec / 1000ULL;
21402139

21412140
if (elapsed_us >= DARWIN_REENUMERATE_TIMEOUT_US) {
21422141
usbi_err (ctx, "darwin/reenumerate_device: timeout waiting for reenumerate");

libusb/libusb/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#define LIBUSB_MINOR 0
88
#endif
99
#ifndef LIBUSB_MICRO
10-
#define LIBUSB_MICRO 28
10+
#define LIBUSB_MICRO 29
1111
#endif
1212
#ifndef LIBUSB_NANO
1313
#define LIBUSB_NANO 0

libusb/libusb/version_nano.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define LIBUSB_NANO 11946
1+
#define LIBUSB_NANO 11953

0 commit comments

Comments
 (0)