提交 7d0a038b 编写于 作者: J John Youn 提交者: Felipe Balbi

usb: dwc3: gadget: Account for link TRB in TRBs left

The TRBs left calculation didn't account for the link TRB taking up one
spot.

If the trb_dequeue < trb_enqueue, then the result includes the link
TRB slot so it must be adjusted.
Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 32db3d94
......@@ -868,6 +868,9 @@ static u32 dwc3_calc_trbs_left(struct dwc3_ep *dep)
trbs_left = dep->trb_dequeue - dep->trb_enqueue;
trbs_left %= DWC3_TRB_NUM;
if (dep->trb_dequeue < dep->trb_enqueue)
trbs_left--;
return trbs_left;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册