ACPI: ibm-acpi: add Ultrabay support for the T60p ThinkPadv2.6.20+ibm-acpi-20070206
commit8aa85a29391c3f1d038a816b6d67d30a8d540eb2
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>
Mon, 5 Feb 2007 19:55:59 +0000 (5 17:55 -0200)
tree9ec604c06d66620f82926ca6951a15fa3ce9bf47
parent62d0cfcb27cf755cebdc93ca95dabc83608007cd
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