]> Joshua Wise's Git repositories - netwatch.git/blobdiff - aseg/counter.c
Make keyboard actually reliable again. Update what's actually on the screen, not...
[netwatch.git] / aseg / counter.c
index d6208d6545f753bfe6079f5ae031c1b150cdc25b..055ceec1609f8da0a4f917273bb34f2185d0a217 100644 (file)
@@ -22,10 +22,8 @@ static void cause_kbd_irq()
        while (inb(0x64) & 0x1)
                inb(0x60);
        outb(0x60, 0xee);       /* Cause an IRQ. */
-       while (!(inb(0x64) & 0x1))
+       while (inb(0x60) != 0xEE)
                ;
-       while (inb(0x64) & 0x1)
-               inb(0x60);
 }
 
 void pci_dump() {
@@ -62,7 +60,8 @@ void pci_dump() {
                        {
                                b = kbd_get_injected_scancode();
                                lastctr = counter;
-                               inb(0x60);
+                               while (inb(0x64) & 0x1)
+                                       inb(0x60);
                        } else
                                b = inb(0x60);
                        if ((curdev == 0) && (b == 0x01)) {     /* Escape */
This page took 0.024115 seconds and 4 git commands to generate.