octeontx2-af: cn10k: Fix SDP base channel number
authorSubbaraya Sundeep <sbhatta@marvell.com>
Sun, 22 Aug 2021 12:02:19 +0000 (17:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 08:02:26 +0000 (10:02 +0200)
commit869b01f4645c0bee527addbd399556bb4afbd936
tree300eefc362c2b785885d7a21dc7b89a7975fba6c
parent844f3a8b90560d3c0136ed14969e11d802cd3ac1
octeontx2-af: cn10k: Fix SDP base channel number

[ Upstream commit 477b53f3f95ba5341b4320f8b7a92cedc5a67650 ]

As per hardware the base channel number configured
for programmable channels of a block must be multiple
of number of channels of that block. This condition
is not met for SDP base channel currently. Hence this
patch ensures all the base channel numbers of all
blocks are multiple of number of channels present in
the blocks. Also instead of hardcoding SDP number
of channels the same is read from the NIX_AF_CONST1
register.

Fixes: 242da439214b ("octeontx2-af: cn10k: Add support for programmable")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/common.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c