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

This commit is contained in:
Gregory Nutt
2015-04-23 09:42:58 -06:00
parent 299addc958
commit 43c19037bb
+5 -5
View File
@@ -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 */