mbox series

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

Message ID 20220902233543.390890-1-helgaas@kernel.org (mailing list archive)
Headers show
Series PCI/PM: Always disable PTM for all devices during suspend | expand

Message

Bjorn Helgaas Sept. 2, 2022, 11:35 p.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com>

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(-)