On Tue, Sep 15, 2026 at 4:48 AM Evgeny Sokolov <[email protected]>
wrote:

> From: Sokolov Evgeny <[email protected]>
>
> 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: [email protected]
>
> Signed-off-by: Sokolov Evgeny <[email protected]>
> ---
>
Acked-by:  Kishore Padmanabha <[email protected]>


>  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
>
>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to