ACPI: ibm-acpi: add Ultrabay support for the T60p ThinkPadv2.6.18.6+ibm-acpi-20070206
commita93778c3e2e7ecda73d593d49c439af6409c4f0c
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>
Sat, 13 Jan 2007 03:45:27 +0000 (13 01:45 -0200)
treea8f7c0683ba386cf6f7de4ad98af4dbe6450c403
parent565ef2a9d336396e240ccb9952a7db54fc620b40
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