[PATCH] Mobile rack support (not working code)

From: Boszormenyi Zoltan (zboszor@externet.hu)
Date: Wed May 17 2000 - 03:06:01 EST


Hi!

I have a mobile rack on one IDE channel and I would like to see
proper support for it. If I umount it and switch it off then I can
take it away and later I can put it back, sitch it on and mount it.
The machine survives it, I was brave enough to test it.
But that is only if the machine was started with the rack switched on
and I cannot put another driver with different geometry into the
rack while the machine is running without risking kernel confusion.

I started coding to achive some kind of support but I could not
correctly do it. Anyway, the attached patch can be seen as a
starting point. The patch does the following: the ide driver has
a new option: ideX=rack. If you specify it on the kernel command
line, the appropriate /proc/ide/ideX will be registered even if
there are no drives attached to it at the moment because it may
be switched on later.

And there will be a write-only /proc/ide/ideX/reset, you can
echo anything into it, the driver does not bother what it gets.
Even 'echo "" >/proc/ide/ideX/reset' works. If you do this,
proc_ide_write_reset() tries to re-recognize the attached drives
and the proper /proc/ide/ideX/hdY will appear/disappear.

This function is a draft, I did not find any other function in
other source files that would do exactly what I would like to do.
E.g. when I take the drive out, issuing 'echo "" >/proc/ide/ideX/reset'
should make the kernel forget about that drive completely.

The comments in proc_ide_write_reset() tells what I wanted.
Special treatment may be needed as well in cases were the rack
is not alone on the IDE channel. Perhaps in the case where the
media is changed. E.g. there was a disk in the rack then it is
replaced with an IDE ZIP drive.

Regards,
Zoltan Boszormenyi <zboszor@mail.externet.hu>



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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:12 EST