diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2019-09-03 12:15:54 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-09-05 06:22:38 +0200 |
commit | 38ddc011478e573c9ab4e3e9bc54cc5bfc542351 (patch) | |
tree | 149b8de3a2208cc763e4766da3b84351bee16b39 /arch | |
parent | powerpc/eeh: Fix race when freeing PDNs (diff) | |
download | linux-38ddc011478e573c9ab4e3e9bc54cc5bfc542351.tar.xz linux-38ddc011478e573c9ab4e3e9bc54cc5bfc542351.zip |
powerpc/eeh: Make permanently failed devices non-actionable
If a device is torn down by a hotplug slot driver it's marked as removed
and marked as permaantly failed. There's no point in trying to recover a
permernantly failed device so it should be considered un-actionable.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190903101605.2890-4-oohall@gmail.com
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/eeh_driver.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 75266156943f..18a69fac4d80 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c @@ -96,8 +96,16 @@ static bool eeh_dev_removed(struct eeh_dev *edev) static bool eeh_edev_actionable(struct eeh_dev *edev) { - return (edev->pdev && !eeh_dev_removed(edev) && - !eeh_pe_passed(edev->pe)); + if (!edev->pdev) + return false; + if (edev->pdev->error_state == pci_channel_io_perm_failure) + return false; + if (eeh_dev_removed(edev)) + return false; + if (eeh_pe_passed(edev->pe)) + return false; + + return true; } /** |