ACPI: ibm-acpi: add Ultrabay support for the T60p ThinkPadv2.6.19.3+ibm-acpi-20070206
commit6c060c8999432c128c8d68da062842471fdba559
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>
Tue, 6 Feb 2007 19:00:24 +0000 (6 17:00 -0200)
treec0b2f3f0a7e0e01a689e182cb7cb45c5cbd9d18e
parent689fbd50e12f1e6f6ea443b31390ce4549c41b91
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