Re: [PATCH 0/2] Mark USB4 controllers as is_thunderbolt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Feb 07, 2022 at 03:00:19PM +0000, Deucher, Alexander wrote:
> [Public]
> 
> > -----Original Message-----
> > From: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
> > Sent: Monday, February 7, 2022 1:42 AM
> > To: Limonciello, Mario <Mario.Limonciello@xxxxxxx>
> > Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>; Andreas Noever
> > <andreas.noever@xxxxxxxxx>; open list:PCI SUBSYSTEM <linux-
> > pci@xxxxxxxxxxxxxxx>; open list:THUNDERBOLT DRIVER <linux-
> > usb@xxxxxxxxxxxxxxx>; Michael Jamet <michael.jamet@xxxxxxxxx>; Yehezkel
> > Bernat <YehezkelShB@xxxxxxxxx>; Deucher, Alexander
> > <Alexander.Deucher@xxxxxxx>
> > 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".

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.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux