Latest working kernel version: None
Earliest failing kernel version: 2.6.25-rc8
Distribution: Ubuntu Hardy Heron (8.04) Beta. Also fails with vanilla kernel
Hardware Environment: Sony Vaio VGN SZ483N laptop + the corresponding docking station
Software Environment: N/A
I compiled the kernel from git following instructions from here: https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
Scenario 1: I boot the machine outside the dock. If I now dock it the ethernet adapter on the docking station is not recognized.
Scenario 2: I boot the machine on the dock. The ethernet adapter on the docking station is recognized. If I now undock after pressing the undock button and redock again the ethernet adapter is not recognized.
Scenario 3: I boot the machine on the dock. The ethernet adapter on the docking station is recognized. If I now undock without pressing the undock button then the machine hangs and requires a hard reset.
Scenario 4: I boot the machine outside the dock and suspend it. If I now place it on the dock and resume then the ethernet adapter on the dock is recognized.
Steps to reproduce:
Docking and undocking works flawlessly under Windows Vista.
The same buggy behavior is observed under Freebsd (see http://lists.freebsd.org/pipermail/freebsd-acpi/2008-March/004693.html). On the freebsd-mobile mailing list it was suggested that the \_SB.DOCK._STA method always seems to return zero (i.e. dock status method indicates that the system is undocked all the time) (see http://lists.freebsd.org/pipermail/freebsd-acpi/2008-March/004699.html).
The attached script dock.sh scans the pci bus and powers them on. This seems to restore network connectivity after a redock but the in use LED on the dock does not light up. Furthermore /sys/devices/platform/dock.0/docked still contains a 0. Some discussion about the script can be found at http://ubuntuforums.org/showthread.php?t=666757
Please let me know if you need any further information.
Created attachment 15693 [details]
Created attachment 15694 [details]
Output of lspci -vvnn
Created attachment 15695 [details]
Output of dmidecode
Created attachment 15696 [details]
Created attachment 15697 [details]
Created attachment 15698 [details]
The script I use to dock
Created attachment 15699 [details]
config used to build the kernel
I have very same problem with VGN-SZ71XN/C and docking station.
I also have a docking problem (http://bugzilla.kernel.org/show_bug.cgi?id=10432), as do other Ubuntu users (https://bugs.launchpad.net/bugs/41091).
In my Dell the dock device's _STA method always returns 0 when I compile the kernel with CONFIG_SLUB, but returns the correct value when I compile with CONFIG_SLAB. It might be worthwhile to compile your kernel with CONFIG_SLAB, to see if this bug is a duplicate.
BTW there is a ubuntu bug report for this bug (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/194617). I don't think this bug is related to 10432. I have no hard freezes while docking and undocking if the acpiphp module is loaded. The hard freeze happens only if acpiphp module is not loaded. The main issue is that the PCI network card is not detected on docking in certain cases.
The reason I thought it could be related is the common feature: the _STA method on the dock device returns a false zero. The Dell then freezes because it receives a continuous stream of ACPI events until the kernel responds by calling the _DCK method. It looks as if the Vaio only sends a single ACPI event, and thus doesn't freeze.
Created attachment 16039 [details]
can you please try attached patch? It appears we should do _DCK first in hotplug.
I tested it and it works. Thanks!
Scenario 1 and 2 are resolved. But Scenario 3 still remains. The sky2 driver still causes the machine to hard freeze if the machine is undocked without pressing the undock button.
*** Bug 10432 has been marked as a duplicate of this bug. ***
Created attachment 16054 [details]
a slightly modified patch
please try the slightly modified patch.
re comment #13: I guess scenario 3 doesn't work for windows too?
I've tested the latest patch on my Dell D600, and it cures my docking issue.
There is one minor issue - even with the extra test on acpi_bus_get_device(), the Dell still sometimes goes down the dock() path when undocking:
Press eject request button on dock:
[ 296.446486] ACPI: \_SB_.PCI0.PCIE.GDCK - undocking
Remove laptop from dock:
[ 298.836494] usb 4-6: USB disconnect, address 6
[ 298.836552] usb 4-6.3: USB disconnect, address 7
[ 299.471014] tg3: eth0: Link is down.
[ 300.267710] ACPI: \_SB_.PCI0.PCIE.GDCK - docking
[ 300.269420] ACPI: Unable to dock!
What's curious is that this doesn't happen every time. The error appears to be harmless, and I can still dock and undock the laptop afterwards.
Scenario 3 works perfectly for Windows vista Ultimate and also under DesktopBSD 1.6 (it suffers from the other scenarios though).
re comment #17: does the patch in http://bugzilla.kernel.org/show_bug.cgi?id=7812 help the undocking case?
re comment #18: this scenario is surprise remove, I don't think linux drivers can handle it, proberly we will not support it.
The patch in http://bugzilla.kernel.org/show_bug.cgi?id=7812 doesn't change the behaviour at all. I still get the "Unable to dock!" message when I remove the laptop.
Looking at the code, there seems to be only one sequence of events that can cause this:
1. I remove the laptop.
2. The Dell BIOS sends ACPI_NOTIFY_BUS_CHECK.
3. acpi_bus_get_device() succeeds.
4. dock() executes the _DCK method without seeing a failure.
5. dock_present() is false, because the laptop is genuinely not in the dock.
I suspect that step 2 is a harmless BIOS bug.
Shaohua - do you have any plans to submit this fix into the mainline kernel?
patches are shipped to acpi test branch.
shipped in linux-2.6.28-rc1
Author: Shaohua Li <email@example.com>
Date: Thu Aug 28 10:02:03 2008 +0800
ACPI: dock: avoid check _STA method