linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Baldyga <r.baldyga@samsung.com>
To: balbi@ti.com, johnyoun@synopsys.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
	b.zolnierkie@samsung.com, Robert Baldyga <r.baldyga@samsung.com>
Subject: [PATCH v2 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers
Date: Wed, 03 Feb 2016 12:36:30 +0100	[thread overview]
Message-ID: <1454499394-4610-2-git-send-email-r.baldyga@samsung.com> (raw)
In-Reply-To: <1454499394-4610-1-git-send-email-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>
---
 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 422ab7d..0d0f6fe 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -369,7 +369,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;
@@ -2172,7 +2173,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);
 }
-- 
1.9.1

  reply	other threads:[~2016-02-03 11:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 11:36 [PATCH v2 0/5] usb: dwc2: gadget: Fix TX FIFO handling Robert Baldyga
2016-02-03 11:36 ` Robert Baldyga [this message]
2016-02-04 12:25   ` [PATCH v2 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers Vahram Aharonyan
2017-01-09  8:13     ` Morgan Chang
2016-02-03 11:36 ` [PATCH v2 2/5] usb: dwc2: gadget: fix TX FIFO size and address initialization Robert Baldyga
2016-02-04 13:07   ` Vahram Aharonyan
2016-02-03 11:36 ` [PATCH v2 3/5] usb: dwc2: gadget: change variable name to more meaningful Robert Baldyga
2016-02-03 11:36 ` [PATCH v2 4/5] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable() Robert Baldyga
2016-02-03 11:36 ` [PATCH v2 5/5] usb: dwc2: gadget: free TX FIFO after killing requests Robert Baldyga

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=1454499394-4610-2-git-send-email-r.baldyga@samsung.com \
    --to=r.baldyga@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnyoun@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@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).