mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[HDAUDBUS] Add a timeout into HDA_SendVerbs
This function may stuck during device installation if there are issues with interrupts (or with a device itself). This fixes the boot on my testing ThinkPad x60s
This commit is contained in:
parent
da4ee18cc9
commit
48b3c61b5d
1 changed files with 14 additions and 5 deletions
|
@ -176,11 +176,20 @@ HDA_SendVerbs(
|
|||
|
||||
while (Queued--)
|
||||
{
|
||||
KeWaitForSingleObject(&Codec->ResponseSemaphore,
|
||||
Executive,
|
||||
KernelMode,
|
||||
FALSE,
|
||||
NULL);
|
||||
LARGE_INTEGER Timeout;
|
||||
Timeout.QuadPart = -1000LL * 10000; // 1 sec
|
||||
|
||||
NTSTATUS waitStatus = KeWaitForSingleObject(&Codec->ResponseSemaphore,
|
||||
Executive,
|
||||
KernelMode,
|
||||
FALSE,
|
||||
&Timeout);
|
||||
|
||||
if (waitStatus == STATUS_TIMEOUT)
|
||||
{
|
||||
DPRINT1("HDA_SendVerbs: timeout! Queued: %u\n", Queued);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Responses != NULL) {
|
||||
|
|
Loading…
Reference in a new issue