From: Jose Abreu Date: Mon, 9 Mar 2020 08:36:20 +0000 (+0100) Subject: net: stmmac: selftests: Do not fail if PHY is not attached X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e0fa433db28a2f51696b0fc48994354478ed6628;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: David S. Miller --- 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)