Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544656

[PATCH RFT] usb: dwc2: gadget: Fix fifo size configuration

From Stefan Wahren <stefan.wahren@i2se.com>
Newsgroups linux.kernel
Subject [PATCH RFT] usb: dwc2: gadget: Fix fifo size configuration
Date 2016-12-19 17:40 +0100
Message-ID <sQ98J-1Te-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Currently the upper limit for the endpoint index during fifo size
config was always 16 instead of the available endpoints. So fix this
by using the determined amount of endpoints and avoid a warning about
"insufficient fifo memory" on bcm2835 which has only 8 endpoints.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: 0a176279db68 ("usb: dwc2: gadget: configure fifos from device tree")
---
 drivers/usb/dwc2/gadget.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Since revert of ("usb: dwc2: gadget: fix TX FIFO size and address") which
caused regressions on some platforms this is the second attempt to fix
gadget support for bcm2835.

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index b95930f..b00184c 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -228,7 +228,7 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
 	 * them to endpoints dynamically according to maxpacket size value of
 	 * given endpoint.
 	 */
-	for (ep = 1; ep < MAX_EPS_CHANNELS; ep++) {
+	for (ep = 1; ep < hsotg->num_of_eps; ep++) {
 		if (!txfsz[ep])
 			continue;
 		val = addr;
-- 
1.7.9.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH RFT] usb: dwc2: gadget: Fix fifo size configuration Stefan Wahren <stefan.wahren@i2se.com> - 2016-12-19 17:40 +0100
  Re: [PATCH RFT] usb: dwc2: gadget: Fix fifo size configuration Sevak Arakelyan <SEVAK.ARAKELYAN@synopsys.com> - 2016-12-20 14:00 +0100
    Re: [PATCH RFT] usb: dwc2: gadget: Fix fifo size configuration Stefan Wahren <stefan.wahren@i2se.com> - 2016-12-20 15:30 +0100
      Re: [PATCH RFT] usb: dwc2: gadget: Fix fifo size configuration Sevak Arakelyan <SEVAK.ARAKELYAN@synopsys.com> - 2016-12-20 17:00 +0100

csiph-web