Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3309 - MikroTik LHG 2: eth0 Link speed not properly reported (fixed at 1000 Mbps) #8178

Closed
openwrt-bot opened this issue Aug 28, 2020 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

rogerpueyo:

Hi,

Given the way the wired network is setup in the MikroTik LHG HB platform DTS file (qca9533_mikrotik_routerboard-lhg-hb):

ð1 { gmac-config { device = <&gmac>; }; };

the link speed for the MikroTik LHG 2 is not properly reported at eth0. Instead, it appears as fixed at 1000 Mbps, while swconfig reports the actual speed for port #1:

root@OpenWrt:~# dmesg | grep eth [ 4.335676] ag71xx 1a000000.eth: invalid MAC address, using random address [ 5.098696] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY] [ 5.108652] eth0: Atheros AG71xx at 0xba000000, irq 5, mode: gmii [ 5.826229] eth0: link up (1000Mbps/Full duplex) [ 5.838081] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 9.991422] eth0: link down [ 56.170746] eth0: link up (1000Mbps/Full duplex) [ 56.176251] br-lan: port 1(eth0) entered blocking state [ 56.181725] br-lan: port 1(eth0) entered disabled state [ 56.187503] device eth0 entered promiscuous mode [ 56.211269] br-lan: port 1(eth0) entered blocking state [ 56.216705] br-lan: port 1(eth0) entered forwarding state root@OpenWrt:~# swconfig dev switch0 show Global attributes: enable_vlan: 0 ar8xxx_mib_poll_interval: 500 ar8xxx_mib_type: 0 enable_mirror_rx: 0 enable_mirror_tx: 0 mirror_monitor_port: 0 mirror_source_port: 0 arl_table: address resolution table Port 0: MAC de:ad:be:ef:00:00 Port 0: MAC de:ad:be:ef:00:01 Port 1: MAC de:ad:be:ef:00:02

Port 0:
mib: MIB counters
RxGoodByte : 61472 (60.0 KiB)
TxByte : 64515 (63.0 KiB)

pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 

Port 1:
mib: MIB counters
RxGoodByte : 64795 (63.2 KiB)
TxByte : 54979 (53.6 KiB)

pvid: 0
link: port:1 link:up speed:10baseT half-duplex auto

Port 2:
mib: No MIB data
pvid: 0
link: port:2 link:down
Port 3:
mib: No MIB data
pvid: 0
link: port:3 link:down
Port 4:
mib: No MIB data
pvid: 0
link: port:4 link:down

Using the following network setup, which is also found in other devices (e.g., MikroTik SXT Lite 5):

&eth0 {
status = "okay";

phy-handle = <&swphy0>;

gmac-config {
	device = <&gmac>;
	switch-phy-swap = <1>;
};

};

&eth1 {
status = "okay";

compatible = "syscon", "simple-mfd";

};

eth0 reports the actual link speed:

[ 5.087144] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
[ 7.827418] eth0: link up (100Mbps/Full duplex)
[ 7.832171] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 9.943393] eth0: link down
[ 44.416376] br-lan: port 1(eth0) entered blocking state
[ 44.421841] br-lan: port 1(eth0) entered disabled state
[ 44.427598] device eth0 entered promiscuous mode
[ 48.497213] eth0: link up (100Mbps/Full duplex)
[ 48.502152] br-lan: port 1(eth0) entered blocking state
[ 48.507613] br-lan: port 1(eth0) entered forwarding state
[ 111.983480] eth0: link down
[ 111.987076] br-lan: port 1(eth0) entered disabled state
[ 114.033204] eth0: link up (10Mbps/Half duplex)
[ 114.038061] br-lan: port 1(eth0) entered blocking state
[ 114.043522] br-lan: port 1(eth0) entered forwarding state
[ 117.103480] eth0: link down
[ 117.107070] br-lan: port 1(eth0) entered disabled state
[ 118.129228] eth0: link up (100Mbps/Full duplex)
[ 118.134175] br-lan: port 1(eth0) entered blocking state
[ 118.139631] br-lan: port 1(eth0) entered forwarding state
[ 120.176348] eth0: link down
[ 120.180095] br-lan: port 1(eth0) entered disabled state
[ 122.225217] eth0: link up (100Mbps/Full duplex)
[ 122.230159] br-lan: port 1(eth0) entered blocking state
[ 122.235615] br-lan: port 1(eth0) entered forwarding state

as the switch is not used:

root@OpenWrt:~# swconfig dev switch0 show
Global attributes:
enable_vlan: 0
ar8xxx_mib_poll_interval: 500
ar8xxx_mib_type: 0
enable_mirror_rx: 0
enable_mirror_tx: 0
mirror_monitor_port: 0
mirror_source_port: 0
arl_table: address resolution table

Port 0:
mib: No MIB data
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
mib: No MIB data
pvid: 0
link: port:1 link:down
Port 2:
mib: No MIB data
pvid: 0
link: port:2 link:down
Port 3:
mib: No MIB data
pvid: 0
link: port:3 link:down
Port 4:
mib: No MIB data
pvid: 0
link: port:4 link:down

@openwrt-bot
Copy link
Author

rogerpueyo:

Pull request submitted at GitHub: #3361

@openwrt-bot
Copy link
Author

francocastillo:

It will be related to [[https://bugs.openwrt.org/index.php?do=details&task_id=3271]]?

@openwrt-bot
Copy link
Author

rogerpueyo:

Sorry, I have no clue. I haven't experienced such behaviour with the MikroTik LHG 2, and the patch on GitHub will only affect this device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant