[PATCH] net/bnxt: fix channel disable bitmap handling

Evgeny Sokolov Evgeny.Sokolov at infotecs.ru
Tue Sep 15 10:48:50 CEST 2026


From: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>

The MPC channel enable bitmap is cleared before it is used to build
the channel mask. As a result, no channels are selected for disable.

Preserve the bitmap before clearing it and use the saved value when
building the channel mask.

Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 80317ff6adf ("net/bnxt/tf_core: support Thor2")
Cc: stable at dpdk.org

Signed-off-by: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>
---
 drivers/net/bnxt/bnxt_mpc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_mpc.c b/drivers/net/bnxt/bnxt_mpc.c
index d77f9dd308..1398321ca7 100644
--- a/drivers/net/bnxt/bnxt_mpc.c
+++ b/drivers/net/bnxt/bnxt_mpc.c
@@ -48,18 +48,20 @@ static int bnxt_mpc_chnls_enable(struct bnxt *bp)
 static int bnxt_mpc_chnls_disable(struct bnxt *bp)
 {
 	struct bnxt_mpc *mpc = bp->mpc;
+	uint8_t mpc_chnl_flg;
 	uint8_t mpc_chnl_msk = 0;
 	int i, rc;
 
 	if (!mpc)
 		return -EINVAL;
+	mpc_chnl_flg = mpc->mpc_chnls_en;
 	mpc->mpc_chnls_en = 0;
 
 	if (!BNXT_PF(bp))
 		return 0;
 
 	for (i = 0; i < BNXT_MPC_CHNL_MAX; i++) {
-		if (!(mpc->mpc_chnls_en & (1 << i)))
+		if (!(mpc_chnl_flg & (1 << i)))
 			continue;
 		mpc_chnl_msk |= (1 << i);
 	}
-- 
2.30.2



More information about the stable mailing list