From 411b881b0d2e53cbad2a4c9744a8cafcb6123a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 24 Oct 2005 10:23:30 +0000 Subject: [PATCH] enable_keyboard() should now work a little better. Disabled keyboard tests for now - we will just assume there is a keyboard. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14485 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/drivers/input/ps2_hid/keyboard.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/drivers/input/ps2_hid/keyboard.c b/src/add-ons/kernel/drivers/input/ps2_hid/keyboard.c index f13f17d989..30294936e2 100644 --- a/src/add-ons/kernel/drivers/input/ps2_hid/keyboard.c +++ b/src/add-ons/kernel/drivers/input/ps2_hid/keyboard.c @@ -27,8 +27,9 @@ enum { } leds_status; enum { - PS2_DATA_SET_LEDS = 0xed, - PS2_ENABLE_KEYBOARD = 0xf4, + PS2_DATA_SET_LEDS = 0xed, + PS2_ENABLE_KEYBOARD = 0xf4, + PS2_DISABLE_KEYBOARD = 0xf5, EXTENDED_KEY = 0xe0, }; @@ -237,13 +238,14 @@ enable_keyboard(void) { uint32 tries = 3; - keyboard_empty_data(); - while (tries-- > 0) { + keyboard_empty_data(); + if (keyboard_command(PS2_ENABLE_KEYBOARD, NULL, 0) == B_OK) return B_OK; } + dprintf("enable_keyboard() failed\n"); return B_ERROR; } @@ -260,6 +262,8 @@ probe_keyboard(void) keyboard_empty_data(); + // Keyboard detection does not seem to be working always correctly +#if 0 // Keyboard self-test if (ps2_write_ctrl(PS2_CTRL_KEYBOARD_SELF_TEST) != B_OK) @@ -284,6 +288,8 @@ probe_keyboard(void) // Enable keyboard return enable_keyboard(); +#endif + return B_OK; }