Asus RT-AC51U flow control

Openwrt 19.07
By default in switch enabled flow control on processor port (6). Because of this, with a lot of traffic, network problems begin. In dmesg:

[168.636728] ------------ [cut here] ------------
[168.645929] WARNING: CPU: 0 PID: 0 at net / sched / sch_generic.c: 320 0x802c39c0
[168.659960] NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 0 timed out
...
[10879.081099] mtk_soc_eth 10100000.ethernet eth0: transmit timed out
[10879.093425] mtk_soc_eth 10100000.ethernet eth0: dma_cfg: 80000065
[10879.105396] mtk_soc_eth 10100000.ethernet eth0: tx_ring = 0, base = 02734000, max = 1024, ctx = 17, dtx = 17, fdx = 16, next = 17
[10879.126164] mtk_soc_eth 10100000.ethernet eth0: rx_ring = 0, base = 02ca4000, max = 1024, calc = 637, drx = 643

Fix in the source code to disable it by default:

--- ./target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c.orig 2020-10-02 13: 44: 10.060180559 +0300
+++ ./target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c 2020-10-02 13: 44: 47.135101292 +0300
@@ -184.8 +184.8 @@
 _mt7620_mii_write (gsw, 2, 16, 0x1515);
 _mt7620_mii_write (gsw, 3, 16, 0x0f0f);
 
- / * CPU Port6 Force Link 1G, FC ON * /
- mtk_switch_w32 (gsw, 0x5e33b, GSW_REG_PORT_PMCR (6));
+ / * CPU Port6 Force Link 1G, FC OFF * /
+ mtk_switch_w32 (gsw, 0x5e30b, GSW_REG_PORT_PMCR (6));
 
 / * Set Port 6 as CPU Port * /
 mtk_switch_w32 (gsw, 0x7f7f7fe0, 0x0010);

The problem is gone.
Perhaps you should fix it in git?

Feel free to submit your patch as a pull request so a developer can review the patch and merge it :slight_smile:

Everything turned out to be somewhat different. 19.07-snapshot works fine with no changes, and 19.07.4 works poorly with changes.