https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d14d7e5b8cb18e0db32d5…
commit d14d7e5b8cb18e0db32d58cb2bec654d8abdb75d
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sun Dec 20 18:23:43 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Wed Jan 27 05:15:15 2021 +0300
[USBHUB] Add a delay hack for USB boot
CORE-7826
---
drivers/usb/usbhub/pnp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/usbhub/pnp.c b/drivers/usb/usbhub/pnp.c
index e7203027cf0..c16fc287c69 100644
--- a/drivers/usb/usbhub/pnp.c
+++ b/drivers/usb/usbhub/pnp.c
@@ -1063,6 +1063,13 @@ USBH_FdoQueryBusRelations(IN PUSBHUB_FDO_EXTENSION HubExtension,
if (!(HubExtension->HubFlags & USBHUB_FDO_FLAG_DO_ENUMERATION))
{
+ // FIXME: this delay makes devices discovery during early boot more reliable
+ LARGE_INTEGER Interval;
+ Status = STATUS_SUCCESS;
+ IoInvalidateDeviceRelations(HubExtension->LowerPDO, BusRelations);
+ Interval.QuadPart = -10000LL * 1000; // 1 sec.
+ KeDelayExecutionThread(KernelMode, FALSE, &Interval);
+
DPRINT_ENUM("USBH_FdoQueryBusRelations: Skip enumeration\n");
goto RelationsWorker;
}