Meraki MR18 Porting issue with eth0

I am working on porting the MR18 to ATH79, I have run into an issue with the Ethernet port (1x Gigabit Atheros AR8035-A, 802.3af PoE capable).

I have enabled the eth0 interface and connectivity is intermittent for example here is the output of a ping where there are missing sequences. It seems to be doing excessive arp requests, but I am not sure if its is a symptom or the cause:

FROM: MR18 running openwrt v21.02

root@OpenWrt:/# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=1.510 ms
64 bytes from 192.168.1.2: seq=4 ttl=64 time=1.237 ms
64 bytes from 192.168.1.2: seq=7 ttl=64 time=1.287 ms
64 bytes from 192.168.1.2: seq=12 ttl=64 time=1.267 ms
64 bytes from 192.168.1.2: seq=20 ttl=64 time=1.597 ms
^C
--- 192.168.1.2 ping statistics ---
23 packets transmitted, 5 packets received, 78% packet loss
round-trip min/avg/max = 1.237/1.379/1.597 ms

TCPDUMP on the destination @ 192.168.1.2:

sudo tcpdump --interface=wlp3s0 -n host 192.168.1.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
08:54:30.119782 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2941, seq 0, length 64
08:54:30.119897 IP 192.168.1.2 > 192.168.1.1: ICMP echo reply, id 2941, seq 0, length 64
08:54:34.120504 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2941, seq 4, length 64
08:54:34.120564 IP 192.168.1.2 > 192.168.1.1: ICMP echo reply, id 2941, seq 4, length 64
08:54:35.178973 ARP, Request who-has 192.168.1.2 tell 192.168.1.1, length 46
08:54:35.179014 ARP, Reply 192.168.1.2 is-at 84:3a:4b:76:ac:0c, length 28
08:54:37.121072 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2941, seq 7, length 64
08:54:37.121160 IP 192.168.1.2 > 192.168.1.1: ICMP echo reply, id 2941, seq 7, length 64
08:54:42.121946 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2941, seq 12, length 64
08:54:42.122028 IP 192.168.1.2 > 192.168.1.1: ICMP echo reply, id 2941, seq 12, length 64
08:54:42.271955 ARP, Request who-has 192.168.1.1 tell 192.168.1.2, length 28
08:54:42.327821 ARP, Reply 192.168.1.1 is-at 00:18:0a:de:7d:70, length 46
08:54:50.123410 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2941, seq 20, length 64
08:54:50.123492 IP 192.168.1.2 > 192.168.1.1: ICMP echo reply, id 2941, seq 20, length 64

My DTS Config for eth0 / eth1 is based on the mach-mr18.c from v19.07.7:

&mdio0 {
	status = "okay";

	phy-mask = <3>;

	phy3: ethernet-phy@3 {
		reg = <3>;
	};
};

&mdio1 {
	status = "okay";

	phy-mask = <2>;

	phy2: ethernet-phy@2 {
		reg = <2>;
		at803x-override-sgmii-link-check;
	};
};


&eth0 {
	status = "okay";

	pll-data = <0xa6000000 0xa0000101 0x80001313>;

	phy-mode = "rgmii";
	phy-handle = <&phy3>;

	//mtd-mac-address = <&gmac>;

	gmac-config {

		//device remove ??
		device = <&gmac>;
		rgmii-enabled = <1>;
		rxd-delay = <3>;
		rxdv-delay = <3>;
	};
};

&eth1 {
	status = "okay";
	phy-handle = <&phy2>;

	qca955x-sgmii-fixup;
};

Any help would be appreciated.

check eee using ethtool

ethtool --show-eee eth0
if enabled try disabling and see what happens:
ethtool --set-eee eth0 eee off

Thanks for responding, its come back with "Cannot get EEE settings: Not supported"

root@OpenWrt:/sys# ethtool --show-eee eth0
Cannot get EEE settings: Not supported

root@OpenWrt:/sys# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
                                1000baseX/Full 
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
                                1000baseX/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                             100baseT/Half 100baseT/Full 
                                             1000baseT/Full 
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 3
        Transceiver: external
        Auto-negotiation: on
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes

root@OpenWrt:/sys# ethtool --statistics  eth0
NIC statistics:
     Tx/Rx 64 Byte: 886
     Tx/Rx 65-127 Byte: 675
     Tx/Rx 128-255 Byte: 68
     Tx/Rx 256-511 Byte: 1947
     Tx/Rx 512-1023 Byte: 0
     Tx/Rx 1024-1518 Byte: 0
     Tx/Rx 1519-1522 Byte VLAN: 0
     Rx Byte: 1007527
     Rx Packet: 3551
     Rx FCS Error: 0
     Rx Multicast Packet: 2739
     Rx Broadcast Packet: 810
     Rx Control Frame Packet: 0
     Rx Pause Frame Packet: 0
     Rx Unknown OPCode Packet: 0
     Rx Alignment Error: 0
     Rx Frame Length Error: 0
     Rx Code Error: 0
     Rx Carrier Sense Error: 0
     Rx Undersize Packet: 0
     Rx Oversize Packet: 0
     Rx Fragments: 0
     Rx Jabber: 0
     Rx Dropped Packet: 0
     Tx Byte: 3146
     Tx Packet: 25
     Tx Multicast Packet: 19
     Tx Broadcast Packet: 0
     Tx Pause Control Frame: 0
     Tx Deferral Packet: 0
     Tx Excessive Deferral Packet: 0
     Tx Single Collision Packet: 0
     Tx Multiple Collision: 0
     Tx Late Collision Packet: 0
     Tx Excessive Collision Packet: 0
     Tx Total Collision: 0
     Tx Pause Frames Honored: 70
     Tx Drop Frame: 0
     Tx Jabber Frame: 0
     Tx FCS Error: 0
     Tx Control Frame: 0
     Tx Oversize Frame: 0
     Tx Undersize Frame: 0
     Tx Fragment: 0
root@OpenWrt:/sys#

I have also tried updating eee-broken-100tx & eee-broken-1000t; based on this link ARM: dts: am335x-baltos: disable EEE for Atheros 8035 PHY - Patchwork (kernel.org) with no success.

Atheros 8035 provides
automatic EEE support that is enabled by default. This causes
occasional link drops when link partner also announces EEE support.
These link drops occur on both 100Mbit/s and 1000Mbit/s speeds.
So disable EEE advertising completely.

DTS Update attempted.

&mdio0 {
	status = "okay";

	phy-mask = <3>;

	phy3: ethernet-phy@3 {
		reg = <3>;
		eee-broken-100tx;
		eee-broken-1000t;
	};
};

&mdio1 {
	status = "okay";

	phy-mask = <2>;

	phy2: ethernet-phy@2 {
		reg = <2>;
		eee-broken-100tx;
		eee-broken-1000t;
		at803x-override-sgmii-link-check;
	};
};

I have resolved the issue, by patching ar71xx_main.com to fixup SERDES calibration value, I will release the patch as part of added support for the MR18 on v21.02.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.