[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Floppy issues



We fixed that in T2 Linux (debugged that for a longer time .. ), the reason was
that the the probe __floppy_read_block_0 tries to read 1 page from disk, 8KB, 
which was more than the derived floppy size of 8 sectors (4KB) from the minor
number, so the "beyond end of device" message comes up, see:
https://github.com/rxrbln/t2sde/blob/main/package/kernel/linux/hotfix-floppy-not-4k-pages.patch

btw, the issue does not occur, if you open the floppy with another
device major/minor like: fd0h1440 (mknod /dev/fd0h1440 b 2 28).

Regards,
Florian Fuchs

root@SUNW_375_0066:# disktype /dev/fd0

--- /dev/fd0
disktype: Can't open /dev/fd0: No such device or address

[  525.341906] disktype: attempt to access beyond end of device
               fd0: rw=0, sector=0, nr_sectors = 16 limit=8
[  525.341991] floppy: error 10 while reading block 0

--- linux-6.16/drivers/block/floppy.c.vanilla	2025-09-07 11:16:02.420895667 +0200
+++ linux-6.16/drivers/block/floppy.c	2025-09-07 11:17:17.538595643 +0200
@@ -331,7 +331,7 @@
  * This default is used whenever the current disk size is unknown.
  * [Now it is rather a minimum]
  */
-#define MAX_DISK_SIZE 4		/* 3984 */
+#define MAX_DISK_SIZE (PAGE_SIZE / 1024)
 
 /*
  * globals used by 'result()'


Reply to: