Having solved a floppy problem earlier today, I wondered
whether nobody else saw this problem. As it turns out
lots of people complain. However, it may be that there is
more than one problem.
Frank Bernard has problems on a single machine since
2.3.99pre6-6, and sees "Trying to lock fdc while usage count=0".
Simon Kirby writes "Me Too" with the same message.
Carl Perry sees the same message starting at 2.3.99-pre6.
Arkadiusz Miskiewicz has poblems with 2.3.99-pre8 with the same message.
Thomas Molina writes "I'm seeing the same thing".
David Bronaugh has problems with 2.3.99pre6-1.
Vitezslav Samel writes
"I tried to find the kernel which triggers this and found
that the problem is between 2.3.99-pre5 and 2.3.99-pre6-prepre6.
When I switched module support on, the floppy problem disappeared."
This seems to be the same problem in all cases.
A short and ugly patch is given below. This suffices in my case.
Please report on success/failure.
[The bug causes random things to happen; that explains why unrelated
changes cause the problem to appear or disappear.]
Then John Levon says
"2.3.29 onwards cause complete hang on floppy access;
floppy compiled as module"
Thierry Vignaud adds:
"it happens only if floppy driver is built as module".
Maybe this is something else? Has this been solved already?
Andries
---------------------------------------------------------------
avoid doing check_floppy_change before open is called
---------------------------------------------------------------
diff -u --recursive --new-file ../linux-2.3.99p9/linux/drivers/block/floppy.c ./linux/drivers/block/floppy.c
--- ../linux-2.3.99p9/linux/drivers/block/floppy.c Wed May 24 15:18:10 2000
+++ ./linux/drivers/block/floppy.c Wed May 24 15:23:44 2000
@@ -3649,6 +3649,8 @@
printk("\n");
}
+static int floppy_open_ct = 0;
+
static int floppy_release(struct inode * inode, struct file * filp)
{
int drive = DRIVE(inode->i_rdev);
@@ -3660,6 +3662,7 @@
UDRS->fd_ref = 0;
}
floppy_release_irq_and_dma();
+ floppy_open_ct--;
return 0;
}
@@ -3706,6 +3709,8 @@
if (floppy_grab_irq_and_dma())
return -EBUSY;
+ floppy_open_ct++;
+
if (filp->f_flags & O_EXCL)
UDRS->fd_ref = -1;
else
@@ -3777,6 +3782,9 @@
DPRINT("check_floppy_change: not a floppy\n");
return 0;
}
+
+ if (floppy_open_ct <= 0)
+ return 0;
if (UTESTF(FD_DISK_CHANGED) || UTESTF(FD_VERIFY))
return 1;
---------------------------------------------------------------
-
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 : Wed May 31 2000 - 21:00:12 EST