Wan link flapping with Asus RT-AC85P

Hello,

I've bough an asus RT-AC85P for a half a year ago.
When it was brand new, I've noticed some link problem on wan side with the official firmware, but sometime it got the 1gbit link. Once, the 1gbit is recognized, everything was ok until next reboot.
With, the last official update it was impossible to get it to work. So I've decided to get into openwrt.
I've experienced the same as before: sometimes works/sometimes doesn't. I've tried to playing with ethtool and autonegotiation, without success. When it is on, it reverts back to 100 Mbps.
Here is what I'm saying:

Sun Apr 11 18:36:37 2021 daemon.notice netifd: Interface 'wan' is enabled
Sun Apr 11 18:36:37 2021 daemon.notice netifd: Interface 'wan6' is enabled
Sun Apr 11 18:37:09 2021 daemon.notice netifd: Network device 'wan' link is up
Sun Apr 11 18:37:09 2021 daemon.notice netifd: Interface 'wan' has link connectivity
Sun Apr 11 18:37:09 2021 daemon.notice netifd: Interface 'wan' is setting up now
Sun Apr 11 18:37:09 2021 kern.info kernel: [ 4124.838195] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control off
Sun Apr 11 18:37:09 2021 daemon.notice netifd: Interface 'wan6' has link connectivity
Sun Apr 11 18:37:09 2021 daemon.notice netifd: wan (6696): udhcpc: started, v1.33.0
Sun Apr 11 18:37:09 2021 daemon.notice netifd: wan (6696): udhcpc: sending discover
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Network device 'wan' link is down
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Interface 'wan' has link connectivity loss
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Interface 'wan6' has link connectivity loss
Sun Apr 11 18:37:10 2021 kern.info kernel: [ 4125.862042] mt7530 mdio-bus:1f wan: Link is Down
Sun Apr 11 18:37:10 2021 daemon.notice netifd: wan (6696): udhcpc: received SIGTERM
Sun Apr 11 18:37:10 2021 daemon.notice netifd: wan (6696): udhcpc: entering released state
Sun Apr 11 18:37:10 2021 daemon.notice netifd: wan (6696): Command failed: Permission denied
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Interface 'wan' is now down
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Interface 'wan' is disabled
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Interface 'wan6' is disabled
Sun Apr 11 18:37:10 2021 kern.info kernel: [ 4126.007886] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
Sun Apr 11 18:37:10 2021 kern.info kernel: [ 4126.021597] 8021q: adding VLAN 0 to HW filter on device wan
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Interface 'wan' is enabled
Sun Apr 11 18:37:10 2021 daemon.notice netifd: Interface 'wan6' is enabled
Sun Apr 11 18:37:35 2021 kern.info kernel: [ 4150.598154] mt7530 mdio-bus:1f wan: Link is Up - 100Mbps/Full - flow control off
Sun Apr 11 18:37:35 2021 daemon.notice netifd: Network device 'wan' link is up
Sun Apr 11 18:37:35 2021 daemon.notice netifd: Interface 'wan' has link connectivity
Sun Apr 11 18:37:35 2021 daemon.notice netifd: Interface 'wan' is setting up now
Sun Apr 11 18:37:35 2021 daemon.notice netifd: Interface 'wan6' has link connectivity
Sun Apr 11 18:37:35 2021 daemon.notice netifd: wan (6786): udhcpc: started, v1.33.0
Sun Apr 11 18:37:35 2021 daemon.notice netifd: wan (6786): udhcpc: sending discover

When it's off, it loops the messages from the begginning till the last timestamp of Sun Apr 11 18:37:10 2021.
I'm use it with a Cisco EPC3208G modem. The cable is ok: cat6 S/FTP. the modem works like a cham with a direct PC connection. the phisical port is ok: lan recognizes it as a gbit. However, the ethtools says the following about the speed of the link partner (cisco modem):

ethtool wan
Settings for wan:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/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 
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: external
	Auto-negotiation: on
	Supports Wake-on: d
	Wake-on: d

Do You have any hints? I've tried the snapshots versions after 2021.04.01.
Is it a hardware issue (so should I return it?) or is it driver problem?

Thank's cociweb.

There can be a number of issues

  • first and foremost, broken ethernet cable or bad contact
  • hardware damage in one of the involved devices
    • interoperability issues between the EPC3208G and RT-AC85P (the later you could test by temporarily putting and unmanaged 1 GBit/s switch inbetween)

Given that you can confirm it with the vendor firmware as well, the failure is at least not caused by OpenWrt.

Hello Slh,
Yes, I've check the cable but it is an cat6 sftp cable. but it swapped multiple times, and checked with cable tester as well.

I've got a gigabit unmanaged switch and I can confirm, it working well in between.

What is your recommendation? we are sure that this is an interoperability problem, As I can see, this is the same behaviour with the stock firmware, so Is it an mt7621 driver problem?
what is your recommendation where can I report this driver bug?

Wierd thing.
I've reconnected the two device (without restart) without the unmanaged switch inbetween, and it works like a charm. (until a restart).

[ 3676.435244] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
[ 4243.724066] mt7530 mdio-bus:1f wan: Link is Down
[ 4245.113764] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
[ 4245.127275] 8021q: adding VLAN 0 to HW filter on device wan
[ 4263.564063] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control off

The 21.02-RC4 brings partial solution. it contains many MT76 fixes (I don't really know which gives the solution). As of now, the proportion turned around: mostly the gigabit link is recognized (8:10), but sometimes still not. (2:10) but it's much more better. May the log looks like different - I've didn't checked it.

It was too quick to mark my previous reply as a good answer.
Unfortunately, the issue is back and worse than previous. The issue now not always occurs during link initialization. As of now, with the updated driver the link is up with gigabit speed, and later on (after various hours) it is degraded to 10/100.

The appropriate bug report: https://bugs.openwrt.org/index.php?do=details&task_id=4090
and similar post: No configuration from ISP on Asus RT-AC85P