Page 1 of 1

Hot Swap Ultrabay Devices?

Posted: Tue Apr 05, 2005 2:54 pm
by systemparadox
Hi all.
Does anyone know if hot swapping ultrabay devices is possible with Linux (I'm thinking of T23 mostly, but other info might be useful)?

Also, I know it should be possible to warm (suspend first) swap (I haven't tried it yet), is there anything you have to do before or afterwards? Is there any restriction on which devices you can swap between (on the thinkpad 600 you could only put the floppy in if it had booted up with it in or attached externally)?

Thanks
Simon

Hotswapping

Posted: Sat Apr 16, 2005 5:09 am
by xtypestereotype
I've read somewhere in the hdparm docs that the source of hdparm contains a patch for the kernel to enable hotswapping on Thinkpad 600's Ultrabay... Hope this helps :)

Re: Hotswapping

Posted: Wed Nov 23, 2005 1:30 pm
by systemparadox
xtypestereotype wrote:I've read somewhere in the hdparm docs that the source of hdparm contains a patch for the kernel to enable hotswapping on Thinkpad 600's Ultrabay... Hope this helps :)
I found the hdparm doc you are reffering too. IBM-ACPI (http://ibm-acpi.sourceforge.net/)(Part of kernel as of 2.6.10) implements an 'eject' function which I think calls hdparm to do the same thing, as well as some ACPI stuff which helps the whole process.

However...
1. This only works for IDE devices. Any other devices show up as 'empty' in /proc/acpi/ibm/bay. This is fine for batteries, but what about the floppy? It seems that it's ok to just rip it out, so long as it's not mounted or in use. That might make sense- the floppy drive is always registered as present in the BIOS and in Win98. But something which will do the relevant ACPI stuff would be nice (the bay light flashes to tell me I shouldn't really be doing it).
2. My DVD/CD-RW drive is unable to read discs if inserted while the system is on. I have to reboot. Why? What's going on? Where can I find more info? How do I fix it?
3. Anything not registered to the IDE driver is not detected and appears as empty (like point 1 above). The big problem here: SCSI emulation for CD-burning. I know the latest cdrtools don't need this but I'm yet to find out how to install them.


The main problem I need fixing is number 2.

Could anyone who has ultrabay hotswapping working (by any method)(just being able to eject and insert an optical drive is enough- you don't need another device) in Linux on their 600X, T20, T21, T22, T23, T30, T4x, or X, R, A, G or Z series ThinkPad please post here!


Any help, advice, suggestions, info, pointers, hints or whatever would be greatly appreciated.
Thanks in advance
Simon

Posted: Mon Dec 19, 2005 10:47 am
by systemparadox
It works!!!
The eject fuction from ibm_acpi doesn't seem to unregister the devices properly.
Using debian's "hotswap" package (I compiled from source and am using it on Slackware/LFS without difficulty) it all works fine.

I've added more info at the bottom of this page:
http://www.thinkwiki.org/wiki/UltraBay

Simon

Posted: Tue Dec 20, 2005 3:10 am
by kaiser
there was something in IBM-ACPIs ReadMe.
the eject command just disconnects the ultrabay, it doesn't tell the system to disable the drive. So I think for the IDE drivers it is a situation as if you rip off the drive, therefore the ReadMe says you have to use idectl to safely shutdown the drive before ejecting it.

Posted: Wed Dec 21, 2005 8:27 am
by systemparadox
kaiser wrote:there was something in IBM-ACPIs ReadMe.
the eject command just disconnects the ultrabay, it doesn't tell the system to disable the drive. So I think for the IDE drivers it is a situation as if you rip off the drive, therefore the ReadMe says you have to use idectl to safely shutdown the drive before ejecting it.
That's worth knowing. Thanks.
I'll probably just tell hotswap to issue the eject command after it's shutdown the device.
Now why didn't I think of that?

Simon