From db2c22633f3c761975d8f469a0e195d8b79e1287 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 26 May 2021 17:33:29 -0500 Subject: [PATCH] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Recent model Chromebooks only return ACK, but not BAT_SUCCESS, which causes hanging and failed ps2k init. To mitigate this, make the absence of BAT_SUCCESS reply non-fatal, and reduce the no-reply timeout from 4s to 1s. Tested on google/dracia and purism/librem_14 Acked-by: Hao A Wu Reviewed-by: Ray Ni Signed-off-by: Sean Rhodes Signed-off-by: Matt DeVillier --- MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c index 77dc226222..981309f8b0 100644 --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c @@ -1731,13 +1731,7 @@ InitKeyboard ( // // wait for BAT completion code // - mWaitForValueTimeOut = KEYBOARD_BAT_TIMEOUT; - - Status = KeyboardWaitForValue (ConsoleIn, KEYBOARD_8048_RETURN_8042_BAT_SUCCESS); - if (EFI_ERROR (Status)) { - KeyboardError (ConsoleIn, L"Keyboard self test failed!\n\r"); - goto Done; - } + KeyboardWaitForValue (ConsoleIn, KEYBOARD_8048_RETURN_8042_BAT_SUCCESS); mWaitForValueTimeOut = KEYBOARD_WAITFORVALUE_TIMEOUT; -- 2.39.2