Skip to content

Commit b1ebbda

Browse files
author
CKI KWF Bot
committed
Merge: RHEL-113425: net/mlx5: Not returning mlx5_link_info table when speed is unknown
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1433 JIRA: https://issues.redhat.com/browse/RHEL-113425 Tested: functionally tested on Azure VM. Signed-off-by: Li Tian <litian@redhat.com> Approved-by: Michal Schmidt <mschmidt@redhat.com> Approved-by: Kamal Heib <kheib@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 63abe46 + 17f1da8 commit b1ebbda

File tree

1 file changed

+5
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+5
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/port.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,11 @@ const struct mlx5_link_info *mlx5_port_ptys2info(struct mlx5_core_dev *mdev,
11501150
mlx5e_port_get_link_mode_info_arr(mdev, &table, &max_size,
11511151
force_legacy);
11521152
i = find_first_bit(&temp, max_size);
1153-
if (i < max_size)
1153+
1154+
/* mlx5e_link_info has holes. Check speed
1155+
* is not zero as indication of one.
1156+
*/
1157+
if (i < max_size && table[i].speed)
11541158
return &table[i];
11551159

11561160
return NULL;

0 commit comments

Comments
 (0)