[ltp] /proc/acpi/ibm/bay gone with ThinkPad ACPI Extras v0.19-20080107/2.6.24

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Wed, 30 Jan 2008 10:36:36 -0200


On Wed, 30 Jan 2008, Marc MERLIN wrote:
> thinkpad_acpi: ThinkPad BIOS 7FETA4WW (2.22 ), EC 7FHT26WW-1.08
> thinkpad_acpi: Lenovo ThinkPad Z61p
> 
> I am also slightly confused about the bay driver in 2.6.24:
> kernel: ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: found ejectable bay
> kernel: ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: Adding notify handler
> kernel: ACPI: Error installing bay notify handler
> kernel: ACPI: Bay [\_SB_.PCI0.IDE0.PRIM.MSTR] Added

I will look into this, it should have screamed bloody murder and refused to
load: without the notify handler, it won't work right(!), although it
*would* be able to command the thinkpad to eject the bay.

> 1) what's this 'Error installing bay notify handler' which I've always
>    had?

It means another driver is already handling that ACPI node, and only one
driver at a time can handle an ACPI node.

I.e. you have ACPI bay.c loaded.

Either that, or there is a bug somewhere.

> 2) why does the kernel config say that this bay driver is supposed to work
>    on thinkpads when it looks like it never worked for me and I always had
>    the bay driver from {ibm,thinkpad}-acpi

Which kernel config?  The ACPI generic bay driver *does* work on any
thinkpads with hotswap bays.  It won't work on some older thinkpads that do
warmswap (tell it to eject, SLEEP, remove device, WAKE), but I am not sure
even thinkpad-acpi would work right with warmswap.

> Also, note that I also patched drivers/misc/thinkpad_acpi.c as recommended
> by tytso to add \_SB_.PCI0.IDE0.PRIM.MSTR: as per
> http://www.mail-archive.com/linux-acpi%40vger.kernel.org/msg04716.html
> As per the messages I got above, it looks like my Z61p with sata but IDE
> ultrabay still requires this patch which isn't in mainline.

And it will never be, it breaks other thinkpads. I would have to rewrite the
bay handler to fix it, and sincerely, it is deprecated and not worth the
bother, UNLESS ACPI bay never works right (which, AFAIK, isn't true).

I will probably remove bay and dock handling from thinkpad-acpi in 2.6.26,
since ACPI generic bay is supposed to start working for batteries in 2.6.25.

-- 
  "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