From: Bin Meng Date: Fri, 23 Jun 2017 02:54:29 -0700 Subject: [U-Boot] [PATCH 13/16] usb: hub: Call usb_update_hub_device() after hub descriptor is fetched In-Reply-To: <1498211673-18715-1-git-send-email-bmeng.cn@gmail.com> References: <1498211673-18715-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1498211673-18715-14-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de After fetching hub descriptor, we need call USB uclass operation update_hub_device() to notify HCD to do some preparation work. Signed-off-by: Bin Meng --- common/usb_hub.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/usb_hub.c b/common/usb_hub.c index 4911981..2fc544e 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -782,6 +782,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' -- 2.9.2