openwrt / openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Other
20.62k stars 10.58k forks source link

FS#3839 - Xiaomi 4A Gigabit link speed auto negotiation #8840

Closed openwrt-bot closed 1 year ago

openwrt-bot commented 3 years ago

mishamosher:

Xiaomi Mi Router 4A Gigabit Edition

OpenWRT 21.02-rc2

The link speed auto-negotiation is broken. I've a 1Gbps switch and a 4-lines ethernet cable (pins 1 2 3 6). It should be possible to achieve a max speed of 100Mbps full duplex. When I connect the switch to the WAN port of the router, the link speed shows up as 1Gbps full duplex (in the router).

Ethernet connectivity remains non-functional unless I set a proper speed and duplex (ex. ethtool -s wan speed 100 duplex full autoneg off).

openwrt-bot commented 3 years ago

Skrity:

Reporting the same happening on mir3g v1 and redmi ac2100. Possibly the same issue as in fs#3681.

At the moment fixing this in local.rc like this: ethtool -s wan advertise 0x8

Both release candidates are affected, but latest 19.07 is not.

openwrt-bot commented 3 years ago

bouzouste:

Reporting also the same. Tested on both rc1 and rc2 of 21.02 With some fast ethernet switches it works great, but with some others and some POE it does not.

Works great with older 19.07.

openwrt-bot commented 3 years ago

Skrity:

a few bootlogs if they help

openwrt-bot commented 3 years ago

bouzouste:

I just saw in source, this piece of code:

fixed-link { speed = <1000>; full-duplex; pause; };

Do you believe it has something to do with this particular issue? /linux/ramips/dts/mt7621.dtsi

openwrt-bot commented 3 years ago

mishamosher:

The issue still happens on RC3.

openwrt-bot commented 3 years ago

csharper2005:

The issue still happens on 21.02.1

openwrt-bot commented 2 years ago

csharper2005:

Other mt7621 devices are also affected: Beeline SmartBox Giga D-Team Newifi D2

openwrt-bot commented 2 years ago

serj-47:

I checked on my xiaomi 4a with firmware 21.02.1 stable and on a snapshot from 02/03/2022. And still the same problem. With a two-pair cable from the ISP, the router reports a 1Gbit connection on the wan interface. [180840.516823] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control off I slightly corrected rc.local and additionally added sleep) sleep 10 ethtool -s wan advertise 0x8

mishamosher commented 2 years ago

Still happening in 21.02.2.

Haven't tried latest snapshot builds, but FS#3932 (#8930) reports 2022-02-20 snapshot as working for Mi 3G.

bill888uk commented 2 years ago

fwiw, I encountered this problem yesterday with my R4AG with 21.02.2 when it is power cycled, with WAN port connected to 100mb switches. One particular unmanaged TPlink TL-SF1008D v9.1 switch was persistently failing. Other TPlink and Netgear switches were slightly better.

I installed snapshot for 10 March 2022, and problem appears to be resolved (for above SF1008D) after reading FS#3932.

mishamosher commented 2 years ago

Issue solved with 22.03-rc1:

Djfe commented 1 year ago

so shall we close this?

mishamosher commented 1 year ago

@Djfe yes, as well as these (they're the same issue):

Djfe commented 1 year ago

@hauke here are three issues about the same bug. It was fixed with 22.03 release candidate 1 I couldn't find out which commit fixed it, though.