From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 30 Aug 1995 08:11:56 -0400 From: Pace Willisson pace@blitz.com Subject: b.com floppy driver patch for fast machines Topicbox-Message-UUID: 1dcdd7d0-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19950830121156.gzKL5_eNG3gR1nJKb9dZalXrYFI3qnhbsRhrd9J9eX0@z> My shiny new 133 mhz pentium was getting "premature EOF" errors when trying to boot from a floppy. This patch to floppysend() fixes it up: *** sys/src/boot/pc/floppy.c- Tue Aug 29 15:48:28 1995 --- sys/src/boot/pc/floppy.c Tue Aug 29 15:48:46 1995 *************** *** 367,373 **** int tries; uchar c; ! for(tries = 0; tries < 100; tries++){ /* * see if its ready for data */ --- 367,373 ---- int tries; uchar c; ! for(tries = 0; tries < 1000; tries++){ /* * see if its ready for data */ I'm a little surprised that this was all I needed to do. On older machines, the inb in the loop would have run at the 8mhz ISA bus speed and would have completely dominated the processor time. Perhaps i/o to this motherboard's built in floppy controller runs much faster. In that case, a better fix might be to do a dummy i/o cycle to a real ISA port, or use a calibrated delay, like clock.c:delay, but scaled for, perhaps, 10 microseconds per shot. Pace Willisson pace@blitz.com