R2 Ubuntu Link detected


#1

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


(dorabmon) #2

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 .


#3

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


(dorabmon) #4

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.


(Denis ) #5

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 ?


(Frank W.) #6

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


(Denis ) #7

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


(Frank W.) #8

But 4.14 currently have sd-card problems


(Denis ) #9

What about EMMC? Have EMMC any problem with 4.14 ?


(Frank W.) #10

Emmc is detected…like described in linked thread


(gary) #11

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


(Denis ) #12

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


(gary) #13

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.


BPI-R2 new image : ubuntu 16.04 V1.2.1 BT and WIFI AP mode are working fine 2017-11-27