diff mbox series

[rdma-next] RDMA/bnxt_re: Fix the condition check while programming congestion control

Message ID 1739022506-8937-1-git-send-email-selvin.xavier@broadcom.com (mailing list archive)
State Accepted
Headers show
Series [rdma-next] RDMA/bnxt_re: Fix the condition check while programming congestion control | expand

Commit Message

Selvin Xavier Feb. 8, 2025, 1:48 p.m. UTC
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>
---
 drivers/infiniband/hw/bnxt_re/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Feb. 9, 2025, 9:59 a.m. UTC | #1
On Sat, 08 Feb 2025 05:48:26 -0800, Selvin Xavier wrote:
> Program the Congestion control values when the CC gen matches.
> Fix the condition check for the same.
> 
> 

Applied, thanks!

[1/1] RDMA/bnxt_re: Fix the condition check while programming congestion control
      https://git.kernel.org/rdma/rdma/c/f26e648a978ae7

Best regards,
diff mbox series

Patch

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;