Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fd212c5d authored by Jack Pham's avatar Jack Pham
Browse files

usb: gadget: f_fs: Align epout buf size to wMaxPacketSize



DWC3 controller requires epout to have its OUT buffer size rounded up
to MaxPacketSize. Since this can vary between 512 and 1024 depending
on whether it is connected in high- or super-speed, set it based on
the EP descriptor.

This bug came up in high-speed connections when a bulk out transfer
of a multiple of 512 bytes is sent, but the transactions were
incorrectly queued in 1024 byte increments. This resulted in the
terminating zero-length packet sent by the host to not get handled by
the controller correctly, causing userspace read() to block indefinitely.

Change-Id: If89b9b29f20627bde9c482268ff12c8182c262c1
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 416e5ce5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment