lkml.org 
[lkml]   [2002]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.5.13 floppy driver is broken
There are at least two major problems with drivers/block/floppy.c
in 2.5.13:

1. Writing to /dev/fd0 fails with EROFS from open().
The driver's open() method relies on revalidate() having read the
first block and sensed whether the floppy is writable or not.
But this code was #if:ed out (lines 3883-3903) in 2.5.13, causing
open() to think the floppy is write-protected and return -EROFS.
Simply removing the #if 0 doesn't work since some of the code
in there no longer compiles in 2.5.13.
A workaround is to read from /dev/fd0 before writing.

2. The data written is seriously corrupted. I compared a bzImage
written to /dev/fd0 with 2.4.19-pre8 and 2.5.13. The first 9K was Ok,
but then 2.5.13 wrote data starting from offset 8K in the input.
I checked if the remaining data was simply shifted 1K, but that
was not the case: there are other differences (the next one at
offset 18K) but I haven't fully analysed the pattern.
I suspect there's some kind of block size confusion error.

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

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.056 / U:4.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site