Created attachment 104661 [details] The end of the dmesg I have a Sony VAIO VPCZ23A4R laptop. It has a dock station with several devices in it: # lspci 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4) 00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4) 00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6230 [Rainbow Peak] (rev 34) 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01) 04:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04) 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06) 08:00.0 PCI bridge: Intel Corporation Device 151b (rev 01) 0a:00.0 PCI bridge: Intel Corporation Device 151b (rev 01) 0a:03.0 PCI bridge: Intel Corporation Device 151b (rev 01) 0a:04.0 PCI bridge: Intel Corporation Device 151b (rev 01) 14:00.0 PCI bridge: Intel Corporation Device 151b (rev 01) 15:03.0 PCI bridge: Intel Corporation Device 151b (rev 01) 15:04.0 PCI bridge: Intel Corporation Device 151b (rev 01) 16:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6730M/6770M/7690M XT] 16:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Turks/Whistler HDMI Audio [Radeon HD 6000 Series] 17:00.0 PCI bridge: Intel Corporation Device 151b (rev 01) 18:00.0 PCI bridge: Intel Corporation Device 151b (rev 01) 18:01.0 PCI bridge: Intel Corporation Device 151b (rev 01) 18:02.0 PCI bridge: Intel Corporation Device 151b (rev 01) 18:03.0 PCI bridge: Intel Corporation Device 151b (rev 01) 18:04.0 PCI bridge: Intel Corporation Device 151b (rev 01) 19:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06) 1a:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6121 SATA II / PATA Controller (rev b2) 1b:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04) aep-vaio ~ # lspci -n 00:00.0 0600: 8086:0104 (rev 09) 00:02.0 0300: 8086:0126 (rev 09) 00:16.0 0780: 8086:1c3a (rev 04) 00:1a.0 0c03: 8086:1c2d (rev 04) 00:1b.0 0403: 8086:1c20 (rev 04) 00:1c.0 0604: 8086:1c10 (rev b4) 00:1c.1 0604: 8086:1c12 (rev b4) 00:1c.2 0604: 8086:1c14 (rev b4) 00:1c.3 0604: 8086:1c16 (rev b4) 00:1c.6 0604: 8086:1c1c (rev b4) 00:1d.0 0c03: 8086:1c26 (rev 04) 00:1f.0 0601: 8086:1c4b (rev 04) 00:1f.2 0104: 8086:282a (rev 04) 00:1f.3 0c05: 8086:1c22 (rev 04) 02:00.0 0280: 8086:0091 (rev 34) 03:00.0 ff00: 10ec:5209 (rev 01) 04:00.0 0c03: 1033:0194 (rev 04) 05:00.0 0200: 10ec:8168 (rev 06) 08:00.0 0604: 8086:151b (rev 01) 0a:00.0 0604: 8086:151b (rev 01) 0a:03.0 0604: 8086:151b (rev 01) 0a:04.0 0604: 8086:151b (rev 01) 14:00.0 0604: 8086:151b (rev 01) 15:03.0 0604: 8086:151b (rev 01) 15:04.0 0604: 8086:151b (rev 01) 16:00.0 0300: 1002:6740 16:00.1 0403: 1002:aa90 17:00.0 0604: 8086:151b (rev 01) 18:00.0 0604: 8086:151b (rev 01) 18:01.0 0604: 8086:151b (rev 01) 18:02.0 0604: 8086:151b (rev 01) 18:03.0 0604: 8086:151b (rev 01) 18:04.0 0604: 8086:151b (rev 01) 19:00.0 0200: 10ec:8168 (rev 06) 1a:00.0 0101: 11ab:6121 (rev b2) 1b:00.0 0c03: 1033:0194 (rev 04) Devices up to and including 05:00.0 are in the laptop itself, and everything below is in the dock station. I have tested the laptop with linux-3.10-rc5 with this patch series applied: https://lkml.org/lkml/2013/6/13/349 The testcase is: boot with the dock station attached, let Xorg start (it will use both Intell and Radeon cards), switch to a virtual console, press the Undock button. Yes I know that GPU hotplug is not yet supported in Xorg, but attempting it should not lead to messages like "kernel BUG at drivers/gpu/drm/ttm/ttm_bo.c:1591!" The part of the dmesg after the undocking attempt, captured over netconsole, is attached to this bug.
Kernel PCI GPU hotplug is not supported yet either. You've basically removed hardware from under an active driver. You'll need to unload the radeon module first.
There was good progress on this undock bug since the report. HD audio (with PulseAudio always opening the mixer) no longer is a thing that prevents undocking. And, if I press the Undock button now, undocking completes successfully. I am going to attach a dmesg with two dock + undock attempts. In the first attempt, nothing was using the Radeon card, so we only get a (possibly unrelated) trace related to backlight. In the second attempt, Radeon was actually used by the X session as an offload sink, but no programs were running that actually attempted to render GL on the Radeon. So, despite the traces, there were no user-visible crashes.
Created attachment 153801 [details] New dmesg with two dock + undock attempts
The laptop is dead, closing bugs reproducible only on it