Skip to content

Commit bbf7d04

Browse files
niklas88bjorn-helgaas
authored andcommitted
PCI/AER: Fix missing uevent on recovery when a reset is requested
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
1 parent cc4a7a2 commit bbf7d04

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
@@ -1596,6 +1596,7 @@ void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type)
15961596
switch (err_type) {
15971597
case PCI_ERS_RESULT_NONE:
15981598
case PCI_ERS_RESULT_CAN_RECOVER:
1599+
case PCI_ERS_RESULT_NEED_RESET:
15991600
envp[idx++] = "ERROR_EVENT=BEGIN_RECOVERY";
16001601
envp[idx++] = "DEVICE_ONLINE=0";
16011602
break;

0 commit comments

Comments
 (0)