R2 Ubuntu Link detected

if disconnect the cable, then Linux believes that the cable is still there, because of this does not work keepalived (vrrp)

# for i in $( ls /sys/class/net ); do echo -n $i; ethtool $i | grep Link\ d; done bond0 Link detected: no bonding_mastersCannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device eth0 Link detected: yes (cable disconnect) eth1 Link detected: yes lo Link detected: yes

It is right because eth0 and 1 is connected to mt7530, eth0 and eth1 just represents the CPU ports on switch and they are always kept as 1g link. The result you expect should depend on ports in the front of board, but those port can’t be model as netdev in kernel .

but in kernel log i see up/down all ports

if you knows all the states all ports, i may be make manual vrrp switching

It is just a notification from hardware but is not reported into netdevice (how do you have multiple ports fitting into single netdev?) as you query got from ethtool. You can use latest kernel to reach what you want, the switch uses dsa to represent each port as independent netdevie.

Hi. We updated kernel to latest version (4.4.70 from GitHub). ifconfig show us two eth, that always up(problem still here). Must we use some special commands, when compiling the kernel? May be we must install some packages ?

4.4.70 does not have dsa-driver for switch (mt7530) yet. You can try 4.14

We use https://github.com/BPI-SINOVOIP/BPI-R2-bsp. Can you get link with 4.14 kernel?

But 4.14 currently have sd-card problems

What about EMMC? Have EMMC any problem with 4.14 ?

Emmc is detected…like described in linked thread

Hi Bacardi

The reason that two ethx interfaces are always up on Ubuntu is that both GMAC-s of MT7623n are connected to MT7530, so the link status doesn’t depend on the status of wan and lan-s port.

If you want to use bonding driver, please use arp method ranther than mii link status. Also the DSA driver is available on Openwrt(lede), you can have a try.

Thanks Gary

Do you plan to include the DSA driver in other systems (Ubunty)?

The DSA driver will not be ported to 4.4.70(ubutu), because lots of code in core code of kernel need to be changed if DSA is supported.