Skip to content
Snippets Groups Projects
Commit 289f3cb2 authored by Vivek Gautam's avatar Vivek Gautam Committed by Marek Vasut
Browse files

usb: hub: Fix enumration timeout


Patch b6d7852c increases timeout for enumeration, taking
worst case to be 10 sec.
get_timer() api returns timestamp in milliseconds, which is
what we are checking in the do-while() loop in usb_hub_configure()
(get_timer(start) < CONFIG_SYS_HZ * 10).
This should give us a required check for 10 seconds, and thereby
we don't need to add additional mdelay of 100 microseconds in
each cycle.

Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
Reviewed-by: default avatarVipin Kumar <vipin.kumar@st.com>
parent 99c3491b
No related branches found
No related tags found
No related merge requests found
......@@ -443,7 +443,6 @@ static int usb_hub_configure(struct usb_device *dev)
(portstatus & USB_PORT_STAT_CONNECTION))
break;
mdelay(100);
} while (get_timer(start) < CONFIG_SYS_HZ * 10);
if (ret < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment