* [PATCH][net-next] net/mlx5: Remove broken and unused mlx5_query_mtppse()
@ 2026-06-15 14:04 lirongqing
2026-06-16 5:28 ` Gal Pressman
2026-06-18 0:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: lirongqing @ 2026-06-15 14:04 UTC (permalink / raw)
To: Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, gal, linux-rdma, linux-kernel
Cc: Li RongQing
From: Li RongQing <lirongqing@baidu.com>
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>
---
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 -
drivers/net/ethernet/mellanox/mlx5/core/port.c | 19 -------------------
2 files changed, 20 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index 1507e88..a1001d5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -296,7 +296,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);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/core/port.c
index ee8b976..ddbe9ca 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
@@ -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};
--
2.9.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][net-next] net/mlx5: Remove broken and unused mlx5_query_mtppse()
2026-06-15 14:04 [PATCH][net-next] net/mlx5: Remove broken and unused mlx5_query_mtppse() lirongqing
@ 2026-06-16 5:28 ` Gal Pressman
2026-06-18 0:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Gal Pressman @ 2026-06-16 5:28 UTC (permalink / raw)
To: lirongqing, Saeed Mahameed, Leon Romanovsky, Tariq Toukan,
Mark Bloch, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-rdma, linux-kernel
On 15/06/2026 17:04, lirongqing wrote:
> From: Li RongQing <lirongqing@baidu.com>
>
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][net-next] net/mlx5: Remove broken and unused mlx5_query_mtppse()
2026-06-15 14:04 [PATCH][net-next] net/mlx5: Remove broken and unused mlx5_query_mtppse() lirongqing
2026-06-16 5:28 ` Gal Pressman
@ 2026-06-18 0:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-06-18 0:20 UTC (permalink / raw)
To: lirongqing
Cc: saeedm, leon, tariqt, mbloch, andrew+netdev, davem, edumazet,
kuba, pabeni, netdev, gal, linux-rdma, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 15 Jun 2026 22:04:06 +0800 you wrote:
> From: Li RongQing <lirongqing@baidu.com>
>
> 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.
>
> [...]
Here is the summary with links:
- [net-next] net/mlx5: Remove broken and unused mlx5_query_mtppse()
https://git.kernel.org/netdev/net/c/b50fa1e07cf8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-18 0:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 14:04 [PATCH][net-next] net/mlx5: Remove broken and unused mlx5_query_mtppse() lirongqing
2026-06-16 5:28 ` Gal Pressman
2026-06-18 0:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox