From: Marek Vasut Date: Tue, 3 May 2016 22:51:20 +0200 Subject: [U-Boot] [PATCH 7/7] usb: hub: Increase the query delay In-Reply-To: <1462308680-9366-1-git-send-email-marex@denx.de> References: <1462308680-9366-1-git-send-email-marex@denx.de> Message-ID: <1462308680-9366-7-git-send-email-marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Increase the query delay, otherwise some sticks are not detected. The problem shows up on the USB bus analyzer such that the stick takes longer time to switch from FS mode to HS mode than the code allows. Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Cc: Hans de Goede Cc: Stefan Roese Cc: Stephen Warren --- common/usb_hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index 0f39c9f..6cd274a 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -145,7 +145,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub) * Do a minimum delay of the larger value of 100ms or pgood_delay * so that the power can stablize before the devices are queried */ - hub->query_delay = get_timer(0) + max(100, (int)pgood_delay); + hub->query_delay = get_timer(0) + max(1000, (int)pgood_delay); /* * Record the power-on timeout here. The max. delay (timeout) -- 2.7.0