[PATCH v2 0/3] PCI/PM: Always disable PTM for all devices during suspend

From: Bjorn Helgaas
Date: Fri Sep 02 2022 - 19:35:53 EST


From: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

We currently disable PTM for Root Ports during suspend. Leaving PTM
enabled for downstream devices causes UR errors if they send PTM Requests.
The intent of this series is to:

- Unconditionally disable PTM during suspend (even if the driver saves
its own state) by moving the disable from pci_prepare_to_sleep() to
pci_pm_suspend().

- Disable PTM for all devices by removing the Root Port condition and
doing it early in the suspend paths.

- Explicitly re-enable PTM during resume, which requires new support in
pci_enable_ptm() for Root Ports and Switch Upstream Ports.


Bjorn Helgaas (3):
PCI/PTM: Preserve PTM Root Select
PCI/PTM: Implement pci_enable_ptm() for Root Ports, Switch Upstream
Ports
PCI/PM: Always disable PTM for all devices during suspend

drivers/pci/pci-driver.c | 14 ++++++++++++++
drivers/pci/pci.c | 20 --------------------
drivers/pci/pcie/ptm.c | 36 ++++++++++++++++++++++++++++--------
3 files changed, 42 insertions(+), 28 deletions(-)

--
2.25.1