thunderbolt: Don't create device link from USB4 Host Interface to USB3 xHC host
USB core will create device links between tunneled USB3 devices and USB4 Host Interface during USB device creation. Those device links are removed with the tunneled USB3 devices, allowing USB4 Host Interface to runtime suspend if USB3 tunnels are not used. So remove device link creation between USB4 Host Interface and USB3 xHC during NHI probe Reported-by: Rajaram Regupathy <rajaram.regupathy@intel.com> Reported-by: Saranya Gopal <saranya.gopal@intel.com> Tested-by: Saranya Gopal <saranya.gopal@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20240830152630.3943215-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f1bfb4a6fe
commit
f20998f23a
@ -32,40 +32,20 @@ static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data,
|
||||
goto out_put;
|
||||
|
||||
/*
|
||||
* Try to find physical device walking upwards to the hierarcy.
|
||||
* We need to do this because the xHCI driver might not yet be
|
||||
* bound so the USB3 SuperSpeed ports are not yet created.
|
||||
* Ignore USB3 ports here as USB core will set up device links between
|
||||
* tunneled USB3 devices and NHI host during USB device creation.
|
||||
* USB3 ports might not even have a physical device yet if xHCI driver
|
||||
* isn't bound yet.
|
||||
*/
|
||||
do {
|
||||
dev = acpi_get_first_physical_node(adev);
|
||||
if (dev)
|
||||
break;
|
||||
|
||||
adev = acpi_dev_parent(adev);
|
||||
} while (adev);
|
||||
|
||||
/*
|
||||
* Check that the device is PCIe. This is because USB3
|
||||
* SuperSpeed ports have this property and they are not power
|
||||
* managed with the xHCI and the SuperSpeed hub so we create the
|
||||
* link from xHCI instead.
|
||||
*/
|
||||
while (dev && !dev_is_pci(dev))
|
||||
dev = dev->parent;
|
||||
|
||||
if (!dev)
|
||||
dev = acpi_get_first_physical_node(adev);
|
||||
if (!dev || !dev_is_pci(dev))
|
||||
goto out_put;
|
||||
|
||||
/*
|
||||
* Check that this actually matches the type of device we
|
||||
* expect. It should either be xHCI or PCIe root/downstream
|
||||
* port.
|
||||
*/
|
||||
/* Check that this matches a PCIe root/downstream port. */
|
||||
pdev = to_pci_dev(dev);
|
||||
if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI ||
|
||||
(pci_is_pcie(pdev) &&
|
||||
(pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT ||
|
||||
pci_pcie_type(pdev) == PCI_EXP_TYPE_DOWNSTREAM))) {
|
||||
if (pci_is_pcie(pdev) &&
|
||||
(pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT ||
|
||||
pci_pcie_type(pdev) == PCI_EXP_TYPE_DOWNSTREAM)) {
|
||||
const struct device_link *link;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user