All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: dwc2: gadget: Fix fifo size configuration
@ 2016-12-19 15:42 Stefan Wahren
  0 siblings, 0 replies; only message in thread
From: Stefan Wahren @ 2016-12-19 15:42 UTC (permalink / raw)
  To: John Youn, Greg Kroah-Hartman
  Cc: Felipe Balbi, Razmik Karapetyan, Vardan Mikayelyan,
	Heiko Stuebner, Michael Niewoehner, Dinh Nguyen, linux-usb,
	linux-kernel, Stefan Wahren

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(-)

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

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

only message in thread, other threads:[~2016-12-19 15:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 15:42 [PATCH] usb: dwc2: gadget: Fix fifo size configuration Stefan Wahren

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.