提交 6f8245b4 编写于 作者: F Felipe Balbi

usb: dwc3: gadget: always decrement by 1

We need to decrement in both cases (enq > deq and
enq < deq)
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 696fe69d
......@@ -884,12 +884,9 @@ static u32 dwc3_calc_trbs_left(struct dwc3_ep *dep)
return DWC3_TRB_NUM - 1;
}
trbs_left = dep->trb_dequeue - dep->trb_enqueue;
trbs_left = dep->trb_dequeue - dep->trb_enqueue - 1;
trbs_left &= (DWC3_TRB_NUM - 1);
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.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部