summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2025-08-07 15:55:38 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 16:33:55 +0200
commita4bc85f083add70d5d96a89910b434559fa6108b (patch)
tree18197a6d4c4e804e684ce3d3a363fcddec6b4ca3 /drivers/pci
parent2fad3c11066ce94b9c94a5cad0fe7ea1e5f7739e (diff)
downloadlinux-a4bc85f083add70d5d96a89910b434559fa6108b.tar.gz
linux-a4bc85f083add70d5d96a89910b434559fa6108b.tar.bz2
linux-a4bc85f083add70d5d96a89910b434559fa6108b.zip
PCI/AER: Fix missing uevent on recovery when a reset is requested
commit bbf7d0468d0da71d76cc6ec9bc8a224325d07b6b upstream. Since commit 7b42d97e99d3 ("PCI/ERR: Always report current recovery status for udev") AER uses the result of error_detected() as parameter to pci_uevent_ers(). As pci_uevent_ers() however does not handle PCI_ERS_RESULT_NEED_RESET this results in a missing uevent for the beginning of recovery if drivers request a reset. Fix this by treating PCI_ERS_RESULT_NEED_RESET as beginning recovery. Fixes: 7b42d97e99d3 ("PCI/ERR: Always report current recovery status for udev") Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Lukas Wunner <lukas@wunner.de> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250807-add_err_uevents-v5-1-adf85b0620b0@linux.ibm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 35270172c833..0c3aa91d1aee 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1600,6 +1600,7 @@ void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type)
switch (err_type) {
case PCI_ERS_RESULT_NONE:
case PCI_ERS_RESULT_CAN_RECOVER:
+ case PCI_ERS_RESULT_NEED_RESET:
envp[idx++] = "ERROR_EVENT=BEGIN_RECOVERY";
envp[idx++] = "DEVICE_ONLINE=0";
break;