From nobody Thu May 15 18:31:10 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 4ZyzLR0X2kz5wk80; Thu, 15 May 2025 18:31:11 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZyzLQ6vkDz3NLV; Thu, 15 May 2025 18:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747333871; 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=lLM0kQ2cj4zpFE9zDwo49setWmI7lKjgFmjcHpDNWHo=; b=AoMBwJwlaFf7LWd4uuUrZgJSC3M5Gf6mrii2XRDWW3/juCQshPOePx365X8MuB4FqEfkXK kEkOUHB/qQi93rJSCk+I8LwpjmMvmAEp7NKfs4EoPbAGU2cU//ZCTdGY6bet4GjVa3ccas aRnZDcE2NffyKHoPFKzrL3bpXvCowBjD5c6waWrp4xUQjArGnptxEilVdTN8VL6C8X7rbl i38BlpK1YOFi2OAF33OhW/SKIQ45n8C284kus9fZiRSZ2ws3GU5mbXtFYPJnonA+/qVDM9 Y7zXn+dgNwXUoZleT1At5deuYA5DgrKRsqB2FwVvIp0n215N8DCf3BXjhqj5uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747333871; 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=lLM0kQ2cj4zpFE9zDwo49setWmI7lKjgFmjcHpDNWHo=; b=NV81eiFdiYTVBsbChpJIM4e1MOdE6YfI63CxQtIzHf7df6coeqYjfkJBDPh6CbXOS74cu4 qI99/azwgCHY6Ogr6ni7o68gaub0vmH2wBJnglgOC4qBI/ZBAOs/tbM8TJbk/VrHbPItku XN6tpPjOQ58eVOc2188OCh4dCtM7ezmbYtIZ/X/8rfyMT/GR0ipVFaxRIkUR8fAH7K4PWT 0I9apBe/emEG8ZnSDYwAtB+qCC9F0MSAgmwAQ+mW+v4U2BJf7kzGKGIYfaO7qLGZXZ/y75 55yhBEPq1KZTAzcAhY08YPw4e+raWoBj26lsxeAwQZsS6eeby0fKVOPYYe7rww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747333871; a=rsa-sha256; cv=none; b=T+Jt7n8yii6FszGrQonSArkZB/dqRz4+1CpmM3+CeAIRnTmuuyVBAxjRxDoxdcDD8IbQdI VMbJwEZCEjVXXhIvZ1gvFdw9Ka7yzy669b8jMFhOzkBEqjewNrah3tuwMbrgoe5BAfPVFx DKKwEL1ILMbcyNfECdyjZQwQ0mdO6vaajB/XqT0klam3VUomzrqX+pJonZk2EhNMzcds5T v510mYbCGWNNsJg/Npn8qZ2ut126yNoLb4DnGkGwnoSFI5N3U527pXkWfIoMhpT7jzMvDU ot3z/ElqR/EVm7ykJ+XKEKVuMT37YmFTFpxK9vT7dMtJzfY/Z0Fl1Lwz13f6kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZyzLQ6WMZzDR6; Thu, 15 May 2025 18:31:10 +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 54FIVAfY021740; Thu, 15 May 2025 18:31:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54FIVA0p021737; Thu, 15 May 2025 18:31:10 GMT (envelope-from git) Date: Thu, 15 May 2025 18:31:10 GMT Message-Id: <202505151831.54FIVA0p021737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: f938c0a90313 - main - 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/main X-Git-Reftype: branch X-Git-Commit: f938c0a90313125a9518307e80ca92d4c71f7745 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=f938c0a90313125a9518307e80ca92d4c71f7745 commit f938c0a90313125a9518307e80ca92d4c71f7745 Author: SHENGYI HUNG AuthorDate: 2025-05-15 10:30:45 +0000 Commit: Baptiste Daroussin CommitDate: 2025-05-15 18:30:32 +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 --- 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 679f4e64b5f6..b442a1f489a0 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -445,6 +445,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; } @@ -1074,6 +1076,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; }