Bug 15521
Summary: | Undock button missing event - ThinkPad X40 | ||
---|---|---|---|
Product: | ACPI | Reporter: | Robert de Rooy (robert.de.rooy) |
Component: | Config-Hotplug | Assignee: | Zhang Rui (rui.zhang) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | acpi-bugzilla, akpm, lenb, rui.zhang |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.33 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
X40 DSTD
debug patch syslog debug patch 2 syslog patch to fix the warning, based on https://patchwork.kernel.org/patch/66412/ |
Description
Robert de Rooy
2010-03-12 11:29:00 UTC
please verify if it's a duplicate of bug #15318. i.e. please try the patch at http://bugzilla.kernel.org/show_bug.cgi?id=15318#c10 and see if it helps. No, I had already tried that patch. Also that issue is resolved in 2.6.33. Not sure how I can remove the Needinfo flag. I only seem to be able to change the status to resolved/verified/rejected/deferred/closed. None of which apply as there is no fix. please apply the debug patch in comment #4 and #6 and do the same test mentioned in bug #15318. With the two patches applied on a 2.6.33.1 kernel, I get these messages when pressing the undock button Mar 16 14:03:54 x40 kernel: Notification 0x3 to device \_SB_.MDCK Mar 16 14:03:54 x40 kernel: Rui: in acpi_dock_notifier_calli, event 3 # grep . /sys/bus/acpi/drivers/*/*/path /sys/bus/acpi/drivers/ac/ACPI0003:00/path:\_SB_.PCI0.LPC_.EC__.AC__ /sys/bus/acpi/drivers/battery/PNP0C0A:00/path:\_SB_.PCI0.LPC_.EC__.BAT0 /sys/bus/acpi/drivers/button/PNP0C0D:00/path:\_SB_.LID_ /sys/bus/acpi/drivers/button/PNP0C0E:00/path:\_SB_.SLPB /sys/bus/acpi/drivers/ec/PNP0C09:00/path:\_SB_.PCI0.LPC_.EC__ /sys/bus/acpi/drivers/pci_link/PNP0C0F:00/path:\_SB_.LNKA /sys/bus/acpi/drivers/pci_link/PNP0C0F:01/path:\_SB_.LNKB /sys/bus/acpi/drivers/pci_link/PNP0C0F:02/path:\_SB_.LNKC /sys/bus/acpi/drivers/pci_link/PNP0C0F:03/path:\_SB_.LNKD /sys/bus/acpi/drivers/pci_link/PNP0C0F:04/path:\_SB_.LNKE /sys/bus/acpi/drivers/pci_link/PNP0C0F:05/path:\_SB_.LNKF /sys/bus/acpi/drivers/pci_link/PNP0C0F:06/path:\_SB_.LNKG /sys/bus/acpi/drivers/pci_link/PNP0C0F:07/path:\_SB_.LNKH /sys/bus/acpi/drivers/pci_root/PNP0A03:00/path:\_SB_.PCI0 /sys/bus/acpi/drivers/power/LNXPOWER:00/path:\_SB_.PCI0.LPC_.EC__.PUBS /sys/bus/acpi/drivers/processor/LNXCPU:00/path:\_PR_.CPU_ /sys/bus/acpi/drivers/thermal/LNXTHERM:01/path:\_TZ_.THM0 /sys/bus/acpi/drivers/thinkpad_hotkey/IBM0068:00/path:\_SB_.PCI0.LPC_.EC__.HKEY /sys/bus/acpi/drivers/video/LNXVIDEO:00/path:\_SB_.PCI0.VID_ Created attachment 25562 [details]
debug patch
please apply this patch on top of the previous patches and attach the dmesg output after pressing the undock button.
Created attachment 25566 [details] syslog That patch causes the following to be printed in syslog during boot ACPI: ACPI Dock Station Driver: 4 docks/bays found \_SB_.PCI0.IDE0.SCDM.MSTR \_SB_.PCI0.IDE0.SCND.MSTR \_SB_.PCI0.LPC_.EC__.BAT1 \_SB_.GDCK There is no change when pressing the undock button. Messages are the same as in Comment #5. It seems a bit strange that it is called "\_SB_.GDCK" during boot, but "\_SB_.MDCK" when pressing the button. Created attachment 25574 [details]
debug patch 2
please apply this patch on top of the previous ones and see if the problem still exists.
The MDCK device should be added as a dock device after this patch applied.
And it handles the undock event when pressing the undock button.
please attach the full dmesg output after the undock button pressed.
Created attachment 25591 [details]
syslog
With the latest patch, it undocks, and the LEDs on the dock change to indicate it was safe to undock. But I do get a traceback.
Mar 18 17:02:07 x40 kernel: Notification 0x3 to device \_SB_.MDCK
Mar 18 17:02:07 x40 kernel: Rui: in acpi_dock_notifier_calli, event 3
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: =======================================================
Mar 18 17:02:07 x40 kernel: [ INFO: possible circular locking dependency detected ]
Mar 18 17:02:07 x40 kernel: 2.6.33.1 #3
Mar 18 17:02:07 x40 kernel: -------------------------------------------------------
Mar 18 17:02:07 x40 kernel: kacpi_hotplug/18 is trying to acquire lock:
Mar 18 17:02:07 x40 kernel: (kacpid){+.+.+.}, at: [<c044f5d8>] flush_workqueue+0x0/0x94
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: but task is already holding lock:
Mar 18 17:02:07 x40 kernel: ((&dpc->work)){+.+.+.}, at: [<c044eead>] worker_thread+0x15d/0x262
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: which lock already depends on the new lock.
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: the existing dependency chain (in reverse order) is:
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: -> #1 ((&dpc->work)){+.+.+.}:
Mar 18 17:02:07 x40 kernel: [<c0463be7>] __lock_acquire+0xa2b/0xb91
Mar 18 17:02:07 x40 kernel: [<c0463de0>] lock_acquire+0x93/0xb1
Mar 18 17:02:07 x40 kernel: [<c044eee9>] worker_thread+0x199/0x262
Mar 18 17:02:07 x40 kernel: [<c045230c>] kthread+0x6f/0x74
Mar 18 17:02:07 x40 kernel: [<c0403842>] kernel_thread_helper+0x6/0x10
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: -> #0 (kacpid){+.+.+.}:
Mar 18 17:02:07 x40 kernel: [<c0463ae9>] __lock_acquire+0x92d/0xb91
Mar 18 17:02:07 x40 kernel: [<c0463de0>] lock_acquire+0x93/0xb1
Mar 18 17:02:07 x40 kernel: [<c044f624>] flush_workqueue+0x4c/0x94
Mar 18 17:02:07 x40 kernel: [<c05f7feb>] acpi_os_wait_events_complete+0x12/0x1e
Mar 18 17:02:07 x40 kernel: [<c05f8013>] acpi_os_execute_deferred+0x1c/0x2d
Mar 18 17:02:07 x40 kernel: [<c044eeef>] worker_thread+0x19f/0x262
Mar 18 17:02:07 x40 kernel: [<c045230c>] kthread+0x6f/0x74
Mar 18 17:02:07 x40 kernel: [<c0403842>] kernel_thread_helper+0x6/0x10
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: other info that might help us debug this:
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: 2 locks held by kacpi_hotplug/18:
Mar 18 17:02:07 x40 kernel: #0: (kacpi_hotplug){+.+...}, at: [<c044eead>] worker_thread+0x15d/0x262
Mar 18 17:02:07 x40 kernel: #1: ((&dpc->work)){+.+.+.}, at: [<c044eead>] worker_thread+0x15d/0x262
Mar 18 17:02:07 x40 kernel:
Mar 18 17:02:07 x40 kernel: stack backtrace:
Mar 18 17:02:07 x40 kernel: Pid: 18, comm: kacpi_hotplug Not tainted 2.6.33.1 #3
Mar 18 17:02:07 x40 kernel: Call Trace:
Mar 18 17:02:07 x40 kernel: [<c07a93db>] ? printk+0x14/0x19
Mar 18 17:02:07 x40 kernel: [<c0462e87>] print_circular_bug+0x91/0x9d
Mar 18 17:02:07 x40 kernel: [<c0463ae9>] __lock_acquire+0x92d/0xb91
Mar 18 17:02:07 x40 kernel: [<c0463c2a>] ? __lock_acquire+0xa6e/0xb91
Mar 18 17:02:07 x40 kernel: [<c0463de0>] lock_acquire+0x93/0xb1
Mar 18 17:02:07 x40 kernel: [<c044f5d8>] ? flush_workqueue+0x0/0x94
Mar 18 17:02:07 x40 kernel: [<c044f624>] flush_workqueue+0x4c/0x94
Mar 18 17:02:07 x40 kernel: [<c044f5d8>] ? flush_workqueue+0x0/0x94
Mar 18 17:02:07 x40 kernel: [<c05f7feb>] acpi_os_wait_events_complete+0x12/0x1e
Mar 18 17:02:07 x40 kernel: [<c05f8013>] acpi_os_execute_deferred+0x1c/0x2d
Mar 18 17:02:07 x40 kernel: [<c044eeef>] worker_thread+0x19f/0x262
Mar 18 17:02:07 x40 kernel: [<c044eead>] ? worker_thread+0x15d/0x262
Mar 18 17:02:07 x40 kernel: [<c05f7ff7>] ? acpi_os_execute_deferred+0x0/0x2d
Mar 18 17:02:07 x40 kernel: [<c0452688>] ? autoremove_wake_function+0x0/0x34
Mar 18 17:02:07 x40 kernel: [<c044ed50>] ? worker_thread+0x0/0x262
Mar 18 17:02:07 x40 kernel: [<c045230c>] kthread+0x6f/0x74
Mar 18 17:02:07 x40 kernel: [<c045229d>] ? kthread+0x0/0x74
Mar 18 17:02:07 x40 kernel: [<c0403842>] kernel_thread_helper+0x6/0x10
Mar 18 17:02:07 x40 kernel: Rui: in dock_notify, ds->flags 0x10, event 3
Mar 18 17:02:07 x40 kernel: Rui: event 3, dock_in_progress: no
Mar 18 17:02:07 x40 kernel: ACPI: \_SB_.MDCK - undocking
Mar 18 17:02:07 x40 kernel: usb 1-1: USB disconnect, address 2
Created attachment 25601 [details] patch to fix the warning, based on https://patchwork.kernel.org/patch/66412/ please apply this patch on top and see if it helps. Thanks! That takes care of the warning. Any chance of submitting these for 2.6.33-stable? Here is what I see now on a Undock, followed by a dock Mar 19 09:03:14 x40 kernel: Notification 0x3 to device \_SB_.MDCK Mar 19 09:03:14 x40 kernel: Rui: in acpi_dock_notifier_calli, event 3 Mar 19 09:03:14 x40 kernel: Rui: in dock_notify, ds->flags 0x10, event 3 Mar 19 09:03:14 x40 kernel: Rui: event 3, dock_in_progress: no Mar 19 09:03:14 x40 kernel: ACPI: \_SB_.MDCK - undocking Mar 19 09:03:14 x40 kernel: usb 1-1: USB disconnect, address 2 Mar 19 09:03:32 x40 kernel: e1000: eth0 NIC Link is Down Mar 19 09:03:32 x40 NetworkManager: <info> (eth0): carrier now OFF (device state 8, deferring action for 4 seconds) Mar 19 09:03:33 x40 kernel: Notification 0x3 to device \_SB_.GDCK Mar 19 09:03:33 x40 kernel: Rui: in acpi_dock_notifier_calli, event 3 Mar 19 09:03:33 x40 kernel: Notification 0x3 to device \_SB_.MDCK Mar 19 09:03:33 x40 kernel: Rui: in acpi_dock_notifier_calli, event 3 Mar 19 09:03:33 x40 kernel: Rui: in dock_notify, ds->flags 0x10, event 3 Mar 19 09:03:33 x40 kernel: Rui: event 3, dock_in_progress: no Mar 19 09:03:33 x40 kernel: ACPI: \_SB_.GDCK - undocking Mar 19 09:03:33 x40 kernel: Rui: in dock_notify, ds->flags 0x10, event 3 Mar 19 09:03:33 x40 kernel: Rui: event 3, dock_in_progress: no Mar 19 09:03:33 x40 kernel: ACPI: \_SB_.MDCK - undocking Mar 19 09:03:36 x40 kernel: e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX Mar 19 09:03:36 x40 NetworkManager: <info> (eth0): carrier now ON (device state 8) Mar 19 09:03:37 x40 kernel: Notification 0x0 to device \_SB_.MDCK Mar 19 09:03:37 x40 kernel: Rui: in acpi_dock_notifier_calli, event 0 Mar 19 09:03:37 x40 kernel: usb 1-1: new high speed USB device using ehci_hcd and address 3 Mar 19 09:03:37 x40 kernel: usb 1-1: New USB device found, idVendor=04b3, idProduct=4484 Mar 19 09:03:37 x40 kernel: usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Mar 19 09:03:37 x40 kernel: hub 1-1:1.0: USB hub found Mar 19 09:03:37 x40 kernel: hub 1-1:1.0: 3 ports detected Mar 19 09:03:38 x40 kernel: Rui: in dock_notify, ds->flags 0x10, event 0 Mar 19 09:03:38 x40 kernel: Rui: event 0, dock_in_progress: no Mar 19 09:03:38 x40 kernel: ACPI: \_SB_.MDCK - docking Mar 19 09:03:38 x40 kernel: ata2: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xe frozen Mar 19 09:03:38 x40 kernel: ata2: ACPI event, ACPI event Mar 19 09:03:38 x40 kernel: ata2: soft resetting link Mar 19 09:03:38 x40 pulseaudio[1428]: ratelimit.c: 6 events suppressed Mar 19 09:03:38 x40 kernel: ata2: EH complete patches are sent to ACPI mail list. please refer to https://patchwork.kernel.org/patch/87371/ https://patchwork.kernel.org/patch/87373/ BTW: I agree they are good candidates for 2.6.33 stable. applied both patches in comment #14 to acpi tree patches below shipped in linux-2.6.34-rc4 closed commit bc73675b99fd9850dd914be01d71af99c5d2a1ae Author: Zhang Rui <rui.zhang@intel.com> Date: Mon Mar 22 15:48:54 2010 +0800 ACPI: fixes a false alarm from lockdep fixes a false alarm from lockdep, as acpi hotplug workqueue waits other workqueues. http://bugzilla.kernel.org/show_bug.cgi?id=14553 https://bugzilla.kernel.org/show_bug.cgi?id=15521 Original-patch-from: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 1ee4d61fd9822fb89e63b88a66848477087cd82e Author: Zhang Rui <rui.zhang@intel.com> Date: Mon Mar 22 15:46:49 2010 +0800 ACPI dock: support multiple ACPI dock devices There may be multiple ACPI dock devices exist in ACPI namespace and we should probe all of them. http://bugzilla.kernel.org/show_bug.cgi?id=15521 CC: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> |