does your patch really fix the damaged packets-issue on cpu-port0 (lan)? then it seems that trgmii is handled wrong by code (headerbytes stripped again or similar)
Interesting… This seems something complex – my patch definitely helped me and I can’t run more tests now but I’ll maybe try switching trgmii on and off on both ports later and see what happens.
FWIW I also have some funkiness regarding speed negotiation (with a host which works with other router) but it doesn’t seem to be related at the first glance.
Yes, you are right – I meant incoming to the other host which I tested this on. Packets incoming on R2 seemed well.
I have some news – I’ve tried to enable TRGMII on both ports instead and voila, it still works! I’ll take some time to verify that current kernel image has the modified DTB – just in case.
can confirm it works with wan and lan0, but currently not with lan1,2,3
i get dhcp-reply (ip set by my router), but i cannot ping it…strange
ignore it…dhcp sets same address to all tested interfaces, so i have to manually shut down the prior ports not only move cable
in my gmac-branch there is a file mt7623a-rfb-emmc.dts created by any of the patches…is that really necessary? can’t compile without it, but found nowhere it is referenced (not in mt7623.dtsi and not in bananapi-r2.dts). do you have this in your tree?
I have this one too, I think it’s a reference board for MT7623 (rfb – reference board). It comes from 0064-dts.patch. Not sure why can’t you compile without it but I didn’t try.
created a new branch from actual 4.14 (4.14.52) and applied patch to it.
works well in my short test
root@bpi-r2-ubuntu:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defau0
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
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP g0
link/ether 0a:18:b3:77:d6:79 brd ff:ff:ff:ff:ff:ff
inet6 fe80::818:b3ff:fe77:d679/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP g0
link/ether ce:96:6b:35:f5:b2 brd ff:ff:ff:ff:ff:ff
inet6 fe80::cc96:6bff:fe35:f5b2/64 scope link
valid_lft forever preferred_lft forever
4: wan@eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group defa0
link/ether ce:96:6b:35:f5:b2 brd ff:ff:ff:ff:ff:ff
5: lan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group def0
link/ether 0a:18:b3:77:d6:79 brd ff:ff:ff:ff:ff:ff
6: lan1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group def0
link/ether 0a:18:b3:77:d6:79 brd ff:ff:ff:ff:ff:ff
7: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group def0
link/ether 0a:18:b3:77:d6:79 brd ff:ff:ff:ff:ff:ff
8: lan3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP0
link/ether 0a:18:b3:77:d6:79 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.105/24 brd 192.168.0.255 scope global lan3
valid_lft forever preferred_lft forever
inet6 fe80::818:b3ff:fe77:d679/64 scope link
valid_lft forever preferred_lft forever
note that you have to set eth1 to up before you get wan-port up
in /etc/network/interfaces:
auto eth0
iface eth0 inet manual
pre-up ip link set $IFACE up
post-down ip link set $IFACE down
auto eth1
iface eth1 inet manual
pre-up ip link set $IFACE up
post-down ip link set $IFACE down
i can ping my router over all ports (only 1 have to be in that subnet! the others I have set to down)
root@gate:/proc# 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 1e:cf:eb:c5:29:96 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 26:65:86:4b:08:8a brd ff:ff:ff:ff:ff:ff
4: wan@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 02:01:02:03:04:00 brd ff:ff:ff:ff:ff:ff
inet xx.xx.xx.xx/24 brd xx.xx.xx.xxx scope global wan
valid_lft forever preferred_lft forever
5: lan0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 1e:cf:eb:c5:29:96 brd ff:ff:ff:ff:ff:ff
inet 192.168.22.10/24 brd 192.168.22.255 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 1e:cf:eb:c5:29:96 brd ff:ff:ff:ff:ff:ff
7: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 1e:cf:eb:c5:29:96 brd ff:ff:ff:ff:ff:ff
8: lan3@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 1e:cf:eb:c5:29:96 brd ff:ff:ff:ff:ff:ff
9: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:08:22:fa:09:fc brd ff:ff:ff:ff:ff:ff
10: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 02:08:22:fa:09:fc brd ff:ff:ff:ff:ff:ff
inet 192.168.25.1/24 scope global ap0
valid_lft forever preferred_lft forever