From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AF2EC4332F for ; Mon, 7 Feb 2022 18:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232862AbiBGSDd (ORCPT ); Mon, 7 Feb 2022 13:03:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241525AbiBGR5H (ORCPT ); Mon, 7 Feb 2022 12:57:07 -0500 X-Greylist: delayed 597 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Feb 2022 09:57:04 PST Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2903C0401EC; Mon, 7 Feb 2022 09:57:04 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id D94412800985A; Mon, 7 Feb 2022 18:47:03 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id BA79D28774D; Mon, 7 Feb 2022 18:47:03 +0100 (CET) Date: Mon, 7 Feb 2022 18:47:03 +0100 From: Lukas Wunner To: "Deucher, Alexander" Cc: Mika Westerberg , "Limonciello, Mario" , Bjorn Helgaas , Andreas Noever , "open list:PCI SUBSYSTEM" , "open list:THUNDERBOLT DRIVER" , Michael Jamet , Yehezkel Bernat Subject: Re: [PATCH 0/2] Mark USB4 controllers as is_thunderbolt Message-ID: <20220207174703.GA25761@wunner.de> References: <20220204182820.130339-1-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Feb 07, 2022 at 03:52:13PM +0000, Deucher, Alexander wrote: > > From: Mika Westerberg > > The other option is to look for ACPI companion (ACPI_COMPANION()) of the > > device. AFAICT dGPUs don't have one (as the BIOS does not know in advance > > what will be connected to the hotplug ports) whereas internal does typically > > have one. > > Yeah, this is probably the right way to do this. No, that doesn't work. At least Apple represents the first few devices in the Thunderbolt daisy-chain in the ACPI namespace, so IIUC you'd find an ACPI companion for those but not for the remainder of the daisy-chain. This is from a 2019/2020 MacBookPro16,1: $ grep 'Device ' acpidump/mbp161/ssdt6.dsl Device (UPSB) Device (DSB0) Device (NHI0) Device (DSB1) Device (UPS0) Device (DSB0) Device (DEV0) Device (DSB3) Device (UPS0) Device (DSB0) Device (DEV0) Device (DSB3) Device (DEV0) ... There's a *reason* why I introduced the is_thunderbolt flag, there is no other reliable way to detect externally attached devices. Thanks, Lukas