From: Greg Kroah-Hartman Date: Wed, 22 Nov 2023 20:09:22 +0000 (+0000) Subject: 5.10-stable patches X-Git-Tag: v4.14.331~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1eb5871745204f460f6a5de4ff98ac2aeaec2ce;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: pci-aspm-fix-l1-substate-handling-in-aspm_attr_store_common.patch --- diff --git a/queue-5.10/pci-aspm-fix-l1-substate-handling-in-aspm_attr_store_common.patch b/queue-5.10/pci-aspm-fix-l1-substate-handling-in-aspm_attr_store_common.patch new file mode 100644 index 00000000000..ddb50646f19 --- /dev/null +++ b/queue-5.10/pci-aspm-fix-l1-substate-handling-in-aspm_attr_store_common.patch @@ -0,0 +1,51 @@ +From 8e37372ad0bea4c9b4712d9943f6ae96cff9491f Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Wed, 11 Oct 2023 09:46:45 +0200 +Subject: PCI/ASPM: Fix L1 substate handling in aspm_attr_store_common() + +From: Heiner Kallweit + +commit 8e37372ad0bea4c9b4712d9943f6ae96cff9491f upstream. + +aspm_attr_store_common(), which handles sysfs control of ASPM, has the same +problem as fb097dcd5a28 ("PCI/ASPM: Disable only ASPM_STATE_L1 when driver +disables L1"): disabling L1 adds only ASPM_L1 (but not any of the L1.x +substates) to the "aspm_disable" mask. + +Enabling one substate, e.g., L1.1, via sysfs removes ASPM_L1 from the +disable mask. Since disabling L1 via sysfs doesn't add any of the +substates to the disable mask, enabling L1.1 actually enables *all* the +substates. + +In this scenario: + + - Write 0 to "l1_aspm" to disable L1 + - Write 1 to "l1_1_aspm" to enable L1.1 + +the intention is to disable L1 and all L1.x substates, then enable just +L1.1, but in fact, *all* L1.x substates are enabled. + +Fix this by explicitly disabling all the L1.x substates when disabling L1. + +Fixes: 72ea91afbfb0 ("PCI/ASPM: Add sysfs attributes for controlling ASPM link states") +Link: https://lore.kernel.org/r/6ba7dd79-9cfe-4ed0-a002-d99cb842f361@gmail.com +Signed-off-by: Heiner Kallweit +[bhelgaas: commit log] +Signed-off-by: Bjorn Helgaas +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/pcie/aspm.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/pci/pcie/aspm.c ++++ b/drivers/pci/pcie/aspm.c +@@ -1250,6 +1250,8 @@ static ssize_t aspm_attr_store_common(st + link->aspm_disable &= ~ASPM_STATE_L1; + } else { + link->aspm_disable |= state; ++ if (state & ASPM_STATE_L1) ++ link->aspm_disable |= ASPM_STATE_L1SS; + } + + pcie_config_aspm_link(link, policy_to_aspm_state(link)); diff --git a/queue-5.10/series b/queue-5.10/series index 79a30408e85..c3d0e127973 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -111,6 +111,7 @@ clk-qcom-ipq8074-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch clk-qcom-ipq6018-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch mmc-vub300-fix-an-error-code.patch mmc-sdhci_am654-fix-start-loop-index-for-tap-value-parsing.patch +pci-aspm-fix-l1-substate-handling-in-aspm_attr_store_common.patch wifi-ath11k-fix-temperature-event-locking.patch wifi-ath11k-fix-dfs-radar-event-locking.patch wifi-ath11k-fix-htt-pktlog-locking.patch