XHCI: Adjust timeouts in WaitOpBits.

Operations that succeed should not take longer; ones that fail will.

Should get rid of ControllerReset() failed CMD_HCRST.

Change-Id: I4981a319bd64a076f2f404214a96d9909f0676de
Reviewed-on: https://review.haiku-os.org/c/1135
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Greg Crain
2019-03-03 17:41:49 +00:00
committed by waddlesplash
parent 2e1e3f0d75
commit 695f50f6cc
+2 -2
View File
@@ -2531,10 +2531,10 @@ XHCI::WaitOpBits(uint32 reg, uint32 mask, uint32 expected)
while ((value & mask) != expected) {
snooze(1000);
value = ReadOpReg(reg);
if (loops == 25) {
if (loops == 100) {
TRACE("delay waiting on reg 0x%" B_PRIX32 " match 0x%" B_PRIX32
" (0x%" B_PRIX32 ")\n", reg, expected, mask);
} else if (loops > 100) {
} else if (loops > 250) {
TRACE_ERROR("timeout waiting on reg 0x%" B_PRIX32
" match 0x%" B_PRIX32 " (0x%" B_PRIX32 ")\n", reg, expected,
mask);