From: Bin Meng Date: Wed, 19 Jul 2017 13:51:18 +0000 (+0800) Subject: usb: hub: Call usb_update_hub_device() after hub descriptor is fetched X-Git-Tag: v2017.09-rc1~32^2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=81060bb1c02abb242b73f118ce297dbe483a40f7;p=u-boot 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 Reviewed-by: Simon Glass --- diff --git a/common/usb_hub.c b/common/usb_hub.c index bbb1155089..70bc6e2931 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -788,6 +788,17 @@ static int usb_hub_configure(struct usb_device *dev) "" : "no "); #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