[PATCH] net/bnxt: fix channel disable bitmap handling
Kishore Padmanabha
kishore.padmanabha at broadcom.com
Mon Sep 21 18:37:06 CEST 2026
On Tue, Sep 15, 2026 at 4:48 AM Evgeny Sokolov <Evgeny.Sokolov at infotecs.ru>
wrote:
> 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>
> ---
>
Acked-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20260921/8361177d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5493 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/stable/attachments/20260921/8361177d/attachment.bin>
More information about the stable
mailing list