From 721a1cc037247ff913c674f9ee6e07b16c7ea315 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Tue, 5 Dec 2023 00:04:04 -0500 Subject: [PATCH] Drop PCI patches not needed on 4.19 --- ...pm-substate-support-to-pci_disable_l.patch | 68 ---- ...-only-aspm_state_l1-when-driver-disa.patch | 47 --- ..._disable_link_state-propagate-errors.patch | 118 ------- ...ove-aspm-declarations-to-linux-pci.h.patch | 317 ------------------ ...disable-only-aspm_state_l1-when-driv.patch | 80 ----- queue-4.19/series | 5 - 6 files changed, 635 deletions(-) delete mode 100644 queue-4.19/pci-aspm-add-l1-pm-substate-support-to-pci_disable_l.patch delete mode 100644 queue-4.19/pci-aspm-disable-only-aspm_state_l1-when-driver-disa.patch delete mode 100644 queue-4.19/pci-let-pci_disable_link_state-propagate-errors.patch delete mode 100644 queue-4.19/pci-move-aspm-declarations-to-linux-pci.h.patch delete mode 100644 queue-4.19/revert-pci-aspm-disable-only-aspm_state_l1-when-driv.patch diff --git a/queue-4.19/pci-aspm-add-l1-pm-substate-support-to-pci_disable_l.patch b/queue-4.19/pci-aspm-add-l1-pm-substate-support-to-pci_disable_l.patch deleted file mode 100644 index 1d90240757a..00000000000 --- a/queue-4.19/pci-aspm-add-l1-pm-substate-support-to-pci_disable_l.patch +++ /dev/null @@ -1,68 +0,0 @@ -From e5711ab0ab6a25b276dc09f14da5331a48bf45be Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sat, 5 Oct 2019 14:04:36 +0200 -Subject: PCI/ASPM: Add L1 PM substate support to pci_disable_link_state() - -From: Heiner Kallweit - -[ Upstream commit aff5d0552da4055da3faa27ee4252e48bb1f5821 ] - -Add support for disabling states L1.1 and L1.2 to pci_disable_link_state(). -Allow separate control of ASPM and PCI PM L1 substates. - -Link: https://lore.kernel.org/r/d81f8036-c236-6463-48e7-ebcdcda85bba@gmail.com -Signed-off-by: Heiner Kallweit -Signed-off-by: Bjorn Helgaas -Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"") -Signed-off-by: Sasha Levin ---- - drivers/pci/pcie/aspm.c | 11 ++++++++++- - include/linux/pci.h | 10 +++++++--- - 2 files changed, 17 insertions(+), 4 deletions(-) - -diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c -index 1f9e89c2c10d3..8f934c88dcd76 100644 ---- a/drivers/pci/pcie/aspm.c -+++ b/drivers/pci/pcie/aspm.c -@@ -1110,7 +1110,16 @@ 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) -- link->aspm_disable |= ASPM_STATE_L1; -+ /* L1 PM substates require L1 */ -+ link->aspm_disable |= ASPM_STATE_L1 | ASPM_STATE_L1SS; -+ if (state & PCIE_LINK_STATE_L1_1) -+ link->aspm_disable |= ASPM_STATE_L1_1; -+ if (state & PCIE_LINK_STATE_L1_2) -+ link->aspm_disable |= ASPM_STATE_L1_2; -+ if (state & PCIE_LINK_STATE_L1_1_PCIPM) -+ link->aspm_disable |= ASPM_STATE_L1_1_PCIPM; -+ if (state & PCIE_LINK_STATE_L1_2_PCIPM) -+ link->aspm_disable |= ASPM_STATE_L1_2_PCIPM; - pcie_config_aspm_link(link, policy_to_aspm_state(link)); - - if (state & PCIE_LINK_STATE_CLKPM) -diff --git a/include/linux/pci.h b/include/linux/pci.h -index f8036acf2c12b..5e21876341c62 100644 ---- a/include/linux/pci.h -+++ b/include/linux/pci.h -@@ -1496,9 +1496,13 @@ extern bool pcie_ports_native; - #define pcie_ports_native false - #endif - --#define PCIE_LINK_STATE_L0S 1 --#define PCIE_LINK_STATE_L1 2 --#define PCIE_LINK_STATE_CLKPM 4 -+#define PCIE_LINK_STATE_L0S BIT(0) -+#define PCIE_LINK_STATE_L1 BIT(1) -+#define PCIE_LINK_STATE_CLKPM BIT(2) -+#define PCIE_LINK_STATE_L1_1 BIT(3) -+#define PCIE_LINK_STATE_L1_2 BIT(4) -+#define PCIE_LINK_STATE_L1_1_PCIPM BIT(5) -+#define PCIE_LINK_STATE_L1_2_PCIPM BIT(6) - - #ifdef CONFIG_PCIEASPM - int pci_disable_link_state(struct pci_dev *pdev, int state); --- -2.42.0 - diff --git a/queue-4.19/pci-aspm-disable-only-aspm_state_l1-when-driver-disa.patch b/queue-4.19/pci-aspm-disable-only-aspm_state_l1-when-driver-disa.patch deleted file mode 100644 index 8b9b35dbaed..00000000000 --- a/queue-4.19/pci-aspm-disable-only-aspm_state_l1-when-driver-disa.patch +++ /dev/null @@ -1,47 +0,0 @@ -From c3e6db03cceefe02c5be01bc581b545d5d5d0121 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 4 May 2023 16:42:57 +0530 -Subject: PCI/ASPM: Disable only ASPM_STATE_L1 when driver disables L1 - -From: Ajay Agarwal - -[ Upstream commit fb097dcd5a28c0a2325632405c76a66777a6bed9 ] - -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 -Signed-off-by: Bjorn Helgaas -Reviewed-by: Kuppuswamy Sathyanarayanan -Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"") -Signed-off-by: Sasha Levin ---- - drivers/pci/pcie/aspm.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c -index 8f934c88dcd76..8db6a9084a12a 100644 ---- a/drivers/pci/pcie/aspm.c -+++ b/drivers/pci/pcie/aspm.c -@@ -1110,8 +1110,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) --- -2.42.0 - diff --git a/queue-4.19/pci-let-pci_disable_link_state-propagate-errors.patch b/queue-4.19/pci-let-pci_disable_link_state-propagate-errors.patch deleted file mode 100644 index 2259964f118..00000000000 --- a/queue-4.19/pci-let-pci_disable_link_state-propagate-errors.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 568b1487084809a7257e371ca4ede0b79eb55794 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 18 Jun 2019 23:13:48 +0200 -Subject: PCI: let pci_disable_link_state propagate errors - -From: Heiner Kallweit - -[ Upstream commit 4cfd218855923a07dc02a5bec3d3bb37a118ebc2 ] - -Drivers may rely on pci_disable_link_state() having disabled certain -ASPM link states. If OS can't control ASPM then pci_disable_link_state() -turns into a no-op w/o informing the caller. The driver therefore may -falsely assume the respective ASPM link states are disabled. -Let pci_disable_link_state() propagate errors to the caller, enabling -the caller to react accordingly. - -Signed-off-by: Heiner Kallweit -Acked-by: Bjorn Helgaas -Signed-off-by: David S. Miller -Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"") -Signed-off-by: Sasha Levin ---- - drivers/pci/pcie/aspm.c | 20 +++++++++++--------- - include/linux/pci-aspm.h | 7 ++++--- - 2 files changed, 15 insertions(+), 12 deletions(-) - -diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c -index 118c91586798d..f2b5f3a8535e5 100644 ---- a/drivers/pci/pcie/aspm.c -+++ b/drivers/pci/pcie/aspm.c -@@ -1078,18 +1078,18 @@ void pcie_aspm_powersave_config_link(struct pci_dev *pdev) - up_read(&pci_bus_sem); - } - --static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) -+static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) - { - struct pci_dev *parent = pdev->bus->self; - struct pcie_link_state *link; - - if (!pci_is_pcie(pdev)) -- return; -+ return 0; - - if (pdev->has_secondary_link) - parent = pdev; - if (!parent || !parent->link_state) -- return; -+ return -EINVAL; - - /* - * A driver requested that ASPM be disabled on this device, but -@@ -1101,7 +1101,7 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) - */ - if (aspm_disabled) { - pci_warn(pdev, "can't disable ASPM; OS doesn't have ASPM control\n"); -- return; -+ return -EPERM; - } - - if (sem) -@@ -1120,11 +1120,13 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) - mutex_unlock(&aspm_lock); - if (sem) - up_read(&pci_bus_sem); -+ -+ return 0; - } - --void pci_disable_link_state_locked(struct pci_dev *pdev, int state) -+int pci_disable_link_state_locked(struct pci_dev *pdev, int state) - { -- __pci_disable_link_state(pdev, state, false); -+ return __pci_disable_link_state(pdev, state, false); - } - EXPORT_SYMBOL(pci_disable_link_state_locked); - -@@ -1132,14 +1134,14 @@ EXPORT_SYMBOL(pci_disable_link_state_locked); - * pci_disable_link_state - Disable device's link state, so the link will - * never enter specific states. Note that if the BIOS didn't grant ASPM - * control to the OS, this does nothing because we can't touch the LNKCTL -- * register. -+ * register. Returns 0 or a negative errno. - * - * @pdev: PCI device - * @state: ASPM link state to disable - */ --void pci_disable_link_state(struct pci_dev *pdev, int state) -+int pci_disable_link_state(struct pci_dev *pdev, int state) - { -- __pci_disable_link_state(pdev, state, true); -+ return __pci_disable_link_state(pdev, state, true); - } - EXPORT_SYMBOL(pci_disable_link_state); - -diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h -index df28af5cef210..67064145d76e0 100644 ---- a/include/linux/pci-aspm.h -+++ b/include/linux/pci-aspm.h -@@ -24,11 +24,12 @@ - #define PCIE_LINK_STATE_CLKPM 4 - - #ifdef CONFIG_PCIEASPM --void pci_disable_link_state(struct pci_dev *pdev, int state); --void pci_disable_link_state_locked(struct pci_dev *pdev, int state); -+int pci_disable_link_state(struct pci_dev *pdev, int state); -+int pci_disable_link_state_locked(struct pci_dev *pdev, int state); - void pcie_no_aspm(void); - #else --static inline void pci_disable_link_state(struct pci_dev *pdev, int state) { } -+static inline int pci_disable_link_state(struct pci_dev *pdev, int state) -+{ return 0; } - static inline void pcie_no_aspm(void) { } - #endif - --- -2.42.0 - diff --git a/queue-4.19/pci-move-aspm-declarations-to-linux-pci.h.patch b/queue-4.19/pci-move-aspm-declarations-to-linux-pci.h.patch deleted file mode 100644 index 4e64bc5ef78..00000000000 --- a/queue-4.19/pci-move-aspm-declarations-to-linux-pci.h.patch +++ /dev/null @@ -1,317 +0,0 @@ -From 1402588c96fb7545d783048ade10b2d1dccedfd8 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 27 Aug 2019 11:56:20 +0200 -Subject: PCI: Move ASPM declarations to linux/pci.h - -From: Krzysztof Wilczynski - -[ Upstream commit 7ce2e76a0420801fb4b53b9e6850940e6b326433 ] - -Move ASPM definitions and function prototypes from include/linux/pci-aspm.h -to include/linux/pci.h so users only need to include : - - PCIE_LINK_STATE_L0S - PCIE_LINK_STATE_L1 - PCIE_LINK_STATE_CLKPM - pci_disable_link_state() - pci_disable_link_state_locked() - pcie_no_aspm() - -No functional changes intended. - -Link: https://lore.kernel.org/r/20190827095620.11213-1-kw@linux.com -Signed-off-by: Krzysztof Wilczynski -Signed-off-by: Bjorn Helgaas -Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"") -Signed-off-by: Sasha Levin ---- - drivers/acpi/pci_root.c | 1 - - drivers/char/xillybus/xillybus_pcie.c | 1 - - drivers/net/ethernet/intel/e1000e/e1000.h | 1 - - drivers/net/ethernet/jme.c | 1 - - drivers/net/ethernet/realtek/r8169_main.c | 1 - - drivers/net/wireless/ath/ath5k/pci.c | 1 - - .../net/wireless/intel/iwlegacy/3945-mac.c | 1 - - .../net/wireless/intel/iwlegacy/4965-mac.c | 1 - - .../net/wireless/intel/iwlwifi/pcie/trans.c | 1 - - drivers/pci/pci-acpi.c | 1 - - drivers/pci/pcie/aspm.c | 1 - - drivers/pci/quirks.c | 1 - - drivers/scsi/aacraid/linit.c | 1 - - drivers/scsi/hpsa.c | 1 - - drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 - - include/linux/pci-aspm.h | 36 ------------------- - include/linux/pci.h | 18 ++++++++++ - 17 files changed, 18 insertions(+), 51 deletions(-) - delete mode 100644 include/linux/pci-aspm.h - -diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c -index e465e720eab20..6c23a6f520bad 100644 ---- a/drivers/acpi/pci_root.c -+++ b/drivers/acpi/pci_root.c -@@ -28,7 +28,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/char/xillybus/xillybus_pcie.c b/drivers/char/xillybus/xillybus_pcie.c -index 05e5324f60bd9..03dda2141ff42 100644 ---- a/drivers/char/xillybus/xillybus_pcie.c -+++ b/drivers/char/xillybus/xillybus_pcie.c -@@ -12,7 +12,6 @@ - - #include - #include --#include - #include - #include "xillybus.h" - -diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h -index c5a119daa7f3c..585da186e21f8 100644 ---- a/drivers/net/ethernet/intel/e1000e/e1000.h -+++ b/drivers/net/ethernet/intel/e1000e/e1000.h -@@ -13,7 +13,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c -index a5ab6f3403ae0..0935cf16de6eb 100644 ---- a/drivers/net/ethernet/jme.c -+++ b/drivers/net/ethernet/jme.c -@@ -27,7 +27,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c -index ecdf628e3bb89..d05bf6446a008 100644 ---- a/drivers/net/ethernet/realtek/r8169_main.c -+++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -28,7 +28,6 @@ - #include - #include - #include --#include - #include - #include - -diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c -index c6156cc38940a..d5ee32ce9eb3d 100644 ---- a/drivers/net/wireless/ath/ath5k/pci.c -+++ b/drivers/net/wireless/ath/ath5k/pci.c -@@ -18,7 +18,6 @@ - - #include - #include --#include - #include - #include - #include "../ath.h" -diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c -index d51a23815e186..20227f87025d1 100644 ---- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c -+++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c -@@ -33,7 +33,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c -index 2b60473e7bf9c..bc5c2f4f9c51b 100644 ---- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c -+++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c -@@ -33,7 +33,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c -index c69c13e762bbe..87235082acda7 100644 ---- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c -+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c -@@ -67,7 +67,6 @@ - * - *****************************************************************************/ - #include --#include - #include - #include - #include -diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c -index 2777c459706a9..216a8f109be42 100644 ---- a/drivers/pci/pci-acpi.c -+++ b/drivers/pci/pci-acpi.c -@@ -14,7 +14,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c -index f2b5f3a8535e5..1f9e89c2c10d3 100644 ---- a/drivers/pci/pcie/aspm.c -+++ b/drivers/pci/pcie/aspm.c -@@ -18,7 +18,6 @@ - #include - #include - #include --#include - #include "../pci.h" - - #ifdef MODULE_PARAM_PREFIX -diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c -index 3a165710fbb86..db8d9cbc86bf6 100644 ---- a/drivers/pci/quirks.c -+++ b/drivers/pci/quirks.c -@@ -20,7 +20,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c -index eecffc03084c0..c2748c07f9507 100644 ---- a/drivers/scsi/aacraid/linit.c -+++ b/drivers/scsi/aacraid/linit.c -@@ -40,7 +40,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c -index 25d9bdd4bc698..77ed4324741fc 100644 ---- a/drivers/scsi/hpsa.c -+++ b/drivers/scsi/hpsa.c -@@ -21,7 +21,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c -index bf659bc466dcc..78cf157fe2c19 100644 ---- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c -+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c -@@ -51,7 +51,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h -deleted file mode 100644 -index 67064145d76e0..0000000000000 ---- a/include/linux/pci-aspm.h -+++ /dev/null -@@ -1,36 +0,0 @@ --/* SPDX-License-Identifier: GPL-2.0 */ --/* -- * aspm.h -- * -- * PCI Express ASPM defines and function prototypes -- * -- * Copyright (C) 2007 Intel Corp. -- * Zhang Yanmin (yanmin.zhang@intel.com) -- * Shaohua Li (shaohua.li@intel.com) -- * -- * For more information, please consult the following manuals (look at -- * http://www.pcisig.com/ for how to get them): -- * -- * PCI Express Specification -- */ -- --#ifndef LINUX_ASPM_H --#define LINUX_ASPM_H -- --#include -- --#define PCIE_LINK_STATE_L0S 1 --#define PCIE_LINK_STATE_L1 2 --#define PCIE_LINK_STATE_CLKPM 4 -- --#ifdef CONFIG_PCIEASPM --int pci_disable_link_state(struct pci_dev *pdev, int state); --int pci_disable_link_state_locked(struct pci_dev *pdev, int state); --void pcie_no_aspm(void); --#else --static inline int pci_disable_link_state(struct pci_dev *pdev, int state) --{ return 0; } --static inline void pcie_no_aspm(void) { } --#endif -- --#endif /* LINUX_ASPM_H */ -diff --git a/include/linux/pci.h b/include/linux/pci.h -index 2636990e0cccf..f8036acf2c12b 100644 ---- a/include/linux/pci.h -+++ b/include/linux/pci.h -@@ -6,12 +6,18 @@ - * Copyright 1994, Drew Eckhardt - * Copyright 1997--1999 Martin Mares - * -+ * PCI Express ASPM defines and function prototypes -+ * Copyright (c) 2007 Intel Corp. -+ * Zhang Yanmin (yanmin.zhang@intel.com) -+ * Shaohua Li (shaohua.li@intel.com) -+ * - * For more information, please consult the following manuals (look at - * http://www.pcisig.com/ for how to get them): - * - * PCI BIOS Specification - * PCI Local Bus Specification - * PCI to PCI Bridge Specification -+ * PCI Express Specification - * PCI System Design Guide - */ - #ifndef LINUX_PCI_H -@@ -1490,9 +1496,21 @@ extern bool pcie_ports_native; - #define pcie_ports_native false - #endif - -+#define PCIE_LINK_STATE_L0S 1 -+#define PCIE_LINK_STATE_L1 2 -+#define PCIE_LINK_STATE_CLKPM 4 -+ - #ifdef CONFIG_PCIEASPM -+int pci_disable_link_state(struct pci_dev *pdev, int state); -+int pci_disable_link_state_locked(struct pci_dev *pdev, int state); -+void pcie_no_aspm(void); - bool pcie_aspm_support_enabled(void); - #else -+static inline int pci_disable_link_state(struct pci_dev *pdev, int state) -+{ return 0; } -+static inline int pci_disable_link_state_locked(struct pci_dev *pdev, int state) -+{ return 0; } -+static inline void pcie_no_aspm(void) { } - static inline bool pcie_aspm_support_enabled(void) { return false; } - #endif - --- -2.42.0 - diff --git a/queue-4.19/revert-pci-aspm-disable-only-aspm_state_l1-when-driv.patch b/queue-4.19/revert-pci-aspm-disable-only-aspm_state_l1-when-driv.patch deleted file mode 100644 index ab70e890cf2..00000000000 --- a/queue-4.19/revert-pci-aspm-disable-only-aspm_state_l1-when-driv.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 8b08bc1854f27aad6e9a7e1cadcaf24e39ec15c4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 11 Oct 2023 09:36:40 +0200 -Subject: Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables - L1" - -From: Heiner Kallweit - -[ Upstream commit 3cb4f534bac010258b2688395c2f13459a932be9 ] - -This reverts commit fb097dcd5a28c0a2325632405c76a66777a6bed9. - -After fb097dcd5a28 ("PCI/ASPM: Disable only ASPM_STATE_L1 when driver -disables L1"), disabling L1 via pci_disable_link_state(PCIE_LINK_STATE_L1), -then enabling one substate, e.g., L1.1, via sysfs actually enables *all* -the substates. - -For example, r8169 disables L1 because of hardware issues on a number of -systems, which implicitly disables the L1.1 and L1.2 substates. - -On some systems, L1 and L1.1 work fine, but L1.2 causes missed rx packets. -Enabling L1.1 via the sysfs "aspm_l1_1" attribute unexpectedly enables L1.2 -as well as L1.1. - -After fb097dcd5a28, pci_disable_link_state(PCIE_LINK_STATE_L1) adds only -ASPM_L1 (but not any of the L1.x substates) to the "aspm_disable" mask: - - --- Before fb097dcd5a28 - +++ After fb097dcd5a28 - - # r8169 disables L1: - pci_disable_link_state(PCIE_LINK_STATE_L1) - - disable |= ASPM_L1 | ASPM_L1_1 | ASPM_L1_2 | ... # disable L1, L1.x - + disable |= ASPM_L1 # disable L1 only - - # write "1" to sysfs "aspm_l1_1" attribute: - l1_1_aspm - aspm_attr_store_common(state = ASPM_L1_1) - disable &= ~ASPM_L1_1 # enable L1.1 - if (state & (ASPM_L1_1 | ...)) # if enabling any substate - disable &= ~ASPM_L1 # enable L1 - - # final state: - - disable = ASPM_L1_2 | ... # L1, L1.1 enabled; L1.2 disabled - + disable = 0 # L1, L1.1, L1.2 all enabled - -Enabling an L1.x substate removes the substate and L1 from the -"aspm_disable" mask. After fb097dcd5a28, the substates were not added to -the mask when disabling L1, so enabling one substate implicitly enables all -of them. - -Revert fb097dcd5a28 so enabling one substate doesn't enable the others. - -Link: https://lore.kernel.org/r/c75931ac-7208-4200-9ca1-821629cf5e28@gmail.com -Signed-off-by: Heiner Kallweit -[bhelgaas: work through example in commit log] -Signed-off-by: Bjorn Helgaas -Cc: stable@vger.kernel.org -Signed-off-by: Sasha Levin ---- - drivers/pci/pcie/aspm.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c -index 8db6a9084a12a..8f934c88dcd76 100644 ---- a/drivers/pci/pcie/aspm.c -+++ b/drivers/pci/pcie/aspm.c -@@ -1110,7 +1110,8 @@ 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) -- link->aspm_disable |= ASPM_STATE_L1; -+ /* L1 PM substates require L1 */ -+ link->aspm_disable |= ASPM_STATE_L1 | ASPM_STATE_L1SS; - if (state & PCIE_LINK_STATE_L1_1) - link->aspm_disable |= ASPM_STATE_L1_1; - if (state & PCIE_LINK_STATE_L1_2) --- -2.42.0 - diff --git a/queue-4.19/series b/queue-4.19/series index 5820014ce41..4ce31f5edbb 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -49,11 +49,6 @@ net-ravb-start-tx-queues-after-hw-initialization-suc.patch perf-intel-pt-adjust-sample-flags-for-vm-exit.patch perf-intel-pt-fix-async-branch-flags.patch smb3-fix-touch-h-of-symlink.patch -pci-let-pci_disable_link_state-propagate-errors.patch -pci-move-aspm-declarations-to-linux-pci.h.patch -pci-aspm-add-l1-pm-substate-support-to-pci_disable_l.patch -pci-aspm-disable-only-aspm_state_l1-when-driver-disa.patch -revert-pci-aspm-disable-only-aspm_state_l1-when-driv.patch s390-mm-fix-phys-vs-virt-confusion-in-mark_kernel_px.patch s390-cmma-fix-detection-of-dat-pages.patch mtd-cfi_cmdset_0001-support-the-absence-of-protectio.patch -- 2.47.3