mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-14 00:22:09 -05:00
After booting, a "transmit queue 0 timed out" warning followed by a register dump was observed. The dump indicates that mtk_hw_init() does not initialize the EEECR during probe. This occurs because the netdev is allocated in mtk_add_mac(), which is called after mtk_hw_init(). Consequently, the EEECR register remains uninitialized until a reset is triggered, causing mtk_hw_init() to run again with a valid netdev, at which point the register is finally set. To address this, instead of modifying the probe sequence, latch the Tx LPI enable state and timer value, and move the EEECR register initialization to mtk_mac_link_up() to ensure proper setup when the interface comes up. Additionally, the splat reveals that LPI functionality is controlled by the MAC_MCR_EEE bits in the MCR register. Update mtk_set_eee() to modify these bits accordingly. Fixes:d8315d5358("kernel: backport Mediatek SoC EEE support") Fixes:edddbaf79c("kernel: Mediatek: set default EEE Tx LPI timer") Signed-off-by: Qingfang Deng <dqfext@gmail.com>
22 lines
717 B
Diff
22 lines
717 B
Diff
From: Felix Fietkau <nbd@nbd.name>
|
|
Date: Mon, 21 Mar 2022 20:39:59 +0100
|
|
Subject: [PATCH] net: ethernet: mtk_eth_soc: enable threaded NAPI
|
|
|
|
This can improve performance under load by ensuring that NAPI processing is
|
|
not pinned on CPU 0.
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
---
|
|
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
@@ -5105,6 +5105,8 @@ static int mtk_probe(struct platform_dev
|
|
* for NAPI to work
|
|
*/
|
|
init_dummy_netdev(ð->dummy_dev);
|
|
+ eth->dummy_dev.threaded = 1;
|
|
+ strcpy(eth->dummy_dev.name, "mtk_eth");
|
|
netif_napi_add(ð->dummy_dev, ð->tx_napi, mtk_napi_tx);
|
|
netif_napi_add(ð->dummy_dev, ð->rx_napi, mtk_napi_rx);
|
|
|