Page MenuHomeFreeBSD

libusb: implement libusb_get_max_alt_packet_size
Needs ReviewPublic

Authored by aokblast on Jul 9 2025, 10:51 AM.
Tags
None
Referenced Files
F143900702: D51225.id.diff
Sun, Feb 1, 5:34 PM
F143894835: D51225.id158214.diff
Sun, Feb 1, 3:30 PM
F143873134: D51225.diff
Sun, Feb 1, 8:29 AM
F143869867: D51225.id158216.diff
Sun, Feb 1, 7:25 AM
Unknown Object (File)
Tue, Jan 27, 4:18 AM
Unknown Object (File)
Sat, Jan 24, 12:23 PM
Unknown Object (File)
Wed, Jan 21, 4:58 AM
Unknown Object (File)
Tue, Jan 20, 2:26 AM

Details

Reviewers
bapt
kevans
Group Reviewers
USB
manpages
Summary

The libusb has a function to calculate the size from given interface,
alt_setting, endpoint. Implementing it by refactoring the calculating
function for libusb_get_max_iso_packet_size.

Sponsored By: FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 66244
Build 63127: arc lint + arc unit

Event Timeline

Add missing parentheses in return

Rebase to main and fix potential error

lwhsu added inline comments.
lib/libusb/libusb10.c
642

pdconf seems leaked here.

662

for all the early return below, except the if (ret < 0), pdconf needs being free()'d?

lib/libusb/libusb.3
206

do you mean multiply the multiplier?

unitrunker_unitrunker.net added inline comments.
lib/libusb/libusb.3
203

Returns the packet size on success,