From 256f5ce7d1e56ef1046234c3d2308f6d0a35594a Mon Sep 17 00:00:00 2001 From: Sasirekaa Madhesu Date: Wed, 28 Feb 2018 10:42:02 +0530 Subject: [PATCH] ipq40xx: Fix for USB 3.0 detection During usb start, all the hub initialization happens, before scanning the bus for devices. In DK, bus 0 has 2 NbrPorts and bus 1 has 1 NbrPorts. Since there are two ports(USB0 and USB1) available, such initialization overwrites the NbrPorts of the hub descriptor. Hence it fails to detect the USB 3.0. This patch modifies the logic to scan for devices in the hub before initializing the next hub. Change-Id: I1071d7c38a896864fe15d8b07bdb2a84ddcac7bf Signed-off-by: Sasirekaa Madhesu --- drivers/usb/host/usb-uclass.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 50538e0bd7..ec8b403215 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -252,13 +252,12 @@ int usb_init(void) } controllers_initialized++; usb_started = true; - } - /* - * lowlevel init done, now scan the bus for devices i.e. search HUBs - * and configure them, first scan primary controllers. - */ - uclass_foreach_dev(bus, uc) { + /* + * lowlevel init done, now scan the bus for devices i.e. search HUBs + * and configure them, first scan primary controllers. + */ + if (!device_active(bus)) continue;