forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generic: sync MediaTek Ethernet driver with upstream
Import commits from upstream Linux replacing some downstream patches. Move accepted patches from pending-{5.15,6.1} to backport-{5.15,6.1}. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
- Loading branch information
Showing
111 changed files
with
9,947 additions
and
6,301 deletions.
There are no files selected for viewing
28 changes: 0 additions & 28 deletions
28
...eric/backport-5.15/730-07-v6.3-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
31 changes: 31 additions & 0 deletions
31
...eric/backport-5.15/733-v6.5-27-net-ethernet-mtk_eth_soc-always-mtk_get_ib1_pkt_type.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From b804f765485109f9644cc05d1e8fc79ca6c6e4aa Mon Sep 17 00:00:00 2001 | ||
From: Daniel Golle <daniel@makrotopia.org> | ||
Date: Wed, 19 Jul 2023 01:39:36 +0100 | ||
Subject: [PATCH 094/250] net: ethernet: mtk_eth_soc: always | ||
mtk_get_ib1_pkt_type | ||
|
||
entries and bind debugfs files would display wrong data on NETSYS_V2 and | ||
later because instead of using mtk_get_ib1_pkt_type the driver would use | ||
MTK_FOE_IB1_PACKET_TYPE which corresponds to NETSYS_V1(.x) SoCs. | ||
Use mtk_get_ib1_pkt_type so entries and bind records display correctly. | ||
|
||
Fixes: 03a3180e5c09e ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986") | ||
Signed-off-by: Daniel Golle <daniel@makrotopia.org> | ||
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> | ||
Link: https://lore.kernel.org/r/c0ae03d0182f4d27b874cbdf0059bc972c317f3c.1689727134.git.daniel@makrotopia.org | ||
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ||
--- | ||
drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | ||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | ||
@@ -98,7 +98,7 @@ mtk_ppe_debugfs_foe_show(struct seq_file | ||
|
||
acct = mtk_foe_entry_get_mib(ppe, i, NULL); | ||
|
||
- type = FIELD_GET(MTK_FOE_IB1_PACKET_TYPE, entry->ib1); | ||
+ type = mtk_get_ib1_pkt_type(ppe->eth, entry->ib1); | ||
seq_printf(m, "%05x %s %7s", i, | ||
mtk_foe_entry_state_str(state), | ||
mtk_foe_pkt_type_str(type)); |
78 changes: 78 additions & 0 deletions
78
...eric/backport-5.15/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
From 5ea0e1312bcfebc06b5f91d1bb82b823d6395125 Mon Sep 17 00:00:00 2001 | ||
From: Lorenzo Bianconi <lorenzo@kernel.org> | ||
Date: Wed, 19 Jul 2023 12:29:49 +0200 | ||
Subject: [PATCH 095/250] net: ethernet: mtk_ppe: add MTK_FOE_ENTRY_V{1,2}_SIZE | ||
macros | ||
|
||
Introduce MTK_FOE_ENTRY_V{1,2}_SIZE macros in order to make more | ||
explicit foe_entry size for different chipset revisions. | ||
|
||
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> | ||
Reviewed-by: Simon Horman <simon.horman@corigine.com> | ||
Signed-off-by: David S. Miller <davem@davemloft.net> | ||
--- | ||
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 10 +++++----- | ||
drivers/net/ethernet/mediatek/mtk_ppe.h | 3 +++ | ||
2 files changed, 8 insertions(+), 5 deletions(-) | ||
|
||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c | ||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c | ||
@@ -4710,7 +4710,7 @@ static const struct mtk_soc_data mt7621_ | ||
.required_pctl = false, | ||
.offload_version = 1, | ||
.hash_offset = 2, | ||
- .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, | ||
+ .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, | ||
.txrx = { | ||
.txd_size = sizeof(struct mtk_tx_dma), | ||
.rxd_size = sizeof(struct mtk_rx_dma), | ||
@@ -4731,7 +4731,7 @@ static const struct mtk_soc_data mt7622_ | ||
.offload_version = 2, | ||
.hash_offset = 2, | ||
.has_accounting = true, | ||
- .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, | ||
+ .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, | ||
.txrx = { | ||
.txd_size = sizeof(struct mtk_tx_dma), | ||
.rxd_size = sizeof(struct mtk_rx_dma), | ||
@@ -4750,7 +4750,7 @@ static const struct mtk_soc_data mt7623_ | ||
.required_pctl = true, | ||
.offload_version = 1, | ||
.hash_offset = 2, | ||
- .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, | ||
+ .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, | ||
.txrx = { | ||
.txd_size = sizeof(struct mtk_tx_dma), | ||
.rxd_size = sizeof(struct mtk_rx_dma), | ||
@@ -4788,8 +4788,8 @@ static const struct mtk_soc_data mt7981_ | ||
.required_pctl = false, | ||
.offload_version = 2, | ||
.hash_offset = 4, | ||
- .foe_entry_size = sizeof(struct mtk_foe_entry), | ||
.has_accounting = true, | ||
+ .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, | ||
.txrx = { | ||
.txd_size = sizeof(struct mtk_tx_dma_v2), | ||
.rxd_size = sizeof(struct mtk_rx_dma_v2), | ||
@@ -4808,8 +4808,8 @@ static const struct mtk_soc_data mt7986_ | ||
.required_clks = MT7986_CLKS_BITMAP, | ||
.required_pctl = false, | ||
.hash_offset = 4, | ||
- .foe_entry_size = sizeof(struct mtk_foe_entry), | ||
.has_accounting = true, | ||
+ .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, | ||
.txrx = { | ||
.txd_size = sizeof(struct mtk_tx_dma_v2), | ||
.rxd_size = sizeof(struct mtk_rx_dma_v2), | ||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.h | ||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.h | ||
@@ -216,6 +216,9 @@ struct mtk_foe_ipv6_6rd { | ||
struct mtk_foe_mac_info l2; | ||
}; | ||
|
||
+#define MTK_FOE_ENTRY_V1_SIZE 80 | ||
+#define MTK_FOE_ENTRY_V2_SIZE 96 | ||
+ | ||
struct mtk_foe_entry { | ||
u32 ib1; | ||
|
Oops, something went wrong.