]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/mlx5: Remove broken and unused mlx5_query_mtppse()
authorLi RongQing <lirongqing@baidu.com>
Mon, 15 Jun 2026 14:04:06 +0000 (22:04 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 17 Jun 2026 23:35:33 +0000 (16:35 -0700)
mlx5_query_mtppse() reads the Event Trigger Pin (MTPPSE) register but
reads the returned arm and mode values from the input buffer 'in'
instead of the output buffer 'out', so it always returns the values
that were written rather than the actual hardware state, making the
query useless.

The function has no in-tree callers. Remove it rather than fix it.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Link: https://patch.msgid.link/20260615140406.1828-1-lirongqing@baidu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/port.c

index 51637e58a48b82775262d02a51ddb22817535606..09e669f83dba76f0a47e98d0faa245bbcf2a6b19 100644 (file)
@@ -297,7 +297,6 @@ void mlx5_core_reps_aux_devs_remove(struct mlx5_core_dev *dev);
 void mlx5_fw_reporters_create(struct mlx5_core_dev *dev);
 int mlx5_query_mtpps(struct mlx5_core_dev *dev, u32 *mtpps, u32 mtpps_size);
 int mlx5_set_mtpps(struct mlx5_core_dev *mdev, u32 *mtpps, u32 mtpps_size);
-int mlx5_query_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 *arm, u8 *mode);
 int mlx5_set_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 arm, u8 mode);
 
 struct mlx5_dm *mlx5_dm_create(struct mlx5_core_dev *dev);
index ee8b9765c5bafd98b8ae14e6427f8cbf2e6c6082..ddbe9ca8971d7edd5af7add03833228ca1580004 100644 (file)
@@ -908,25 +908,6 @@ int mlx5_set_mtpps(struct mlx5_core_dev *mdev, u32 *mtpps, u32 mtpps_size)
                                    sizeof(out), MLX5_REG_MTPPS, 0, 1);
 }
 
-int mlx5_query_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 *arm, u8 *mode)
-{
-       u32 out[MLX5_ST_SZ_DW(mtppse_reg)] = {0};
-       u32 in[MLX5_ST_SZ_DW(mtppse_reg)] = {0};
-       int err = 0;
-
-       MLX5_SET(mtppse_reg, in, pin, pin);
-
-       err = mlx5_core_access_reg(mdev, in, sizeof(in), out,
-                                  sizeof(out), MLX5_REG_MTPPSE, 0, 0);
-       if (err)
-               return err;
-
-       *arm = MLX5_GET(mtppse_reg, in, event_arm);
-       *mode = MLX5_GET(mtppse_reg, in, event_generation_mode);
-
-       return err;
-}
-
 int mlx5_set_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 arm, u8 mode)
 {
        u32 out[MLX5_ST_SZ_DW(mtppse_reg)] = {0};