XHCI: Allow commands to time out after 1s instead of stalling forever.
This seems to occur when trying to stop endpoints in certain scenarios, at least.
This commit is contained in:
@@ -2147,10 +2147,10 @@ XHCI::DoCommand(xhci_trb* trb)
|
|||||||
QueueCommand(trb);
|
QueueCommand(trb);
|
||||||
Ring(0, 0);
|
Ring(0, 0);
|
||||||
|
|
||||||
if (acquire_sem(fCmdCompSem) < B_OK) {
|
if (acquire_sem_etc(fCmdCompSem, 1, B_RELATIVE_TIMEOUT, 1 * 1000 * 1000) < B_OK) {
|
||||||
TRACE("Unable to obtain fCmdCompSem semaphore!\n");
|
TRACE("Unable to obtain fCmdCompSem!\n");
|
||||||
Unlock();
|
Unlock();
|
||||||
return B_ERROR;
|
return B_TIMED_OUT;
|
||||||
}
|
}
|
||||||
// eat up sems that have been released by multiple interrupts
|
// eat up sems that have been released by multiple interrupts
|
||||||
int32 semCount = 0;
|
int32 semCount = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user