[ltp] T21 warm / hotswapping (was T21 modem & 2.6)

Paul Ionescu linux-thinkpad@linux-thinkpad.org
Sun, 30 May 2004 15:36:01 +0300


Piotr Gawrysiak wrote:
        
        Thanks! I am also using ACPI (APM suspend does not work, only
        blanks screen and gives very strange double tone beep - and it
        works OK before loading OS, ie. on GRUB screen - anyone else has
        experienced this?). With ACPI I have however a problem - when I
        suspend the Ultrabay LED stays on, even when machine is
        suspended. WinXP behaves in the same way (I think it also uses
        ACPI) but you can use "stop device" tray icon, or IBM's Easy
        Eject utility to stop the DVD of FDD before you pull it out of
        the bay. Is it possible to do it in Linux (Fedora Core 2)? With
        tpctl I guess it's possible to read information about the device
        mounted in the bay (tpctl -iU I think) but that's all.
        
        Piotr Gawrysiak

Piotr,

I have a T40, and it suspends with both APM and ACPI, and in both cases the Ultrabay LED stays ON.
In FC2 is not yet possible to "stop device" because that function is done in ACPI, and the current linux ACPI as it is in FC2 has no support for it.
And I suspect that some information from IBM side is needed for this to be implemented in ACPI.
IBM released the Easy Eject utility for Windoze, but nothing for Linux, which is not nice from a Linux supporter.
What is needed, is a IBM ACPI driver, like the one for ASUS or Toshiba.
The Asus and Toshiba are reverse engineering from windows drivers and from looking at DSDT-s.
But in Thinkpads, there are some IBM specific ACPI implementation that does not respect the ACPI standard (i.e. FAN is not described here, brightness levels are not here, a.s.o)

Anyways, if someone really needs to hotswap the ultrabay device, then it is doable with ACPI and idectl from hdparm.
idectl is not included in FC2, you have to get it from hdparm sources.
But the basic is like this, supposing you have a CD in ultrabay:

idectl 1 off
Pull out the cdrom, insert some other ide device. NOTE: The device is still powered on when you pull it, but should be OK as the ultrabay is supposed to be hotswappable.
(In windows, the device is powered off before pulling. I did it on my thinkpad several times without consequences, but don't blame me if you ruin your thinkpad)
idectl 1 on

now you can use the new device.