Second patch to turn off floppy motor(s)

From: Richard B. Johnson
Date: Tue Oct 07 2003 - 08:36:13 EST



For anyone interested.. This has already been discussed-to-death.

--- linux-2.4.22/arch/i386/boot/bootsect.S.orig Tue Oct 7 08:47:06 2003
+++ linux-2.4.22/arch/i386/boot/bootsect.S Tue Oct 7 09:23:35 2003
@@ -396,15 +396,10 @@
# NOTE: Doesn't save %ax or %dx; do it yourself if you need to.

kill_motor:
-#if 1
- xorw %ax, %ax # reset FDC
- xorb %dl, %dl
- int $0x13
-#else
movw $0x3f2, %dx
- xorb %al, %al
- outb %al, %dx
-#endif
+ inb %dx, %al # Get R/W bits
+ andb $0x0f, %al # Save all but motor-on bits
+ outb %al, %dx # Shut off motor
ret

sectors: .word 0




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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/