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

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!swrinde!news.dell.com!james
  2. From: james@raid.dell.com (James Van Artsdalen)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: 386BSD 0.1: pccons.c bug
  5. Message-ID: <1992Jul26.212059.29490@raid.dell.com>
  6. Date: 26 Jul 92 21:20:59 GMT
  7. References: <1992Jul26.061759.13547@raid.dell.com>
  8. Reply-To: james@raid.cactus.org (James Van Artsdalen)
  9. Organization: Dell Computer Co
  10. Lines: 35
  11.  
  12. In <1992Jul26.061759.13547@raid.dell.com>, james@raid.dell.com (me) wrote:
  13.  
  14. Sigh.  Obviously I hadn't tested this.  The second while loop needs to
  15. wait for the output buffer bit to go high, not wait for it to go low.
  16.  
  17. Is there a PS/2 mouse driver (lots of Compaqs and Dells have
  18. PS/2-style mice)?  If so, much of the code in pccons.c will have to
  19. change to avoid race conditions.  The keyboard LED update code needs
  20. to know that the next byte coming from the 8042 might be a keyboard or
  21. mouse data byte, and not an ACK for the LED command.
  22.  
  23.     I haven't tested this change.  I found the bug by inspection.
  24.     
  25.     *** pccons.c.~1~    Sun Jul 26 01:12:26 1992
  26.     --- pccons.c    Sun Jul 26 01:13:36 1992
  27.     ***************
  28.     *** 155,161 ****
  29.           
  30.           while (inb(KBSTATP)&KBS_IBF);
  31.           if (val) outb(KBOUTP, val);
  32.     !     while (inb(KBSTATP)&KBS_IBF);
  33.           return (inb(KBDATAP));
  34.       }
  35.       
  36.     --- 155,161 ----
  37.           
  38.           while (inb(KBSTATP)&KBS_IBF);
  39.           if (val) outb(KBOUTP, val);
  40.     !     while (inb(KBSTATP)&KBS_DIB);
  41.           return (inb(KBDATAP));
  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.