Page MenuHomeFreeBSD

libusb: implement zlp flag in libusb transfer
Needs ReviewPublic

Authored by aokblast on Wed, Aug 6, 12:58 PM.
Tags
None
Referenced Files
F126997414: D51759.id.diff
Tue, Aug 26, 11:04 AM
F126989587: D51759.id159849.diff
Tue, Aug 26, 9:08 AM
Unknown Object (File)
Mon, Aug 25, 9:07 PM
Unknown Object (File)
Mon, Aug 25, 12:36 PM
Unknown Object (File)
Mon, Aug 25, 10:41 AM
Unknown Object (File)
Mon, Aug 25, 8:12 AM
Unknown Object (File)
Sat, Aug 23, 1:40 AM
Unknown Object (File)
Thu, Aug 21, 4:46 PM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The USB protocol defines a Zero-Length Packet (ZLP) to signal the end of
a transfer when the data size is an exact multiple of the Maximum Packet
Size (MPS). Without a ZLP in such cases, the device may not be able to
determine that the transfer has completed.

This flag is added to libusb to allow the user send a ZLP in the end
of libusb_xfer.

Diff Detail

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

Event Timeline

Send packet only the multiple of packet

defer zlp check until we can find the xfer

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

should we use libusb20_tr_get_max_packet_length() or libusb20_tr_get_max_total_length()?