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.

> 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.

> 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 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. 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.

> John.
>

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.051 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site