]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
octeontx2-pf: Fix NIX_AF_TL3_TL2X_LINKX_CFG register configuration
authorNaveen Mamindlapalli <naveenm@marvell.com>
Tue, 2 Aug 2022 14:28:13 +0000 (19:58 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 17 Oct 2022 09:57:19 +0000 (11:57 +0200)
commit7a65093cb596fc78f16557160216019a90c94c6e
treea5938db13e71b8991c9d7b776b69fd032a519141
parent3864e5a7c4bfda53b59c036c444cb5f988447e22
octeontx2-pf: Fix NIX_AF_TL3_TL2X_LINKX_CFG register configuration

BugLink: https://bugs.launchpad.net/bugs/1990564
commit 13c9f4dc102f2856e80b92486c41841e25e23772 upstream.

For packets scheduled to RPM and LBK, NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL]
selects the TL3 or TL2 scheduling level as the one used for link/channel
selection and backpressure. For each scheduling queue at the selected
level: Setting NIX_AF_TL3_TL2(0..255)_LINK(0..12)_CFG[ENA] = 1 allows
the TL3/TL2 queue to schedule packets to a specified RPM or LBK link
and channel.

There is an issue in the code where NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL]
is set to TL3 where as the NIX_AF_TL3_TL2(0..255)_LINK(0..12)_CFG is
configured for TL2 queue in some cases. As a result packets will not
transmit on that link/channel. This patch fixes the issue by configuring
the NIX_AF_TL3_TL2(0..255)_LINK(0..12)_CFG register depending on the
NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL] value.

Fixes: caa2da34fd25a ("octeontx2-pf: Initialize and config queues")
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Link: https://lore.kernel.org/r/20220802142813.25031-1-naveenm@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h