]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RDMA/bnxt_re: Fix the condition check while programming congestion control
authorSelvin Xavier <selvin.xavier@broadcom.com>
Sat, 8 Feb 2025 13:48:26 +0000 (05:48 -0800)
committerLeon Romanovsky <leon@kernel.org>
Sun, 9 Feb 2025 09:59:05 +0000 (04:59 -0500)
Program the Congestion control values when the CC gen matches.
Fix the condition check for the same.

Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
Reported-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reported-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/1739022506-8937-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/debugfs.c

index d7354e7753fe389b24ebe335adb2f8ca0b63f09c..af91d16c3c77f5509da9811a8b40294cc118a1d0 100644 (file)
@@ -265,7 +265,7 @@ static int bnxt_re_configure_cc(struct bnxt_re_dev *rdev, u32 gen_ext, u32 offse
        struct bnxt_qplib_cc_param ccparam = { };
 
        /* Supporting only Gen 0 now */
-       if (gen_ext != CC_CONFIG_GEN0_EXT0)
+       if (gen_ext == CC_CONFIG_GEN0_EXT0)
                bnxt_re_fill_gen0_ext0(&ccparam, offset, val);
        else
                return -EINVAL;