linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Youn <johnyoun@synopsys.com>
To: John Youn <johnyoun@synopsys.com>
To: Felipe Balbi <balbi@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-usb@vger.kernel.org
To: linux-kernel@vger.kernel.org
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Robert Baldyga <r.baldyga@samsung.com>
Subject: [PATCH 1/6] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers
Date: Mon, 29 Aug 2016 13:38:50 -0700	[thread overview]
Message-ID: <bbca7304030c4264c3d3f738ffab62e8d7cdf051.1472502978.git.johnyoun@synopsys.com> (raw)
In-Reply-To: <cover.1472502978.git.johnyoun@synopsys.com>

From: Robert Baldyga <r.baldyga@samsung.com>

In context of FIFO registers we use ep->fifo_index instead of ep->index.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
---
 drivers/usb/dwc2/gadget.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index af46adf..f6086d6 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -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);
 }
-- 
2.9.0

  reply	other threads:[~2016-08-29 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 20:38 [PATCH 0/6] usb: dwc2: gadget: Fix TX FIFO handling John Youn
2016-08-29 20:38 ` John Youn [this message]
2016-08-29 20:38 ` [PATCH 2/6] usb: dwc2: gadget: fix TX FIFO size and address initialization John Youn
2016-08-29 20:38 ` [PATCH 3/6] usb: dwc2: gadget: change variable name to more meaningful John Youn
2016-08-29 20:38 ` [PATCH 4/6] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable() John Youn
2016-08-29 20:39 ` [PATCH 5/6] usb: dwc2: gadget: free TX FIFO after killing requests John Youn
2016-08-29 20:39 ` [PATCH 6/6] Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size John Youn
2016-09-02 14:41   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bbca7304030c4264c3d3f738ffab62e8d7cdf051.1472502978.git.johnyoun@synopsys.com \
    --to=johnyoun@synopsys.com \
    --cc=r.baldyga@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).