Skip to content

Commit a4bc85f

Browse files
niklas88gregkh
authored andcommitted
PCI/AER: Fix missing uevent on recovery when a reset is requested
commit bbf7d04 upstream. Since commit 7b42d97 ("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: 7b42d97 ("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>
1 parent 2fad3c1 commit a4bc85f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/pci/pci-driver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type)
16001600
switch (err_type) {
16011601
case PCI_ERS_RESULT_NONE:
16021602
case PCI_ERS_RESULT_CAN_RECOVER:
1603+
case PCI_ERS_RESULT_NEED_RESET:
16031604
envp[idx++] = "ERROR_EVENT=BEGIN_RECOVERY";
16041605
envp[idx++] = "DEVICE_ONLINE=0";
16051606
break;

0 commit comments

Comments
 (0)