Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966603AbbDWRQP (ORCPT ); Thu, 23 Apr 2015 13:16:15 -0400 Received: from mail-ob0-f177.google.com ([209.85.214.177]:36375 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966367AbbDWRQN (ORCPT ); Thu, 23 Apr 2015 13:16:13 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Adam Goode Date: Thu, 23 Apr 2015 13:15:52 -0400 Message-ID: Subject: Re: Thunderbolt hotplug not working on MacMini7,1 To: Andreas Noever Cc: "linux-kernel@vger.kernel.org" , Matthew Garrett Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8305 Lines: 152 On Thu, Apr 23, 2015 at 12:12 PM, Andreas Noever wrote: > On Thu, Apr 23, 2015 at 5:10 PM, Adam Goode wrote: >> On Thu, Apr 23, 2015 at 9:28 AM, Adam Goode wrote: >>> >>> On Thu, Apr 23, 2015 at 6:08 AM, Andreas Noever >>> wrote: >>> > Hi Adam, >>> > >>> > On my system (MacBookPro10,1 - 4 channel TB1) the bridges and the >>> > controller both use 0x1547 and are only differentiated by >>> > subvendor/subdevice. >>> > >>> > 0x156c is the 4 channel TB2 controller and was originally added by >>> > Matthew. Judging from his patch it looks like the subvendor/subdevice >>> > is set on his system: >>> > http://patchwork.ozlabs.org/patch/354626/ >>> > >>> > But it also indicates that the bridges already use different ids. If >>> > that is the case then we can drop the subvendor/subdevice for 0x156c. >>> > Matthew can you confirm that on your system 0x156c is used only for >>> > the controller? >>> > >>> > Adam, could you check that suspend/resume works properly? Also your >>> > bugzilla report suggest that hotplug might now work without the >>> > driver. Could you try to revert the _OSI check (and disable the >>> > driver) and check whether everything "just works"? >>> > >>> >>> In _OSI("Darwin") mode, suspend/resume doesn't work. It failed to come >>> back from suspend. >>> >>> I have to rebuild the kernel and remove Darwin again, but I will test >>> suspend/resume in "Windows 2012" mode later. >>> >>> From previous testing, hotplug doesn't automatically work in "Windows >>> 2012" mode. It exhibits the standard no-driver behavior where devices >>> are not detected after boot. But even in "Windows 2012" mode I still >>> do get the 0x156c device, which I think used to be hidden if !Darwin. >>> >>> More testing coming... >>> >> >> I've booted into _OSI(Windows 2012) mode. I am not physically at the >> device right now, but here is the current dmesg with 1 thunderbolt >> device plugged in: >> >> [ 15.576766] thunderbolt 0000:06:00.0: NHI initialized, starting thunderbolt >> [ 15.577868] thunderbolt 0000:06:00.0: allocating TX ring 0 of size 10 >> [ 15.578939] thunderbolt 0000:06:00.0: allocating RX ring 0 of size 10 >> [ 15.580008] thunderbolt 0000:06:00.0: control channel created >> [ 15.581068] thunderbolt 0000:06:00.0: control channel starting... >> [ 15.582122] thunderbolt 0000:06:00.0: starting TX ring 0 >> [ 15.583173] thunderbolt 0000:06:00.0: enabling interrupt at >> register 0x38200 bit 0 (0x0 -> 0x1) >> [ 15.584228] thunderbolt 0000:06:00.0: starting RX ring 0 >> [ 15.585281] thunderbolt 0000:06:00.0: enabling interrupt at >> register 0x38200 bit 12 (0x1 -> 0x1001) >> [ 15.586463] thunderbolt 0000:06:00.0: initializing Switch at 0x0 >> (depth: 0, up port: 5) >> [ 15.587526] thunderbolt 0000:06:00.0: old switch config: >> [ 15.588569] thunderbolt 0000:06:00.0: Switch: 8086:156d (Revision: >> 0, TB Version: 2) >> [ 15.589581] thunderbolt 0000:06:00.0: Max Port Number: 12 >> [ 15.590557] thunderbolt 0000:06:00.0: Config: >> [ 15.591532] thunderbolt 0000:06:00.0: Upstream Port Number: 5 >> Depth: 0 Route String: 0x0 Enabled: 1, PlugEventsDelay: 255ms >> [ 15.592530] thunderbolt 0000:06:00.0: unknown1: 0x0 unknown4: 0x0 >> [ 15.593530] thunderbolt 0000:06:00.0: 0: unsupported switch device id 0x156d >> [ 15.625612] thunderbolt 0000:06:00.0: 0: uid: 0x1001500947a60 >> [ 15.626919] thunderbolt 0000:06:00.0: Port 0: 8086:156d (Revision: >> 0, TB Version: 1, Type: Port (0x1)) >> [ 15.628028] thunderbolt 0000:06:00.0: Max hop id (in/out): 7/7 >> [ 15.629050] thunderbolt 0000:06:00.0: Max counters: 8 >> [ 15.630156] thunderbolt 0000:06:00.0: NFC Credits: 0x700000 >> [ 15.631685] thunderbolt 0000:06:00.0: Port 1: 8086:156d (Revision: >> 0, TB Version: 1, Type: Port (0x1)) >> [ 15.632896] thunderbolt 0000:06:00.0: Max hop id (in/out): 15/15 >> [ 15.634000] thunderbolt 0000:06:00.0: Max counters: 16 >> [ 15.635001] thunderbolt 0000:06:00.0: NFC Credits: 0x3c00000 >> [ 15.636582] thunderbolt 0000:06:00.0: Port 2: 8086:156d (Revision: >> 0, TB Version: 1, Type: Port (0x1)) >> [ 15.637737] thunderbolt 0000:06:00.0: Max hop id (in/out): 15/15 >> [ 15.638862] thunderbolt 0000:06:00.0: Max counters: 16 >> [ 15.639875] thunderbolt 0000:06:00.0: NFC Credits: 0x3c00000 >> [ 15.641452] thunderbolt 0000:06:00.0: Port 3: 8086:156d (Revision: >> 0, TB Version: 1, Type: Port (0x1)) >> [ 15.642572] thunderbolt 0000:06:00.0: Max hop id (in/out): 15/15 >> [ 15.643702] thunderbolt 0000:06:00.0: Max counters: 16 >> [ 15.644683] thunderbolt 0000:06:00.0: NFC Credits: 0x3c00000 >> [ 15.646250] thunderbolt 0000:06:00.0: Port 4: 8086:156d (Revision: >> 0, TB Version: 1, Type: Port (0x1)) >> [ 15.647285] thunderbolt 0000:06:00.0: Max hop id (in/out): 15/15 >> [ 15.648370] thunderbolt 0000:06:00.0: Max counters: 16 >> [ 15.649460] thunderbolt 0000:06:00.0: NFC Credits: 0x3c00000 >> [ 15.650539] thunderbolt 0000:06:00.0: Port 5: 8086:156d (Revision: >> 0, TB Version: 1, Type: NHI (0x2)) >> [ 15.651517] thunderbolt 0000:06:00.0: Max hop id (in/out): 11/11 >> [ 15.652578] thunderbolt 0000:06:00.0: Max counters: 16 >> [ 15.653553] thunderbolt 0000:06:00.0: NFC Credits: 0xf00000 >> [ 15.654712] thunderbolt 0000:06:00.0: Port 6: 8086:156d (Revision: >> 0, TB Version: 1, Type: PCIe (0x100101)) >> [ 15.655667] thunderbolt 0000:06:00.0: Max hop id (in/out): 8/8 >> [ 15.656681] thunderbolt 0000:06:00.0: Max counters: 2 >> [ 15.657595] thunderbolt 0000:06:00.0: NFC Credits: 0x700000 >> [ 15.658696] thunderbolt 0000:06:00.0: Port 7: 8086:156d (Revision: >> 0, TB Version: 1, Type: PCIe (0x100101)) >> [ 15.659614] thunderbolt 0000:06:00.0: Max hop id (in/out): 8/8 >> [ 15.660574] thunderbolt 0000:06:00.0: Max counters: 2 >> [ 15.661414] thunderbolt 0000:06:00.0: NFC Credits: 0x700000 >> [ 15.662444] thunderbolt 0000:06:00.0: Port 8: 8086:156d (Revision: >> 0, TB Version: 1, Type: PCIe (0x100101)) >> [ 15.663289] thunderbolt 0000:06:00.0: Max hop id (in/out): 8/8 >> [ 15.664194] thunderbolt 0000:06:00.0: Max counters: 2 >> [ 15.664995] thunderbolt 0000:06:00.0: NFC Credits: 0x700000 >> [ 15.665982] thunderbolt 0000:06:00.0: Port 9: 8086:156d (Revision: >> 0, TB Version: 1, Type: PCIe (0x100101)) >> [ 15.666867] thunderbolt 0000:06:00.0: Max hop id (in/out): 8/8 >> [ 15.667701] thunderbolt 0000:06:00.0: Max counters: 2 >> [ 15.668454] thunderbolt 0000:06:00.0: NFC Credits: 0x700000 >> [ 15.669318] thunderbolt 0000:06:00.0: Port 10: 8086:156d >> (Revision: 0, TB Version: 1, Type: DP/HDMI (0xe0102)) >> [ 15.670092] thunderbolt 0000:06:00.0: Max hop id (in/out): 9/9 >> [ 15.670863] thunderbolt 0000:06:00.0: Max counters: 2 >> [ 15.671624] thunderbolt 0000:06:00.0: NFC Credits: 0x700000 >> [ 15.672488] thunderbolt 0000:06:00.0: Port 11: 8086:156d >> (Revision: 0, TB Version: 1, Type: DP/HDMI (0xe0101)) >> [ 15.673255] thunderbolt 0000:06:00.0: Max hop id (in/out): 9/9 >> [ 15.674015] thunderbolt 0000:06:00.0: Max counters: 2 >> [ 15.674758] thunderbolt 0000:06:00.0: NFC Credits: 0xf00000 >> [ 15.675617] thunderbolt 0000:06:00.0: Port 12: 8086:156d >> (Revision: 0, TB Version: 1, Type: DP/HDMI (0xe0101)) >> [ 15.676370] thunderbolt 0000:06:00.0: Max hop id (in/out): 9/9 >> [ 15.677115] thunderbolt 0000:06:00.0: Max counters: 2 >> [ 15.677844] thunderbolt 0000:06:00.0: NFC Credits: 0xf00000 >> [ 15.678887] thunderbolt 0000:06:00.0: 0:1: is unplugged (state: 7) >> [ 15.679624] thunderbolt 0000:06:00.0: 0:3: is unplugged (state: 7) > Strange... it does not detect the device. Does the TB device show up in lspci? > This may be my fault. I am not sure if I reconnected the device when I was debugging. Almost certainly not, actually. I left it while I was compiling a new kernel and forgot. I'll let you know tonight when I get back. Adam -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/