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