]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/eeh: Add a debugfs interface to check if a driver supports recovery
authorOliver O'Halloran <oohall@gmail.com>
Tue, 3 Nov 2020 05:15:12 +0000 (16:15 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 31 Jan 2021 11:35:47 +0000 (22:35 +1100)
commit9e857416833d9701a406ecd6f03a695405ada5e6
tree809547eb16695460cde88c67a84810ca2edeeab1
parentb5e904b83067bbbd7dc83ea3734c119f8796d79f
powerpc/eeh: Add a debugfs interface to check if a driver supports recovery

If a PCI device's current driver implements the error handling callbacks
EEH can use them to recover the device after an error occurs. For devices
without the error handling callbacks we recover them by removing the device
and re-scanning it so the PCI core puts the device back into a known good
state.

Currently there's no way for userspace to determine if the driver supports
recovery or not which makes it difficult to write automated tests for EEH.
This patch addressing that by adding a debugfs interface for querying if
a specific device can be recovered or not.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201103051512.919333-2-oohall@gmail.com
arch/powerpc/kernel/eeh.c