diff options
author | Sam Bobroff <sbobroff@linux.ibm.com> | 2018-05-25 13:11:39 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-06-03 20:43:41 +1000 |
commit | 665012c5734b0f2123dfb4b2bdd44c3344647b9a (patch) | |
tree | 6bfbf954ef2a77aa7663a986ba606c90f643c87d /arch/powerpc | |
parent | 010acfa1a76679174a0d8732965d76ae8a8531f7 (diff) | |
download | linux-stable-665012c5734b0f2123dfb4b2bdd44c3344647b9a.tar.gz linux-stable-665012c5734b0f2123dfb4b2bdd44c3344647b9a.tar.bz2 linux-stable-665012c5734b0f2123dfb4b2bdd44c3344647b9a.zip |
powerpc/eeh: Cleaner handling of EEH_DEV_NO_HANDLER
If a device without a driver is recovered via EEH, the flag
EEH_DEV_NO_HANDLER is incorrectly left set on the device after
recovery, because the test in eeh_report_resume() for the existence of
a bound driver is done before the flag is cleared. If a driver is
later bound, and EEH experienced again, some of the drivers EEH
handers are not called.
To correct this, clear the flag unconditionally after EEH processing
is complete.
Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/eeh_driver.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 7b0670b03a97..e18802d96654 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c @@ -411,7 +411,6 @@ static void *eeh_report_resume(struct eeh_dev *edev, void *userdata) if (!driver->err_handler || !driver->err_handler->resume || (edev->mode & EEH_DEV_NO_HANDLER) || !was_in_error) { - edev->mode &= ~EEH_DEV_NO_HANDLER; goto out; } @@ -786,6 +785,7 @@ void eeh_handle_normal_event(struct eeh_pe *pe) { struct pci_bus *bus; struct eeh_dev *edev, *tmp; + struct eeh_pe *tmp_pe; int rc = 0; enum pci_ers_result result = PCI_ERS_RESULT_NONE; struct eeh_rmv_data rmv_data = {LIST_HEAD_INIT(rmv_data.edev_list), 0}; @@ -940,6 +940,10 @@ void eeh_handle_normal_event(struct eeh_pe *pe) eeh_set_irq_state(pe, true); eeh_pe_dev_traverse(pe, eeh_report_resume, NULL); + eeh_for_each_pe(pe, tmp_pe) + eeh_pe_for_each_dev(tmp_pe, edev, tmp) + edev->mode &= ~EEH_DEV_NO_HANDLER; + pr_info("EEH: Recovery successful.\n"); goto final; |