diff options
author | Ajay Agarwal <ajayagarwal@google.com> | 2023-05-04 16:42:57 +0530 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-05-18 16:51:13 -0500 |
commit | fb097dcd5a28c0a2325632405c76a66777a6bed9 (patch) | |
tree | c97cb55146391d833f680717419389f655b7d508 | |
parent | 456d8aa37d0f56fc9e985e812496e861dcd6f2f2 (diff) | |
download | linux-fb097dcd5a28c0a2325632405c76a66777a6bed9.tar.gz linux-fb097dcd5a28c0a2325632405c76a66777a6bed9.tar.bz2 linux-fb097dcd5a28c0a2325632405c76a66777a6bed9.zip |
PCI/ASPM: Disable only ASPM_STATE_L1 when driver disables L1
Previously pci_disable_link_state(PCIE_LINK_STATE_L1) disabled L1SS as well
as L1. This is unnecessary since pcie_config_aspm_link() takes care that
L1SS is not enabled if L1 is disabled.
Disable only ASPM_STATE_L1 when the caller disables L1. No functional
changes intended.
This is consistent with aspm_attr_store_common(), which disables only L1,
not L1SS, when L1 is disabled via the sysfs "l1_aspm" file.
[bhelgaas: commit log]
Link: https://lore.kernel.org/r/20230504111301.229358-2-ajayagarwal@google.com
Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
-rw-r--r-- | drivers/pci/pcie/aspm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index db32335039d6..8c8352eeee52 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -1098,8 +1098,7 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) if (state & PCIE_LINK_STATE_L0S) link->aspm_disable |= ASPM_STATE_L0S; if (state & PCIE_LINK_STATE_L1) - /* L1 PM substates require L1 */ - link->aspm_disable |= ASPM_STATE_L1 | ASPM_STATE_L1SS; + link->aspm_disable |= ASPM_STATE_L1; if (state & PCIE_LINK_STATE_L1_1) link->aspm_disable |= ASPM_STATE_L1_1; if (state & PCIE_LINK_STATE_L1_2) |