Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

thunderbolt: Use is_pciehp instead of is_hotplug_bridge

The thunderbolt driver sets up device link dependencies from hotplug ports
to the Host Router (aka Native Host Interface, NHI). When resuming from
system sleep, this allows the Host Router to re-establish tunnels to
attached Thunderbolt devices before the hotplug ports resume.

To identify the hotplug ports, the driver utilizes the is_hotplug_bridge
flag which also encompasses ACPI slots handled by the ACPI hotplug driver.

Thunderbolt hotplug ports are always Hot-Plug Capable PCIe ports, so it is
more apt to identify them with the is_pciehp flag.

Similarly, hotplug ports on older Thunderbolt controllers have broken MSI
support and are quirked to use legacy INTx interrupts instead. The quirk
identifies them with is_hotplug_bridge, even though all affected ports are
also matched by is_pciehp. So use is_pciehp here as well.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

authored by

Lukas Wunner and committed by
Mika Westerberg
5d038471 aaa76d1c

+2 -2
+1 -1
drivers/pci/quirks.c
··· 3829 3829 */ 3830 3830 static void quirk_thunderbolt_hotplug_msi(struct pci_dev *pdev) 3831 3831 { 3832 - if (pdev->is_hotplug_bridge && 3832 + if (pdev->is_pciehp && 3833 3833 (pdev->device != PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_4C || 3834 3834 pdev->revision <= 1)) 3835 3835 pdev->no_msi = 1;
+1 -1
drivers/thunderbolt/tb.c
··· 3336 3336 if (!pci_is_pcie(pdev)) 3337 3337 continue; 3338 3338 if (pci_pcie_type(pdev) != PCI_EXP_TYPE_DOWNSTREAM || 3339 - !pdev->is_hotplug_bridge) 3339 + !pdev->is_pciehp) 3340 3340 continue; 3341 3341 3342 3342 link = device_link_add(&pdev->dev, &nhi->pdev->dev,