Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -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;
}
}