WSL2-Linux-Kernel/arch/powerpc
Ganesh Goudar a51c253d83 powerpc/eeh: Set channel state after notifying the drivers
[ Upstream commit 9efcdaac36 ]

When a PCI error is encountered 6th time in an hour we
set the channel state to perm_failure and notify the
driver about the permanent failure.

However, after upstream commit 38ddc01147 ("powerpc/eeh:
Make permanently failed devices non-actionable"), EEH handler
stops calling any routine once the device is marked as
permanent failure. This issue can lead to fatal consequences
like kernel hang with certain PCI devices.

Following log is observed with lpfc driver, with and without
this change, Without this change kernel hangs, If PCI error
is encountered 6 times for a device in an hour.

Without the change

 EEH: Beginning: 'error_detected(permanent failure)'
 PCI 0132:60:00.0#600000: EEH: not actionable (1,1,1)
 PCI 0132:60:00.1#600000: EEH: not actionable (1,1,1)
 EEH: Finished:'error_detected(permanent failure)'

With the change

 EEH: Beginning: 'error_detected(permanent failure)'
 EEH: Invoking lpfc->error_detected(permanent failure)
 EEH: lpfc driver reports: 'disconnect'
 EEH: Invoking lpfc->error_detected(permanent failure)
 EEH: lpfc driver reports: 'disconnect'
 EEH: Finished:'error_detected(permanent failure)'

To fix the issue, set channel state to permanent failure after
notifying the drivers.

Fixes: 38ddc01147 ("powerpc/eeh: Make permanently failed devices non-actionable")
Suggested-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230209105649.127707-1-ganeshgr@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:21:53 +01:00
..
boot powerpc/toc: Future proof kernel toc 2024-01-25 14:52:32 -08:00
configs Remove DECnet support from kernel 2023-06-21 15:59:15 +02:00
crypto powerpc: flexible GPR range save/restore macros 2022-07-12 16:35:02 +02:00
include arch: consolidate arch_irq_work_raise prototypes 2024-02-23 08:54:39 +01:00
kernel powerpc/eeh: Set channel state after notifying the drivers 2024-03-01 13:21:53 +01:00
kexec powerpc: Set crashkernel offset to mid of RMA region 2022-04-13 20:59:03 +02:00
kvm powerpc: Don't include lppaca.h in paca.h 2023-09-19 12:22:42 +02:00
lib powerpc/lib: Validate size for vector operations 2024-02-23 08:54:37 +01:00
math-emu powerpc/math_emu/efp: Include module.h 2022-10-26 12:35:21 +02:00
mm powerpc/kasan: Fix addr error caused by page alignment 2024-02-23 08:55:04 +01:00
net powerpc64/bpf: Limit 'ldbrx' to processors compliant with ISA v2.06 2022-02-01 17:27:09 +01:00
perf powerpc/perf/hv-24x7: add missing RTAS retry status handling 2024-03-01 13:21:51 +01:00
platforms powerpc/pseries/lpar: add missing RTAS retry status handling 2024-03-01 13:21:51 +01:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-21 15:59:14 +02:00
sysdev powerpc/xive: Fix endian conversion size 2023-11-20 11:08:26 +01:00
tools powerpc/64: Add UADDR64 relocation support 2022-05-09 09:14:44 +02:00
xmon powerpc: Don't include lppaca.h in paca.h 2023-09-19 12:22:42 +02:00
Kbuild
Kconfig powerpc/memhotplug: Add add_pages override for PPC 2022-07-07 17:53:28 +02:00
Kconfig.debug powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y 2023-07-23 13:47:29 +02:00
Makefile powerpc: remove checks for binutils older than 2.25 2024-01-25 14:52:32 -08:00
Makefile.postlink