All of lore.kernel.org
 help / color / mirror / Atom feed
* Revert "usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers"
@ 2017-12-06 14:35 Minas Harutyunyan
  0 siblings, 0 replies; only message in thread
From: Minas Harutyunyan @ 2017-12-06 14:35 UTC (permalink / raw)
  To: Felipe Balbi, linux-usb; +Cc: John Youn, Minas Harutyunyan

This reverts commit ad674a15249e7d800162858e49272877a782ec40 "usb: dwc2:
gadget: use ep->fifo_index in context of FIFO registers".

DTXFSTSn indexation based on EP number not TxFIFO number.

Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
---
 drivers/usb/dwc2/gadget.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 8cecd3e1d5ae..86bf42a99807 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -538,8 +538,7 @@ 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->fifo_index));
+		can_write = dwc2_readl(hsotg->regs + DTXFSTS(hs_ep->index));
 
 		can_write &= 0xffff;
 		can_write *= 4;
@@ -3165,7 +3164,7 @@ static void kill_all_requests(struct dwc2_hsotg *hsotg,
 
 	if (!hsotg->dedicated_fifos)
 		return;
-	size = (dwc2_readl(hsotg->regs + DTXFSTS(ep->fifo_index)) & 0xffff) * 4;
+	size = (dwc2_readl(hsotg->regs + DTXFSTS(ep->index)) & 0xffff) * 4;
 	if (size < ep->fifo_size)
 		dwc2_hsotg_txfifo_flush(hsotg, ep->fifo_index);
 }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-06 14:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 14:35 Revert "usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers" Minas Harutyunyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.