From nobody Mon Jun 22 13:54:34 2026 X-Original-To: dev-commits-src-main@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 4gkV7G2Cyyz6hFfB for ; Mon, 22 Jun 2026 13:54:34 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gkV7G1lW3z41rN for ; Mon, 22 Jun 2026 13:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782136474; 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=BgoD91ay0odIORbpqoodYe2/7SOFob4xV24WAM/hfRs=; b=CwH34FLBNcMxWDinod9UGJhzUtInowykiAiysR6tVEHz2RUDBr5EK9WXR8bTYDj7rqtz+F ZGWyT26M2QBD210sef4gW+hLg01QE9Mc79liC3vrgb5bfbf/dam7OgK5+LAbbsY3vmwrCV DK4k7JwRO7uB6m0HDZdVh3zW1isWHoK9RbBs1aFfvMgwaW6qEzFDw7rD9/cRSiqPdO7653 G1OyRxIxpIDp9wIstAi6yCfiv+oaXT+iuwJHVkvYT5ISeQ4+P9OrgsbHCEDvoqMyXL9R+s y4vf/HOdmf6EQz3pMPbEceDK/lapjDXRKapBJiFWB2ZvxPqwnk5AqqNrlCEl3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782136474; a=rsa-sha256; cv=none; b=YwMn0PeQqERwKK+HJpG0sT+B4RGs6ETjbhFCYXuoy2AKcnRNy/kYQG6plzapZkxTbgAUEO gWdguezlmf3PJwyILHy8ZndQKIlDWvdSG7YGVchQX/ecr+ifvtMvkXvnO0//QLry48bYwL s779qgq79GnWNmY3xM1QaMuU/ejUyU29iel+mGhlV1FQqb2BEkkp4qQZ8kAtK9hiz6R0gc 7zznSh+Xz9E6nT6lW+vW3emmDYYDwc0uE7FbNmWtPW4h9//aeZTPD8QWhzipoWJl+ZABt5 lZU9NWVmDd+r8zlu4GpCJp7vi6C4t6dAw4oC2vu1XLMed4trMhu3GuJ70ew3TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782136474; 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=BgoD91ay0odIORbpqoodYe2/7SOFob4xV24WAM/hfRs=; b=L6dhcoQDWrpRPbk6az8+1pm66afCG+iSD0wtMhnV6oVOhT8QPqZr4IFlG597YtmebX+NoY mKvV/MiMMbvSA6sa0rsjab1ywI8tG3nO8xqRsgYGEPfKEorQi6gM4jHCpxXgp7hGMlsJe+ H9H+mWzd+0P5KDClCKrn9QV1fpJFuW1jzP6Fdw/WA75MW1slKJeLXnKZmdR5oqCcFP7L2v Vp6FjpFHzB5IfD57pL9BUJXM0YPmqi+uRtKmfCx8b0Qg3sgqjVteVeWZxYamRDZfEyT+eL ZlcZZzJ9yc0CcSqvX139vwUeThT2dzdvPgc4trgly7eurM8UOgJMQSLYs30Whg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gkV7G0DwJzqSv for ; Mon, 22 Jun 2026 13:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cf40 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 22 Jun 2026 13:54:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 1a8701e2e9a9 - main - libusb: Implement libusb20_tr_get_flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a8701e2e9a97cabb18ed58d236382796d7f7aa7 Auto-Submitted: auto-generated Date: Mon, 22 Jun 2026 13:54:34 +0000 Message-Id: <6a393e9a.3cf40.4d94b099@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=1a8701e2e9a97cabb18ed58d236382796d7f7aa7 commit 1a8701e2e9a97cabb18ed58d236382796d7f7aa7 Author: ShengYi Hung AuthorDate: 2026-06-11 15:39:44 +0000 Commit: ShengYi Hung CommitDate: 2026-06-22 13:54:31 +0000 libusb: Implement libusb20_tr_get_flags Reviewed by: adrian, bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57543 --- lib/libusb/Makefile | 1 + lib/libusb/libusb20.3 | 11 +++++++++++ lib/libusb/libusb20.c | 6 ++++++ lib/libusb/libusb20.h | 1 + 4 files changed, 19 insertions(+) diff --git a/lib/libusb/Makefile b/lib/libusb/Makefile index 89cf600236cc..f11083c94c86 100644 --- a/lib/libusb/Makefile +++ b/lib/libusb/Makefile @@ -194,6 +194,7 @@ MLINKS += libusb20.3 libusb20_tr_get_actual_length.3 MLINKS += libusb20.3 libusb20_tr_get_max_frames.3 MLINKS += libusb20.3 libusb20_tr_get_max_packet_length.3 MLINKS += libusb20.3 libusb20_tr_get_max_total_length.3 +MLINKS += libusb20.3 libusb20_tr_get_flags.3 MLINKS += libusb20.3 libusb20_tr_get_status.3 MLINKS += libusb20.3 libusb20_tr_pending.3 MLINKS += libusb20.3 libusb20_tr_callback_wrapper.3 diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3 index a5213b1aa187..f2405e90ce7a 100644 --- a/lib/libusb/libusb20.3 +++ b/lib/libusb/libusb20.3 @@ -62,6 +62,8 @@ USB access library (libusb -lusb) .Ft uint32_t .Fn libusb20_tr_get_max_total_length "struct libusb20_transfer *xfer" .Ft uint8_t +.Fn libusb20_tr_get_flags "struct libusb20_transfer *xfer" +.Ft uint8_t .Fn libusb20_tr_get_status "struct libusb20_transfer *xfer" .Ft uint8_t .Fn libusb20_tr_pending "struct libusb20_transfer *xfer" @@ -359,6 +361,15 @@ bound to. . .Pp . +.Fn libusb20_tr_get_flags +will return the transfer flags of an USB transfer. +. +Flag values are defined by a set of LIBUSB20_TRANSFER_XXX enums and can +be set using +.Fn libusb20_tr_set_flags . +. +.Pp +. .Fn libusb20_tr_get_status will return the status of an USB transfer. . diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c index 7b443e236cc2..2cd8a6ea7037 100644 --- a/lib/libusb/libusb20.c +++ b/lib/libusb/libusb20.c @@ -370,6 +370,12 @@ libusb20_tr_set_flags(struct libusb20_transfer *xfer, uint8_t flags) return; } +uint8_t +libusb20_tr_get_flags(struct libusb20_transfer *xfer) +{ + return (xfer->flags); +} + uint32_t libusb20_tr_get_length(struct libusb20_transfer *xfer, uint16_t frIndex) { diff --git a/lib/libusb/libusb20.h b/lib/libusb/libusb20.h index a9bb3ec1647e..6a95042eda44 100644 --- a/lib/libusb/libusb20.h +++ b/lib/libusb/libusb20.h @@ -214,6 +214,7 @@ uint32_t libusb20_tr_get_actual_length(struct libusb20_transfer *xfer); uint32_t libusb20_tr_get_max_frames(struct libusb20_transfer *xfer); uint32_t libusb20_tr_get_max_packet_length(struct libusb20_transfer *xfer); uint32_t libusb20_tr_get_max_total_length(struct libusb20_transfer *xfer); +uint8_t libusb20_tr_get_flags(struct libusb20_transfer *xfer); uint8_t libusb20_tr_get_status(struct libusb20_transfer *xfer); uint8_t libusb20_tr_pending(struct libusb20_transfer *xfer); void libusb20_tr_callback_wrapper(struct libusb20_transfer *xfer);