]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RDMA/bnxt_re: Fix incorrect display of inactivity_cp in debugfs output
authorGautam R A <gautam-r.a@broadcom.com>
Tue, 20 May 2025 03:59:07 +0000 (09:29 +0530)
committerLeon Romanovsky <leon@kernel.org>
Wed, 21 May 2025 10:02:29 +0000 (06:02 -0400)
The inactivity_cp parameter in debugfs was not being read or
written correctly, resulting in "Invalid argument" errors.

Fixed this by ensuring proper mapping of inactivity_cp in
both the map_cc_config_offset_gen0_ext0 and
bnxt_re_fill_gen0_ext0() functions.

Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
Signed-off-by: Gautam R A <gautam-r.a@broadcom.com>
Link: https://patch.msgid.link/20250520035910.1061918-2-kalesh-anakkur.purayil@broadcom.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/debugfs.c

index af91d16c3c77f5509da9811a8b40294cc118a1d0..a3aad6c3dbec1fb1bd62d8bd214f1fc7522d2515 100644 (file)
@@ -170,6 +170,9 @@ static int map_cc_config_offset_gen0_ext0(u32 offset, struct bnxt_qplib_cc_param
        case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TCP_CP:
                *val =  ccparam->tcp_cp;
                break;
+       case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP:
+               *val = ccparam->inact_th;
+               break;
        default:
                return -EINVAL;
        }
@@ -247,7 +250,9 @@ static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offs
                ccparam->tcp_cp = val;
                break;
        case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE:
+               break;
        case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP:
+               ccparam->inact_th = val;
                break;
        case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TIME_PER_PHASE:
                ccparam->time_pph = val;