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: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Amir Vadai 2014-03-02 10:25:02 +02:00 committed by David S. Miller
parent 9813337a4b
commit 313c2d375b
1 changed files with 4 additions and 2 deletions

View File

@ -129,8 +129,10 @@ static int mlx4_en_test_speed(struct mlx4_en_priv *priv)
if (mlx4_en_QUERY_PORT(priv->mdev, priv->port))
return -ENOMEM;
/* The device currently only supports 10G speed */
if (priv->port_state.link_speed != SPEED_10000)
/* The device supports 1G, 10G and 40G speeds */
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 0;
}