linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Noever <andreas.noever@gmail.com>
To: Adam Goode <adam@spicenitz.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: Thunderbolt hotplug not working on MacMini7,1
Date: Fri, 24 Apr 2015 13:46:26 +0200	[thread overview]
Message-ID: <CAMxnaaVPP+G3U07O8Oa5dGsjt2Vp6acFGvKqMJCb8yGsDc=AbQ@mail.gmail.com> (raw)
In-Reply-To: <CADN=WdqD5XX+cuRiKWmXsnvNf07-AX4UUPtwTo=6z4VZWv1ogw@mail.gmail.com>

On Fri, Apr 24, 2015 at 6:50 AM, Adam Goode <adam@spicenitz.org> wrote:
> On Thu, Apr 23, 2015 at 1:15 PM, Adam Goode <adam@spicenitz.org> wrote:
>> On Thu, Apr 23, 2015 at 12:12 PM, Andreas Noever
>> <andreas.noever@gmail.com> wrote:
>>> On Thu, Apr 23, 2015 at 5:10 PM, Adam Goode <adam@spicenitz.org> wrote:
>>>> On Thu, Apr 23, 2015 at 9:28 AM, Adam Goode <adam@spicenitz.org> wrote:
>>>>>
>>>>> On Thu, Apr 23, 2015 at 6:08 AM, Andreas Noever
>>>>> <andreas.noever@gmail.com> 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
>
>
> Yes, definitely was unplugged. Hotplugging seems to work fine in
> either "Windows 2012" or "Darwin" mode.
>
> Suspend works, resume brings up video and then invariably freezes (in
> either _OSI condition).
>
>
> Adam

Hm, it seems strange that hotplug would not work without the driver in
win2012 mode. If it works under windows (without additional drivers? -
maybe bootcamp includes a windows TB driver?) then it should also work
for us.

Andreas

  reply	other threads:[~2015-04-24 11:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADN=WdrsLoertuPi0Tabb6dmdRAj0d200q=5awq-xL9yE8W=hw@mail.gmail.com>
2015-04-22  4:05 ` Fwd: Thunderbolt hotplug not working on MacMini7,1 Adam Goode
2015-04-23  2:56   ` Adam Goode
2015-04-23  7:24     ` Greg KH
2015-04-23 10:08     ` Andreas Noever
2015-04-23 13:28       ` Adam Goode
2015-04-23 15:10         ` Adam Goode
2015-04-23 16:12           ` Andreas Noever
2015-04-23 17:15             ` Adam Goode
2015-04-24  4:50               ` Adam Goode
2015-04-24 11:46                 ` Andreas Noever [this message]
2015-04-24 18:39                   ` Adam Goode
2015-04-25  4:58                     ` Adam Goode
2015-04-26  2:41                       ` Adam Goode
2015-04-26  3:00                         ` Adam Goode
2015-05-04 13:00                           ` Adam Goode
2015-05-06 10:18                             ` Andreas Noever
2015-04-23 18:12       ` Matthew Garrett
2015-04-24 11:41         ` Andreas Noever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMxnaaVPP+G3U07O8Oa5dGsjt2Vp6acFGvKqMJCb8yGsDc=AbQ@mail.gmail.com' \
    --to=andreas.noever@gmail.com \
    --cc=adam@spicenitz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).