summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2015-03-06 17:58:21 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:42 -0700
commit0071b357da5fbad68189ca7a47cde5a6bdb75e33 (patch)
treea4abec750976599537d522e03f374887437d3520 /include
parent4e32ea8f3b6aed0d9479355342deb63434fe2950 (diff)
usb: dwc3: gadget: Fix calculation of request.actual for SG
When a request completes, cleanup_done_trbs() tries to calculate request.actual by subtracting the TRB remainder from the original request.length, but does not account for scatter-gather requests that queued multiple TRBs. In this case, the request.length field may be used by the function to keep track of the aggregate length of all the provided SG entries, and thus will produce an incorrect request.actual. Instead, for scatter-gather, to find the pre-transfer buffer length of each TRB, get the length field of each SG entry. Then the number of bytes transfered can be correctly determined as the difference between that and the bytes remaining in the TRB. Change-Id: I4c197462ce5b804c9d684240e95c35b532976220 Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions