octeontx2-af: Add missing mcs flr handler call
authorGeetha sowjanya <gakula@marvell.com>
Tue, 5 Dec 2023 08:04:33 +0000 (13:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:39:10 +0000 (18:39 +0100)
[ Upstream commit d431abd0a9aa27be379fb5f8304062071b0f5a7e ]

If mcs resources are attached to PF/VF. These resources need
to be freed on FLR. This patch add missing mcs flr call on PF FLR.

Fixes: bd69476e86fc ("octeontx2-af: cn10k: mcs: Install a default TCAM for normal traffic")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c

index 733add3..d88d86b 100644 (file)
@@ -2622,6 +2622,9 @@ static void __rvu_flr_handler(struct rvu *rvu, u16 pcifunc)
         */
        rvu_npc_free_mcam_entries(rvu, pcifunc, -1);
 
+       if (rvu->mcs_blk_cnt)
+               rvu_mcs_flr_handler(rvu, pcifunc);
+
        mutex_unlock(&rvu->flr_lock);
 }