good news, on Patchwork/Mailinglist there was a DSA-driver for mt7531 released…i added it to this branch and made a quick test:
details
root@bpi-r64:~# uname -a
Linux bpi-r64 5.5.0-rc1-bpi-r64-netnext #9 SMP PREEMPT Tue Dec 10 11:59:07 CET 2019 aarch64 GNU/Linux
root@bpi-r64:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 12:9b:2c:56:cd:f0 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether b6:2e:63:86:9e:98 brd ff:ff:ff:ff:ff:ff
4: wan@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 12:9b:2c:56:cd:f0 brd ff:ff:ff:ff:ff:ff
5: lan0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 12:9b:2c:56:cd:f0 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.19/24 scope global lan0
valid_lft forever preferred_lft forever
6: lan1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 12:9b:2c:56:cd:f0 brd ff:ff:ff:ff:ff:ff
7: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 12:9b:2c:56:cd:f0 brd ff:ff:ff:ff:ff:ff
8: lan3@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 12:9b:2c:56:cd:f0 brd ff:ff:ff:ff:ff:ff
root@bpi-r64:~# ping -c4 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.498 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.371 ms
64 bytes from 192.168.0.10: icmp_seq=3 ttl=64 time=0.487 ms
64 bytes from 192.168.0.10: icmp_seq=4 ttl=64 time=0.458 ms
--- 192.168.0.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 81ms
rtt min/avg/max/mdev = 0.371/0.453/0.498/0.054 ms
root@bpi-r64:~#
root@bpi-r64:~# iperf3 -c 192.168.0.21
Connecting to host 192.168.0.21, port 5201
[ 5] local 192.168.0.19 port 56412 connected to 192.168.0.21 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 114 MBytes 957 Mbits/sec 0 1003 KBytes
[ 5] 1.00-2.00 sec 113 MBytes 944 Mbits/sec 0 1.08 MBytes
[ 5] 2.00-3.00 sec 112 MBytes 941 Mbits/sec 0 1.08 MBytes
[ 5] 3.00-4.00 sec 112 MBytes 941 Mbits/sec 0 1.08 MBytes
[ 5] 4.00-5.00 sec 112 MBytes 942 Mbits/sec 0 1.08 MBytes
[ 5] 5.00-6.00 sec 112 MBytes 944 Mbits/sec 0 1.21 MBytes
[ 5] 6.00-7.00 sec 112 MBytes 944 Mbits/sec 0 1.27 MBytes
[ 5] 7.00-8.00 sec 112 MBytes 943 Mbits/sec 0 1.27 MBytes
[ 5] 8.00-9.00 sec 111 MBytes 934 Mbits/sec 0 1.27 MBytes
[ 5] 9.00-10.00 sec 112 MBytes 944 Mbits/sec 0 1.27 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.10 GBytes 943 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 1.10 GBytes 941 Mbits/sec receiver
iperf Done.
root@bpi-r64:~# iperf3 -c 192.168.0.21 -R
Connecting to host 192.168.0.21, port 5201
Reverse mode, remote host 192.168.0.21 is sending
[ 5] local 192.168.0.19 port 56416 connected to 192.168.0.21 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 112 MBytes 941 Mbits/sec
[ 5] 1.00-2.00 sec 111 MBytes 932 Mbits/sec
[ 5] 2.00-3.00 sec 112 MBytes 941 Mbits/sec
[ 5] 3.00-4.00 sec 112 MBytes 938 Mbits/sec
[ 5] 4.00-5.00 sec 112 MBytes 941 Mbits/sec
[ 5] 5.00-6.00 sec 112 MBytes 941 Mbits/sec
[ 5] 6.00-7.00 sec 112 MBytes 938 Mbits/sec
[ 5] 7.00-8.00 sec 112 MBytes 941 Mbits/sec
[ 5] 8.00-9.00 sec 112 MBytes 937 Mbits/sec
[ 5] 9.00-10.00 sec 112 MBytes 941 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.10 GBytes 942 Mbits/sec 617 sender
[ 5] 0.00-10.00 sec 1.09 GBytes 939 Mbits/sec receiver
iperf Done.
root@bpi-r64:~#
have managed to backport to 5.4:
i added the timeout-loop (waiting for MT7531_SGMII_LINK_STATUS) from the other mt7531-phy-driver, but the driver seem to have same SGMII-timeout if loaded from local storage…
this loop seems to break functionality if sgmii is not initialized before (uboot tftp). I have reverted it and it works again. Retransmitts were caused by my local switch config (flowcontrol is disabled by default…after set to autonegotiate/on on both ports no retransmitts happen)