All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher@amd.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: "Limonciello, Mario" <Mario.Limonciello@amd.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	"open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
	"open list:THUNDERBOLT DRIVER" <linux-usb@vger.kernel.org>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>
Subject: RE: [PATCH 0/2] Mark USB4 controllers as is_thunderbolt
Date: Mon, 7 Feb 2022 15:52:13 +0000	[thread overview]
Message-ID: <BL1PR12MB51442184B407A747E4C487F1F72C9@BL1PR12MB5144.namprd12.prod.outlook.com> (raw)
In-Reply-To: <YgE+g9JOJE6foThi@lahna>

[Public]

> -----Original Message-----
> From: Mika Westerberg <mika.westerberg@linux.intel.com>
> Sent: Monday, February 7, 2022 10:45 AM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: Limonciello, Mario <Mario.Limonciello@amd.com>; Bjorn Helgaas
> <bhelgaas@google.com>; Andreas Noever <andreas.noever@gmail.com>;
> open list:PCI SUBSYSTEM <linux-pci@vger.kernel.org>; open
> list:THUNDERBOLT DRIVER <linux-usb@vger.kernel.org>; Michael Jamet
> <michael.jamet@intel.com>; Yehezkel Bernat <YehezkelShB@gmail.com>
> Subject: Re: [PATCH 0/2] Mark USB4 controllers as is_thunderbolt
> 
> Hi,
> 
> On Mon, Feb 07, 2022 at 03:00:19PM +0000, Deucher, Alexander wrote:
> > [Public]
> >
> > > -----Original Message-----
> > > From: Mika Westerberg <mika.westerberg@linux.intel.com>
> > > Sent: Monday, February 7, 2022 1:42 AM
> > > To: Limonciello, Mario <Mario.Limonciello@amd.com>
> > > Cc: Bjorn Helgaas <bhelgaas@google.com>; Andreas Noever
> > > <andreas.noever@gmail.com>; open list:PCI SUBSYSTEM <linux-
> > > pci@vger.kernel.org>; open list:THUNDERBOLT DRIVER <linux-
> > > usb@vger.kernel.org>; Michael Jamet <michael.jamet@intel.com>;
> > > Yehezkel Bernat <YehezkelShB@gmail.com>; Deucher, Alexander
> > > <Alexander.Deucher@amd.com>
> > > Subject: Re: [PATCH 0/2] Mark USB4 controllers as is_thunderbolt
> > >
> > > Hi Mario,
> > >
> > > On Fri, Feb 04, 2022 at 12:28:18PM -0600, Mario Limonciello wrote:
> > > > Various drivers in the kernel use `pci_is_thunderbolt_attached` to
> > > > designate behaving differently from a device that is internally in
> > > > the machine. This function relies upon the `is_thunderbolt`
> > > > designation which checks for a specific capability only set on Intel
> controllers.
> > > >
> > > > Non-Intel USB4 designs should also match this designation so that
> > > > they can be treated the same regardless of the host they're connected
> to.
> > >
> > > Not objecting this if really needed but since USB4 is supposed to be
> > > transparent to the native (tunneled) protocol, I would rather try to
> > > figure out if there is really need to change driver behaviour
> > > whether it is connected over USB4 or plugged natively on the PCIe slot.
> > >
> > > Can you elaborate a bit what kind of functionality needs this?
> > > Perhaps we can figure a better alternative?
> >
> > In the AMD GPU driver we use it to determine which dGPU is built into
> > a platform vs. externally connected since the internal one uses ACPI
> > for certain things and the external one does not.  There are probably
> > other ways to determine this, but it's not in place at the moment.
> 
> Can't you check if the device is behind a hotplug bridge? Then for certain it is
> "removable".

Unfortunately, most (all?) of the root ports on modern platforms are hotplug capable even if the hardware is soldered to the board.

> 
> 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.

Alex

  reply	other threads:[~2022-02-07 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 18:28 [PATCH 0/2] Mark USB4 controllers as is_thunderbolt Mario Limonciello
2022-02-04 18:28 ` [PATCH 1/2] thunderbolt: move definition of PCI_CLASS_SERIAL_USB_USB4 Mario Limonciello
2022-02-04 18:28 ` [PATCH 2/2] pci: mark USB4 devices as "is_thunderbolt" Mario Limonciello
2022-02-04 22:29   ` Bjorn Helgaas
2022-02-05  9:39     ` Lukas Wunner
2022-02-04 18:36 ` [PATCH 0/2] Mark USB4 controllers as is_thunderbolt Deucher, Alexander
2022-02-07  6:41 ` Mika Westerberg
2022-02-07 15:00   ` Deucher, Alexander
2022-02-07 15:45     ` Mika Westerberg
2022-02-07 15:52       ` Deucher, Alexander [this message]
2022-02-07 17:47         ` Lukas Wunner
2022-02-08  6:33           ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BL1PR12MB51442184B407A747E4C487F1F72C9@BL1PR12MB5144.namprd12.prod.outlook.com \
    --to=alexander.deucher@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.