diff options
author | Amir Vadai <amirv@mellanox.com> | 2014-03-02 10:25:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-02 20:04:01 -0500 |
commit | 313c2d375b1c9b648d9d4b96ec1b8185ac6a78c5 (patch) | |
tree | 8c95051418e4c1ed7a30f91b119eee5392ef7540 /drivers/net/ethernet/mellanox | |
parent | 9813337a4b16ea5b1701b1d00f7e410f5decdfa5 (diff) | |
download | linux-313c2d375b1c9b648d9d4b96ec1b8185ac6a78c5.tar.bz2 |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c index c11d063473e5..03e5f6ac67e7 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c @@ -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; } |