Xiaomi R4A Gigabit 21.02 problem with 100mbps ethernet WAN

I have same problem on two R4a devices
the problem is
When I plug the Ethernet cable (100mbps) to the wan port of the Router Before plugin the Power adapter, the Wan port wont negotiate with my 100Mbps switch and wan port wont come up

You can workaround this by installing ethtool

ethtool -s [device_name] speed [10/100/1000] duplex [half/full] autoneg [on/off]

Example from my own experince:

ethtool -s eth2 speed 100 duplex full autoneg off

I have the same problem using Xiaomi Mi Router 3G (OpenWrt 21.02.1 r16325-88151b8303). When during boot time a 100Mb/s link is connected to the WAN, the WAN port keeps going up and down. Using the ethtool does not solve the problem.

# ethtool -s wan speed 100 duplex full autoneg off
# 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:  100baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: off
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes
# 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:  100baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: off
        Supports Wake-on: d
        Wake-on: d
        Link detected: no
# 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:  100baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: off
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes
# 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:  100baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: off
        Supports Wake-on: d
        Wake-on: d
        Link detected: no
[   36.993659] mt7530 mdio-bus:1f wan: Link is Down
[   52.353818] mt7530 mdio-bus:1f wan: Link is Up - 100Mbps/Full - flow control rx/tx
[   53.377667] mt7530 mdio-bus:1f wan: Link is Down
[   66.689801] mt7530 mdio-bus:1f wan: Link is Up - 100Mbps/Full - flow control rx/tx
[   67.713646] mt7530 mdio-bus:1f wan: Link is Down
[   81.025823] mt7530 mdio-bus:1f wan: Link is Up - 100Mbps/Full - flow control rx/tx
[   82.049664] mt7530 mdio-bus:1f wan: Link is Down
[   95.361805] mt7530 mdio-bus:1f wan: Link is Up - 100Mbps/Full - flow control rx/tx
[   96.385649] mt7530 mdio-bus:1f wan: Link is Down
[  138.369814] mt7530 mdio-bus:1f wan: Link is Up - 100Mbps/Full - flow control rx/txt 

Need to reboot with a 1000Mb/s link connected to WAN to resolve the problem, connecting a 100Mb/s link afterwards works fine.

# 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
                                             1000baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes
# 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: Symmetric
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

Edit:

I found recent comments in different posts which seem to be using master/openwrt 21.02 and have a similar issue:

fwiw, this may seem like a stupid idea, as a temporary workaround.

What would happen if you installed an unmanaged gigabit switch between the modem's 100mbps port and the R4A gigabit port?

1 Like

Just resolved the issue on my Xiaomi Mi Router 3G router by upgrading to latest firmware just released 21.02.2. WAN interface on Xiaomi router no longer flapping when 100Mb/s at boottime with this new firmware.

Edit:

Spoken to soon: problem seems be be reduced (no more issues during boottime), however some what later the WAN interface starts to flapping again.

fwiw, I discovered the same problem with my R4AG flashed with 21.02.2 when WAN is connected to active 100mb port.
https://forum.openwrt.org/t/xiaomi-4a-router-gigabit-edition-internet-not-working/121192/30

FS#3932 reports problem allegedly fixed in snapshot since 20 Feb 2022 for R3G.

Update: I've just installed snapshot for 10 March 2022 for my R4AG. Early indication is the problem is indeed fixed.