提交 ad674a15 编写于 作者: R Robert Baldyga 提交者: Felipe Balbi

usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers

In context of FIFO registers we use ep->fifo_index instead of ep->index.
Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 da7b895d
...@@ -388,7 +388,8 @@ static int dwc2_hsotg_write_fifo(struct dwc2_hsotg *hsotg, ...@@ -388,7 +388,8 @@ static int dwc2_hsotg_write_fifo(struct dwc2_hsotg *hsotg,
return -ENOSPC; return -ENOSPC;
} }
} else if (hsotg->dedicated_fifos && hs_ep->index != 0) { } else if (hsotg->dedicated_fifos && hs_ep->index != 0) {
can_write = dwc2_readl(hsotg->regs + DTXFSTS(hs_ep->index)); can_write = dwc2_readl(hsotg->regs +
DTXFSTS(hs_ep->fifo_index));
can_write &= 0xffff; can_write &= 0xffff;
can_write *= 4; can_write *= 4;
...@@ -2432,7 +2433,7 @@ static void kill_all_requests(struct dwc2_hsotg *hsotg, ...@@ -2432,7 +2433,7 @@ static void kill_all_requests(struct dwc2_hsotg *hsotg,
if (!hsotg->dedicated_fifos) if (!hsotg->dedicated_fifos)
return; return;
size = (dwc2_readl(hsotg->regs + DTXFSTS(ep->index)) & 0xffff) * 4; size = (dwc2_readl(hsotg->regs + DTXFSTS(ep->fifo_index)) & 0xffff) * 4;
if (size < ep->fifo_size) if (size < ep->fifo_size)
dwc2_hsotg_txfifo_flush(hsotg, ep->fifo_index); dwc2_hsotg_txfifo_flush(hsotg, ep->fifo_index);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册