diff options
author | Liav A <liavalb@gmail.com> | 2022-02-11 18:57:08 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-12 12:04:31 +0100 |
commit | 0881a7be8d7931df81c8b8444c926231ec3355d9 (patch) | |
tree | 8d1359c37548c47cd002f002b73c3be8188f2063 | |
parent | 506c13d143c985a269bfb35d6b937cb1b12a5a00 (diff) | |
download | serenity-0881a7be8d7931df81c8b8444c926231ec3355d9.zip |
Kernel: Increase delay and attempts count when checking i8042 existence
-rw-r--r-- | Kernel/Devices/HID/I8042Controller.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Devices/HID/I8042Controller.cpp b/Kernel/Devices/HID/I8042Controller.cpp index 8b5b0379d1..b6253e3e30 100644 --- a/Kernel/Devices/HID/I8042Controller.cpp +++ b/Kernel/Devices/HID/I8042Controller.cpp @@ -36,14 +36,14 @@ UNMAP_AFTER_INIT bool I8042Controller::check_existence(Badge<HIDManagement>) { SpinlockLocker lock(m_lock); // Note: Perform controller self-test before touching the controller - // Try to probe the controller for 5 times and give up if nothing + // Try to probe the controller for 10 times and give up if nothing // responded. - for (int attempt = 0; attempt < 5; attempt++) { + for (int attempt = 0; attempt < 10; attempt++) { do_write(I8042Port::Command, I8042Command::TestPS2Controller); if (do_read(I8042Port::Buffer) == I8042Response::ControllerTestPassed) return true; - // Note: Wait 50 microseconds in case the controller couldn't respond - IO::delay(50); + // Note: Wait 500 microseconds in case the controller couldn't respond + IO::delay(500); } dbgln("I8042: Trying to probe for existence of controller failed"); return false; |