Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp463404rdb; Thu, 2 Nov 2023 08:34:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFN/ddGIRGudmSS9Rwj3e8c+9uZYgw54aZ3yVdaM7UDAdWDlfI9Qx6bE4tjY8PxMuiuwBa1 X-Received: by 2002:a17:90b:30d7:b0:27d:89d:2bc3 with SMTP id hi23-20020a17090b30d700b0027d089d2bc3mr16605380pjb.3.1698939299346; Thu, 02 Nov 2023 08:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698939299; cv=none; d=google.com; s=arc-20160816; b=h/nGN+cEuu9xmD5UCc301SiSkIatCKu4pD0hATaGiRha798z9cA7SDt1GRZ61b8WEH 4zEMrjaJhDyibqAGTcKEG5xd9Bm0KBQ45SHufU6N+b/43RMF4ETDjOZLAqFvFYod3yj/ RQQEZoKRAOQu9KC5IV6IGpTIOog06uUlVrJQt1MRTnkBhRYZHnFoQPxK2R6bbAaxevqs ztW0ZNUa4qEyz+zknDaal8geFgOSRWaorRN7OEpx4TT4MFpNbMFJ2oA8zMF2CtBHljNM El0X1tgrZV1lMBLo5+70EWmgCalvuSUgilY0liZ3GdFiin1fq1OjM/cERCMY04cixxX4 d1mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1tL3GdcloexEhEzE4Snt5zNYTwDa5NjlcI6UrCYwyYc=; fh=ZkuaXkNgPynvCVFjZ1889iUFJTIIC24VwK+X1o917YM=; b=sA0C5G0WWbhBoxyCZp4hGn37NUoGxB9HHeqHIvMRDCfe9lGTWbxnmn0IquQZIkfgpS 9or8kjel65kWuwYVtwCV6PZuLjawZYYzZavydkf/Ih2V1j0yoz9K7K+sayg2nBvsGA8u s8T8NQAcVRHMavE/ZPogY3cgK5YFbSgveMMeQlAal8amdCBipnfZqzTBcHitipbmmqqP M9XY1Htzu4eA3dzfGzNPE+GkC4012qrghLtdastmZ3Avv1yZZn+JTa4Hmn+8e8Um31s+ OoB8HbX4bQ4LOw9mqsbr4x1Xga+XWC7C5UV8sBFhD1/sNWuLinJse6E9MVxGW/vXTV6W kbMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id h19-20020a17090ac39300b0027cd01b6caasi63908pjt.47.2023.11.02.08.34.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 08:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CC5DF8115455; Thu, 2 Nov 2023 08:34:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347663AbjKBPeB (ORCPT + 99 others); Thu, 2 Nov 2023 11:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376810AbjKBPdy (ORCPT ); Thu, 2 Nov 2023 11:33:54 -0400 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 601D213E; Thu, 2 Nov 2023 08:33:50 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (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 6196028046BF6; Thu, 2 Nov 2023 16:33:45 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 553B157544; Thu, 2 Nov 2023 16:33:45 +0100 (CET) Date: Thu, 2 Nov 2023 16:33:45 +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: <20231102153345.GA30347@wunner.de> References: <20231101225259.GA101390@bhelgaas> <928df647-5b20-406b-8da5-3199f5cfbb48@amd.com> <20231102152154.GA22270@wunner.de> 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) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 02 Nov 2023 08:34:38 -0700 (PDT) On Thu, Nov 02, 2023 at 10:26:31AM -0500, Mario Limonciello wrote: > On 11/2/2023 10:21, Lukas Wunner wrote: > > 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. > > It's only for a device connected to an Intel TBT3 controller though; it > won't apply to USB4. Time to resurrect this patch here...? :) https://lore.kernel.org/all/20220204182820.130339-3-mario.limonciello@amd.com/