From nobody Mon Jun 23 07:40:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bQg4C1yr5z5ywK5; Mon, 23 Jun 2025 07:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bQg4C15j9z47rN; Mon, 23 Jun 2025 07:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750664459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EonVS5qfcksv3a7AK/4SY67PU1P8sXMI/+Fx/PzLK3E=; b=V56UTjOt5QAZ8GM+PhwUpqNjwMTqNRQU9RYxhcwfhvxobSLxy8iiLb5+2BPnVPZyX7pLYy ILdZQ5IC3zXaoGfI3iQFOTWMjD1W78knlq5fk8M61kAcncIO/LF4zhf5Sz0ZLEa6uvRpGA OGaiq8gfGz9asRaADGtPw6ieHS1M7/GthYHOjWYg+qJgxgLYh+7QKuTDOEtvKxjJqnYdsF mRX2E2vnbnzejsDaz2p8ebfntWi64ZyAnkw6x1KIAoWbItc/WJKTPXE4I4xpfztXH/u646 9WK5DmVMAKEarsxsciqsP2AdzaWVcNz/nmVO7g+9Ph6IVTm0Y5RDF3So50WiaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750664459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EonVS5qfcksv3a7AK/4SY67PU1P8sXMI/+Fx/PzLK3E=; b=wz/zNbJ6MurITceUMcgH6CONebcM6fz2A8Sse6qYidC3LdyDQY++Hr8lQFMtCyRmuYmfqe 2AVRn5R2B/Ax+cPaQioNJvlUXEb/XqdtQlm/8vZntOX/wKkFu6DoV7QwaVl569mXZ6IyLF zLAa/x8+b7xB+8RHJj2dZXPsHi+oci94VspsQ/I9GGMl6bLe4O2z7hsxZqaurzLABNPyd3 2QbILJcNS88KoqS2TvDHZjJRjk47VHnlwc9wEe5ZqHq+w4amRFX9SmaUF5p1kbQPv87D2d XVlqAx3R61zUK8N94N6uUw35s9OCr2wSswaJIaMuczMulWEWhCT7oTjL7MAZoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750664459; a=rsa-sha256; cv=none; b=tSwtI2GcONm4LpO6fn+s1zzGTtz+FqNqfMBsiiouaBNx81IiXdBYa2ah9a7QARw4u+90As mCGc4OKai/ePAnJ6F9CNiElprYcRPuriClUS7Vlreat05382j7EstKz7FKgNzz0HQVE89F TUT52ctMR0a5hnV70aBSRFw778Bx2JyJLQ+Ud/1jypkMqq9HDZpFc9hzgw6ok2y+96aFnB vWfcliO5Xzt41jaD13Mr2rKP7yEsiuU22TaW5sqz5ZNPjNVI7f2c45Jh5kGvFUGcSDrtBy 6CjFIGW1WX/Afv/i0dn42irvAhYkD/iafis6t6bR7ZQS9VMhA6rK9NSht3YvzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bQg4C0hhcztkZ; Mon, 23 Jun 2025 07:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55N7ewrj064902; Mon, 23 Jun 2025 07:40:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55N7ewso064899; Mon, 23 Jun 2025 07:40:58 GMT (envelope-from git) Date: Mon, 23 Jun 2025 07:40:58 GMT Message-Id: <202506230740.55N7ewso064899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 05275cf75a19 - stable/14 - libusb: add SUPER_PLUS in speed enum. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 05275cf75a19e9f5919bf0a2ee86b5b946d0dc07 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=05275cf75a19e9f5919bf0a2ee86b5b946d0dc07 commit 05275cf75a19e9f5919bf0a2ee86b5b946d0dc07 Author: SHENGYI HUNG AuthorDate: 2025-05-15 10:30:45 +0000 Commit: Baptiste Daroussin CommitDate: 2025-06-23 07:40:33 +0000 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 (cherry picked from commit f938c0a90313125a9518307e80ca92d4c71f7745) --- lib/libusb/libusb.3 | 2 +- lib/libusb/libusb.h | 1 + lib/libusb/libusb01.c | 2 ++ lib/libusb/libusb10.c | 5 +++++ lib/libusb/libusb20.3 | 1 + lib/libusb/libusb20.h | 1 + usr.sbin/usbconfig/dump.c | 2 ++ 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3 index fe07e86623c8..1ca0e677d96f 100644 --- a/lib/libusb/libusb.3 +++ b/lib/libusb/libusb.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 26, 2023 +.Dd May 16, 2025 .Dt LIBUSB 3 .Os .Sh NAME diff --git a/lib/libusb/libusb.h b/lib/libusb/libusb.h index 732fc9dca1e0..cdac94b17c64 100644 --- a/lib/libusb/libusb.h +++ b/lib/libusb/libusb.h @@ -216,6 +216,7 @@ enum libusb_speed { LIBUSB_SPEED_FULL = 2, LIBUSB_SPEED_HIGH = 3, LIBUSB_SPEED_SUPER = 4, + LIBUSB_SPEED_SUPER_PLUS = 5, }; enum libusb_transfer_status { diff --git a/lib/libusb/libusb01.c b/lib/libusb/libusb01.c index 7017016693af..f246e74353a6 100644 --- a/lib/libusb/libusb01.c +++ b/lib/libusb/libusb01.c @@ -130,6 +130,8 @@ usb_get_transfer_by_ep_no(usb_dev_handle * dev, uint8_t ep_no) bufsize = 4096; } else if (speed == LIBUSB20_SPEED_SUPER) { bufsize = 65536; + } else if (speed == LIBUSB20_SPEED_SUPER_PLUS) { + bufsize = 131072; } else { bufsize = 16384; } diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 5564bfd8b499..f8912b5c47cb 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -437,6 +437,8 @@ libusb_get_device_speed(libusb_device *dev) return (LIBUSB_SPEED_HIGH); case LIBUSB20_SPEED_SUPER: return (LIBUSB_SPEED_SUPER); + case LIBUSB20_SPEED_SUPER_PLUS: + return (LIBUSB_SPEED_SUPER_PLUS); default: break; } @@ -1066,6 +1068,9 @@ libusb10_get_buffsize(struct libusb20_device *pdev, libusb_transfer *xfer) case LIBUSB20_SPEED_SUPER: ret = 65536; break; + case LIBUSB20_SPEED_SUPER_PLUS: + ret = 131072; + break; default: ret = 16384; break; diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3 index 1d07db8f32a4..7854b0f8ed7e 100644 --- a/lib/libusb/libusb20.3 +++ b/lib/libusb/libusb20.3 @@ -858,6 +858,7 @@ returns the current speed of the given USB device. .It LIBUSB20_SPEED_HIGH .It LIBUSB20_SPEED_VARIABLE .It LIBUSB20_SPEED_SUPER +.It LIBUSB20_SPEED_SUPER_PLUS .El . .Pp diff --git a/lib/libusb/libusb20.h b/lib/libusb/libusb20.h index 7bca2f7508c7..c132c58a9f69 100644 --- a/lib/libusb/libusb20.h +++ b/lib/libusb/libusb20.h @@ -159,6 +159,7 @@ enum { LIBUSB20_SPEED_HIGH, LIBUSB20_SPEED_VARIABLE, LIBUSB20_SPEED_SUPER, + LIBUSB20_SPEED_SUPER_PLUS, }; /** \ingroup misc diff --git a/usr.sbin/usbconfig/dump.c b/usr.sbin/usbconfig/dump.c index 2a4a5300efeb..10ff2125853e 100644 --- a/usr.sbin/usbconfig/dump.c +++ b/usr.sbin/usbconfig/dump.c @@ -100,6 +100,8 @@ dump_speed(uint8_t value) return ("VARIABLE (52-480Mbps)"); case LIBUSB20_SPEED_SUPER: return ("SUPER (5.0Gbps)"); + case LIBUSB20_SPEED_SUPER_PLUS: + return ("SUPER+(10-20Gbps)"); default: break; }