mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: John Bradford <john@grabjohn.com>
Cc: Mikael Pettersson <mikpe@csd.uu.se>,
	Dave Jones <davej@redhat.com>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: FDC motor left on
Date: Mon, 6 Oct 2003 12:22:04 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0310061218040.9590@chaos> (raw)
In-Reply-To: <200310061606.h96G6qhp000963@81-2-122-30.bradfords.org.uk>

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.



  reply	other threads:[~2003-10-06 16:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03 17:25 Richard B. Johnson
2003-10-03 23:58 ` Dave Jones
2003-10-06 12:42   ` Richard B. Johnson
2003-10-06 12:50     ` Maciej W. Rozycki
2003-10-06 12:59     ` Mikael Pettersson
2003-10-06 13:58       ` Richard B. Johnson
2003-10-06 14:25         ` John Bradford
2003-10-06 15:09           ` Richard B. Johnson
2003-10-06 15:49             ` Maciej W. Rozycki
2003-10-06 16:17               ` Richard B. Johnson
2003-10-06 16:46                 ` Maciej W. Rozycki
2003-10-06 16:06             ` John Bradford
2003-10-06 16:22               ` Richard B. Johnson [this message]
2003-10-06 16:41                 ` John Bradford
2003-10-04 13:56 Mikael Pettersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0310061218040.9590@chaos \
    --to=root@chaos.analogic.com \
    --cc=davej@redhat.com \
    --cc=john@grabjohn.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@csd.uu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®