提交 87e1dcd4 编写于 作者: P Peter Chen 提交者: Felipe Balbi

usb: cdns3: gadget: add CHAIN and ISP bit for sg list use case

For sg buffer list use case, we need to add ISP for each TRB, and
add CHAIN bit for each TRB except for the last TRB.
Signed-off-by: NPeter Chen <peter.chen@nxp.com>
Signed-off-by: NFelipe Balbi <balbi@kernel.org>
上级 4e218882
...@@ -1220,8 +1220,14 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, ...@@ -1220,8 +1220,14 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
else else
priv_req->trb->control = cpu_to_le32(control); priv_req->trb->control = cpu_to_le32(control);
if (sg_supported) if (sg_supported) {
trb->control |= TRB_ISP;
/* Don't set chain bit for last TRB */
if (sg_iter < num_trb - 1)
trb->control |= TRB_CHAIN;
s = sg_next(s); s = sg_next(s);
}
control = 0; control = 0;
++sg_iter; ++sg_iter;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册