octeontx2-pf: Calculate LBK link instead of hardcoding
authorSubbaraya Sundeep <sbhatta@marvell.com>
Thu, 29 Oct 2020 05:15:47 +0000 (10:45 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 31 Oct 2020 21:16:47 +0000 (14:16 -0700)
commit8bcf5ced6526e1c4c8a2703f9ca9135fef7409d6
treecb4d480170aaacc4f919b0a1a17c2a583e12457e
parenta84cdcea3b4feb46730c88454b5f85e828429c2b
octeontx2-pf: Calculate LBK link instead of hardcoding

CGX links are followed by LBK links but number of
CGX and LBK links varies between platforms. Hence
get the number of links present in hardware from
AF and use it to calculate LBK link number.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Rakesh Babu <rsaladi2@marvell.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h