devfs
[Top] [All Lists]

ide-floppy doesn't register with devfs if no media

To: devfs@xxxxxxxxxxx, ide-floppy-test@xxxxxxxxxxxxxxxxxxxxx
Subject: ide-floppy doesn't register with devfs if no media
From: Pavel Roskin <proski@xxxxxxx>
Date: Wed, 28 May 2003 12:35:58 -0400 (EDT)
Cc: Paul Bristow <paul@xxxxxxxxxxxxxxx>
Sender: devfs-bounce@xxxxxxxxxxx
Hello!

There is a bug in 2.5.x kernels (last tested with 2.5.69-bk18) - devfs
entries are not registered for IDE floppies if the media is absent while
the ide-floppy driver is being initialized.

ide-floppy sets the number of minor numbers to more than one in
idefloppy_attach(), drivers/ide/ide-floppy.c and calls add_disk() in
drivers/block/genhd.c, which calls register_disk() in
fs/partitions/check.c.

register_disk() registers devfs entries for devices with one minor number
(e.g. standard PC floppy) and then checks media.  If the media is missing,
no devfs entries are registered at all.

I think if would be better to register at least the "disc" entry.

By the way, if ide-floppy is a module, it tries to unregister the devfs
entries on unload, which results is a kernel panic.  My earlier patch
posted today to the devfs list prevents the panic and may be useful for
development of ide-floppy until this problem is fixed.

-- 
Regards,
Pavel Roskin

<Prev in Thread] Current Thread [Next in Thread>
  • ide-floppy doesn't register with devfs if no media, Pavel Roskin <=