Skip to contentSkip to conversation

PROBLEM: floppy motor spins when floppy module not installed

DISCUSSION Dale Mellor 8 participants 20 messages Dec 12, 2003 – Dec 15, 2003

lore
Share & tools
lore
#0 lore raw

1. Floppy motor spins when floppy module not installed.

2. From the moment of bootup, the floppy drive motor spins when the kernel is compiled to use the floppy driver as a module and this is not installed (the motor stops as soon as the module is installed).

3. Keywords: floppy, module, kernel, boot.

4. Kernel version 2.6.0-test11

5.

6.

7.

7.1 Gnu C                  3.2.1
    Gnu make               3.80
    util-linux             2.11y
    mount                  2.11y
    module-init-tools      0.9.8
    e2fsprogs              1.28
    reiserfsprogs          3.x.1b
    pcmcia-cs              3.2.5
    PPP                    2.4.2b3
    nfs-utils              1.0.6
    Linux C Library        2.3.2
    Dynamic linker (ldd)   2.3.2
    Procps                 2.0.7
    Net-tools              1.60
    Kbd                    command
    Sh-utils               5.0
    Modules Loaded         ymfpci ac97_codec soundcore pcnet_cs 8390 crc32 ipv6 pegasus

7.2 processor : 0
vendor_id : GenuineTMx86
cpu family : 6
model : 4
model name : Transmeta(tm) Crusoe(tm) Processor TM5600
stepping : 3
cpu MHz : 595.732
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr cx8 cmov mmx longrun
bogomips : 1085.44

7.3 ymfpci 49280 0 - Live 0xc78ed000

    ac97_codec 18080 1 ymfpci, Live 0xc78d2000
    soundcore 8064 1 ymfpci, Live 0xc78bc000
    pcnet_cs 16484 1 - Live 0xc78d8000
    8390 9824 1 pcnet_cs, Live 0xc78ce000
    crc32 4096 1 8390, Live 0xc78bf000
    ipv6 238400 20 - Live 0xc790f000
    pegasus 21024 0 - Live 0xc78c3000

7.4 0000-001f : dma1

    0020-0021 : pic1
    0040-005f : timer
    0060-006f : keyboard
    0080-008f : dma page reg
    00a0-00a1 : pic2
    00c0-00df : dma2
    00f0-00ff : fpu
    01f0-01f7 : ide0
    02f8-02ff : pcnet_cs
    0300-031f : pcnet_cs
    03c0-03df : vga+
    03f6-03f6 : ide0
    0cf8-0cff : PCI conf1
    1000-100f : 0000:00:07.1
      1000-1007 : ide0
      1008-100f : ide1
    1010-1013 : 0000:00:09.0
    1020-103f : 0000:00:07.2
      1020-103f : uhci_hcd
    1040-105f : 0000:00:07.3
    1080-10bf : 0000:00:09.0
    10c0-10c7 : Sony Programable I/O Device
    1400-14ff : 0000:00:0d.0
    4000-40ff : PCI CardBus #01
    4400-44ff : PCI CardBus #01
    8000-803f : 0000:00:07.3

    00000000-0009b7ff : System RAM
    0009b800-0009ffff : reserved
    000a0000-000bffff : Video RAM area
    000c0000-000c7fff : Video ROM
    000f0000-000fffff : System ROM
    00100000-06feffff : System RAM
      00100000-002b4d37 : Kernel code
      002b4d38-0035ff9f : Kernel data
    06ff0000-06fff7ff : ACPI Tables
    06fff800-06ffffff : ACPI Non-volatile Storage
    10000000-10000fff : 0000:00:0c.0
      10000000-10000fff : yenta_socket
    10400000-107fffff : PCI CardBus #01
    10800000-10bfffff : PCI CardBus #01
    a0000000-a0000fff : card services
    fc000000-fc0fffff : 0000:00:00.0
    fc100000-fc103fff : 0000:00:08.0
    fc104000-fc1047ff : 0000:00:08.0
    fc104800-fc1049ff : 0000:00:0b.0
    fc105000-fc105fff : 0000:00:0d.0
    fc108000-fc10ffff : 0000:00:09.0
      fc108000-fc10ffff : ymfpci
    fd000000-fdffffff : 0000:00:0d.0
    fff80000-ffffffff : reserved

7.5

7.6

7.7

