@@ -224,9 +224,12 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
* to enumerate devices behind this port properly (the port is
* powered down preventing all config space accesses to the
* subordinate devices). We can't be sure for native PCIe hotplug
- * either so prevent that as well.
+ * either so prevent that as well. However Thunderbolt controllers
+ * on Macs are capable of side-band signaling plug events while
+ * powered down, so allow them to suspend.
*/
- if (!dev->is_hotplug_bridge) {
+ if (!dev->is_hotplug_bridge ||
+ (dev->is_thunderbolt && dmi_match(DMI_SYS_VENDOR, "Apple Inc."))) {
/*
* Keep the port resumed 100ms to make sure things like
* config space accesses from userspace (lspci) will not
@@ -244,7 +247,8 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
static void pcie_portdrv_remove(struct pci_dev *dev)
{
- if (!dev->is_hotplug_bridge) {
+ if (!dev->is_hotplug_bridge ||
+ (dev->is_thunderbolt && dmi_match(DMI_SYS_VENDOR, "Apple Inc."))) {
pm_runtime_forbid(&dev->dev);
pm_runtime_get_noresume(&dev->dev);
pm_runtime_dont_use_autosuspend(&dev->dev);
Thunderbolt controllers have a pin to signal plug events while the controller is powered down. On Macs this pin is wired to the southbridge and causes a GPE to be fired. The OS may then power up the controller to probe the newly connected device. It is thus okay to let Thunderbolt hotplug ports go to D3 on Macs. Signed-off-by: Lukas Wunner <lukas@wunner.de> --- drivers/pci/pcie/portdrv_pci.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)