ACPI: ibm-acpi: add Ultrabay support for the T60p ThinkPadv2.6.19.1+ibm-acpi-20061231
commit4090864864dda95c1b8d957877a33ff6b60ae911
authorTheodore Ts'o <tytso@mit.edu>
Sun, 31 Dec 2006 16:53:49 +0000 (31 14:53 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 31 Dec 2006 17:07:22 +0000 (31 15:07 -0200)
tree55fd5ec0169e996a8ac58f89efce5d4f1ed4c08d
parent3c7823147a9896a7bbfa8781cd3b1d4373cec896
ACPI: ibm-acpi: add Ultrabay support for the T60p ThinkPad

The following patch adds support for obtaining the status and ejecting
Ultrabay devices for the T60p Thinkpad; my guess is that it probably
works on T60 Thinkpads and probably more recent Lenovo latops as well.

With the 2.03 BIOS I have been able to eject a SATA drive in an Ultrabay
carrier by using the command:

  "echo 1 > /sys/class/scsi_device/1:0:0:0/device/delete"

and upon re-inserting the it back into the device and issuing the
command:

 "echo 0 0 0 > /sys/class/scsi_host/host1/scan"

have the device appear again.  (With the 1.02 BIOS the device does not
function when re-inserted, even after a warm boot; a cold reboot is
required to store the Ultrabay device's functionality.)

More complicated Ultrabay eject and insert scripts can be found on the
ThinkWiki, although it's important to comment out the "hdparm -Y" as it
apparently doesn't work or do anything, and causes the eject process to
hang for about a minute.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Whoopie <whoopie79@gmx.net>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
drivers/acpi/ibm_acpi.c