mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
usbhost: Fix function address generation for multi-port root hubs.
Devices connected to the same USB bus should have unique function addresses. This was not true for root hubs with multiple ports. After this change, enumeration is more reliable on the sama5d3-xplained board when both root hub ports are used. This change amounts to using one usbhost_devaddr_s object per root hub instead of one per root hub port. For the majority of boards only one root hub port is available so no change in behavior should be expected.
This commit is contained in:
committed by
Alin Jerpelea
parent
4ed48c33e9
commit
d66282a893
@@ -734,7 +734,7 @@ struct usbhost_roothubport_s
|
||||
*/
|
||||
|
||||
struct usbhost_hubport_s hport; /* Common hub port definitions */
|
||||
struct usbhost_devaddr_s devgen; /* Address generation data */
|
||||
struct usbhost_devaddr_s *pdevgen; /* Address generation data pointer */
|
||||
};
|
||||
|
||||
/* struct usbhost_class_s provides access from the USB host driver to the
|
||||
|
||||
@@ -81,14 +81,15 @@ struct usbhost_roothubport_s; /* Forward reference */
|
||||
* hub port.
|
||||
*
|
||||
* Input Parameters:
|
||||
* rhport - A reference to a roothubport structure.
|
||||
* devgen - A reference to a usbhost_devaddr_s structure.
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
* On success, zero (OK) is returned. On a failure, a negated errno value
|
||||
* is returned indicating the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void usbhost_devaddr_initialize(FAR struct usbhost_roothubport_s *rhport);
|
||||
int usbhost_devaddr_initialize(FAR struct usbhost_devaddr_s *devgen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbhost_devaddr_create
|
||||
|
||||
Reference in New Issue
Block a user