Re: Floppy issues
Hi Florian.
On Wed, 2025-10-29 at 16:54 +0100, Florian Fuchs wrote:
> On 25 Oct 12:35, Gregor Riepl wrote:
> > > 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
> >
> > Is this common for PC floppy drives?
> > Perhaps /dev/fd0 should register itself with the correct minor number instead.
>
> Yes, it's common, as far as I understand the floppy driver, it
> auto-detects the disk geometry by reading the first block ("bootblock")
> in floppy_revalidate and __floppy_read_block_0 [1].
>
> The auto-detection is also noted in admin-guide/devices.txt [2]:
>
> 2 block Floppy disks
> 0 = /dev/fd0 Controller 0, drive 0, autodetect
>
> > Perhaps /dev/fd0 should register itself with the correct minor number instead.
>
> That might be difficult, as you could put in disks with a different
> kind of geometry.
With your patch independently verified, could you send your patch upstream?
Gregor can then add his "Tested-by:" on the patch if you remember to CC him ;-).
We're tracking the state of this bug here [1] so it doesn't get lost.
Adrian
> [1] https://github.com/sparclinux/issues/issues/18
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: