home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / bsd / 10892 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.8 KB  |  56 lines

  1. Path: sparky!uunet!mcsun!Germany.EU.net!urmel.informatik.rwth-aachen.de!acds.physik.rwth-aachen.de!kuku
  2. From: kuku@acds.physik.rwth-aachen.de (Christoph Kukulies)
  3. Newsgroups: comp.unix.bsd
  4. Subject: door open with disk inserted problem (fd.c patch)
  5. Date: 4 Jan 1993 17:05:57 GMT
  6. Organization: I.Physikalisches Institut RWTH-Aachen
  7. Lines: 42
  8. Distribution: world
  9. Message-ID: <1i9qplINN37c@urmel.informatik.rwth-aachen.de>
  10. Reply-To: kuku@acds.physik.rwth-aachen.de
  11. NNTP-Posting-Host: acds.physik.rwth-aachen.de
  12. Keywords: patch fix kludge hack fd.c door open
  13.  
  14.  
  15. For about half a year I have been living with a behaviour of the
  16. 386BSD floppy driver which showed up in not recognizing the presence
  17. of the fd controller when a disk was inserted and the door was left open.
  18. Booting the fd has never been a problem. I always was blaming
  19. some strange BIOS or hardware property for being responsible until
  20. some genious mind kicked me to perhaps try it with door open and disk removed.
  21.  
  22. I did and the problem could be worked around. I did not like this workaround,though,  because all too often I forget a floppy in the slot and system uptime is a  precious resource - you know. Anyway, here is something
  23. what I would not call a patch because it lacks the proper format, but for applying the fix manually, I leave it here for everyone's convenience:
  24.  
  25. ------------------------- file /sys/i386/isa/fd.c --------------------
  26. /*
  27. !* probe for existence of controller
  28.  */
  29. fdprobe(dev)
  30. struct isa_device *dev;
  31. {
  32.     fdc = dev->id_iobase;
  33.  
  34.     /* see if it can handle a command */
  35. +    outb(fdc+fdout,0);
  36. +    DELAY(100);
  37. +    outb(fdc+fdout,4);
  38.     if (out_fdc(NE7CMD_SPECIFY) < 0) {
  39.         fdc = 0;
  40.         return(0);
  41.     }
  42.     out_fdc(0xDF);
  43.     out_fdc(2);
  44.     return 1;
  45. }
  46.  
  47. ----------------------------------- end of fix -------------------------- 
  48.  
  49. --
  50. --Chris
  51. Christoph P. U. Kukulies
  52. kuku@acds.physik.rwth-aachen.de
  53. *** Error code 1
  54.  
  55. Stop.
  56.