summaryrefslogtreecommitdiff
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2022-10-05 17:32:52 -0500
committerBjorn Helgaas <bhelgaas@google.com>2022-10-05 17:32:52 -0500
commitc1c2d8921f10f8b81c57ed3838f150bb711c83c0 (patch)
treea07e7501865c1f402b567fe36419e05899e2d2cf /drivers/pci/pci.c
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff)
parent7afeb84d14eaaebb71f5c558ed57ca858e4304e7 (diff)
Merge branch 'pci/aspm'
- Save L1 PM Substates Capability across suspend/resume so L1SS keeps working after resume (Vidya Sagar) - If device lacks L1 PM Substates Capability, don't read junk and treat it as such a Capability (Bjorn Helgaas) - Fix the LTR_L1.2_THRESHOLD computation, which previously configured the threshold for entering L1.2 to be lower than intended, so L1.2 could be used when it shouldn't be (Bjorn Helgaas) * pci/aspm: PCI/ASPM: Correct LTR_L1.2_THRESHOLD computation PCI/ASPM: Ignore L1 PM Substates if device lacks capability PCI/ASPM: Factor out L1 PM Substates configuration PCI/ASPM: Save L1 PM Substates Capability for suspend/resume PCI/ASPM: Refactor L1 PM Substates Control Register programming
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 95bc329e74c0..68a49fbaabde 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1663,6 +1663,7 @@ int pci_save_state(struct pci_dev *dev)
return i;
pci_save_ltr_state(dev);
+ pci_save_aspm_l1ss_state(dev);
pci_save_dpc_state(dev);
pci_save_aer_state(dev);
pci_save_ptm_state(dev);
@@ -1769,6 +1770,7 @@ void pci_restore_state(struct pci_dev *dev)
* LTR itself (in the PCIe capability).
*/
pci_restore_ltr_state(dev);
+ pci_restore_aspm_l1ss_state(dev);
pci_restore_pcie_state(dev);
pci_restore_pasid_state(dev);
@@ -3485,6 +3487,11 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev)
if (error)
pci_err(dev, "unable to allocate suspend buffer for LTR\n");
+ error = pci_add_ext_cap_save_buffer(dev, PCI_EXT_CAP_ID_L1SS,
+ 2 * sizeof(u32));
+ if (error)
+ pci_err(dev, "unable to allocate suspend buffer for ASPM-L1SS\n");
+
pci_allocate_vc_save_buffers(dev);
}