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

Skip to content
Commit 9d4ff1fb authored by Jack Pham's avatar Jack Pham Committed by Vamsi Krishna
Browse files

usb: dwc3: gadget: Fix TRB chaining for SG requests



In dwc3_prepare_trbs() when handling requests with scatter-gather
enabled, we must make sure to perform the check of whether the
request is the last one in the list *before* looping over the
scatterlist. This is because the dwc3_prepare_one_trb() call has
a side effect of moving the request to the req_queued list, so
after that point checking if it's still in the request_list is
invalid. This causes the last TRB to not have either its last
or chain bits set when queueing to the hardware which can result
in the function driver not getting any completion notification
of the queued request.

Change-Id: If3dbd068cef0cf0e66255dc8bc8fa45a1ee85b0c
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent f645d398
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