]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
octeontx2-af: Apply tx nibble fixup always
authorStanislaw Kardach <skardach@marvell.com>
Wed, 3 Aug 2022 07:54:12 +0000 (13:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:45:20 +0000 (11:45 +0200)
commit dd1d1a8a6b29b6b472fd0d449b29eb806c411dd2 upstream.

NPC_PARSE_NIBBLE for TX interface has to be equal to the RX one for some
silicon revisions. Mistakenly this fixup was only applied to the default
MKEX profile while it should also be applied to any loaded profile.

Fixes: 1c1935c9945d ("octeontx2-af: Add NIX1 interfaces to NPC")
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c

index 3a31fb8cc15542b8bd53337c48bea57e15c17744..3d99cb91e3eeb7fcf8970d2c37c87b6f05541da3 100644 (file)
@@ -1915,6 +1915,7 @@ static void rvu_npc_hw_init(struct rvu *rvu, int blkaddr)
 
 static void rvu_npc_setup_interfaces(struct rvu *rvu, int blkaddr)
 {
+       struct npc_mcam_kex *mkex = rvu->kpu.mkex;
        struct npc_mcam *mcam = &rvu->hw->mcam;
        struct rvu_hwinfo *hw = rvu->hw;
        u64 nibble_ena, rx_kex, tx_kex;
@@ -1927,15 +1928,15 @@ static void rvu_npc_setup_interfaces(struct rvu *rvu, int blkaddr)
        mcam->counters.max--;
        mcam->rx_miss_act_cntr = mcam->counters.max;
 
-       rx_kex = npc_mkex_default.keyx_cfg[NIX_INTF_RX];
-       tx_kex = npc_mkex_default.keyx_cfg[NIX_INTF_TX];
+       rx_kex = mkex->keyx_cfg[NIX_INTF_RX];
+       tx_kex = mkex->keyx_cfg[NIX_INTF_TX];
        nibble_ena = FIELD_GET(NPC_PARSE_NIBBLE, rx_kex);
 
        nibble_ena = rvu_npc_get_tx_nibble_cfg(rvu, nibble_ena);
        if (nibble_ena) {
                tx_kex &= ~NPC_PARSE_NIBBLE;
                tx_kex |= FIELD_PREP(NPC_PARSE_NIBBLE, nibble_ena);
-               npc_mkex_default.keyx_cfg[NIX_INTF_TX] = tx_kex;
+               mkex->keyx_cfg[NIX_INTF_TX] = tx_kex;
        }
 
        /* Configure RX interfaces */