Commit e0fa433d authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller
Browse files

net: stmmac: selftests: Do not fail if PHY is not attached



If a PHY is not attached, we can still run the tests with MAC loopback
mode. Return -EOPNOTSUPP error code in PHY loopback test so that global
status is not a failure.

Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c9ee306
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ static int stmmac_test_phy_loopback(struct stmmac_priv *priv)
	int ret;

	if (!priv->dev->phydev)
		return -EBUSY;
		return -EOPNOTSUPP;

	ret = phy_loopback(priv->dev->phydev, true);
	if (ret)