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

Skip to content
Commit 04204d7a authored by Mayank Rana's avatar Mayank Rana Committed by Udipto Goswami
Browse files

dwc3-msm: Increment req->num_trbs on queueing TRB



BAM endpoint TRB ring has usage of 2 TRBs (normal and LINK), and
completion API (dwc3_msm_req_complete_func()) currently only
increments dequeue pointer by 1 assuming that dwc3_gadget_giveback()
does increment dequeue pointer for normal TRB. With newer changes
in dwc3 gadget framework, it moves requests to cancelled list with
usb_ep_dequeue() and reclaim those TRBs on end transfer command
completion. Reclaiming TRB back to trb pool is done only when
req->num_trbs is non zero. dwc3_msm_ep_queue() API checks for
enqueue and dequeue pointers, and on mismatch of it error out.
This results into no BAM2BAM communication after trying to use USB
as sink with QDSS usecase. Fix this issue by incrementing req->num_trbs
with dwc3_msm_ep_queue() API for normal TRB so dequeue pointer is
incremented with dwc3_gadget_ep_cleanup_cancelled_requests() API.

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