qca-nss-dp: add patch fixing rmmod and insmod
[openwrt/staging/pepe2k.git] / package / kernel / qca-nss-dp / patches / 0011-06-edma_v1-skip-edma_disable_port-in-edma_cleanup-subse.patch
1 From c7c59c6097d94dbab8fc68dae798017bdbc5b3b9 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Tue, 16 Apr 2024 16:22:32 +0200
4 Subject: [PATCH 6/6] edma_v1: skip edma_disable_port in edma_cleanup
5 subsequent run
6
7 Skip edma_disable_port in edma_cleanup subsequent run as it will cause
8 the kernel panic as the regs are already freed by previous run of
9 edma_cleanup. It's use it's not clear but the call is already done in
10 the first run of edma_cleanup. Maybe an oversight never dropped?
11
12 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 ---
14 hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 12 +++++++++---
15 1 file changed, 9 insertions(+), 3 deletions(-)
16
17 --- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
18 +++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
19 @@ -326,9 +326,15 @@ void edma_cleanup(bool is_dp_override)
20 * Disable EDMA only at module exit time, since NSS firmware
21 * depends on this setting.
22 */
23 - if (!is_dp_override) {
24 - edma_disable_port();
25 - }
26 + /* This call will make the kernel panic as reg used by
27 + * edma_disable_port are already freed by previous call of
28 + * edma_cleanup. Logic is not clear of WHY this is called.
29 + * Keep this here for reference if someone EVER wants
30 + * to investigate.
31 + */
32 + // if (!is_dp_override) {
33 + // edma_disable_port();
34 + // }
35 return;
36 }
37