On Wed, Jul 30, 2025 at 01:20:57PM +0200, Niklas Schnelle wrote:
> 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.
[...]
> +++ b/drivers/pci/pci-driver.c
> @@ -1592,6 +1592,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;

I note that PCI_ERS_RESULT_NO_AER_DRIVER is also missing in that
switch/case statement.  I guess for the patch to be complete,
it needs to be added to the PCI_ERS_RESULT_DISCONNECT case.
Do you agree?

If you do and respin the patch with that change, feel free to add
my Reviewed-by.

Since you're an IBMer and EEH is maintained by IBM, I'm wondering
if it would be possible to amend EEH to report "rc" instead of
PCI_ERS_RESULT_NONE in eeh_report_error()?  There are multiple
deviations between AER and EEH, this is one of them.  It would
be good to move towards a more consistent recovery process across
platforms.

Thanks,

Lukas

Reply via email to