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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64B18C433EF for ; Mon, 14 Feb 2022 08:43:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBA7510E21C; Mon, 14 Feb 2022 08:43:43 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1CA6A10E207; Mon, 14 Feb 2022 07:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644823640; x=1676359640; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3D+QYO7Pwm9FAUWke5CmBKJRJaBzCTD4KK+GctzE02M=; b=bEqDs83K67onjru0NlXVJuUGM4pDLdgmNUjEQJEAPrsXxBwQm+8f4ZLk kyv6ICmHtAhLetWaPEnS16MkAzyneeMUu11ExmQvgT0gNzpCupRS7DjsY t9ktakhkAnF54MR0PyY8rn+op+hgP9WycH0b6Mz5DMmvLSq6Qosj41Vct sGBjfXvI7KIHyLwPrO1SLfUrPWl0XqwG1ciMPCbd4uRCDg1NxhsTG6Ntm xoxgrMXFIizIaGl68y7eibLhKzXdZJ/KShtuk6In0SCkolQDqbvYBAAKa svx6diikkFLj3YqWvoEn5eWSGP/p3lRyNAsC7v9rcwflT3AZu/IWZC9et A==; X-IronPort-AV: E=McAfee;i="6200,9189,10257"; a="336459435" X-IronPort-AV: E=Sophos;i="5.88,367,1635231600"; d="scan'208";a="336459435" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2022 23:27:19 -0800 X-IronPort-AV: E=Sophos;i="5.88,367,1635231600"; d="scan'208";a="634979853" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.162]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2022 23:27:15 -0800 Received: by lahna (sSMTP sendmail emulation); Mon, 14 Feb 2022 09:27:13 +0200 Date: Mon, 14 Feb 2022 09:27:13 +0200 From: Mika Westerberg To: "Limonciello, Mario" Subject: Re: [PATCH v3 04/12] PCI: Drop the `is_thunderbolt` attribute from PCI core Message-ID: References: <20220211193250.1904843-1-mario.limonciello@amd.com> <20220211193250.1904843-5-mario.limonciello@amd.com> <20220213082056.GA23572@wunner.de> <0ef8f2cb-1978-f469-71d3-2cf7469eb8b6@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ef8f2cb-1978-f469-71d3-2cf7469eb8b6@amd.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Mailman-Approved-At: Mon, 14 Feb 2022 08:43:42 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , Michael Jamet , "open list:PCI SUBSYSTEM" , "open list:THUNDERBOLT DRIVER" , Yehezkel Bernat , "open list:DRM DRIVERS" , Andreas Noever , Lukas Wunner , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Bjorn Helgaas , Alexander.Deucher@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" Hi Mario, On Sun, Feb 13, 2022 at 11:26:56AM -0600, Limonciello, Mario wrote: > On 2/13/2022 02:20, Lukas Wunner wrote: > > On Fri, Feb 11, 2022 at 01:32:42PM -0600, Mario Limonciello wrote: > > > The `is_thunderbolt` attribute is currently a dumping ground for a > > > variety of things. > > > > It's not as arbitrary as it may seem. Quite a bit of thought went into > > the current design. > > > > > > > Instead use the driver core removable attribute to indicate the > > > detail a device is attached to a thunderbolt or USB4 chain. > > > > You're missing the point that "is_thunderbolt" is set on the *controller* > > (i.e. its upstream and downstream ports). > > > > The controller itself is *not* removable if it's the host controller. > > > > However a device can be assumed to be removable if it has an ancestor > > which has the "is_thunderbolt" flag set. > > > > Ah right... I wonder if really what this series should be about then is > setting up the the PCIe endpoints for PCIe tunneling and XHCI tunneling to > be marked as "external" instead then. It would mean that existing code will > apply the removable attribute to everything downstream (and presumably at > least some of those drivers it will continue to make sense to drop > "pcie_is_thunderbolt_attached" and instead check dev_is_removable. Yes, I think this is the right thing to do. Anything connected over PCIe/USB 3.x tunnel is pretty much "removable" whereas the host controllers may or may not. Typically they are not.