From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932265AbcH2Uiz (ORCPT ); Mon, 29 Aug 2016 16:38:55 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60895 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751223AbcH2Uix (ORCPT ); Mon, 29 Aug 2016 16:38:53 -0400 X-Sasl-enc: UPLbrrPn2hmghacXvk61c04YpE1IJRsr9edymfsbAKCk 1472503131 Date: Mon, 29 Aug 2016 13:38:50 -0700 Message-Id: In-Reply-To: References: From: John Youn To: John Youn To: Felipe Balbi To: Greg Kroah-Hartman To: linux-usb@vger.kernel.org To: linux-kernel@vger.kernel.org To: Stefan Wahren Cc: Robert Baldyga Subject: [PATCH 1/6] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Baldyga In context of FIFO registers we use ep->fifo_index instead of ep->index. Signed-off-by: Robert Baldyga Signed-off-by: John Youn --- 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