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@xxxxxxxxxxxx> Reported-by: Chengchang Tang <tangchengchang@xxxxxxxxxx> Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx> --- drivers/infiniband/hw/bnxt_re/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c index f4dd2fb..03c8da90 100644 --- a/drivers/infiniband/hw/bnxt_re/debugfs.c +++ b/drivers/infiniband/hw/bnxt_re/debugfs.c @@ -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; -- 2.5.5