stmmac regression on ASUS TinkerBoard

From: Katsuhiro Suzuki
Date: Sun Jun 23 2019 - 10:15:03 EST


Hello stmmac maintainers,

I found this commit and that has some regressions:
74371272f97f net: stmmac: Convert to phylink and remove phylib logic


My environment is:
- ASUS TinkerBoard
- SoC is RK3288
- Using STMMAC driver
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
- Using this device-tree
arch/arm/boot/dts/rk3288.dtsi ('gmac: ethernet@ff290000' node)

Current linux-next on my environment, 'ifconfig eth0 up' does not work
correctly with following message...

-----
root@linaro-alip:~# ifconfig eth0 up
[ 105.028916] rk_gmac-dwmac ff290000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
-----

I checked drivers/net/ethernet/stmicro/stmmac/stmmac_main.c and found
stmmac_init_phy() is going to fail if ethernet device node does not
have following property:
- phy-handle
- phy
- phy-device

This commit broke the device-trees such as TinkerBoard. The mdio
subnode creating a mdio bus is changed to required or still optional?


Best Regards,
Katsuhiro Suzuki