From 695f50f6cc551a29335f69753fb897ce4ca43908 Mon Sep 17 00:00:00 2001 From: Greg Crain Date: Sat, 2 Mar 2019 13:14:54 +0000 Subject: [PATCH] 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 --- src/add-ons/kernel/busses/usb/xhci.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/xhci.cpp b/src/add-ons/kernel/busses/usb/xhci.cpp index ce9f4f4fff..395e6a1a40 100644 --- a/src/add-ons/kernel/busses/usb/xhci.cpp +++ b/src/add-ons/kernel/busses/usb/xhci.cpp @@ -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);