X. Workaround: either install the module and then uninstall it;
or kill the penguin ;-) (sorry, couldn't resist...)

#1 lore raw
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priority in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

Signature · 2 lines
Måns Rullgård
[email protected]
#2 lore raw
Quoted 4 lines · On Fri, 12 Dec 2003, [iso-8859-1] Måns Rullgård wrote:
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

Quoted 8 lines

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priority in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

--
Måns Rullgård
[email protected]

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity. This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

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

#3 lore raw
Quoted 11 lines · Richard B. Johnson
Quoted 8 lines · On Fri, 12 Dec 2003, [iso-8859-1] Måns Rullgård wrote:
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priority in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

Quoted 6 lines

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity. This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

OK, but why doesn't it affect all machines?

Signature · 2 lines
Måns Rullgård
[email protected]
#4 lore raw
Quoted 13 lines · On Fri, 12 Dec 2003, [iso-8859-1] Måns Rullgård wrote:
Quoted 11 lines · Richard B. Johnson
Quoted 8 lines · On Fri, 12 Dec 2003, [iso-8859-1] Måns Rullgård wrote:
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priority in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

Quoted 9 lines
Quoted 6 lines

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity. This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

OK, but why doesn't it affect all machines?

If you leave the FDC software in the kernel, the FDC software sets up everything and turns off the motor. If you have the FDC as a module, you have nothing in there to turn off the motor until you install the module.

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

#5 lore raw
Quoted 7 lines · Richard B. Johnson
Quoted 5 lines · On Fri, 12 Dec 2003, [iso-8859-1] Måns Rullgård wrote:
Quoted 3 lines · Richard B. Johnson

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity.

IMHO a ridiculous design, as is most of the PC.

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

OK, but why doesn't it affect all machines?

If you leave the FDC software in the kernel, the FDC software sets up everything and turns off the motor. If you have the FDC as a module, you have nothing in there to turn off the motor until you install the module.

I'm running 2.6.0-test11 on a machine with modular floppy driver, without any spinning motors. I think it boots from floppy before HD, but I'm not certain (can't check right now).

Signature · 2 lines
Måns Rullgård
[email protected]
#6 lore raw
Quoted 18 lines · M?ns Rullg?rd
Quoted 7 lines · Richard B. Johnson
Quoted 5 lines · On Fri, 12 Dec 2003, [iso-8859-1] M?ns Rullg?rd wrote:
Quoted 3 lines · Richard B. Johnson

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity.

IMHO a ridiculous design, as is most of the PC.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

OK, but why doesn't it affect all machines?

Quoted 8 lines
Quoted 4 lines

If you leave the FDC software in the kernel, the FDC software sets up everything and turns off the motor. If you have the FDC as a module, you have nothing in there to turn off the motor until you install the module.

I'm running 2.6.0-test11 on a machine with modular floppy driver, without any spinning motors. I think it boots from floppy before HD, but I'm not certain (can't check right now).

Maybe because you run patched LILO which works around this 2.6.x brokeness. Debian's #221967 says that 'reset disk subsystem' should stop floppy motor. I'd like to see this black on white...

Fortunately Andreas Roland accepted patch instead of reassigning bug to 2.6.x kernel package where it belongs - if kernel does not pass timer IRQ to the BIOS, it is kernel's responsibility to do tasks which BIOS scheduled for future...

lilo (1:22.5.8-6) unstable; urgency=low

* Now LILO can disable FDC on (weird?) BIOS using 2.6 kernel.

    (closes: #221967)

						Petr Vandrovec
#7 lore raw
Quoted 7 lines · Petr Vandrovec
Quoted 4 lines · M?ns Rullg?rd

I'm running 2.6.0-test11 on a machine with modular floppy driver, without any spinning motors. I think it boots from floppy before HD, but I'm not certain (can't check right now).

Maybe because you run patched LILO which works around this 2.6.x

GRUB, actually. Does it mess with the floppy drive?

Signature · 2 lines
Måns Rullgård
[email protected]
#8 lore raw
Quoted 11 lines · M?ns Rullg?rd
Quoted 7 lines · Petr Vandrovec
Quoted 4 lines · M?ns Rullg?rd

I'm running 2.6.0-test11 on a machine with modular floppy driver, without any spinning motors. I think it boots from floppy before HD, but I'm not certain (can't check right now).

Maybe because you run patched LILO which works around this 2.6.x

GRUB, actually. Does it mess with the floppy drive?

AFAIK yes:

NEWS:

New in 0.5 - 1998-08-20, Erich Boleyn:

* GRUB now shuts off the floppy before transferring control to any other programs/modules/loaders. (chain-loading doesn't matter here, just loading 32-bit modules/kernels)

stage2/asm.S:

/*
* stop_floppy()
*
* Stops the floppy drive from spinning, so that other software is
* jumped to with a known state.
*/
ENTRY(stop_floppy)

       movw    $0x3F2, %dx
       xorb    %al, %al
       outb    %al, %dx

ret

Petr Vandrovec

#9 lore raw
In reply to Måns Rullgård
Quoted 7 lines · Måns Rullgård
Quoted 5 lines

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity. This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

OK, but why doesn't it affect all machines?

Most likely, other machines take longer than two seconds from probing the floppy to booting the kernel.

Matthew.

#10 lore raw
In reply to Richard B. Johnson

Quote from "Richard B. Johnson" <[email protected]>:

Quoted 16 lines · On Fri, 12 Dec 2003, [iso-8859-1] M=E5ns Rullg=E5rd wrote:
Quoted 7 lines
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priorit=

y

Quoted 6 lines

in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

--
M=E5ns Rullg=E5rd
[email protected]

Quoted 6 lines

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity. This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

We discussed almost exactly the same problem at length on LKML just two months ago:

http://marc.theaimsgroup.com/?l=linux-kernel&m=106545766213063&w=2

John.

#11 lore raw
Quoted 24 lines · John Bradford

Quote from "Richard B. Johnson" <[email protected]>:

Quoted 16 lines · On Fri, 12 Dec 2003, [iso-8859-1] M=E5ns Rullg=E5rd wrote:
Quoted 7 lines
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priorit=

y

Quoted 6 lines

in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

--
M=E5ns Rullg=E5rd
[email protected]

Quoted 6 lines

It is not a broken BIOS! The BIOS timer that ticks 18.206 times per second has an ISR that, in addition to keeping time, turns OFF the FDC motor after two seconds of inactivity. This ISR is taken away by Linux. Therefore Linux must turn off that motor! It is a Linux bug, not a BIOS bug. Linux took control away from the BIOS during boot.

Quoted 6 lines

We discussed almost exactly the same problem at length on LKML just two months ago:

http://marc.theaimsgroup.com/?l=linux-kernel&m=106545766213063&w=2

John.

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.

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

#12 lore raw
Quoted 10 lines

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.

Quoted 7 lines

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.

js

#13 lore raw
Quoted 19 lines · Joshua Schmidlkofer
Quoted 10 lines

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.

Quoted 7 lines

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.

Quoted 9 lines

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:

arch/i386/boot/setup.S renamed from arch/i386/boot/setup.S.orig +4 -0
@@ -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.

#14 lore raw
In reply to Richard B. Johnson

Quote from "Richard B. Johnson" <[email protected]>:

Quoted 5 lines

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.

Well, on a practical level, yes, I agree with you, it is the easiest way to solve the problem.

On a technical level, I still think that the BIOS configuration is broken if it leaves the floppy motor on, on a system running a kernel without the floppy code compiled in.

John.

#15 lore raw
Quoted 8 lines · John Bradford

Quote from "Richard B. Johnson" <[email protected]>:

Quoted 5 lines

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.

Quoted 9 lines

Well, on a practical level, yes, I agree with you, it is the easiest way to solve the problem.

On a technical level, I still think that the BIOS configuration is broken if it leaves the floppy motor on, on a system running a kernel without the floppy code compiled in.

John.

Hmmm. The BIOS doesn't know that you have a kernel without any floppy code. The BIOS also doesn't know that its timer queue is going to be destroyed by the data (code) that it's properly reading from some disk. All it knows is that every time the floppy is accessed, the motor must be turn ON before access and must be turned OFF two seconds after the last access. Since it doesn't know when the last access will be (it doesn't know the future), it resets a timer-variable upon every access. The timer- queue bumps the variable and if it gets to zero, turns OFF the FDC motor.

The BIOS code is properly doing its job. When control is taken away from the BIOS, the code that took control must tie up any loose-ends that the BIOS wasn't able to finish.

It's not the job of the boot-loader because it didn't alter the BIOS in any way. It used the BIOS to put the kernel in it's correct place. Then it gives control to the kernel code. It's that kernel code that takes control away from the BIOS. It's the responsibility of that kernel code to handle the consequences of doing that.

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

#16 lore raw
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

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.

Well, on a practical level, yes, I agree with you, it is the easiest way to solve the problem.

Quoted 6 lines
Quoted 3 lines

On a technical level, I still think that the BIOS configuration is broken if it leaves the floppy motor on, on a system running a kernel without the floppy code compiled in.

Hmmm. The BIOS doesn't know that you have a kernel without any floppy code.

No, but the user does, and if the machine in question boots fast enough that interrupts are disabled less than two seconds after the last BIOS floppy access, they should currently avoid configuring the BIOS in such a way that it accesses floppy drive if there is not going to be any code to turn it off, which currently means having floppy support compiled in, (or as a module).

Quoted 10 lines

The BIOS also doesn't know that its timer queue
is going to be destroyed by the data (code) that it's properly reading from some disk. All it knows is that every time the floppy is accessed, the motor must be turn ON before access and must be turned OFF two seconds after the last access. Since it doesn't know when the last access will be (it doesn't know the future), it resets a timer-variable upon every access. The timer- queue bumps the variable and if it gets to zero, turns OFF the FDC motor.

Quoted 2 lines

The BIOS code is properly doing its job. When control is taken away from the BIOS, the code that took control

The code that took control is the bootloader, which may never load a Linux kernel. Imagine a theoretical future bootloader which disabled interrupts, thereby stopping the two second floppy motor timeout, and offered things such as a serial console, monitor, or other diagnostic features.

Quoted 2 lines

must
tie up any loose-ends that the BIOS wasn't able to finish.

Possibly, but I still consider the BIOS configuration broken if there are infact any loose-ends to tie up.

Quoted 6 lines

It's not the job of the boot-loader because it didn't alter the BIOS in any way. It used the BIOS to put the kernel in it's correct place. Then it gives control to the kernel code. It's that kernel code that takes control away from the BIOS. It's the responsibility of that kernel code to handle the consequences of doing that.

At the end of the day, though, I agree that it's the best way to fix it, but we shouldn't convince ourselves that it's particularly elegant.

John.

#17 lore raw
In reply to Måns Rullgård
Quoted 9 lines · Måns Rullgård
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priority in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

The kernel stops the spinning floppy _if_ you gives it a driver for the floppy hardware.

This is not a problem at all, considering that linux comes with such a driver.

Compile it in, or arranger for the module to be loaded at boot time. You may of course arrange to unload it a little later if you want to save the memory.

Helge Hafting

#18 lore raw
Quoted 13 lines · Helge Hafting
Quoted 9 lines · Måns Rullgård
Quoted 1 line · Dale Mellor

1. Floppy motor spins when floppy module not installed.

It's a known problem. Some broken BIOSes don't turn off the motor after probing for a disk. One solution is to change the boot priority in the BIOS settings so the hard disk is tried before floppy. If you ever need to boot from a floppy, you can change it back.

The kernel stops the spinning floppy _if_ you gives it a driver for the floppy hardware.

Quoted 6 lines

This is not a problem at all, considering that linux comes with such a driver.

Compile it in, or arranger for the module to be loaded at boot time. You may of course arrange to unload it a little later if you want to save the memory.

This seems like the correct solution to me.

Signature · 3 lines
VB programmers ask why no one takes them seriously, 
it's somewhat akin to a McDonalds manager asking employees 
why they don't take their 'career' seriously.
#19 lore raw
In reply to Dale Mellor
Quoted 8 lines · Dale Mellor

1. Floppy motor spins when floppy module not installed.

2. From the moment of bootup, the floppy drive motor spins when the kernel is compiled to use the floppy driver as a module and this is not installed (the motor stops as soon as the module is installed).

3. Keywords: floppy, module, kernel, boot.

Kernel version 2.6.0-test11

[SNIPPED...]

This was reported a long time ago and there were some patches around to fix it. I guess it didn't get into the "main-line", perhaps because people don't think it's important.

Your temporary fix is to disable the "floppy-seek" on boot and to change the boot-sequence so the floppy is not accessed on boot (change the BIOS to boot C: before A:). That will "fix" the problem for the moment.

The correct fix, that nobody wanted to do, is to reset the motor control bit in the FDC motor control register upon startup. This was previously shown and patches exist.

There were doom-sayers that claimed that the earth may stop turning (or something like that) if this was done which is probably why it didn't get fixed. If you are bold and want to try again, somewhere convenient in

              ../linux-nn.nn/arch/i386/boot/setup.S

write a zero byte out port 0x3f2. This port is used only for the FDC motor so it won't hurt if the controller's not even there.

Something like:

setup.S renamed from setup.S.orig +4 -0
@@ -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.