Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151065156
D50498.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
927 B
Referenced Files
None
Subscribers
None
D50498.id.diff
View Options
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -1249,6 +1249,7 @@
static int
get_kbd_echo(KBDC kbdc)
{
+ int data;
/* enable the keyboard port, but disable the keyboard intr. */
if (setup_kbd_port(kbdc, TRUE, FALSE))
/* CONTROLLER ERROR: there is very little we can do... */
@@ -1256,7 +1257,18 @@
/* see if something is present */
write_kbd_command(kbdc, KBDC_ECHO);
- if (read_kbd_data(kbdc) != KBD_ECHO) {
+ data = read_kbd_data(kbdc);
+
+ /*
+ * Some i8042 falsely return KBD_ACK for ECHO comamnd.
+ * Thought it is not a correct behavior for AT keyboard, we accept
+ * and consume it to prevent resetting the whole keyboard after the
+ * first interrupt.
+ */
+ if (data == KBD_ACK)
+ data = read_kbd_data(kbdc);
+
+ if (data != KBD_ECHO) {
empty_both_buffers(kbdc, 10);
test_controller(kbdc);
test_kbd_port(kbdc);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 6:11 PM (9 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30991134
Default Alt Text
D50498.id.diff (927 B)
Attached To
Mode
D50498: atkbd: fix first keystroke force reset
Attached
Detach File
Event Timeline
Log In to Comment