[PATCH] Patch for Toshiba 2520 Laptops

From: Alain Knaff (Alain.Knaff@ltnb.lu)
Date: Tue Jul 18 2000 - 01:16:19 EST


Certain Toshiba laptop's floppy disk controllers (toshiba 2520)
occasionnally send bogus interrupts, which confuse the floppy
driver. This interrupts are easily recognizable by their
head/sector/cylinder numbers being out of range. The following patch
instructs the floppy controller to ignore these interrupts.

Regards,

Alain

diff -ur test5-pre2/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
--- test5-pre2/linux/drivers/block/floppy.c Tue Jul 18 07:43:08 2000
+++ linux/drivers/block/floppy.c Tue Jul 18 08:01:35 2000
@@ -2339,6 +2339,13 @@
 {
         int nr_sectors, ssize, eoc, heads;
 
+ if (R_HEAD >= 2) {
+ /* some Toshiba floppy controllers occasionnally seem to
+ * return bogus interrupts after read/write operations, which
+ * can be recognized by a bad head number (>= 2) */
+ return;
+ }
+
         if (!DRS->first_read_date)
                 DRS->first_read_date = jiffies;
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:10 EST