From: Kalesh AP Date: Tue, 20 May 2025 03:59:09 +0000 (+0530) Subject: RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc X-Git-Tag: v6.16-rc1~111^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=990b5c07f677a0b633b41130a70771337c18343e;p=thirdparty%2Fkernel%2Flinux.git RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc Driver currently supports modifying GEN0_EXT0 CC parameters through debugfs hook. Fixed to return -EOPNOTSUPP instead of -EINVAL in bnxt_re_configure_cc() when the user tries to modify any other CC parameters. Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook") Signed-off-by: Kalesh AP Link: https://patch.msgid.link/20250520035910.1061918-4-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky --- diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c index 9f6392155d915..e632f1661b929 100644 --- a/drivers/infiniband/hw/bnxt_re/debugfs.c +++ b/drivers/infiniband/hw/bnxt_re/debugfs.c @@ -272,7 +272,7 @@ static int bnxt_re_configure_cc(struct bnxt_re_dev *rdev, u32 gen_ext, u32 offse int rc; if (gen_ext != CC_CONFIG_GEN0_EXT0) - return -EINVAL; + return -EOPNOTSUPP; rc = bnxt_re_fill_gen0_ext0(&ccparam, offset, val); if (rc)