Bug 13669

Summary: Kernel bug with dock driver
Product: Drivers Reporter: Rafael J. Wysocki (rjw)
Component: PlatformAssignee: Henrique de Moraes Holschuh (hmh)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, bugzilla, lenb, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27 2.7.28 2.6.29 2.6.30 Tree: Mainline
Regression: Yes
Bug Depends on:    
Bug Blocks: 13070, 56331    

Description Rafael J. Wysocki 2009-06-28 23:24:42 UTC
Subject    : [2.6.30] Kernel bug with dock driver
Submitter  : Joerg Platte <jplatte@naasa.net>
Date       : 2009-06-14 21:00
References : http://lkml.org/lkml/2009/6/14/216
Handled-By : Henrique de Moraes Holschuh <hmh@hmh.eng.br>

This entry is being used for tracking a regression from 2.6.29.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Zhang Rui 2009-06-29 01:18:45 UTC
*** Bug 13642 has been marked as a duplicate of this bug. ***
Comment 2 Henrique de Moraes Holschuh 2009-07-06 15:33:32 UTC
Ok, I tracked it down.

Basically, thinkpad-acpi is screwing up the ACPI core, and causing the OOPs, and it has been doing things wrong since day one.

ibm-acpi (and later on, thinkpad-acpi) has never registered the bay and dock subdrivers as ACPI devices (because these devices are not matched by HID but rather by namespace node).  And still, it wants to get ACPI events (notifications) and to issue ACPI userspace events (over procfs, and recently, netlink).

This used to work well, but it doesn't anymore.  And it is an horrible hack anyway.

I am not going to fix it.  Instead, I will simply remove the bay and dock subdrivers.  Their usefulness has ended already, the generic bay and dock drivers, plus the libata ACPI eject support, can do a lot better.

I will submit a three-changed-lines patch to -stable and 2.6.31 that mark the thinkpad-acpi DOCK and BAY handling as BROKEN, and I will remove the dead code as soon as possible in a separate patch (2.6.32 at the worst, 2.6.31 if Len will take the patch).
Comment 3 Joerg Platte 2009-07-07 21:35:52 UTC
I compiled 2.6.30.1 without thinkpad-acpi bay/dock support (which sould be equivalent to your patch) and got no bug message until now, even after lots of docking and undocking events. From my point of view this bug can be closed. Henrique, thank you for your work!
Comment 4 Zhang Rui 2009-07-08 00:49:59 UTC
patch already available.
http://patchwork.kernel.org/patch/34525/
http://patchwork.kernel.org/patch/34526/
Comment 5 Len Brown 2009-08-02 16:39:50 UTC
patches above applied to acpi tree
Comment 6 Henrique de Moraes Holschuh 2009-08-03 00:29:41 UTC
merged in mainline, commit 1f6fc2de9525e34ee93bd392fa046369a8cfbf1e and 550e7fd8afb7664ae7cedb398c407694e2bf7d3c.

Needs to go to -stable for 2.6.27 and later.