mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
Don't use tsleep when cold booting. It is called before bus->use_polling
is initialised by usb_init. This might solve problems with some controllers not being initiliased properly, because a delay was effectively a tsleep that returned immediately. Approved by: jhk
This commit is contained in:
parent
16422b76f1
commit
3a119ee1e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57011
@ -302,7 +302,7 @@ usb_delay_ms(bus, ms)
|
||||
u_int ms;
|
||||
{
|
||||
/* Wait at least two clock ticks so we know the time has passed. */
|
||||
if (bus->use_polling)
|
||||
if (bus->use_polling || cold)
|
||||
delay((ms+1) * 1000);
|
||||
else
|
||||
tsleep(&ms, PRIBIO, "usbdly", (ms*hz+999)/1000 + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user