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

Commit 363b019b authored by Tarun Gupta's avatar Tarun Gupta
Browse files

USB: f_mass_storage.c: Send CSW with correct residue



Incase the data size reported from host is more than
the data received in CBW, CSW hack may send residue
zero. But there might still be data left over from
host to be procssed.

If CSW hack is sent with residue zero, fill pointer
may get stuck to throw away data. Incase of multiple
LUNs, host may issue another command at this time.
This command gets stuck forever, because the buffer
head pointer is still not moved to next and the
throw away data is still not cleared.

Reporting correct residue in this particular case
will resolve the issue with command being stuck and
host also does not report it to be a residue mismatch.

CRs-Fixed: 699965
Change-Id: Ic921e561bb2747c4853ddda832abca6d7f4c5c1e
Signed-off-by: default avatarSujeet Kumar <ksujeet@codeaurora.org>
Signed-off-by: default avatarTarun Gupta <tarung@codeaurora.org>
parent a60b3733
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