summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOr Har-Toov <ohartoov@nvidia.com>2026-08-16 09:50:14 +0300
committerJakub Kicinski <kuba@kernel.org>2026-08-20 12:22:42 -0700
commit20f11b5cfa429ba3a2b8ef463d47e820687b4d2e (patch)
tree921dc30a450db0bfc0a68dc806bcf14a805b3383 /include
parentff0f9b7aa1c756e24a8023eaf684e93774c64194 (diff)
downloadlinux-20f11b5cfa429ba3a2b8ef463d47e820687b4d2e.tar.gz
linux-20f11b5cfa429ba3a2b8ef463d47e820687b4d2e.zip
net/mlx5: Move vport DOWN state check out of mlx5_query_vport_max_tx_speed()
mlx5_query_vport_max_tx_speed() was introduced to serve the query_port_speed path, which uses max_tx_speed == 0 when port is down. This is incorrect for callers that need the actual configured speed regardless of vport state, such as modify-vport-state helpers that must preserve the speed across state transitions. Move this logic to the caller function in the verb flow and let mlx5_query_vport_max_tx_speed() return the raw firmware value unconditionally. Fixes: aaecff5e13cd ("RDMA/mlx5: Implement query_port_speed callback") Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Reviewed-by: Shay Drori <shayd@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260816065015.3280733-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/vport.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mlx5/vport.h b/include/linux/mlx5/vport.h
index 577168a4ca0c..57c6b5bacedb 100644
--- a/include/linux/mlx5/vport.h
+++ b/include/linux/mlx5/vport.h
@@ -61,7 +61,8 @@ u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport);
int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
u16 vport, u8 other_vport, u8 state);
int mlx5_query_vport_max_tx_speed(struct mlx5_core_dev *mdev, u8 op_mod,
- u16 vport, u8 other_vport, u32 *max_tx_speed);
+ u16 vport, u8 other_vport,
+ u32 *max_tx_speed, u8 *state);
int mlx5_modify_vport_max_tx_speed(struct mlx5_core_dev *mdev, u8 opmod,
u16 vport, u8 other_vport, u16 max_tx_speed);
int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev,