Commit 313c2d37 authored by Amir Vadai's avatar Amir Vadai Committed by David S. Miller

net/mlx4_en: Fix selftest failing on non 10G link speed

Connect-X devices selftest speed test shouldn't fail on 1G and 40G link
speeds.
Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9813337a
...@@ -129,8 +129,10 @@ static int mlx4_en_test_speed(struct mlx4_en_priv *priv) ...@@ -129,8 +129,10 @@ static int mlx4_en_test_speed(struct mlx4_en_priv *priv)
if (mlx4_en_QUERY_PORT(priv->mdev, priv->port)) if (mlx4_en_QUERY_PORT(priv->mdev, priv->port))
return -ENOMEM; return -ENOMEM;
/* The device currently only supports 10G speed */ /* The device supports 1G, 10G and 40G speeds */
if (priv->port_state.link_speed != SPEED_10000) if (priv->port_state.link_speed != 1000 &&
priv->port_state.link_speed != 10000 &&
priv->port_state.link_speed != 40000)
return priv->port_state.link_speed; return priv->port_state.link_speed;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment