]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Not returning mlx5_link_info table when speed is unknown
authorLi Tian <litian@redhat.com>
Wed, 10 Sep 2025 00:37:32 +0000 (08:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 09:16:42 +0000 (11:16 +0200)
commite1fa8f786c8dfd33cf671b588c883060832ce765
tree7c0fef9b03e6fd8372b31a1a898267e8139fa38f
parent4c2c59cc838c999b62c0bca2b90817e561ac5f79
net/mlx5: Not returning mlx5_link_info table when speed is unknown

[ Upstream commit 5577352b55833d0f4350eb5d62eda2df09e84922 ]

Because mlx5e_link_info and mlx5e_ext_link_info have holes
e.g. Azure mlx5 reports PTYS 19. Do not return it unless speed
is retrieved successfully.

Fixes: 65a5d35571849 ("net/mlx5: Refactor link speed handling with mlx5_link_info struct")
Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Li Tian <litian@redhat.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250910003732.5973-1-litian@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/port.c