IDE-Floppy and devfs

From: Andreas Franck (afranck@gmx.de)
Date: Sun Oct 22 2000 - 16:06:26 EST


Hi Paul, hi linux-kernel audience,

some szggestion for the upcoming 2.4 release ide-floppy driver: It
really works
nice without devfs, but the ide-floppy behaviour in connection with
devfs is
a bit strange.

If ide-floppy is compiled as a module, which is loaded (or autoloaded by
some smart
devfs rule) when no disk is in the drive, NO devfs entries are created,
so there
is no way to access the drive. Even worse, when a disk is inserted, the
module is
still loaded so there is no way to access the disk! Only manual
unloading and reloading
of the module will do the trick.

I'd suggest something like the cdrom approach: There is always one
device node for
removable devices, regardless of any media present in the drive. This
could
be /dev/ide/host0/bus1/target1/lun0/floppy or something like that.

Accessing this file should trigger a probe for the media (which may be
partitioned
in ide-floppy devices, which makes life a bit harder). By this probe,
the
/dev/ide/.../lun0/disc and /dev/ide/.../lun0/part4 (or any other
partitions)
might be created, if there is a medium in the drive; a symlink to the
"right" partition
(part4 for normal ZIP disks, AFAIK) shhould be placed in a directory of
its own,
for example /dev/ide/floppy/c0b1t1u0, and anotherone perhaps in
/dev/idefloppy/floppy0
or something.

I have already implemented the first half of this (creation of the
floppy node which will
trigger the partition scan when accessed), I have attached my patch for
review here.
Its still quite hackish, but I'm sure you can follow my ideas with what
I explained above
- if not, don't hesitate to ask.

->- snip -<-

-- 
->>>----------------------- Andreas Franck --------<<<-
---<<<---- Andreas.Franck@post.rwth-aachen.de --->>>---
->>>---- Keep smiling! ----------------------------<<<-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:19 EST