]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/pci: Allow automatic recovery with minimal driver support
authorNiklas Schnelle <schnelle@linux.ibm.com>
Wed, 25 Jun 2025 09:28:30 +0000 (11:28 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Sat, 28 Jun 2025 16:59:00 +0000 (18:59 +0200)
commit62355f1f87b8c7f8785a8dd3cd5ca6e5b513566a
treeb8de023ef96bb424eb640095714c1da8d8b0276b
parentb97a7972b1f4f81417840b9a2ab0c19722b577d5
s390/pci: Allow automatic recovery with minimal driver support

According to Documentation/PCI/pci-error-recovery.rst only the
error_detected() callback in the err_handler struct is mandatory for
a driver to support error recovery. So far s390's error recovery chose
a stricter approach also requiring slot_reset() and resume().

Relax this requirement and only require error_detected(). If a callback
is not implemented EEH and AER treat this as PCI_ERS_RESULT_NONE. This
return value is otherwise used by drivers abstaining from their vote
on how to proceed with recovery and currently also not supported by
s390's recovery code.

So to support missing callbacks in-line with other implementors of the
recovery flow, also handle PCI_ERS_RESULT_NONE. Since s390 only does per
PCI function recovery and does not do voting, treat PCI_ERS_RESULT_NONE
optimistically and proceed through recovery unless other failures
prevent this.

Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Reviewed-by: Julian Ruess <julianr@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/pci/pci_event.c