octeontx2-af: cn10k: Fix SDP base channel number
authorSubbaraya Sundeep <sbhatta@marvell.com>
Sun, 22 Aug 2021 12:02:19 +0000 (17:32 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Aug 2021 20:38:15 +0000 (21:38 +0100)
commit477b53f3f95ba5341b4320f8b7a92cedc5a67650
tree7d2121f42402fe76fcb4323847452a3744a85ceb
parente8fb4df1f5d84bc08dd4f4827821a851d2eab241
octeontx2-af: cn10k: Fix SDP base channel number

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>
drivers/net/ethernet/marvell/octeontx2/af/common.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c