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:Sujeet Kumar <ksujeet@codeaurora.org> Signed-off-by:
Tarun Gupta <tarung@codeaurora.org>
Loading
Please register or sign in to comment