Skip to content

Commit 80950a5

Browse files
Ajay Agarwalbjorn-helgaas
authored andcommitted
PCI/ASPM: Set ASPM_STATE_L1 when driver enables L1.1 or L1.2
Previously pci_enable_link_state(PCIE_LINK_STATE_L1_1) enabled only ASPM_STATE_L1_1 and did not enable ASPM_STATE_L1. The L1.1 state only works when L1 is enabled, so enable ASPM_STATE_L1 in addition, and do the same for L1.2. The only current caller is vmd_pm_enable_quirk(), which enables *all* ASPM states, so this should have no functional effect. [bhelgaas: commit log] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ajay Agarwal <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 25edb25 commit 80950a5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/pci/pcie/aspm.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,14 +1174,15 @@ int pci_enable_link_state(struct pci_dev *pdev, int state)
11741174
link->aspm_default |= ASPM_STATE_L0S;
11751175
if (state & PCIE_LINK_STATE_L1)
11761176
link->aspm_default |= ASPM_STATE_L1;
1177+
/* L1 PM substates require L1 */
11771178
if (state & PCIE_LINK_STATE_L1_1)
1178-
link->aspm_default |= ASPM_STATE_L1_1;
1179+
link->aspm_default |= ASPM_STATE_L1_1 | ASPM_STATE_L1;
11791180
if (state & PCIE_LINK_STATE_L1_2)
1180-
link->aspm_default |= ASPM_STATE_L1_2;
1181+
link->aspm_default |= ASPM_STATE_L1_2 | ASPM_STATE_L1;
11811182
if (state & PCIE_LINK_STATE_L1_1_PCIPM)
1182-
link->aspm_default |= ASPM_STATE_L1_1_PCIPM;
1183+
link->aspm_default |= ASPM_STATE_L1_1_PCIPM | ASPM_STATE_L1;
11831184
if (state & PCIE_LINK_STATE_L1_2_PCIPM)
1184-
link->aspm_default |= ASPM_STATE_L1_2_PCIPM;
1185+
link->aspm_default |= ASPM_STATE_L1_2_PCIPM | ASPM_STATE_L1;
11851186
pcie_config_aspm_link(link, policy_to_aspm_state(link));
11861187

11871188
link->clkpm_default = (state & PCIE_LINK_STATE_CLKPM) ? 1 : 0;

0 commit comments

Comments
 (0)