Re: [PATCH] PCI: Wait for 50ms after bridge is powered up
From: Mika Westerberg <mika.westerberg@linux.intel.com>
Date: 2016-05-31 10:47:14
Also in:
linux-pci
On Tue, May 31, 2016 at 12:40:51PM +0200, Lukas Wunner wrote:
quoted hunk ↗ jump to hunk
On Tue, May 31, 2016 at 11:58:05AM +0300, Mika Westerberg wrote:quoted
To summarize the next steps. I will send new version of the PCI PM patches with following changes. - Drop this 50ms patch, we should have the PCIe 100ms delay already covered. - Increase runtime PM autosuspend time from 10ms to 500ms (or whatever is the prefered default).I did some tests, turns out the autosuspend delay need not be increased to prevent the Thunderbolt hotplug ports from suspending between "enabling device" and loading the pciehp driver, however the following is needed:diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 7860ab3..1d1fb1c 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c@@ -238,6 +238,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev, pm_runtime_set_autosuspend_delay(&dev->dev, 10); pm_runtime_use_autosuspend(&dev->dev); pm_runtime_put_autosuspend(&dev->dev); + pm_runtime_mark_last_busy(&dev->dev); pm_runtime_allow(&dev->dev); }
I still prefer increasing the autosuspend delay. The above looks hackish and does not work if it takes more than 10ms to get to the tbt driver probe. Did you try if it also works with 500ms delay?