net: stmmac: selftests: Do not fail if PHY is not attached
authorJose Abreu <Jose.Abreu@synopsys.com>
Mon, 9 Mar 2020 08:36:20 +0000 (09:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 03:13:16 +0000 (20:13 -0700)
commite0fa433db28a2f51696b0fc48994354478ed6628
treea0acdf91231de68cef7bb1754cf5325e3931fbf3
parent6c9ee3069380d2dd98fbb410616d776c172ee64f
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>
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c