9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* b.com floppy driver patch for fast machines
@ 1995-08-30 12:11 Pace
  0 siblings, 0 replies; 3+ messages in thread
From: Pace @ 1995-08-30 12:11 UTC (permalink / raw)


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






^ permalink raw reply	[flat|nested] 3+ messages in thread

* b.com floppy driver patch for fast machines
@ 1995-09-05  0:47 Ken
  0 siblings, 0 replies; 3+ messages in thread
From: Ken @ 1995-09-05  0:47 UTC (permalink / raw)


|For what it's worth, the Crynwr packet drivers for DOS use an inb from
|the keyboard controller to establish a reasonably constant delay.  I
|gather this is because the keyboard controller runs at something like 7
|MHz on virtually every motherboard.  It runs at a higher clock rate on
|PS/2s, but apparently it's reliable on ISA, EISA, and ISA/PCI
|motherboards.

Well, it isn't actually anything to do with the keyboard controller,
just that that port is a "harmless" one to read and that most ISA buses
run at 8-12 MHz, regardless of CPU speed.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* b.com floppy driver patch for fast machines
@ 1995-08-30 15:03 Stephen
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen @ 1995-08-30 15:03 UTC (permalink / raw)


For what it's worth, the Crynwr packet drivers for DOS use an inb from
the keyboard controller to establish a reasonably constant delay.  I
gather this is because the keyboard controller runs at something like 7
MHz on virtually every motherboard.  It runs at a higher clock rate on
PS/2s, but apparently it's reliable on ISA, EISA, and ISA/PCI
motherboards.

Sorry about such sketchy second-hand info, but maybe it's worth
something if you want to find a constant delay.

		 Stephen

-- 
Stephen Trier              "Dessine-moi un mutton"
trier@ins.cwru.edu                  - Le Petit Prince
KG8IH






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-09-05  0:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-08-30 12:11 b.com floppy driver patch for fast machines Pace
1995-08-30 15:03 Stephen
1995-09-05  0:47 Ken

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).