lkml.org 
[lkml]   [2020]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] PCI/PM: Skip link training delay for S3 resume
Date
Commit ad9001f2f411 ("PCI/PM: Add missing link delays required by the
PCIe spec") added a 1100ms delay on resume for bridges that don't
support Link Active Reporting.

The commit also states that the delay can be skipped for S3, as the
firmware should already handled the case for us.

So let's skip the link training delay for S3, to save 1100ms resume
time.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
drivers/pci/pci-driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 0454ca0e4e3f..3050375bad04 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -916,7 +916,8 @@ static int pci_pm_resume_noirq(struct device *dev)
pci_fixup_device(pci_fixup_resume_early, pci_dev);
pcie_pme_root_status_cleanup(pci_dev);

- if (!skip_bus_pm && prev_state == PCI_D3cold)
+ if (!skip_bus_pm && prev_state == PCI_D3cold
+ && !pm_resume_via_firmware())
pci_bridge_wait_for_secondary_bus(pci_dev);

if (pci_has_legacy_pm_support(pci_dev))
--
2.17.1
\
 
 \ /
  Last update: 2020-03-11 05:53    [W:0.088 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site