home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 2885 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.4 KB

  1. Path: sparky!uunet!usc!sdd.hp.com!swrinde!news.dell.com!raid.dell.com!james
  2. From: james@raid.dell.com (James Van Artsdalen)
  3. Newsgroups: comp.unix.bsd
  4. Subject: 386BSD 0.1: pccons.c bug
  5. Message-ID: <1992Jul26.061759.13547@raid.dell.com>
  6. Date: 26 Jul 92 06:17:59 GMT
  7. Sender: james@raid.dell.com (James Van Artsdalen)
  8. Reply-To: james@raid.dell.com (James Van Artsdalen)
  9. Organization: Dell Computer Corporation
  10. Lines: 35
  11.  
  12. I think there is a bug in the function kbd_cmd in pccons.c.
  13.  
  14. kbd_cmd waits for the 8042 input buffer to empty, and then writes a
  15. byte destined for the keyboard.
  16.  
  17. kbd_cmd then waits for the 8042 input buffer to become empty again,
  18. and then reads the output buffer.  This part is wrong: kbd_cmd should
  19. wait for the output buffer to become full, rather than wait for the
  20. input buffer to become empty.
  21.  
  22. I haven't tested this change.  I found the bug by inspection.
  23.  
  24. *** pccons.c.~1~    Sun Jul 26 01:12:26 1992
  25. --- pccons.c    Sun Jul 26 01:13:36 1992
  26. ***************
  27. *** 155,161 ****
  28.       
  29.       while (inb(KBSTATP)&KBS_IBF);
  30.       if (val) outb(KBOUTP, val);
  31. !     while (inb(KBSTATP)&KBS_IBF);
  32.       return (inb(KBDATAP));
  33.   }
  34.   
  35. --- 155,161 ----
  36.       
  37.       while (inb(KBSTATP)&KBS_IBF);
  38.       if (val) outb(KBOUTP, val);
  39. !     while (inb(KBSTATP)&KBS_DIB);
  40.       return (inb(KBDATAP));
  41.   }
  42.   
  43. -- 
  44. -- 
  45. James R. Van Artsdalen          james@bigtex.cactus.org   "Live Free or Die"
  46. Dell Computer Co    9505 Arboretum Blvd Austin TX 78759         512-338-8789
  47.