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:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment