All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: For d3_delay and d3cold_delay, zero means zero
@ 2017-03-14  9:44 Adrian Hunter
  2017-03-14 13:03 ` Bjorn Helgaas
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2017-03-14  9:44 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-pm, linux-acpi, Rafael J. Wysocki, Lukas Wunner,
	Andy Shevchenko, Mika Westerberg

Do not sleep at all for the respective cases of d3_delay is zero or
d3cold_delay is zero.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/pci/pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7904d02ffdb9..9779483f81fd 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -66,7 +66,8 @@ static void pci_dev_d3_sleep(struct pci_dev *dev)
 	if (delay < pci_pm_d3_delay)
 		delay = pci_pm_d3_delay;
 
-	msleep(delay);
+	if (delay)
+		msleep(delay);
 }
 
 #ifdef CONFIG_PCI_DOMAINS
@@ -827,7 +828,8 @@ static void __pci_start_power_transition(struct pci_dev *dev, pci_power_t state)
 		 * because have already delayed for the bridge.
 		 */
 		if (dev->runtime_d3cold) {
-			msleep(dev->d3cold_delay);
+			if (dev->d3cold_delay)
+				msleep(dev->d3cold_delay);
 			/*
 			 * When powering on a bridge from D3cold, the
 			 * whole hierarchy may be powered on into
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-14 20:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14  9:44 [PATCH] PCI: For d3_delay and d3cold_delay, zero means zero Adrian Hunter
2017-03-14 13:03 ` Bjorn Helgaas
2017-03-14 13:21   ` Adrian Hunter
2017-03-14 13:23     ` Adrian Hunter
2017-03-14 17:52     ` Rafael J. Wysocki
2017-03-14 20:04     ` Bjorn Helgaas

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.