[PATCH v2 6/9] PCI: Rename is_thunderbolt to is_tunneled

From: Mario Limonciello
Date: Fri Nov 03 2023 - 15:08:57 EST


The `is_thunderbolt` bit has been used to indicate that a PCIe device
contained the Intel VSEC which is used by various parts of the kernel
to change behavior. To later allow usage with USB4 controllers as well,
rename this to `is_tunneled`.

Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
drivers/pci/pci.c | 2 +-
drivers/pci/probe.c | 2 +-
drivers/platform/x86/apple-gmux.c | 2 +-
include/linux/pci.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 59c01d68c6d5..d9aa5a39f585 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3032,7 +3032,7 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge)
return true;

/* Even the oldest 2010 Thunderbolt controller supports D3. */
- if (bridge->is_thunderbolt)
+ if (bridge->is_tunneled)
return true;

/* Platform might know better if the bridge supports D3 */
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 795534589b98..518413d15402 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1597,7 +1597,7 @@ static void set_pcie_thunderbolt(struct pci_dev *dev)
/* Is the device part of a Thunderbolt controller? */
vsec = pci_find_vsec_capability(dev, PCI_VENDOR_ID_INTEL, PCI_VSEC_ID_INTEL_TBT);
if (vsec)
- dev->is_thunderbolt = 1;
+ dev->is_tunneled = 1;
}

static void set_pcie_untrusted(struct pci_dev *dev)
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index 1417e230edbd..20315aa4463a 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -774,7 +774,7 @@ static int gmux_resume(struct device *dev)

static int is_thunderbolt(struct device *dev, void *data)
{
- return to_pci_dev(dev)->is_thunderbolt;
+ return to_pci_dev(dev)->is_tunneled;
}

static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 439c2dac8a3e..b1724f25fb02 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -440,7 +440,7 @@ struct pci_dev {
unsigned int is_virtfn:1;
unsigned int is_hotplug_bridge:1;
unsigned int shpc_managed:1; /* SHPC owned by shpchp */
- unsigned int is_thunderbolt:1; /* Thunderbolt controller */
+ unsigned int is_tunneled:1; /* Tunneled TBT or USB4 link */
unsigned int no_command_complete:1; /* No command completion */
/*
* Devices marked being untrusted are the ones that can potentially
--
2.34.1