[USBHUB] Add a delay hack for USB boot

CORE-7826
This commit is contained in:
Victor Perevertkin 2020-12-20 18:23:43 +03:00
parent 6f389a35db
commit d14d7e5b8c
No known key found for this signature in database
GPG key ID: C750B7222E9C7830

View file

@ -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;
}