dwc3: Fix USB TRB ring initialization in BAM2BAM case
With unexpected TRB ring initialization USB BAM2BAM functionality
stalls. Hence use trb_enqueue as index to get TRB from TRB pool
to initialize TRB ring for BAM2BAM case.
CRs-Fixed: 2064160
Change-Id: I1cfbb9985fa5c9f1c56f2636e0e2bf7e7f3bec73
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index df0427c..5b1d581 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -164,12 +164,12 @@ static void dwc3_ep_inc_trb(u8 *index)
*index = 0;
}
-static void dwc3_ep_inc_enq(struct dwc3_ep *dep)
+void dwc3_ep_inc_enq(struct dwc3_ep *dep)
{
dwc3_ep_inc_trb(&dep->trb_enqueue);
}
-static void dwc3_ep_inc_deq(struct dwc3_ep *dep)
+void dwc3_ep_inc_deq(struct dwc3_ep *dep)
{
dwc3_ep_inc_trb(&dep->trb_dequeue);
}