From e8b00cfdcb78ebd20e097eb21862376a4b4f8313 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 25 Sep 2022 16:56:45 +0100 Subject: [PATCH] kernel: rename upstreamed patches and import fixes Move and rename patches which were merged upstream and import follow-up fixes for MediaTek Ethernet offloading features on MT7622 and Filogic platforms. Remove patch 793-net-ethernet-mtk_eth_soc-fix-typo-in-__mtk_foe_entry.patch which breaks hardware flow offloading on MT7622, it will be reverted upstream as well. Fixes: c93c5365c0 ("kernel: pick patches for MediaTek Ethernet from linux-next") Signed-off-by: Daniel Golle --- ...eth_soc-move-gdma_to_ppe-and-ppe_ba.patch} | 0 ...eth_soc-move-ppe-table-hash-offset-.patch} | 8 +-- ...eth_soc-add-the-capability-to-run-m.patch} | 0 ...eth_soc-move-wdma_base-definitions-.patch} | 0 ...eth_soc-add-foe_entry_size-to-mtk_e.patch} | 6 +-- ...eth_soc-check-max-allowed-value-in-.patch} | 0 ...eth_wed-add-mtk_wed_configure_irq-a.patch} | 0 ...eth_wed-add-wed-support-for-mt7986-.patch} | 0 ...net-mtk_eth_wed-add-axi-bus-support.patch} | 0 ...eth_soc-introduce-flow-offloading-s.patch} | 8 +-- ...eth_soc-enable-flow-offloading-supp.patch} | 2 +- ..._eth_soc-fix-wrong-use-of-new-helper.patch | 46 +++++++++++++++++ ..._eth_soc-fix-usage-of-foe_entry_size.patch | 49 +++++++++++++++++++ ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 6 +-- ..._eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch | 45 +++++++++++++++++ ..._eth_soc-fix-typo-in-__mtk_foe_entry.patch | 27 ---------- 16 files changed, 155 insertions(+), 42 deletions(-) rename target/linux/generic/{pending-5.15/781-net-ethernet-mtk_eth_soc-move-gdma_to_ppe-and-ppe_ba.patch => backport-5.15/713-v6.0-net-ethernet-mtk_eth_soc-move-gdma_to_ppe-and-ppe_ba.patch} (100%) rename target/linux/generic/{pending-5.15/782-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch => backport-5.15/714-v6.0-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch} (96%) rename target/linux/generic/{pending-5.15/790-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch => backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch} (100%) rename target/linux/generic/{pending-5.15/791-net-ethernet-mtk_eth_soc-move-wdma_base-definitions-.patch => backport-5.15/716-v6.0-net-ethernet-mtk_eth_soc-move-wdma_base-definitions-.patch} (100%) rename target/linux/generic/{pending-5.15/792-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch => backport-5.15/717-v6.0-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch} (97%) rename target/linux/generic/{pending-5.15/794-net-ethernet-mtk_eth_soc-check-max-allowed-value-in-.patch => backport-5.15/718-v6.0-net-ethernet-mtk_eth_soc-check-max-allowed-value-in-.patch} (100%) rename target/linux/generic/{pending-5.15/795-net-ethernet-mtk_eth_wed-add-mtk_wed_configure_irq-a.patch => backport-5.15/719-v6.0-net-ethernet-mtk_eth_wed-add-mtk_wed_configure_irq-a.patch} (100%) rename target/linux/generic/{pending-5.15/796-net-ethernet-mtk_eth_wed-add-wed-support-for-mt7986-.patch => backport-5.15/720-v6.0-net-ethernet-mtk_eth_wed-add-wed-support-for-mt7986-.patch} (100%) rename target/linux/generic/{pending-5.15/797-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch => backport-5.15/721-v6.0-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch} (100%) rename target/linux/generic/{pending-5.15/798-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch => backport-5.15/722-v6.0-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch} (99%) rename target/linux/generic/{pending-5.15/799-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch => backport-5.15/723-v6.0-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch} (94%) create mode 100644 target/linux/generic/backport-5.15/724-v6.0-net-ethernet-mtk_eth_soc-fix-wrong-use-of-new-helper.patch create mode 100644 target/linux/generic/backport-5.15/725-v6.0-net-ethernet-mtk_eth_soc-fix-usage-of-foe_entry_size.patch create mode 100644 target/linux/generic/pending-5.15/781-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch delete mode 100644 target/linux/generic/pending-5.15/793-net-ethernet-mtk_eth_soc-fix-typo-in-__mtk_foe_entry.patch diff --git a/target/linux/generic/pending-5.15/781-net-ethernet-mtk_eth_soc-move-gdma_to_ppe-and-ppe_ba.patch b/target/linux/generic/backport-5.15/713-v6.0-net-ethernet-mtk_eth_soc-move-gdma_to_ppe-and-ppe_ba.patch similarity index 100% rename from target/linux/generic/pending-5.15/781-net-ethernet-mtk_eth_soc-move-gdma_to_ppe-and-ppe_ba.patch rename to target/linux/generic/backport-5.15/713-v6.0-net-ethernet-mtk_eth_soc-move-gdma_to_ppe-and-ppe_ba.patch diff --git a/target/linux/generic/pending-5.15/782-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch b/target/linux/generic/backport-5.15/714-v6.0-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch similarity index 96% rename from target/linux/generic/pending-5.15/782-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch rename to target/linux/generic/backport-5.15/714-v6.0-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch index 89a3aa9893..dd3bb15800 100644 --- a/target/linux/generic/pending-5.15/782-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch +++ b/target/linux/generic/backport-5.15/714-v6.0-net-ethernet-mtk_eth_soc-move-ppe-table-hash-offset-.patch @@ -44,7 +44,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4150,6 +4150,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4148,6 +4148,7 @@ static const struct mtk_soc_data mt7621_ .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, .offload_version = 2, @@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4168,6 +4169,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4166,6 +4167,7 @@ static const struct mtk_soc_data mt7622_ .required_clks = MT7622_CLKS_BITMAP, .required_pctl = false, .offload_version = 2, @@ -60,7 +60,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4185,6 +4187,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4183,6 +4185,7 @@ static const struct mtk_soc_data mt7623_ .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, .offload_version = 2, @@ -68,7 +68,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4218,6 +4221,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4216,6 +4219,7 @@ static const struct mtk_soc_data mt7986_ .caps = MT7986_CAPS, .required_clks = MT7986_CLKS_BITMAP, .required_pctl = false, diff --git a/target/linux/generic/pending-5.15/790-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch b/target/linux/generic/backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch similarity index 100% rename from target/linux/generic/pending-5.15/790-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch rename to target/linux/generic/backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch diff --git a/target/linux/generic/pending-5.15/791-net-ethernet-mtk_eth_soc-move-wdma_base-definitions-.patch b/target/linux/generic/backport-5.15/716-v6.0-net-ethernet-mtk_eth_soc-move-wdma_base-definitions-.patch similarity index 100% rename from target/linux/generic/pending-5.15/791-net-ethernet-mtk_eth_soc-move-wdma_base-definitions-.patch rename to target/linux/generic/backport-5.15/716-v6.0-net-ethernet-mtk_eth_soc-move-wdma_base-definitions-.patch diff --git a/target/linux/generic/pending-5.15/792-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch b/target/linux/generic/backport-5.15/717-v6.0-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch similarity index 97% rename from target/linux/generic/pending-5.15/792-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch rename to target/linux/generic/backport-5.15/717-v6.0-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch index 16bc8e29fc..c24bd8022c 100644 --- a/target/linux/generic/pending-5.15/792-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch +++ b/target/linux/generic/backport-5.15/717-v6.0-net-ethernet-mtk_eth_soc-add-foe_entry_size-to-mtk_e.patch @@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4167,6 +4167,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4165,6 +4165,7 @@ static const struct mtk_soc_data mt7621_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -29,7 +29,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4186,6 +4187,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4184,6 +4185,7 @@ static const struct mtk_soc_data mt7622_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -37,7 +37,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4204,6 +4206,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4202,6 +4204,7 @@ static const struct mtk_soc_data mt7623_ .required_pctl = true, .offload_version = 2, .hash_offset = 2, diff --git a/target/linux/generic/pending-5.15/794-net-ethernet-mtk_eth_soc-check-max-allowed-value-in-.patch b/target/linux/generic/backport-5.15/718-v6.0-net-ethernet-mtk_eth_soc-check-max-allowed-value-in-.patch similarity index 100% rename from target/linux/generic/pending-5.15/794-net-ethernet-mtk_eth_soc-check-max-allowed-value-in-.patch rename to target/linux/generic/backport-5.15/718-v6.0-net-ethernet-mtk_eth_soc-check-max-allowed-value-in-.patch diff --git a/target/linux/generic/pending-5.15/795-net-ethernet-mtk_eth_wed-add-mtk_wed_configure_irq-a.patch b/target/linux/generic/backport-5.15/719-v6.0-net-ethernet-mtk_eth_wed-add-mtk_wed_configure_irq-a.patch similarity index 100% rename from target/linux/generic/pending-5.15/795-net-ethernet-mtk_eth_wed-add-mtk_wed_configure_irq-a.patch rename to target/linux/generic/backport-5.15/719-v6.0-net-ethernet-mtk_eth_wed-add-mtk_wed_configure_irq-a.patch diff --git a/target/linux/generic/pending-5.15/796-net-ethernet-mtk_eth_wed-add-wed-support-for-mt7986-.patch b/target/linux/generic/backport-5.15/720-v6.0-net-ethernet-mtk_eth_wed-add-wed-support-for-mt7986-.patch similarity index 100% rename from target/linux/generic/pending-5.15/796-net-ethernet-mtk_eth_wed-add-wed-support-for-mt7986-.patch rename to target/linux/generic/backport-5.15/720-v6.0-net-ethernet-mtk_eth_wed-add-wed-support-for-mt7986-.patch diff --git a/target/linux/generic/pending-5.15/797-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch b/target/linux/generic/backport-5.15/721-v6.0-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch similarity index 100% rename from target/linux/generic/pending-5.15/797-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch rename to target/linux/generic/backport-5.15/721-v6.0-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch diff --git a/target/linux/generic/pending-5.15/798-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch b/target/linux/generic/backport-5.15/722-v6.0-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch similarity index 99% rename from target/linux/generic/pending-5.15/798-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch rename to target/linux/generic/backport-5.15/722-v6.0-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch index 2fb0b1dfd6..1ecbf485f1 100644 --- a/target/linux/generic/pending-5.15/798-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch +++ b/target/linux/generic/backport-5.15/722-v6.0-net-ethernet-mtk_eth_soc-introduce-flow-offloading-s.patch @@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) mtk_ppe_check_skb(eth->ppe[0], skb, hash); -@@ -4183,7 +4184,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4181,7 +4182,7 @@ static const struct mtk_soc_data mt7621_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -58,7 +58,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4203,7 +4204,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4201,7 +4202,7 @@ static const struct mtk_soc_data mt7622_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -67,7 +67,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4222,7 +4223,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4220,7 +4221,7 @@ static const struct mtk_soc_data mt7623_ .required_pctl = true, .offload_version = 2, .hash_offset = 2, @@ -76,7 +76,7 @@ Signed-off-by: Lorenzo Bianconi .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4254,9 +4255,11 @@ static const struct mtk_soc_data mt7986_ +@@ -4252,9 +4253,11 @@ static const struct mtk_soc_data mt7986_ .reg_map = &mt7986_reg_map, .ana_rgc3 = 0x128, .caps = MT7986_CAPS, diff --git a/target/linux/generic/pending-5.15/799-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch b/target/linux/generic/backport-5.15/723-v6.0-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch similarity index 94% rename from target/linux/generic/pending-5.15/799-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch rename to target/linux/generic/backport-5.15/723-v6.0-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch index 5b94c3ad3a..037e9d4443 100644 --- a/target/linux/generic/pending-5.15/799-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch +++ b/target/linux/generic/backport-5.15/723-v6.0-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch @@ -16,7 +16,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4258,6 +4258,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4256,6 +4256,7 @@ static const struct mtk_soc_data mt7986_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7986_CLKS_BITMAP, .required_pctl = false, diff --git a/target/linux/generic/backport-5.15/724-v6.0-net-ethernet-mtk_eth_soc-fix-wrong-use-of-new-helper.patch b/target/linux/generic/backport-5.15/724-v6.0-net-ethernet-mtk_eth_soc-fix-wrong-use-of-new-helper.patch new file mode 100644 index 0000000000..c4bd29365c --- /dev/null +++ b/target/linux/generic/backport-5.15/724-v6.0-net-ethernet-mtk_eth_soc-fix-wrong-use-of-new-helper.patch @@ -0,0 +1,46 @@ +From 40350ce3ae8701146aafd79c5f7b5582d9955e58 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 25 Sep 2022 15:12:35 +0100 +Subject: [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper + function +To: linux-mediatek@lists.infradead.org, + netdev@vger.kernel.org, + Lorenzo Bianconi +Cc: Sujuan Chen , + Bo Jiao , + Felix Fietkau , + John Crispin , + Sean Wang , + Mark Lee , + David S. Miller , + Eric Dumazet , + Jakub Kicinski , + Paolo Abeni , + Matthias Brugger , + Chen Minqiang + +In function mtk_foe_entry_set_vlan() the call to field accessor macro +FIELD_GET(MTK_FOE_IB1_BIND_VLAN_LAYER, entry->ib1) +has been wrongly replaced by +mtk_prep_ib1_vlan_layer(eth, entry->ib1) + +Use correct helper function mtk_get_ib1_vlan_layer instead. + +Reported-by: Chen Minqiang +Fixes: 03a3180e5c09e1 ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986") +Signed-off-by: Daniel Golle +--- + drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_ppe.c ++++ b/drivers/net/ethernet/mediatek/mtk_ppe.c +@@ -337,7 +337,7 @@ int mtk_foe_entry_set_vlan(struct mtk_et + { + struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); + +- switch (mtk_prep_ib1_vlan_layer(eth, entry->ib1)) { ++ switch (mtk_get_ib1_vlan_layer(eth, entry->ib1)) { + case 0: + entry->ib1 |= mtk_get_ib1_vlan_tag_mask(eth) | + mtk_prep_ib1_vlan_layer(eth, 1); diff --git a/target/linux/generic/backport-5.15/725-v6.0-net-ethernet-mtk_eth_soc-fix-usage-of-foe_entry_size.patch b/target/linux/generic/backport-5.15/725-v6.0-net-ethernet-mtk_eth_soc-fix-usage-of-foe_entry_size.patch new file mode 100644 index 0000000000..bb02f401a2 --- /dev/null +++ b/target/linux/generic/backport-5.15/725-v6.0-net-ethernet-mtk_eth_soc-fix-usage-of-foe_entry_size.patch @@ -0,0 +1,49 @@ +From fcf14c2c5deae8f8c3d25530bab10856f63f8a63 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 25 Sep 2022 15:18:54 +0100 +Subject: [PATCH 2/2] net: ethernet: mtk_eth_soc: fix usage of foe_entry_size +To: linux-mediatek@lists.infradead.org, + netdev@vger.kernel.org, + Lorenzo Bianconi +Cc: Sujuan Chen , + Bo Jiao , + Felix Fietkau , + John Crispin , + Sean Wang , + Mark Lee , + David S. Miller , + Eric Dumazet , + Jakub Kicinski , + Paolo Abeni , + Matthias Brugger , + Chen Minqiang + +As sizeof(hwe->data) can now longer be used as the actual size depends +on foe_entry_size, in commit 9d8cb4c096ab02 +("net: ethernet: mtk_eth_soc: add foe_entry_size to mtk_eth_soc") the +use of sizeof(hwe->data) is hence replaced. +However, replacing it with ppe->eth->soc->foe_entry_size is wrong as +foe_entry_size represents the size of the whole descriptor and not just +the 'data' field. +Fix this by subtracing the size of the only other field in the struct +'ib1', so we actually end up with the correct size to be copied to the +data field. + +Reported-by: Chen Minqiang +Fixes: 9d8cb4c096ab02 ("net: ethernet: mtk_eth_soc: add foe_entry_size to mtk_eth_soc") +Signed-off-by: Daniel Golle +--- + drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_ppe.c ++++ b/drivers/net/ethernet/mediatek/mtk_ppe.c +@@ -547,7 +547,7 @@ __mtk_foe_entry_commit(struct mtk_ppe *p + } + + hwe = mtk_foe_get_entry(ppe, hash); +- memcpy(&hwe->data, &entry->data, eth->soc->foe_entry_size); ++ memcpy(&hwe->data, &entry->data, eth->soc->foe_entry_size - sizeof(hwe->ib1)); + wmb(); + hwe->ib1 = entry->ib1; + diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index 49c6ea1c03..670c2b04a8 100644 --- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2789,8 +2789,8 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -2802,8 +2802,8 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -2802,8 +2802,8 @@ static irqreturn_t mtk_handle_irq_tx(int +@@ -2815,8 +2815,8 @@ static irqreturn_t mtk_handle_irq_tx(int eth->tx_events++; if (likely(napi_schedule_prep(ð->tx_napi))) { @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -4074,6 +4074,8 @@ static int mtk_probe(struct platform_dev +@@ -4114,6 +4114,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-5.15/781-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch b/target/linux/generic/pending-5.15/781-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch new file mode 100644 index 0000000000..65845ea4c6 --- /dev/null +++ b/target/linux/generic/pending-5.15/781-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch @@ -0,0 +1,45 @@ +From 8743af8a77dd909970462ca578358128cce5d027 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Tue, 27 Sep 2022 15:39:39 +0100 +Subject: [PATCH] net: ethernet: mtk_eth_soc: fix mask of + RX_DMA_GET_SPORT{,_V2} +To: linux-mediatek@lists.infradead.org, + netdev@vger.kernel.org, + Lorenzo Bianconi +Cc: Sujuan Chen , + Bo Jiao , + Felix Fietkau , + John Crispin , + Sean Wang , + Mark Lee , + David S. Miller , + Eric Dumazet , + Jakub Kicinski , + Paolo Abeni , + Matthias Brugger , + Chen Minqiang + +The bitmasks applied in RX_DMA_GET_SPORT and RX_DMA_GET_SPORT_V2 macros +were swapped. Fix that. + +Reported-by: Chen Minqiang +Fixes: 160d3a9b192985 ("net: ethernet: mtk_eth_soc: introduce MTK_NETSYS_V2 support") +Acked-by: Lorenzo Bianconi +Signed-off-by: Daniel Golle +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -315,8 +315,8 @@ + #define MTK_RXD5_PPE_CPU_REASON GENMASK(22, 18) + #define MTK_RXD5_SRC_PORT GENMASK(29, 26) + +-#define RX_DMA_GET_SPORT(x) (((x) >> 19) & 0xf) +-#define RX_DMA_GET_SPORT_V2(x) (((x) >> 26) & 0x7) ++#define RX_DMA_GET_SPORT(x) (((x) >> 19) & 0x7) ++#define RX_DMA_GET_SPORT_V2(x) (((x) >> 26) & 0xf) + + /* PDMA V2 descriptor rxd3 */ + #define RX_DMA_VTAG_V2 BIT(0) diff --git a/target/linux/generic/pending-5.15/793-net-ethernet-mtk_eth_soc-fix-typo-in-__mtk_foe_entry.patch b/target/linux/generic/pending-5.15/793-net-ethernet-mtk_eth_soc-fix-typo-in-__mtk_foe_entry.patch deleted file mode 100644 index 77daf6c8bf..0000000000 --- a/target/linux/generic/pending-5.15/793-net-ethernet-mtk_eth_soc-fix-typo-in-__mtk_foe_entry.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 12ff69304c83c679ca01ef3db963ab0db9de19fb Mon Sep 17 00:00:00 2001 -Message-Id: <12ff69304c83c679ca01ef3db963ab0db9de19fb.1662332102.git.lorenzo@kernel.org> -In-Reply-To: <2a60545635c2705312299384f4e9fec2f2a3acd6.1662332102.git.lorenzo@kernel.org> -References: <2a60545635c2705312299384f4e9fec2f2a3acd6.1662332102.git.lorenzo@kernel.org> -From: Lorenzo Bianconi -Date: Mon, 5 Sep 2022 00:43:43 +0200 -Subject: [PATCH net-next 2/6] net: ethernet: mtk_eth_soc: fix typo in - __mtk_foe_entry_clear - -Set ib1 state to MTK_FOE_STATE_UNBIND in __mtk_foe_entry_clear routine. - -Signed-off-by: Lorenzo Bianconi ---- - drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/ethernet/mediatek/mtk_ppe.c -+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -413,7 +413,7 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp - struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, entry->hash); - - hwe->ib1 &= ~MTK_FOE_IB1_STATE; -- hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_BIND); -+ hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_UNBIND); - dma_wmb(); - } - entry->hash = 0xffff; -- 2.30.2