]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/pci/pcie/aspm.c
PCI/ASPM: Disable ASPM L1.2 Substate if we don't have LTR
[mirror_ubuntu-bionic-kernel.git] / drivers / pci / pcie / aspm.c
index 3b9b4d50cd988198b877e1acc91685c26ab90002..88b419835d189ac351c279486ea659e87371025b 100644 (file)
@@ -384,6 +384,15 @@ static void pcie_get_aspm_reg(struct pci_dev *pdev,
                info->l1ss_cap = 0;
                return;
        }
+
+       /*
+        * If we don't have LTR for the entire path from the Root Complex
+        * to this device, we can't use ASPM L1.2 because it relies on the
+        * LTR_L1.2_THRESHOLD.  See PCIe r4.0, secs 5.5.4, 6.18.
+        */
+       if (!pdev->ltr_path)
+               info->l1ss_cap &= ~PCI_L1SS_CAP_ASPM_L1_2;
+
        pci_read_config_dword(pdev, info->l1ss_cap_ptr + PCI_L1SS_CTL1,
                              &info->l1ss_ctl1);
        pci_read_config_dword(pdev, info->l1ss_cap_ptr + PCI_L1SS_CTL2,