[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250403074425.1181053-1-raag.jadav@intel.com>
Date: Thu, 3 Apr 2025 13:14:25 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: rafael@...nel.org,
mahesh@...ux.ibm.com,
oohall@...il.com,
bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
ilpo.jarvinen@...ux.intel.com,
lukas.wunner@...el.com,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v1] PCI/AER: Avoid power state transition during system suspend
If an error is triggered while system suspend is in progress, any bus
level power state transition will result in unpredictable error handling.
Mark skip_bus_pm flag as true to avoid this.
Signed-off-by: Raag Jadav <raag.jadav@...el.com>
---
Ideally we'd want to defer recovery until system resume, but this is
good enough to prevent device suspend.
More discussion at [1].
[1] https://lore.kernel.org/r/Z-38rPeN_j7YGiEl@black.fi.intel.com
drivers/pci/pcie/aer.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 508474e17183..5acf4efc2df3 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -1108,6 +1108,12 @@ static void pci_aer_handle_error(struct pci_dev *dev, struct aer_err_info *info)
static void handle_error_source(struct pci_dev *dev, struct aer_err_info *info)
{
+ /*
+ * Avoid any power state transition if an error is triggered during
+ * system suspend.
+ */
+ dev->skip_bus_pm = true;
+
cxl_rch_handle_error(dev, info);
pci_aer_handle_error(dev, info);
pci_dev_put(dev);
--
2.34.1
Powered by blists - more mailing lists