From 1034640cbd3bed3e007562e9ca0f75525eb4a9e0 Mon Sep 17 00:00:00 2001 From: Xiang Liu Date: Fri, 21 Aug 2026 23:37:43 +0800 Subject: [PATCH] drm/amd/ras: tolerate an unsupported MCA debug mode control ras_mp1_set_debug_mode() reports -EOPNOTSUPP where the control does not exist, an SR-IOV guest among them. Treating that as fatal fails ras_core_sw_init() and takes RAS down on every VF. Nothing else in the MP1 block depends on it, so carry on. Signed-off-by: Xiang Liu Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/ras/core/ras_mp1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/ras/core/ras_mp1.c b/drivers/gpu/drm/amd/ras/core/ras_mp1.c index 2452448806f6..0f5140abb6a8 100644 --- a/drivers/gpu/drm/amd/ras/core/ras_mp1.c +++ b/drivers/gpu/drm/amd/ras/core/ras_mp1.c @@ -202,13 +202,14 @@ int ras_mp1_sw_init(struct ras_core_context *ras_core) mutex_init(&mp1->op_mutex); + /* Nothing else in the MP1 block depends on the debug mode control. */ ret = ras_mp1_set_debug_mode(ras_core, false); - if (ret) { + if (ret && ret != -EOPNOTSUPP) { mutex_destroy(&mp1->op_mutex); return ret; } - return ret; + return 0; } int ras_mp1_sw_fini(struct ras_core_context *ras_core)