lkml.org 
[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: FDC motor left on
On Mon, 6 Oct 2003, John Bradford wrote:

> > > > If you can end up with another floppy drive motor on under
> > > > any condition when the kernel is given control, then you
> > > > can simply reset both (or all) floppy motor control bits.
> > >
> > > This is not a problem to deal with in the kernel - what if there is
> > > hardware other than a floppy controller at that address?
> > >
> >
> > In the ix86 architecture (and it is in arch-specific code), there
> > cannot be anything at this address except a floppy or nothing.
> > In both cases, you are covered.
> >
> > I any embedded systems developer decides to put something besides
> > a FDC at that address, it is up to them to fix the problems they
> > create, not linux.
>
> If no support for floppy drives is compiled in to the kernel, it's
> reasonable to expect no floppy-related accesses to be done to those
> ports.
>
> > > The bootloader needs to ensure that the hardware is at least in a
> > > sensible state when the kernel is entered. Infact, unless the system
> > > is being booted from floppy, why is the BIOS accessing the floppy at
> > > all?
> > >
> >
> > The BIOS accesses the floppy (if one exists) because of the
> > boot order having been selected. Many who have computers,
> > that are not accessible to others, have the BIOS set up so
> > that the first thing to check for a boot-loader is the floppy,
> > then the CD-ROM, then the hard disk. This lets them do their
> > normal work without having to muck with the BIOS.
> >
> > It is not an error to configure a machine this way. It
> > is an option. It is an error, however, to leave a floppy
> > disk-drive motor ON forever.
>
> OK, so the bootloader is at fault, not the BIOS. If the BIOS is
> configured to allow booting from floppy, but you decide to boot from
> other media on any occasion, the first code loaded, I.E. the
> bootloader, should turn off the floppy motor.
>
> > > Re-configure the BIOS not to try to boot from the floppy, or to seek
> > > the drive to see whether it is capable of 40 or 80 tracks.
> > >
> >
> > The BIOS can be (correctly) set to any of many possible boot-
> > options.
>
> If the floppy motor ends up being on all the time, how is that a
> correct configuration?
>
> > > If that is not possible, (on a laptop with an obscure BIOS for
> > > example), add a delay to the bootloader. Assumng interupts are still
> > > enabled, the BIOS will switch the floppy off after a few seconds.
> > >
> >
> > An arbitrary delay is a very bad hack.
>
> Yes, it is, the real solution is to fix the bootloader. I was simply
> providing a workaround.
>
> > If you need something OFF,
> > you turn it OFF. One should never work-around a primative like
> > ON or OFF. The digital-output registers at the FDC's specified
> > address is where this is done.
>
> I consider it just as much of a hack to add floppy-related code to all
> i386 kernels whether they are for floppy-less machines or not.
>
> John.
>

Well we are in agreement that it must be turned OFF. The only
question is where it should be done. Already the kernel fixes
the video board (generic VGA) and other stuff that it may
find wrong (PCI bus), etc. So, a simple read/write to a
machine-compatible port might be the simplest accommodation.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.049 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site