[ltp] UltraBay Slim removal

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Wed, 22 Apr 2009 00:07:42 -0300


On Tue, 21 Apr 2009, Peter F. Patel-Schneider wrote:
> Does anyone know how the Ultrabay Slim physical actions are mapped into
> events that Linux (Fedora, in my case) can respond to?

Yes.  On any non-ancient thinkpad, dock and bay actions are two-step.
On the first step, we get a notification from ACPI that the lever is
"out".  Then we do whatever we should do, and issue the acpi eject
command, which powers down the bay/dock.  Then the user does the
second step (remove the device/undock).

In a new-enough kernel (2.6.28+), the dock driver (which also takes
care of the bays) will issue an uevent when you eject the lever.  I am
not sure how well it works on 2.6.27, but it _is_ supposed to work
in 2.6.27.

If the dock driver isn't working on your kernel, you can configure
thinkpad-acpi with the legacy bay and dock support, it will give you
acpi events to hook to.  Check the documentation.  It is incompatible
with ACPI-aware libata, and it is incompatible with the T60 bay.  Your
best bet really is the standard dock driver.

> In particular, is there an event that corresponds to moving the latch
> that lets the device eject lever pop out?  

Yes, see above.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh