[PATCH net 3/3] octeontx2-af: mcs: Fix SC resource cleanup loop
From: Subrat Pandey
Date: Wed Jul 29 2026 - 03:37:46 EST
From: Baha Mesleh <baha.mesleh@xxxxxxxxx>
The SC resource cleanup loop was incorrectly iterating over secy.max
instead of sc.max. This patch fixes to use correct value.
Fixes: cfc14181d497 ("octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources").
Signed-off-by: Baha Mesleh <baha.mesleh@xxxxxxxxx>
Signed-off-by: Subrat Pandey <subratp@xxxxxxxxxxx>
---
drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
index a07e0b3d8d00..88658c07c391 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
@@ -738,7 +738,7 @@ int mcs_free_all_rsrc(struct mcs *mcs, int dir, u16 pcifunc)
}
/* free sc entries */
- for (id = 0; id < map->secy.max; id++) {
+ for (id = 0; id < map->sc.max; id++) {
if (map->sc2pf_map[id] != pcifunc)
continue;
mcs_free_rsrc(&map->sc, map->sc2pf_map, id, pcifunc);
--
2.43.0