From: Daniel Golle Date: Sat, 6 Jul 2024 03:02:31 +0000 (+0100) Subject: generic: 6.6: mtk_eth_soc: import accepted patches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=27b6838afacfcd79be52b2563b870ae7b3caf8f6;p=openwrt%2Fstaging%2Fansuel.git generic: 6.6: mtk_eth_soc: import accepted patches Import two imported patches accepted upstream. Move from pending: - net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops Initial import: - net: ethernet: mtk_ppe: Change PPE entries number to 16K Signed-off-by: Daniel Golle --- diff --git a/target/linux/generic/backport-6.6/752-28-v6.10-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch b/target/linux/generic/backport-6.6/752-28-v6.10-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch new file mode 100644 index 0000000000..b62586b992 --- /dev/null +++ b/target/linux/generic/backport-6.6/752-28-v6.10-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch @@ -0,0 +1,32 @@ +From 3b2aef99221d395ce37efa426d7b50e7dcd621d6 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Mon, 1 Jul 2024 20:28:14 +0100 +Subject: [PATCH] net: ethernet: mediatek: Allow gaps in MAC allocation + +Some devices with MediaTek SoCs don't use the first but only the second +MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY +connected to the second MAC this is quite common. +Make sure to reset and enable PSE also in those cases by skipping gaps +using 'continue' instead of aborting the loop using 'break'. + +Fixes: dee4dd10c79a ("net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs") +Suggested-by: Elad Yifee +Signed-off-by: Daniel Golle +Reviewed-by: Przemek Kitszel +Link: https://patch.msgid.link/379ae584cea112db60f4ada79c7e5ba4f3364a64.1719862038.git.daniel@makrotopia.org +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -3396,7 +3396,7 @@ static int mtk_open(struct net_device *d + + for (i = 0; i < MTK_MAX_DEVS; i++) { + if (!eth->netdev[i]) +- break; ++ continue; + + target_mac = netdev_priv(eth->netdev[i]); + if (!soc->offload_version) { diff --git a/target/linux/generic/backport-6.6/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch b/target/linux/generic/backport-6.6/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch new file mode 100644 index 0000000000..c6b332f370 --- /dev/null +++ b/target/linux/generic/backport-6.6/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch @@ -0,0 +1,29 @@ +From ca18300e00d584d5693127eb60c108b84883b8ac Mon Sep 17 00:00:00 2001 +From: Shengyu Qu +Date: Fri, 5 Jul 2024 01:26:26 +0800 +Subject: [PATCH] net: ethernet: mtk_ppe: Change PPE entries number to 16K + +MT7981,7986 and 7988 all supports 32768 PPE entries, and MT7621/MT7620 +supports 16384 PPE entries, but only set to 8192 entries in driver. So +incrase max entries to 16384 instead. + +Signed-off-by: Elad Yifee +Signed-off-by: Shengyu Qu +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/TY3P286MB261103F937DE4EEB0F88437D98DE2@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/mediatek/mtk_ppe.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_ppe.h ++++ b/drivers/net/ethernet/mediatek/mtk_ppe.h +@@ -8,7 +8,7 @@ + #include + #include + +-#define MTK_PPE_ENTRIES_SHIFT 3 ++#define MTK_PPE_ENTRIES_SHIFT 4 + #define MTK_PPE_ENTRIES (1024 << MTK_PPE_ENTRIES_SHIFT) + #define MTK_PPE_HASH_MASK (MTK_PPE_ENTRIES - 1) + #define MTK_PPE_WAIT_TIMEOUT_US 1000000 diff --git a/target/linux/generic/pending-6.6/734-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch b/target/linux/generic/pending-6.6/734-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch deleted file mode 100644 index 8e1ad54a53..0000000000 --- a/target/linux/generic/pending-6.6/734-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 379ae584cea112db60f4ada79c7e5ba4f3364a64 Mon Sep 17 00:00:00 2001 -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 13718593 -X-Patchwork-Delegate: kuba@kernel.org -List-Id: -From: Daniel Golle -Date: Mon, 1 Jul 2024 19:26:28 +0100 -Subject: [PATCH] net: ethernet: mediatek: Allow gaps in MAC allocation - -Some devices with MediaTek SoCs don't use the first but only the second -MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY -connected to the second MAC this is quite common. -Make sure to reset and enable PSE also in those cases by skipping gaps -using 'continue' instead of aborting the loop using 'break'. - -Fixes: dee4dd10c79a ("net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs") -Suggested-by: Elad Yifee -Signed-off-by: Daniel Golle ---- - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3431,7 +3431,7 @@ static int mtk_open(struct net_device *d - - for (i = 0; i < MTK_MAX_DEVS; i++) { - if (!eth->netdev[i]) -- break; -+ continue; - - target_mac = netdev_priv(eth->netdev[i]); - if (!soc->offload_version) {