]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
authorGeetha sowjanya <gakula@marvell.com>
Wed, 21 May 2025 06:08:34 +0000 (11:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:20 +0000 (14:40 +0200)
commit3cb003b959d7e5a1abaddf5434fb8a5a69b916a2
treee63e611b55332c800601ffe49629e0c9ebe09441
parent7b1357a108ecb3e107c6e8ea6af6e62fd58c07ad
octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG

[ Upstream commit a6ae7129819ad20788e610261246e71736543b8b ]

The current implementation maps the APR table using a fixed size,
which can lead to incorrect mapping when the number of PFs and VFs
varies.
This patch corrects the mapping by calculating the APR table
size dynamically based on the values configured in the
APR_LMT_CFG register, ensuring accurate representation
of APR entries in debugfs.

Fixes: 0daa55d033b0 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table").
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Link: https://patch.msgid.link/20250521060834.19780-3-gakula@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c