From: Lukas Wunner <lukas@wunner.de>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andreas Noever <andreas.noever@gmail.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Bjorn Helgaas <helgaas@kernel.org>,
Peter Wu <peter@lekensteyn.nl>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Valdis Kletnieks <valdis.kletnieks@vt.edu>,
Dave Airlie <airlied@gmail.com>
Subject: Re: [PATCH] PCI: Wait for 50ms after bridge is powered up
Date: Tue, 31 May 2016 12:40:51 +0200 [thread overview]
Message-ID: <20160531104051.GA13958@wunner.de> (raw)
In-Reply-To: <20160531085805.GI1743@lahna.fi.intel.com>
On Tue, May 31, 2016 at 11:58:05AM +0300, Mika Westerberg wrote:
> 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);
}
With this small change things look much better (with the 10 ms delay
we have now):
[ 2.353643] pcieport 0000:06:03.0: enabling device (0000 -> 0002)
[ 2.353789] pcieport 0000:06:03.0: rpm_idle
[ 2.353825] pcieport 0000:06:04.0: enabling device (0000 -> 0003)
[ 2.353855] pcieport 0000:06:03.0: rpm_idle
[ 2.353994] pcieport 0000:06:04.0: rpm_idle
[ 2.354017] pcieport 0000:06:04.0: rpm_idle
[ 2.354042] pcieport 0000:06:05.0: enabling device (0000 -> 0003)
[ 2.354186] pcieport 0000:06:05.0: rpm_idle
[ 2.354213] pcieport 0000:06:06.0: enabling device (0000 -> 0002)
[ 2.354362] pcieport 0000:06:06.0: rpm_idle
[ 2.354407] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 2.354441] pciehp 0000:06:03.0:pcie204: Slot #3 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl- LLActRep+
[ 2.354524] pciehp 0000:06:03.0:pcie204: service driver pciehp loaded
[ 2.354533] pciehp 0000:06:04.0:pcie204: Slot #4 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl- LLActRep+
[ 2.354609] pciehp 0000:06:04.0:pcie204: service driver pciehp loaded
[ 2.354617] pciehp 0000:06:05.0:pcie204: Slot #5 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl- LLActRep+
[ 2.354690] pciehp 0000:06:05.0:pcie204: service driver pciehp loaded
[ 2.354698] pciehp 0000:06:06.0:pcie204: Slot #6 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl- LLActRep+
[ 2.354772] pciehp 0000:06:06.0:pcie204: service driver pciehp loaded
[ 2.354777] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 2.354827] intel_idle: MWAIT substates: 0x21120
[ 2.354829] intel_idle: v0.4.1 model 0x3A
[ 2.355122] intel_idle: lapic_timer_reliable_states 0xffffffff
[ 2.355152] GHES: HEST is not enabled!
[ 2.355216] pcieport 0000:06:05.0: rpm_idle
[ 2.355235] pcieport 0000:06:06.0: rpm_idle
[ 2.355238] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 2.355277] pcieport 0000:06:03.0: rpm_idle
[ 2.355301] pcieport 0000:06:04.0: rpm_idle
[ 2.355659] Linux agpgart interface v0.103
[ 2.355739] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[ 2.355764] AMD IOMMUv2 functionality not available on this system
[ 2.356396] i8042: PNP: No PS/2 controller found. Probing ports directly.
[ 2.364794] pcieport 0000:06:06.0: rpm_suspend
[ 2.366112] pcieport 0000:06:05.0: rpm_suspend
[ 2.367402] pcieport 0000:06:04.0: rpm_suspend
[ 2.368671] pcieport 0000:06:03.0: rpm_suspend
Thanks,
Lukas
next prev parent reply other threads:[~2016-05-31 10:40 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 17:14 Rescanning is broken with runtime PM for PCIe ports Peter Wu
2016-05-19 7:42 ` Mika Westerberg
2016-05-19 11:36 ` Mika Westerberg
2016-05-20 8:45 ` Peter Wu
2016-05-23 8:20 ` [PATCH] PCI: Power on bridges before scanning new devices Mika Westerberg
2016-05-23 20:00 ` Bjorn Helgaas
2016-05-23 21:50 ` Bjorn Helgaas
2016-05-24 12:23 ` Bjorn Helgaas
2016-05-24 12:52 ` Lukas Wunner
2016-05-24 12:53 ` Mika Westerberg
2016-05-24 14:27 ` Peter Wu
2016-05-24 15:06 ` Lukas Wunner
2016-05-24 16:38 ` Bjorn Helgaas
2016-05-24 23:46 ` Peter Wu
2016-05-24 16:28 ` Bjorn Helgaas
2016-05-25 15:04 ` [PATCH] PCI: Wait for 50ms after bridge is powered up Mika Westerberg
2016-05-25 20:44 ` Rafael J. Wysocki
2016-05-26 10:10 ` Lukas Wunner
2016-05-26 10:25 ` Mika Westerberg
2016-05-26 10:45 ` Lukas Wunner
2016-05-26 11:03 ` Mika Westerberg
2016-05-28 12:29 ` Rafael J. Wysocki
2016-05-30 9:33 ` Mika Westerberg
2016-05-30 14:44 ` Mika Westerberg
2016-05-30 15:19 ` Andreas Noever
2016-05-31 8:33 ` Mika Westerberg
2016-05-31 8:58 ` Mika Westerberg
2016-05-31 10:40 ` Lukas Wunner [this message]
2016-05-31 10:47 ` Mika Westerberg
2016-05-31 11:07 ` Lukas Wunner
2016-06-01 9:11 ` Mika Westerberg
2016-06-01 11:42 ` Lukas Wunner
2016-05-24 21:13 ` [PATCH] PCI: Power on bridges before scanning new devices Mika Westerberg
2016-05-25 0:03 ` Rafael J. Wysocki
2016-05-25 13:19 ` Mika Westerberg
2016-05-25 20:45 ` Rafael J. Wysocki
2016-05-26 8:16 ` Mika Westerberg
2016-05-28 12:21 ` Rafael J. Wysocki
2016-05-30 9:35 ` Mika Westerberg
2016-05-25 12:16 ` Lukas Wunner
2016-05-25 13:25 ` Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160531104051.GA13958@wunner.de \
--to=lukas@wunner.de \
--cc=airlied@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=peter@lekensteyn.nl \
--cc=rjw@rjwysocki.net \
--cc=valdis.kletnieks@vt.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.