diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-07-19 13:51:18 (GMT) |
---|---|---|
committer | Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> | 2017-08-08 08:42:23 (GMT) |
commit | ec6ae08af891c52b0541e28a5bc960f0898f1849 (patch) | |
tree | 4937d526bdd2b333d818d09b3656a8550216d258 /common | |
parent | c4a5c1226b2b84f3a0d5b40cebb15393e8f39589 (diff) | |
download | u-boot-ec6ae08af891c52b0541e28a5bc960f0898f1849.tar.xz |
usb: hub: Call usb_update_hub_device() after hub descriptor is fetched
After fetching hub descriptor, we need to call USB uclass operation
update_hub_device() to notify HCD to do some preparation work.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/usb_hub.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c index bbb1155..70bc6e2 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -789,6 +789,17 @@ static int usb_hub_configure(struct usb_device *dev) #ifdef CONFIG_DM_USB /* + * Update USB host controller's internal representation of this hub + * after the hub descriptor is fetched. + */ + ret = usb_update_hub_device(dev); + if (ret < 0 && ret != -ENOSYS) { + debug("%s: failed to update hub device for HCD (%x)\n", + __func__, ret); + return ret; + } + + /* * A maximum of seven tiers are allowed in a USB topology, and the * root hub occupies the first tier. The last tier ends with a normal * USB device. USB 3.0 hubs use a 20-bit field called 'route string' |