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

Commit fc705cad authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: u_data_bridge: Fix handling of USB RX requests



This change handles below cases and improves performance:
1. If USB OUT request buffer is bigger than provided read buffer
from application, then data equal to read buffer is copied. This
results into data loss. Handle this case by making sure that
whole USB OUT request buffer is provided to application across
multiple read() call.

2. If read buffer size is greater than available data as part of
one USB OUT request buffer, then copy data from other USB OUT
request buffers until read buffer is filled completely.

Also reduce USB Tx/RX buffer size from PAGE_SIZE to 2048 bytes.
It also fixes issue where USB RX requests are not being queued
after USB composition switch.

Change-Id: I8ec0e0e09dba853dd2b8dba078549ab52e5c4ce2
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent a93872da
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