From: Eugenia Emantayev Date: Tue, 8 Jul 2014 08:25:20 +0000 (+0300) Subject: net/mlx4_en: Run loopback test only when port is up X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4359db1e0d9f763dfcffbf23fb4a19341aad9b6b;p=linux-beck.git net/mlx4_en: Run loopback test only when port is up Loopback can't work when port is down. Signed-off-by: Eugenia Emantayev Signed-off-by: Amir Vadai Signed-off-by: David S. Miller --- 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)