From c7c59c6097d94dbab8fc68dae798017bdbc5b3b9 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Tue, 16 Apr 2024 16:22:32 +0200 Subject: [PATCH 6/6] edma_v1: skip edma_disable_port in edma_cleanup subsequent run Skip edma_disable_port in edma_cleanup subsequent run as it will cause the kernel panic as the regs are already freed by previous run of edma_cleanup. It's use it's not clear but the call is already done in the first run of edma_cleanup. Maybe an oversight never dropped? Signed-off-by: Christian Marangi --- hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) --- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c +++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c @@ -326,9 +326,15 @@ void edma_cleanup(bool is_dp_override) * Disable EDMA only at module exit time, since NSS firmware * depends on this setting. */ - if (!is_dp_override) { - edma_disable_port(); - } + /* This call will make the kernel panic as reg used by + * edma_disable_port are already freed by previous call of + * edma_cleanup. Logic is not clear of WHY this is called. + * Keep this here for reference if someone EVER wants + * to investigate. + */ + // if (!is_dp_override) { + // edma_disable_port(); + // } return; }