home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / minix / 4959 next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.7 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!mcsun!sun4nl!star.cs.vu.nl!kjb
  2. From: kjb@cs.vu.nl (Kees J. Bot)
  3. Newsgroups: comp.os.minix
  4. Subject: Re: more FDC_MAX_RETRY (was HELP, .. on Gateway 2000 486/33)
  5. Message-ID: <BzLqF6.Exp@cs.vu.nl>
  6. Date: 21 Dec 92 09:01:54 GMT
  7. References: <168C1E448.SESPC395@ysub.ysu.edu> <1609@uitecgw.uitec.ac.jp>
  8. Sender: news@cs.vu.nl
  9. Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
  10. Lines: 36
  11.  
  12. nemossan@uitec.ac.jp (Sakurao NEMOTO) writes:
  13. >Thus, I saw source-codes of kernel/floppy.c, there such codes have been
  14. >found;
  15. >------------------------------------------------
  16. >    const MAX_FDC_RETRY = 100;
  17. >        |
  18. >    retries := MAX_FDC_RETRY;
  19. >    while not ready do begin
  20. >       DEC(retries);
  21. >       if retries <= 0 then exit(IOerror);
  22. >    end;
  23. >    fdc_out(port,val);
  24. >    exit(NOerror);
  25. >------------------------------------------------
  26.  
  27. The floppy.c in the upcoming 1.6.24 release will have it like this:
  28.  
  29.   retries = MAX_FDC_RETRY + FDC_TIMEOUT;
  30.   while (TRUE) {
  31.     real_action_here();
  32.  
  33.         if (retries < FDC_TIMEOUT) milli_delay(1);      /* take it slow now */
  34.         if (--retries == 0) break;      /* time out */
  35.   }
  36.  
  37. with MAX_FDC_RETRY set to 10000 and FDC_TIMEOUT at 500.  So even if
  38. your 586/333 can poll 10000 times without the FDC reacting, it will try
  39. a guaranteed 500 millisec longer before giving up.
  40.  
  41. For your next floppy driver bug, try copying data from one floppy drive
  42. to another.  Watch the motor of drive X being turned off when drive Y is
  43. accessed (don't look at the light, put your ear against the drive).  The
  44. code worked before scattered I/O was invented, so don't blame its author.
  45. --
  46.                             Kees J. Bot  (kjb@cs.vu.nl)
  47.                   Systems Programmer, Vrije Universiteit Amsterdam
  48.