From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA0E21B275 for ; Thu, 2 Nov 2023 15:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3699B193; Thu, 2 Nov 2023 08:21:56 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 2AA0C28046BF6; Thu, 2 Nov 2023 16:21:54 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1B3D740DA3E; Thu, 2 Nov 2023 16:21:54 +0100 (CET) Date: Thu, 2 Nov 2023 16:21:54 +0100 From: Lukas Wunner To: Mario Limonciello Cc: Bjorn Helgaas , bhelgaas@google.com, mika.westerberg@linux.intel.com, andreas.noever@gmail.com, michael.jamet@intel.com, YehezkelShB@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Alexander.Deucher@amd.com Subject: Re: [PATCH 2/2] PCI: Ignore PCIe ports used for tunneling in pcie_bandwidth_available() Message-ID: <20231102152154.GA22270@wunner.de> References: <20231101225259.GA101390@bhelgaas> <928df647-5b20-406b-8da5-3199f5cfbb48@amd.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <928df647-5b20-406b-8da5-3199f5cfbb48@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) On Wed, Nov 01, 2023 at 08:14:31PM -0500, Mario Limonciello wrote: > Considering this I think it's a good idea to move that creation of the > device link into drivers/pci/pci-acpi.c and store a bit in struct pci_device > to indicate it's a tunneled port. > > Then 'thunderbolt' can look for this directly instead of walking all the FW > nodes. > > pcie_bandwidth_available() can just look at the tunneled port bit instead of > the existence of the device link. pci_is_thunderbolt_attached() should already be doing exactly what you want to achieve with the new bit. It tells you whether a PCI device is behind a Thunderbolt tunnel. So I don't think a new bit is actually needed. Thanks, Lukas