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

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
...@@ -380,7 +380,7 @@ static int stmmac_test_phy_loopback(struct stmmac_priv *priv) ...@@ -380,7 +380,7 @@ static int stmmac_test_phy_loopback(struct stmmac_priv *priv)
int ret; int ret;
if (!priv->dev->phydev) if (!priv->dev->phydev)
return -EBUSY; return -EOPNOTSUPP;
ret = phy_loopback(priv->dev->phydev, true); ret = phy_loopback(priv->dev->phydev, true);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment