mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
UPSTREAM: 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.
Change-Id: Iff6b518e286d095a8be50551e2caba52cedbfab7
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit ad674a1524)
This commit is contained in:
committed by
Tao Huang
parent
8fe85bac11
commit
cf74f8dc0e
@@ -388,7 +388,8 @@ static int dwc2_hsotg_write_fifo(struct dwc2_hsotg *hsotg,
|
||||
return -ENOSPC;
|
||||
}
|
||||
} 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 *= 4;
|
||||
@@ -2432,7 +2433,7 @@ static void kill_all_requests(struct dwc2_hsotg *hsotg,
|
||||
|
||||
if (!hsotg->dedicated_fifos)
|
||||
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)
|
||||
dwc2_hsotg_txfifo_flush(hsotg, ep->fifo_index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user