diff options
author | Eugenia Emantayev <eugenia@mellanox.com> | 2014-07-08 11:25:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 19:58:44 -0700 |
commit | 4359db1e0d9f763dfcffbf23fb4a19341aad9b6b (patch) | |
tree | 15fa35a4bffd537cb02c808f80ffac41aaf2bf49 /drivers | |
parent | 523ece889eeee84a381e16086b81e07a76cff8b6 (diff) |
net/mlx4_en: Run loopback test only when port is up
Loopback can't work when port is down.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c index 03e5f6ac67e7..49d5afc7cfb8 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c @@ -159,7 +159,8 @@ void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf) if (priv->mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_UC_LOOPBACK) { buf[3] = mlx4_en_test_registers(priv); - buf[4] = mlx4_en_test_loopback(priv); + if (priv->port_up) + buf[4] = mlx4_en_test_loopback(priv); } if (carrier_ok) |