diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2020-03-09 09:36:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-09 20:13:16 -0700 |
commit | e0fa433db28a2f51696b0fc48994354478ed6628 (patch) | |
tree | a0acdf91231de68cef7bb1754cf5325e3931fbf3 /drivers | |
parent | 6c9ee3069380d2dd98fbb410616d776c172ee64f (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c index 2aba2673d6c3..586a657be984 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -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) |