0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-10-31 18:36:01 +00:00
Files
openwrt/target/linux/airoha/patches-6.12/116-03-net-airoha-add-reference-for-SPORT-GDM4-in-qdma_get_.patch
Christian Marangi 83eacb6ab0 airoha: backport minor fixes for NPU handling
Backport upstream minor fixed for NPU handling that might result in
kernel panic or handle leak.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-29 15:15:53 +01:00

32 lines
954 B
Diff

From ad29054f9b0e96e30a5d0bb6967d1204b8ea8bd1 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Fri, 17 Jan 2025 10:12:02 +0100
Subject: [PATCH 3/9] net: airoha: add reference for SPORT GDM4 in
qdma_get_gdm_port
Add SPORT reference in get gdm port as the on receive the SPORT 0x18 is
assigned for the GDM4 port.
While at it also add comments to better identify GDM1 ports.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/net/ethernet/airoha/airoha_eth.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -588,8 +588,11 @@ static int airoha_qdma_get_gdm_port(stru
sport = FIELD_GET(QDMA_ETH_RXMSG_SPORT_MASK, msg1);
switch (sport) {
+ case 0x18:
+ port = 3; /* GDM4 */
+ break;
case 0x10 ... 0x14:
- port = 0;
+ port = 0; /* GDM1 */
break;
case 0x2 ... 0x4:
port = sport - 1;