Subject: Re: Ain't no stopping us now...
To: None <>
From: Leo Weppelman <>
List: port-atari
Date: 12/11/1995 08:51:00
Hi All,

> > > Did anyone notice that the floppy drive motor is
> > > never turned off?  Kinda weird feature. :-)
> > When NetBSD is up and running the motor should stop spinning after
> > about 5 sec. idle time - at least it did when I last tested it....
> Nope, it doesn't. It stops a few seconds after the floppy drive has
> been accessed for the first time (eg mounting an fs, or installing
> a new bootstrap ;-) ).
> I didn't examine any further, but I guess, the problem is that the
> controller is only initialised on the first open (Fdopen() in fd.c)?
> > It might be that the motor doesn't stop spinning when it was on when the
> > system was rebooted. This is a bug indeed.
> No difference between (auto-)boot from floppy or harddisk, and also
> the same thing when booting NetBSD under TOS/MagiC (from harddisk of
> course).
Waldi was completely right... It turns out that the FDC only turns off the
drive motor _after_ seeing 10 index pulses. As the floppy-autoconf stuff
turned the motor on but turned off all selections, no index pulses were
arriving at the FDC, hence the motor stayed on...
The new version of the floppy-driver (fd.c), turns the select-line on after
the autoconfig on the _first_ detected floppy unit (usually the built-in one). 
The FDC is probed every 30 sec. to see if the motor is spinning, if not the
drive will be de-selected. This means that the internal floppy unit is 'safe'.
You can still ruin floppies in the external drive though. I have an idea
to fix this but haven't had time to implement it.