Rakesh Babu Saladi 0f74dde5be octeontx2-af: Support variable number of lmacs
[ Upstream commit f2e664ad503d4e5ce7c42a0862ab164331a0ef37 ]

Most of the code in CGX/RPM driver assumes that max lmacs per
given MAC as always, 4 and the number of MAC blocks also as 4.
With this assumption, the max number of interfaces supported is
hardcoded to 16. This creates a problem as next gen CN10KB silicon
MAC supports 8 lmacs per MAC block.

This patch solves the problem by using "max lmac per MAC block"
value from constant csrs and uses cgx_cnt_max value which is
populated based number of MAC blocks supported by silicon.

Signed-off-by: Rakesh Babu Saladi <rsaladi2@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: e307b5a845c5 ("octeontx2-af: Fix pause frame configuration")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-10 17:10:34 +01:00
..
2023-11-28 17:07:05 +00:00
2023-12-03 07:32:07 +01:00
2023-11-20 11:51:55 +01:00
2023-10-25 12:03:06 +02:00
2023-10-10 22:00:46 +02:00