forked from Minki/linux
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: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6c9ee30693
commit
e0fa433db2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user