Use a more reasonable timeout of 1 second for synchronous USB requests.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24810 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-04-05 15:14:30 +00:00
parent 0e4edbeafa
commit b6b5de0741
+2 -2
View File
@@ -322,9 +322,9 @@ ControlPipe::SendRequest(uint8 requestType, uint8 request, uint16 value,
}
// the sem will be released in the callback after the result data was
// filled into the provided struct. use a 5 seconds timeout to avoid
// filled into the provided struct. use a 1 second timeout to avoid
// hanging applications.
if (acquire_sem_etc(transferResult->notify_sem, 1, B_RELATIVE_TIMEOUT, 5000000) < B_OK) {
if (acquire_sem_etc(transferResult->notify_sem, 1, B_RELATIVE_TIMEOUT, 1000000) < B_OK) {
TRACE_ERROR(("USB ControlPipe: timeout waiting for queued request to complete\n"));
delete_sem(transferResult->notify_sem);