linux_dsm_epyc7002/drivers/pci/pcie
Mika Westerberg 52be9464aa PCI/portdrv: Resume upon exit from system suspend if left runtime suspended
Currently we try to keep PCIe ports runtime suspended over system suspend
if possible. This mostly happens when entering suspend-to-idle because
there is no need to re-configure wake settings.

This causes problems if the parent port goes into D3cold and it gets
resumed upon exit from system suspend. This may happen for example if the
port is part of PCIe switch and the same switch is connected to a PCIe
endpoint that needs to be resumed. The way exit from D3cold works according
PCIe 4.0 spec 5.3.1.4.2 is that power is restored and cold reset is
signaled. After this the device is in D0unitialized state keeping PME
context if it supports wake from D3cold.

The problem occurs when a PCIe hotplug port is left suspended and the
parent port goes into D3cold and back to D0: the port keeps its PME context
but since everything else is reset back to defaults (D0unitialized) it is
not set to detect hotplug events anymore.

For this reason change the PCIe portdrv power management logic so that it
is fine to keep the port runtime suspended over system suspend but it needs
to be resumed upon exit to make sure it gets properly re-initialized.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2018-10-02 16:04:40 -05:00
..
aer_inject.c PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ 2018-06-11 08:11:39 -05:00
aer.c PCI/ERR: Handle fatal error recovery 2018-09-26 14:23:14 -05:00
aspm.c PCI/ASPM: Convert to use sysfs_match_string() helper 2018-08-06 14:30:34 -05:00
dpc.c PCI: Make link active reporting detection generic 2018-10-02 16:04:40 -05:00
err.c PCI: Unify device inaccessible 2018-10-02 16:04:40 -05:00
Kconfig PCI/AER: Use "PCI Express" consistently in Kconfig text 2018-06-11 08:11:47 -05:00
Makefile PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ 2018-06-11 08:11:39 -05:00
pme.c PCI: portdrv: Initialize service drivers directly 2018-09-20 12:05:54 -05:00
portdrv_core.c PCI: pciehp: Clear spurious events earlier on resume 2018-07-31 11:07:59 -05:00
portdrv_pci.c PCI/portdrv: Resume upon exit from system suspend if left runtime suspended 2018-10-02 16:04:40 -05:00
portdrv.h PCI: portdrv: Initialize service drivers directly 2018-09-20 12:05:54 -05:00
ptm.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00