From 43c19037bb8a8a09a774026dbe965e0a0f0e55c2 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 23 Apr 2015 09:42:58 -0600 Subject: [PATCH] Fix USB hub bugs: Don't allocate port EP0 until needed, otherwise run out of endpoints; using wrong pointer to access child endpoint array in a few places --- arch/arm/src/lpc17xx/lpc17_usbhost.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 02bb5947c88..10e38a5a1c1 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -3154,13 +3154,13 @@ struct usbhost_connection_s *lpc17_usbhost_initialize(int controller) /* Initialize the public port representation */ - hport = &priv->rhport.hport; - hport->drvr = drvr; + hport = &priv->rhport.hport; + hport->drvr = drvr; #ifdef CONFIG_USBHOST_HUB - hport->parent = NULL; + hport->parent = NULL; #endif - hport->ep0 = EDCTRL; - hport->speed = USB_SPEED_FULL; + hport->ep0 = EDCTRL; + hport->speed = USB_SPEED_FULL; /* Initialize function address generation logic */