Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755097AbbDXLls (ORCPT ); Fri, 24 Apr 2015 07:41:48 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:36293 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbbDXLlr (ORCPT ); Fri, 24 Apr 2015 07:41:47 -0400 MIME-Version: 1.0 In-Reply-To: <20150423181246.GA23441@srcf.ucam.org> References: <20150423181246.GA23441@srcf.ucam.org> From: Andreas Noever Date: Fri, 24 Apr 2015 13:41:25 +0200 Message-ID: Subject: Re: Thunderbolt hotplug not working on MacMini7,1 To: Matthew Garrett Cc: Adam Goode , "linux-kernel@vger.kernel.org" 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: 2156 Lines: 49 On Thu, Apr 23, 2015 at 8:12 PM, Matthew Garrett wrote: > On Thu, Apr 23, 2015 at 12:08:01PM +0200, 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. > > Do they have the same PCI class? No, 0604 for the bridges and 0880 for the device. It looks like the only reason that the bridges do not have a subsystem/subvendor set is because there is no such field in the pci bridge header. Instead they put 2222:1111 into the SSVID capability: 06:06.0 PCI bridge [0604]: Intel Corporation Unknown device [8086:1547] (rev 03) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0 Bus: primary=06, secondary=08, subordinate=08, sec-latency=0 Capabilities: [80] Power Management version 3 Capabilities: [88] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+ Capabilities: [ac] Subsystem: Unknown device [2222:1111] Capabilities: [c0] Express Downstream Port (Slot+), MSI 00 Capabilities: [100] #8086 07:00.0 System peripheral [0880]: Intel Corporation Unknown device [8086:1547] (rev 03) Subsystem: Unknown device [2222:1111] Flags: bus master, fast devsel, latency 0, IRQ 17 Memory at c1d00000 (32-bit, non-prefetchable) Memory at c1d40000 (32-bit, non-prefetchable) Capabilities: [80] Power Management version 3 Capabilities: [88] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+ Capabilities: [ac] Subsystem: Unknown device [2222:1111] Capabilities: [c0] Express Endpoint, MSI 00 Capabilities: [a0] MSI-X: Enable- Mask- TabSize=16 Capabilities: [100] #8086 pci_setup_device actually reads this capability and puts it into dev->subsystem_vendor/device. So we might actually get bound to the bridges (if the pcieport driver is unavailable). I'll post a patch to bind to the class code instead. Good idea! Andreas -- 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/