Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33185
Change subject: libpayload/i8042/keyboard: Fix return value check for keyboard_cmd ......................................................................
libpayload/i8042/keyboard: Fix return value check for keyboard_cmd
CB:32951 ("libpayload: Reset PS/2 keyboard") added a call to reset keyboard and check the return value of keyboard_cmd() to compare against I8042_KBCMD_ACK. However, keyboard_cmd() already checks for ACK and returns 1 or 0 based on whether ACK is received.
This change fixes the check introduced by CB:32951 to compare against 0 just like the other checks for keyboard_cmd().
BUG=b:134366527 TEST=Verified that logs do not contain "ERROR: Keyboard reset failed" anymore.
Change-Id: Idcadaae12e0a44e404a1d98c6deb633d97058203 Signed-off-by: Furquan Shaikh furquan@google.com --- M payloads/libpayload/drivers/i8042/keyboard.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/33185/1
diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c index 12255fb..1bc321d 100644 --- a/payloads/libpayload/drivers/i8042/keyboard.c +++ b/payloads/libpayload/drivers/i8042/keyboard.c @@ -319,8 +319,8 @@
/* Reset keyboard and self test (keyboard side) */ ret = keyboard_cmd(I8042_KBCMD_RESET); - if (ret != I8042_KBCMD_ACK) { - printf("ERROR: Keyboard reset failed ACK: 0x%x\n", ret); + if (!ret) { + printf("ERROR: Keyboard reset failed!\n", ret); return; }