From ebdb2a844f00aeb442965e0f0a8f31f374c72383 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Thu, 18 Feb 2016 22:03:06 +0100 Subject: [PATCH] Disable PS/2 port testing. This is reportedly a problem with some emulated PS/2 controllers. glauxosdever reported his computer responds 0x50 0x00 instead of just 0x00. OpenBSD has commented out this check in sys/dev/ic/pckbc.c, claiming it's a problem with some controllers and that some might even hang. I doubt not testing ports is going to be a problem, as the identitication code runs next and verifies devices and all relevant modern hardware probably has this working well enough. --- kernel/x86-family/ps2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/x86-family/ps2.cpp b/kernel/x86-family/ps2.cpp index fa1bc691..8dbebe9d 100644 --- a/kernel/x86-family/ps2.cpp +++ b/kernel/x86-family/ps2.cpp @@ -284,6 +284,7 @@ void Init(PS2Device* keyboard, PS2Device* mouse) } bool port_1 = true; bool port_2 = dual; +#if 0 // Disabled due to some emulated PS/2 controllers not handling this well. if ( port_1 ) { if ( !TryWriteCommand(REG_COMMAND_TEST_FIRST_PORT) || @@ -298,6 +299,7 @@ void Init(PS2Device* keyboard, PS2Device* mouse) return; port_2 = byte == 0x00; } +#endif size_t port_1_resp_size = 0; uint8_t port_1_resp[2]; if ( port_1 && !DetectDevice(1, port_1_resp, &port_1_resp_size) )