X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/d9de6545faee2e375a98f43e373dda9f3418b14b..35592f46cdf2510114f767f968657711e4c226e9:/aseg/counter.c?ds=sidebyside diff --git a/aseg/counter.c b/aseg/counter.c index d6208d6..055ceec 100644 --- a/aseg/counter.c +++ b/aseg/counter.c @@ -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 */