mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Joshua Schmidlkofer <kernel@pacrimopen.com>
Cc: "John Bradford" <john@grabjohn.com>, "Måns Rullgård" <mru@kth.se>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: PROBLEM: floppy motor spins when floppy module not installed
Date: Mon, 15 Dec 2003 09:37:20 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.53.0312150921340.9281@chaos> (raw)
In-Reply-To: <1071296320.16407.17.camel@menion.home>

On Fri, 12 Dec 2003, Joshua Schmidlkofer wrote:

> > Yes, and I recall we agreed to disagree where the FDC stop must
> > be put, but we both agreed that it must be stopped. I still contend
> > that since the Linux startup code takes control away from the BIOS,
> > it's that codes responsibility to turn OFF things that the BIOS
> > might have left ON.
> >
> > Funny thing. It's so trivial, anybody/everybody could turn the
> > floppy motor off, but all the fingers point to somebody else's
> > code.
> >
> > It's a bug in Linux, not in a boot-loader. That bug was covered up
> > until the FDC code got modularized. Once we were able to compile
> > a kernel without the FDC, the bug was exposed. So, I suggest that
> > we just fix the bug and be done with it. It's not a performance
> > problem, the write to the port occurs exactly once during the nest
> > 999 days of up-time. It's just an attempt to make a mountain out
> > of a mole-hill.
>
>
> We have had (do have?) several cases of optional "this workaround", or
> "that workaround" as per-hardware config options.  If this is that
> objectionable for genral consumption then someone ought to submit a
> patch to do the dirty deed but put it in as a configurable workaround
> (CONFIG_TURNFLOPPYOFF=Y/N), and leave it at that. [For maximum
> perversity, it could also be a MODULE.] This does not affect everyone
> right?  I have never tried booting w/o the floppy module, so I really
> don't know about my system.
>

Well It's NOT a workaround. In the IBM/Intel/PC platform, the
floppy motor is turned OFF in a simple timer-queue that runs
off the PIT Channel 0. If some operating system decides to tear
down that queue, it MUST perform the function(s) that the
queue was performing or else it's a BUG, plain and simple.
This long-time BUG was hidden as long as the floppy-disk
code remained in the kernel. Now, since the floppy disk
code is no longer permanently coded into the kernel, the
BUG is exposed. Failure to fix this known BUG, in spite of
the patches sent, is an obvious example of child-like
misbehavior.

Again, the patch is provided:

--- linux-2.4.22/arch/i386/boot/setup.S.orig	Tue Oct  7 09:24:33 2003
+++ linux-2.4.22/arch/i386/boot/setup.S	Fri Dec 12 09:52:32 2003
@@ -777,6 +777,10 @@
 	movb	$0xFB, %al			# mask all irq's but irq2 which
 	outb	%al, $0x21			# is cascaded

+	movw	$0x3f2, %dx
+	xorb	%al, %al			# Turn OFF FDC motor
+	outb	%al, %dx
+
 # Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
 # need no steenking BIOS anyway (except for the initial loading :-).
 # The BIOS-routine wants lots of unnecessary data, and it's less




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-12-15 14:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-12 13:57 Dale Mellor
2003-12-12 14:18 ` Måns Rullgård
2003-12-12 15:04   ` Richard B. Johnson
2003-12-12 15:11     ` Måns Rullgård
2003-12-12 15:20       ` Richard B. Johnson
2003-12-12 15:33         ` Måns Rullgård
2003-12-12 16:05           ` Petr Vandrovec
2003-12-12 16:27             ` Måns Rullgård
2003-12-12 16:41               ` Petr Vandrovec
2003-12-12 16:00       ` Matthew Kirkwood
2003-12-12 19:28     ` John Bradford
2003-12-12 19:47       ` Richard B. Johnson
2003-12-13  6:18         ` Joshua Schmidlkofer
2003-12-15 14:37           ` Richard B. Johnson [this message]
2003-12-13 10:40         ` John Bradford
2003-12-15 14:50           ` Richard B. Johnson
2003-12-15 20:24             ` John Bradford
2003-12-13 13:18   ` Helge Hafting
2003-12-13 16:42     ` Joshua Schmidlkofer
2003-12-12 14:59 ` Richard B. Johnson

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.0312150921340.9281@chaos \
    --to=root@chaos.analogic.com \
    --cc=john@grabjohn.com \
    --cc=kernel@pacrimopen.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mru@kth.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®