From 8d827ccc932f779b6706e1d6ec3d333f25e28e31 Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 13 Apr 2026 08:27:41 -0400 Subject: [PATCH] kernel: bump 6.12 to 6.12.81 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.81 Removed upstreamed: ramips/patches-6.12/100-mips-ralink-update-CPU-clock-index.patch[1] airoha/patches-6.12/135-v7.1-net-airoha-Add-missing-cleanup-bits-in-airoha_qdma_c.patch[2] Manually rebased: airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.81&id=e8fd60338545f4bc9c23d3d4686c88324aa76fb8 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.81&id=cce5027f9dc3a333ccbcd59a2c3ab2906bd08d30 Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/22913 [Modify airoha move patch] Signed-off-by: Hauke Mehrtens --- ....13-net-airoha-Implement-BQL-support.patch | 4 +- ...13-net-airoha-Simplify-Tx-napi-logic.patch | 6 +- ...e-Tx-drop-capability-for-each-Tx-DMA.patch | 2 +- ...-Introduce-ndo_select_queue-callback.patch | 4 +- ...airoha-Add-sched-ETS-offload-support.patch | 10 ++-- ...airoha-Add-sched-HTB-offload-support.patch | 8 +-- ...net-airoha-Enforce-ETS-Qdisc-priomap.patch | 4 +- ...x-TSO-support-for-header-cloned-skbs.patch | 6 +- ...oha-Reset-BQL-stopping-the-netdevice.patch | 4 +- ...airoha_eth-driver-in-a-dedicated-fol.patch | 40 +++++++++++-- ...iroha-Move-DSA-tag-in-DMA-descriptor.patch | 14 ++--- ...ble-support-for-multiple-net_devices.patch | 14 ++--- ...REG_GDM_FWD_CFG-initialization-in-ai.patch | 2 +- ...e-airoha_set_gdm_port_fwd_cfg-in-air.patch | 4 +- ...-Introduce-flowtable-offload-support.patch | 8 +-- ...airoha-Add-loopback-support-for-GDM2.patch | 2 +- ...min-max-packet-len-configuration-in-.patch | 4 +- ...-net-airoha-Enable-Rx-Scatter-Gather.patch | 2 +- ...oduce-airoha_dev_change_mtu-callback.patch | 4 +- ...able-TSO-Scatter-Gather-for-LAN-port.patch | 2 +- ...ev-dsa_ptr-check-in-airoha_get_dsa_t.patch | 2 +- ...id-report-in-airoha_tc_get_htb_get_l.patch | 2 +- ...et-airoha-Fix-ETS-priomap-validation.patch | 4 +- ...ate-egress-gdm-port-in-airoha_ppe_fo.patch | 2 +- ...-Add-matchall-filter-offload-support.patch | 6 +- ...oha-Introduce-airoha_irq_bank-struct.patch | 18 +++--- ...e-multiple-IRQ-lines-support-in-airo.patch | 6 +- ...t-store-hfwd-references-in-airoha_qd.patch | 2 +- ...he-capability-to-allocate-hwfd-buffe.patch | 4 +- ...he-capability-to-allocate-hfwd-descr.patch | 2 +- ...n-error-handling-path-in-airoha_allo.patch | 2 +- ...te-number-of-descriptors-according-t.patch | 8 +-- ...rentiate-hwfd-buffer-size-for-QDMA0-.patch | 6 +- ...Add-airoha_ppe_dev-struct-definition.patch | 2 +- ...-channel-configuration-for-ETS-Qdisc.patch | 2 +- ...oopback-mode-configuration-for-GDM2-.patch | 2 +- ...issing-stats-to-ethtool_eth_mac_stat.patch | 2 +- ...airoha-Add-get_link-ethtool-callback.patch | 2 +- ...into-account-out-of-order-tx-complet.patch | 4 +- ...iroha-Add-airoha_eth_soc_data-struct.patch | 10 ++-- ...alize-airoha_ppe2_is_enabled-routine.patch | 2 +- ...t-default-ppe-cpu-port-in-airoha_dev.patch | 4 +- ...tor-src-port-configuration-in-airhoh.patch | 8 +-- ...19-net-airoha-Add-AN7583-SoC-support.patch | 16 +++--- ...ve-code-duplication-in-airoha_regs.h.patch | 2 +- ...n-error-handling-path-in-airoha_prob.patch | 2 +- ...ha-Fix-a-copy-and-paste-bug-in-probe.patch | 2 +- ...he-capability-to-consume-out-of-orde.patch | 26 ++++----- ...net_devs-registration-in-a-dedicated.patch | 6 +- ...dm-port-enum-value-whenever-possible.patch | 10 ++-- ...-airoha-implement-get_link_ksettings.patch | 2 +- ...-__field_prep-for-non-constant-masks.patch | 6 +- ...flow-control-source-port-mapping-dep.patch | 2 +- ...GDM-forward-port-configuration-in-nd.patch | 12 ++-- ...t-QDMA-block-according-LAN-WAN-confi.patch | 16 +++--- ...-PPE-default-cput-port-in-airoha_ppe.patch | 6 +- ...k-the-code-flow-in-airoha_remove-and.patch | 14 ++--- ...-offloading-until-all-net_devices-ar.patch | 2 +- ...issing-cleanup-bits-in-airoha_qdma_c.patch | 57 ------------------- .../900-unaligned_access_hacks.patch | 2 +- ...ci_sync-Add-fallback-bd-address-prop.patch | 4 +- ...th-hci_sync-Fix-crash-on-NULL-parent.patch | 2 +- ...528-drm-Increase-plane_mask-to-64bit.patch | 2 +- .../721-net-add-packet-mangeling.patch | 6 +- target/linux/generic/kernel-6.12 | 4 +- ...malloc-tlb_vpn-array-to-avoid-stack-.patch | 2 +- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 28 ++++----- ...0211_ptr-even-with-no-CFG82111-suppo.patch | 2 +- ...iatek-fix-ppe-flow-accounting-for-L2.patch | 2 +- ...k-for-QINIYEK-BJ-SFP-10G-T-copper-SF.patch | 2 +- ...Fix-DMA-allocations-on-57766-devices.patch | 2 +- 71 files changed, 230 insertions(+), 255 deletions(-) delete mode 100644 target/linux/airoha/patches-6.12/135-v7.1-net-airoha-Add-missing-cleanup-bits-in-airoha_qdma_c.patch diff --git a/target/linux/airoha/patches-6.12/017-v6.13-net-airoha-Implement-BQL-support.patch b/target/linux/airoha/patches-6.12/017-v6.13-net-airoha-Implement-BQL-support.patch index dd432007ba..ce169f699d 100644 --- a/target/linux/airoha/patches-6.12/017-v6.13-net-airoha-Implement-BQL-support.patch +++ b/target/linux/airoha/patches-6.12/017-v6.13-net-airoha-Implement-BQL-support.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c -@@ -1713,9 +1713,11 @@ static int airoha_qdma_tx_napi_poll(stru +@@ -1729,9 +1729,11 @@ static int airoha_qdma_tx_napi_poll(stru WRITE_ONCE(desc->msg1, 0); if (skb) { @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski if (netif_tx_queue_stopped(txq) && q->ndesc - q->queued >= q->free_thr) netif_tx_wake_queue(txq); -@@ -2494,7 +2496,9 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -2510,7 +2512,9 @@ static netdev_tx_t airoha_dev_xmit(struc q->queued += i; skb_tx_timestamp(skb); diff --git a/target/linux/airoha/patches-6.12/031-02-v6.13-net-airoha-Simplify-Tx-napi-logic.patch b/target/linux/airoha/patches-6.12/031-02-v6.13-net-airoha-Simplify-Tx-napi-logic.patch index 04b10f39cb..1c9662bdde 100644 --- a/target/linux/airoha/patches-6.12/031-02-v6.13-net-airoha-Simplify-Tx-napi-logic.patch +++ b/target/linux/airoha/patches-6.12/031-02-v6.13-net-airoha-Simplify-Tx-napi-logic.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c -@@ -1669,8 +1669,12 @@ static int airoha_qdma_tx_napi_poll(stru +@@ -1685,8 +1685,12 @@ static int airoha_qdma_tx_napi_poll(stru irq_queued = FIELD_GET(IRQ_ENTRY_LEN_MASK, status); while (irq_queued > 0 && done < budget) { @@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski if (val == 0xff) break; -@@ -1680,9 +1684,7 @@ static int airoha_qdma_tx_napi_poll(stru +@@ -1696,9 +1700,7 @@ static int airoha_qdma_tx_napi_poll(stru irq_queued--; done++; @@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski if (qid >= ARRAY_SIZE(qdma->q_tx)) continue; -@@ -1690,46 +1692,53 @@ static int airoha_qdma_tx_napi_poll(stru +@@ -1706,46 +1708,53 @@ static int airoha_qdma_tx_napi_poll(stru if (!q->ndesc) continue; diff --git a/target/linux/airoha/patches-6.12/038-01-v6.14-net-airoha-Enable-Tx-drop-capability-for-each-Tx-DMA.patch b/target/linux/airoha/patches-6.12/038-01-v6.14-net-airoha-Enable-Tx-drop-capability-for-each-Tx-DMA.patch index b6bbcf3191..67b42b1f6d 100644 --- a/target/linux/airoha/patches-6.12/038-01-v6.14-net-airoha-Enable-Tx-drop-capability-for-each-Tx-DMA.patch +++ b/target/linux/airoha/patches-6.12/038-01-v6.14-net-airoha-Enable-Tx-drop-capability-for-each-Tx-DMA.patch @@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c -@@ -1789,6 +1789,10 @@ static int airoha_qdma_init_tx_queue(str +@@ -1805,6 +1805,10 @@ static int airoha_qdma_init_tx_queue(str WRITE_ONCE(q->desc[i].ctrl, cpu_to_le32(val)); } diff --git a/target/linux/airoha/patches-6.12/038-02-v6.14-net-airoha-Introduce-ndo_select_queue-callback.patch b/target/linux/airoha/patches-6.12/038-02-v6.14-net-airoha-Introduce-ndo_select_queue-callback.patch index f150dd929a..d48a2d0690 100644 --- a/target/linux/airoha/patches-6.12/038-02-v6.14-net-airoha-Introduce-ndo_select_queue-callback.patch +++ b/target/linux/airoha/patches-6.12/038-02-v6.14-net-airoha-Introduce-ndo_select_queue-callback.patch @@ -29,7 +29,7 @@ Signed-off-by: Paolo Abeni #define AIROHA_NUM_TX_RING 32 #define AIROHA_NUM_RX_RING 32 #define AIROHA_FE_MC_MAX_VLAN_TABLE 64 -@@ -2421,21 +2423,44 @@ static void airoha_dev_get_stats64(struc +@@ -2437,21 +2439,44 @@ static void airoha_dev_get_stats64(struc } while (u64_stats_fetch_retry(&port->stats.syncp, start)); } @@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni if (skb->ip_summed == CHECKSUM_PARTIAL) msg0 |= FIELD_PREP(QDMA_ETH_TXMSG_TCO_MASK, 1) | FIELD_PREP(QDMA_ETH_TXMSG_UCO_MASK, 1) | -@@ -2609,6 +2634,7 @@ static const struct net_device_ops airoh +@@ -2625,6 +2650,7 @@ static const struct net_device_ops airoh .ndo_init = airoha_dev_init, .ndo_open = airoha_dev_open, .ndo_stop = airoha_dev_stop, diff --git a/target/linux/airoha/patches-6.12/038-03-v6.14-net-airoha-Add-sched-ETS-offload-support.patch b/target/linux/airoha/patches-6.12/038-03-v6.14-net-airoha-Add-sched-ETS-offload-support.patch index 4ea0742377..06c4c1235c 100644 --- a/target/linux/airoha/patches-6.12/038-03-v6.14-net-airoha-Add-sched-ETS-offload-support.patch +++ b/target/linux/airoha/patches-6.12/038-03-v6.14-net-airoha-Add-sched-ETS-offload-support.patch @@ -100,7 +100,7 @@ Signed-off-by: Paolo Abeni }; struct airoha_eth { -@@ -1961,6 +2002,27 @@ static void airoha_qdma_init_qos(struct +@@ -1977,6 +2018,27 @@ static void airoha_qdma_init_qos(struct FIELD_PREP(SLA_SLOW_TICK_RATIO_MASK, 40)); } @@ -128,7 +128,7 @@ Signed-off-by: Paolo Abeni static int airoha_qdma_hw_init(struct airoha_qdma *qdma) { int i; -@@ -2011,6 +2073,7 @@ static int airoha_qdma_hw_init(struct ai +@@ -2027,6 +2089,7 @@ static int airoha_qdma_hw_init(struct ai airoha_qdma_set(qdma, REG_TXQ_CNGST_CFG, TXQ_CNGST_DROP_EN | TXQ_CNGST_DEI_DROP_EN); @@ -136,7 +136,7 @@ Signed-off-by: Paolo Abeni return 0; } -@@ -2630,6 +2693,135 @@ airoha_ethtool_get_rmon_stats(struct net +@@ -2646,6 +2709,135 @@ airoha_ethtool_get_rmon_stats(struct net } while (u64_stats_fetch_retry(&port->stats.syncp, start)); } @@ -272,7 +272,7 @@ Signed-off-by: Paolo Abeni static const struct net_device_ops airoha_netdev_ops = { .ndo_init = airoha_dev_init, .ndo_open = airoha_dev_open, -@@ -2638,6 +2830,7 @@ static const struct net_device_ops airoh +@@ -2654,6 +2846,7 @@ static const struct net_device_ops airoh .ndo_start_xmit = airoha_dev_xmit, .ndo_get_stats64 = airoha_dev_get_stats64, .ndo_set_mac_address = airoha_dev_set_macaddr, @@ -280,7 +280,7 @@ Signed-off-by: Paolo Abeni }; static const struct ethtool_ops airoha_ethtool_ops = { -@@ -2687,7 +2880,8 @@ static int airoha_alloc_gdm_port(struct +@@ -2703,7 +2896,8 @@ static int airoha_alloc_gdm_port(struct dev->watchdog_timeo = 5 * HZ; dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM | NETIF_F_TSO6 | NETIF_F_IPV6_CSUM | diff --git a/target/linux/airoha/patches-6.12/038-04-v6.14-net-airoha-Add-sched-HTB-offload-support.patch b/target/linux/airoha/patches-6.12/038-04-v6.14-net-airoha-Add-sched-HTB-offload-support.patch index 4240a89952..c42220587f 100644 --- a/target/linux/airoha/patches-6.12/038-04-v6.14-net-airoha-Add-sched-HTB-offload-support.patch +++ b/target/linux/airoha/patches-6.12/038-04-v6.14-net-airoha-Add-sched-HTB-offload-support.patch @@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni /* qos stats counters */ u64 cpu_tx_packets; u64 fwd_tx_packets; -@@ -2809,6 +2850,243 @@ static int airoha_tc_setup_qdisc_ets(str +@@ -2825,6 +2866,243 @@ static int airoha_tc_setup_qdisc_ets(str } } @@ -338,7 +338,7 @@ Signed-off-by: Paolo Abeni static int airoha_dev_tc_setup(struct net_device *dev, enum tc_setup_type type, void *type_data) { -@@ -2817,6 +3095,8 @@ static int airoha_dev_tc_setup(struct ne +@@ -2833,6 +3111,8 @@ static int airoha_dev_tc_setup(struct ne switch (type) { case TC_SETUP_QDISC_ETS: return airoha_tc_setup_qdisc_ets(port, type_data); @@ -347,7 +347,7 @@ Signed-off-by: Paolo Abeni default: return -EOPNOTSUPP; } -@@ -2867,7 +3147,8 @@ static int airoha_alloc_gdm_port(struct +@@ -2883,7 +3163,8 @@ static int airoha_alloc_gdm_port(struct } dev = devm_alloc_etherdev_mqs(eth->dev, sizeof(*port), @@ -357,7 +357,7 @@ Signed-off-by: Paolo Abeni if (!dev) { dev_err(eth->dev, "alloc_etherdev failed\n"); return -ENOMEM; -@@ -2887,6 +3168,11 @@ static int airoha_alloc_gdm_port(struct +@@ -2903,6 +3184,11 @@ static int airoha_alloc_gdm_port(struct dev->irq = qdma->irq; SET_NETDEV_DEV(dev, eth->dev); diff --git a/target/linux/airoha/patches-6.12/039-v6.14-net-airoha-Enforce-ETS-Qdisc-priomap.patch b/target/linux/airoha/patches-6.12/039-v6.14-net-airoha-Enforce-ETS-Qdisc-priomap.patch index 151865b89c..29a914a8dd 100644 --- a/target/linux/airoha/patches-6.12/039-v6.14-net-airoha-Enforce-ETS-Qdisc-priomap.patch +++ b/target/linux/airoha/patches-6.12/039-v6.14-net-airoha-Enforce-ETS-Qdisc-priomap.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c -@@ -2785,7 +2785,7 @@ static int airoha_qdma_set_tx_ets_sched( +@@ -2801,7 +2801,7 @@ static int airoha_qdma_set_tx_ets_sched( struct tc_ets_qopt_offload_replace_params *p = &opt->replace_params; enum tx_sched_mode mode = TC_SCH_SP; u16 w[AIROHA_NUM_QOS_QUEUES] = {}; @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski if (p->bands > AIROHA_NUM_QOS_QUEUES) return -EINVAL; -@@ -2799,7 +2799,20 @@ static int airoha_qdma_set_tx_ets_sched( +@@ -2815,7 +2815,20 @@ static int airoha_qdma_set_tx_ets_sched( if (nstrict == AIROHA_NUM_QOS_QUEUES - 1) return -EINVAL; diff --git a/target/linux/airoha/patches-6.12/046-v6.15-net-airoha-Fix-TSO-support-for-header-cloned-skbs.patch b/target/linux/airoha/patches-6.12/046-v6.15-net-airoha-Fix-TSO-support-for-header-cloned-skbs.patch index 376973b56b..48d7869637 100644 --- a/target/linux/airoha/patches-6.12/046-v6.15-net-airoha-Fix-TSO-support-for-header-cloned-skbs.patch +++ b/target/linux/airoha/patches-6.12/046-v6.15-net-airoha-Fix-TSO-support-for-header-cloned-skbs.patch @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c -@@ -2548,11 +2548,10 @@ static u16 airoha_dev_select_queue(struc +@@ -2564,11 +2564,10 @@ static u16 airoha_dev_select_queue(struc static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb, struct net_device *dev) { @@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski struct netdev_queue *txq; struct airoha_queue *q; void *data = skb->data; -@@ -2575,8 +2574,9 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -2591,8 +2590,9 @@ static netdev_tx_t airoha_dev_xmit(struc if (skb_cow_head(skb, 0)) goto error; @@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski tcp_hdr(skb)->check = (__force __sum16)csum; msg0 |= FIELD_PREP(QDMA_ETH_TXMSG_TSO_MASK, 1); -@@ -2605,7 +2605,7 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -2621,7 +2621,7 @@ static netdev_tx_t airoha_dev_xmit(struc for (i = 0; i < nr_frags; i++) { struct airoha_qdma_desc *desc = &q->desc[index]; struct airoha_queue_entry *e = &q->entry[index]; diff --git a/target/linux/airoha/patches-6.12/047-v6.13-net-airoha-Reset-BQL-stopping-the-netdevice.patch b/target/linux/airoha/patches-6.12/047-v6.13-net-airoha-Reset-BQL-stopping-the-netdevice.patch index 228ca7a9fa..d99b6c076e 100644 --- a/target/linux/airoha/patches-6.12/047-v6.13-net-airoha-Reset-BQL-stopping-the-netdevice.patch +++ b/target/linux/airoha/patches-6.12/047-v6.13-net-airoha-Reset-BQL-stopping-the-netdevice.patch @@ -16,7 +16,7 @@ Signed-off-by: Andrew Lunn --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c -@@ -2468,7 +2468,7 @@ static int airoha_dev_stop(struct net_de +@@ -2484,7 +2484,7 @@ static int airoha_dev_stop(struct net_de { struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_qdma *qdma = port->qdma; @@ -25,7 +25,7 @@ Signed-off-by: Andrew Lunn netif_tx_disable(dev); err = airoha_set_gdm_ports(qdma->eth, false); -@@ -2479,6 +2479,14 @@ static int airoha_dev_stop(struct net_de +@@ -2495,6 +2495,14 @@ static int airoha_dev_stop(struct net_de GLOBAL_CFG_TX_DMA_EN_MASK | GLOBAL_CFG_RX_DMA_EN_MASK); diff --git a/target/linux/airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch b/target/linux/airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch index 9b9a054839..e32dc271f3 100644 --- a/target/linux/airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch +++ b/target/linux/airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch @@ -101,7 +101,7 @@ Signed-off-by: Paolo Abeni -obj-$(CONFIG_NET_AIROHA) += airoha_eth.o --- /dev/null +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -0,0 +1,3357 @@ +@@ -0,0 +1,3373 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2024 AIROHA Inc @@ -1804,18 +1804,34 @@ Signed-off-by: Paolo Abeni + +static void airoha_qdma_cleanup_rx_queue(struct airoha_queue *q) +{ -+ struct airoha_eth *eth = q->qdma->eth; ++ struct airoha_qdma *qdma = q->qdma; ++ struct airoha_eth *eth = qdma->eth; ++ int qid = q - &qdma->q_rx[0]; + + while (q->queued) { + struct airoha_queue_entry *e = &q->entry[q->tail]; ++ struct airoha_qdma_desc *desc = &q->desc[q->tail]; + struct page *page = virt_to_head_page(e->buf); + + dma_sync_single_for_cpu(eth->dev, e->dma_addr, e->dma_len, + page_pool_get_dma_dir(q->page_pool)); + page_pool_put_full_page(q->page_pool, page, false); ++ /* Reset DMA descriptor */ ++ WRITE_ONCE(desc->ctrl, 0); ++ WRITE_ONCE(desc->addr, 0); ++ WRITE_ONCE(desc->data, 0); ++ WRITE_ONCE(desc->msg0, 0); ++ WRITE_ONCE(desc->msg1, 0); ++ WRITE_ONCE(desc->msg2, 0); ++ WRITE_ONCE(desc->msg3, 0); ++ + q->tail = (q->tail + 1) % q->ndesc; + q->queued--; + } ++ ++ q->head = q->tail; ++ airoha_qdma_rmw(qdma, REG_RX_DMA_IDX(qid), RX_RING_DMA_IDX_MASK, ++ FIELD_PREP(RX_RING_DMA_IDX_MASK, q->tail)); +} + +static int airoha_qdma_init_rx(struct airoha_qdma *qdma) @@ -3461,7 +3477,7 @@ Signed-off-by: Paolo Abeni +MODULE_DESCRIPTION("Ethernet driver for Airoha SoC"); --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ /dev/null -@@ -1,3357 +0,0 @@ +@@ -1,3373 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Copyright (c) 2024 AIROHA Inc @@ -5164,18 +5180,34 @@ Signed-off-by: Paolo Abeni - -static void airoha_qdma_cleanup_rx_queue(struct airoha_queue *q) -{ -- struct airoha_eth *eth = q->qdma->eth; +- struct airoha_qdma *qdma = q->qdma; +- struct airoha_eth *eth = qdma->eth; +- int qid = q - &qdma->q_rx[0]; - - while (q->queued) { - struct airoha_queue_entry *e = &q->entry[q->tail]; +- struct airoha_qdma_desc *desc = &q->desc[q->tail]; - struct page *page = virt_to_head_page(e->buf); - - dma_sync_single_for_cpu(eth->dev, e->dma_addr, e->dma_len, - page_pool_get_dma_dir(q->page_pool)); - page_pool_put_full_page(q->page_pool, page, false); +- /* Reset DMA descriptor */ +- WRITE_ONCE(desc->ctrl, 0); +- WRITE_ONCE(desc->addr, 0); +- WRITE_ONCE(desc->data, 0); +- WRITE_ONCE(desc->msg0, 0); +- WRITE_ONCE(desc->msg1, 0); +- WRITE_ONCE(desc->msg2, 0); +- WRITE_ONCE(desc->msg3, 0); +- - q->tail = (q->tail + 1) % q->ndesc; - q->queued--; - } +- +- q->head = q->tail; +- airoha_qdma_rmw(qdma, REG_RX_DMA_IDX(qid), RX_RING_DMA_IDX_MASK, +- FIELD_PREP(RX_RING_DMA_IDX_MASK, q->tail)); -} - -static int airoha_qdma_init_rx(struct airoha_qdma *qdma) diff --git a/target/linux/airoha/patches-6.12/048-05-v6.15-net-airoha-Move-DSA-tag-in-DMA-descriptor.patch b/target/linux/airoha/patches-6.12/048-05-v6.15-net-airoha-Move-DSA-tag-in-DMA-descriptor.patch index 4bd450ba4a..9552ef7937 100644 --- a/target/linux/airoha/patches-6.12/048-05-v6.15-net-airoha-Move-DSA-tag-in-DMA-descriptor.patch +++ b/target/linux/airoha/patches-6.12/048-05-v6.15-net-airoha-Move-DSA-tag-in-DMA-descriptor.patch @@ -74,7 +74,7 @@ Signed-off-by: Paolo Abeni napi_gro_receive(&q->napi, skb); done++; -@@ -1636,25 +1655,76 @@ static u16 airoha_dev_select_queue(struc +@@ -1652,25 +1671,76 @@ static u16 airoha_dev_select_queue(struc return queue < dev->num_tx_queues ? queue : 0; } @@ -155,7 +155,7 @@ Signed-off-by: Paolo Abeni if (skb->ip_summed == CHECKSUM_PARTIAL) msg0 |= FIELD_PREP(QDMA_ETH_TXMSG_TCO_MASK, 1) | FIELD_PREP(QDMA_ETH_TXMSG_UCO_MASK, 1) | -@@ -1685,6 +1755,8 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -1701,6 +1771,8 @@ static netdev_tx_t airoha_dev_xmit(struc spin_lock_bh(&q->lock); txq = netdev_get_tx_queue(dev, qid); @@ -164,7 +164,7 @@ Signed-off-by: Paolo Abeni if (q->queued + nr_frags > q->ndesc) { /* not enough space in the queue */ netif_tx_stop_queue(txq); -@@ -1692,7 +1764,10 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -1708,7 +1780,10 @@ static netdev_tx_t airoha_dev_xmit(struc return NETDEV_TX_BUSY; } @@ -175,7 +175,7 @@ Signed-off-by: Paolo Abeni for (i = 0; i < nr_frags; i++) { struct airoha_qdma_desc *desc = &q->desc[index]; struct airoha_queue_entry *e = &q->entry[index]; -@@ -2223,6 +2298,37 @@ static const struct ethtool_ops airoha_e +@@ -2239,6 +2314,37 @@ static const struct ethtool_ops airoha_e .get_rmon_stats = airoha_ethtool_get_rmon_stats, }; @@ -213,7 +213,7 @@ Signed-off-by: Paolo Abeni static int airoha_alloc_gdm_port(struct airoha_eth *eth, struct device_node *np) { const __be32 *id_ptr = of_get_property(np, "reg", NULL); -@@ -2295,6 +2401,10 @@ static int airoha_alloc_gdm_port(struct +@@ -2311,6 +2417,10 @@ static int airoha_alloc_gdm_port(struct port->id = id; eth->ports[index] = port; @@ -224,7 +224,7 @@ Signed-off-by: Paolo Abeni return register_netdev(dev); } -@@ -2387,8 +2497,10 @@ error_hw_cleanup: +@@ -2403,8 +2513,10 @@ error_hw_cleanup: for (i = 0; i < ARRAY_SIZE(eth->ports); i++) { struct airoha_gdm_port *port = eth->ports[i]; @@ -236,7 +236,7 @@ Signed-off-by: Paolo Abeni } free_netdev(eth->napi_dev); platform_set_drvdata(pdev, NULL); -@@ -2413,6 +2525,7 @@ static void airoha_remove(struct platfor +@@ -2429,6 +2541,7 @@ static void airoha_remove(struct platfor continue; unregister_netdev(port->dev); diff --git a/target/linux/airoha/patches-6.12/048-07-v6.15-net-airoha-Enable-support-for-multiple-net_devices.patch b/target/linux/airoha/patches-6.12/048-07-v6.15-net-airoha-Enable-support-for-multiple-net_devices.patch index 4b78255ba3..6d2e47d7c8 100644 --- a/target/linux/airoha/patches-6.12/048-07-v6.15-net-airoha-Enable-support-for-multiple-net_devices.patch +++ b/target/linux/airoha/patches-6.12/048-07-v6.15-net-airoha-Enable-support-for-multiple-net_devices.patch @@ -25,7 +25,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1562,6 +1562,7 @@ static int airoha_dev_open(struct net_de +@@ -1578,6 +1578,7 @@ static int airoha_dev_open(struct net_de airoha_qdma_set(qdma, REG_QDMA_GLOBAL_CFG, GLOBAL_CFG_TX_DMA_EN_MASK | GLOBAL_CFG_RX_DMA_EN_MASK); @@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni return 0; } -@@ -1577,16 +1578,20 @@ static int airoha_dev_stop(struct net_de +@@ -1593,16 +1594,20 @@ static int airoha_dev_stop(struct net_de if (err) return err; @@ -62,7 +62,7 @@ Signed-off-by: Paolo Abeni } return 0; -@@ -2329,13 +2334,14 @@ static void airoha_metadata_dst_free(str +@@ -2345,13 +2350,14 @@ static void airoha_metadata_dst_free(str } } @@ -79,7 +79,7 @@ Signed-off-by: Paolo Abeni u32 id; if (!id_ptr) { -@@ -2344,14 +2350,14 @@ static int airoha_alloc_gdm_port(struct +@@ -2360,14 +2366,14 @@ static int airoha_alloc_gdm_port(struct } id = be32_to_cpup(id_ptr); @@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni dev_err(eth->dev, "duplicate gdm port id: %d\n", id); return -EINVAL; } -@@ -2399,7 +2405,7 @@ static int airoha_alloc_gdm_port(struct +@@ -2415,7 +2421,7 @@ static int airoha_alloc_gdm_port(struct port->qdma = qdma; port->dev = dev; port->id = id; @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni err = airoha_metadata_dst_alloc(port); if (err) -@@ -2471,6 +2477,7 @@ static int airoha_probe(struct platform_ +@@ -2487,6 +2493,7 @@ static int airoha_probe(struct platform_ for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) airoha_qdma_start_napi(ð->qdma[i]); @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni for_each_child_of_node(pdev->dev.of_node, np) { if (!of_device_is_compatible(np, "airoha,eth-mac")) continue; -@@ -2478,7 +2485,7 @@ static int airoha_probe(struct platform_ +@@ -2494,7 +2501,7 @@ static int airoha_probe(struct platform_ if (!of_device_is_available(np)) continue; diff --git a/target/linux/airoha/patches-6.12/048-08-v6.15-net-airoha-Move-REG_GDM_FWD_CFG-initialization-in-ai.patch b/target/linux/airoha/patches-6.12/048-08-v6.15-net-airoha-Move-REG_GDM_FWD_CFG-initialization-in-ai.patch index c4079f45d4..6d05cd067d 100644 --- a/target/linux/airoha/patches-6.12/048-08-v6.15-net-airoha-Move-REG_GDM_FWD_CFG-initialization-in-ai.patch +++ b/target/linux/airoha/patches-6.12/048-08-v6.15-net-airoha-Move-REG_GDM_FWD_CFG-initialization-in-ai.patch @@ -63,7 +63,7 @@ Signed-off-by: Paolo Abeni airoha_fe_rmw(eth, REG_GDM_LEN_CFG(p), GDM_SHORT_LEN_MASK | GDM_LONG_LEN_MASK, FIELD_PREP(GDM_SHORT_LEN_MASK, 60) | -@@ -1614,8 +1605,11 @@ static int airoha_dev_set_macaddr(struct +@@ -1630,8 +1621,11 @@ static int airoha_dev_set_macaddr(struct static int airoha_dev_init(struct net_device *dev) { struct airoha_gdm_port *port = netdev_priv(dev); diff --git a/target/linux/airoha/patches-6.12/048-09-v6.15-net-airoha-Rename-airoha_set_gdm_port_fwd_cfg-in-air.patch b/target/linux/airoha/patches-6.12/048-09-v6.15-net-airoha-Rename-airoha_set_gdm_port_fwd_cfg-in-air.patch index 3edeacfbd0..153a10ad48 100644 --- a/target/linux/airoha/patches-6.12/048-09-v6.15-net-airoha-Rename-airoha_set_gdm_port_fwd_cfg-in-air.patch +++ b/target/linux/airoha/patches-6.12/048-09-v6.15-net-airoha-Rename-airoha_set_gdm_port_fwd_cfg-in-air.patch @@ -83,7 +83,7 @@ Signed-off-by: Paolo Abeni static void airoha_fe_maccr_init(struct airoha_eth *eth) { int p; -@@ -1539,7 +1512,7 @@ static int airoha_dev_open(struct net_de +@@ -1555,7 +1528,7 @@ static int airoha_dev_open(struct net_de int err; netif_tx_start_all_queues(dev); @@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni if (err) return err; -@@ -1565,7 +1538,7 @@ static int airoha_dev_stop(struct net_de +@@ -1581,7 +1554,7 @@ static int airoha_dev_stop(struct net_de int i, err; netif_tx_disable(dev); diff --git a/target/linux/airoha/patches-6.12/048-13-v6.15-net-airoha-Introduce-flowtable-offload-support.patch b/target/linux/airoha/patches-6.12/048-13-v6.15-net-airoha-Introduce-flowtable-offload-support.patch index 7bafddc0e3..b0f16617f6 100644 --- a/target/linux/airoha/patches-6.12/048-13-v6.15-net-airoha-Introduce-flowtable-offload-support.patch +++ b/target/linux/airoha/patches-6.12/048-13-v6.15-net-airoha-Introduce-flowtable-offload-support.patch @@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni napi_gro_receive(&q->napi, skb); done++; -@@ -1301,6 +1310,10 @@ static int airoha_hw_init(struct platfor +@@ -1317,6 +1326,10 @@ static int airoha_hw_init(struct platfor return err; } @@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni set_bit(DEV_STATE_INITIALIZED, ð->state); return 0; -@@ -2165,6 +2178,47 @@ static int airoha_tc_htb_alloc_leaf_queu +@@ -2181,6 +2194,47 @@ static int airoha_tc_htb_alloc_leaf_queu return 0; } @@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni static void airoha_tc_remove_htb_queue(struct airoha_gdm_port *port, int queue) { struct net_device *dev = port->dev; -@@ -2248,6 +2302,9 @@ static int airoha_dev_tc_setup(struct ne +@@ -2264,6 +2318,9 @@ static int airoha_dev_tc_setup(struct ne return airoha_tc_setup_qdisc_ets(port, type_data); case TC_SETUP_QDISC_HTB: return airoha_tc_setup_qdisc_htb(port, type_data); @@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni default: return -EOPNOTSUPP; } -@@ -2503,6 +2560,7 @@ static void airoha_remove(struct platfor +@@ -2519,6 +2576,7 @@ static void airoha_remove(struct platfor } free_netdev(eth->napi_dev); diff --git a/target/linux/airoha/patches-6.12/048-14-v6.15-net-airoha-Add-loopback-support-for-GDM2.patch b/target/linux/airoha/patches-6.12/048-14-v6.15-net-airoha-Add-loopback-support-for-GDM2.patch index e91501eeb0..380c68c615 100644 --- a/target/linux/airoha/patches-6.12/048-14-v6.15-net-airoha-Add-loopback-support-for-GDM2.patch +++ b/target/linux/airoha/patches-6.12/048-14-v6.15-net-airoha-Add-loopback-support-for-GDM2.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1588,14 +1588,81 @@ static int airoha_dev_set_macaddr(struct +@@ -1604,14 +1604,81 @@ static int airoha_dev_set_macaddr(struct return 0; } diff --git a/target/linux/airoha/patches-6.12/063-01-v6.15-net-airoha-Move-min-max-packet-len-configuration-in-.patch b/target/linux/airoha/patches-6.12/063-01-v6.15-net-airoha-Move-min-max-packet-len-configuration-in-.patch index 2b8903d667..9a4090d6b0 100644 --- a/target/linux/airoha/patches-6.12/063-01-v6.15-net-airoha-Move-min-max-packet-len-configuration-in-.patch +++ b/target/linux/airoha/patches-6.12/063-01-v6.15-net-airoha-Move-min-max-packet-len-configuration-in-.patch @@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski airoha_fe_rmw(eth, REG_CDM1_VLAN_CTRL, CDM1_VLAN_MASK, FIELD_PREP(CDM1_VLAN_MASK, 0x8100)); -@@ -1520,9 +1515,9 @@ static void airoha_update_hw_stats(struc +@@ -1536,9 +1531,9 @@ static void airoha_update_hw_stats(struc static int airoha_dev_open(struct net_device *dev) { @@ -45,7 +45,7 @@ Signed-off-by: Jakub Kicinski netif_tx_start_all_queues(dev); err = airoha_set_vip_for_gdm_port(port, true); -@@ -1536,6 +1531,11 @@ static int airoha_dev_open(struct net_de +@@ -1552,6 +1547,11 @@ static int airoha_dev_open(struct net_de airoha_fe_clear(qdma->eth, REG_GDM_INGRESS_CFG(port->id), GDM_STAG_EN_MASK); diff --git a/target/linux/airoha/patches-6.12/063-02-v6.15-net-airoha-Enable-Rx-Scatter-Gather.patch b/target/linux/airoha/patches-6.12/063-02-v6.15-net-airoha-Enable-Rx-Scatter-Gather.patch index 073f8e89a4..be6ef75374 100644 --- a/target/linux/airoha/patches-6.12/063-02-v6.15-net-airoha-Enable-Rx-Scatter-Gather.patch +++ b/target/linux/airoha/patches-6.12/063-02-v6.15-net-airoha-Enable-Rx-Scatter-Gather.patch @@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski airoha_qdma_fill_rx_queue(q); -@@ -1161,7 +1178,6 @@ static int airoha_qdma_hw_init(struct ai +@@ -1177,7 +1194,6 @@ static int airoha_qdma_hw_init(struct ai } airoha_qdma_wr(qdma, REG_QDMA_GLOBAL_CFG, diff --git a/target/linux/airoha/patches-6.12/063-03-v6.15-net-airoha-Introduce-airoha_dev_change_mtu-callback.patch b/target/linux/airoha/patches-6.12/063-03-v6.15-net-airoha-Introduce-airoha_dev_change_mtu-callback.patch index a203ac2692..5dfffbd9e3 100644 --- a/target/linux/airoha/patches-6.12/063-03-v6.15-net-airoha-Introduce-airoha_dev_change_mtu-callback.patch +++ b/target/linux/airoha/patches-6.12/063-03-v6.15-net-airoha-Introduce-airoha_dev_change_mtu-callback.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1705,6 +1705,20 @@ static void airoha_dev_get_stats64(struc +@@ -1721,6 +1721,20 @@ static void airoha_dev_get_stats64(struc } while (u64_stats_fetch_retry(&port->stats.syncp, start)); } @@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski static u16 airoha_dev_select_queue(struct net_device *dev, struct sk_buff *skb, struct net_device *sb_dev) { -@@ -2397,6 +2411,7 @@ static const struct net_device_ops airoh +@@ -2413,6 +2427,7 @@ static const struct net_device_ops airoh .ndo_init = airoha_dev_init, .ndo_open = airoha_dev_open, .ndo_stop = airoha_dev_stop, diff --git a/target/linux/airoha/patches-6.12/063-06-v6.15-net-airoha-Enable-TSO-Scatter-Gather-for-LAN-port.patch b/target/linux/airoha/patches-6.12/063-06-v6.15-net-airoha-Enable-TSO-Scatter-Gather-for-LAN-port.patch index 76d82ee70e..b30f62d6a5 100644 --- a/target/linux/airoha/patches-6.12/063-06-v6.15-net-airoha-Enable-TSO-Scatter-Gather-for-LAN-port.patch +++ b/target/linux/airoha/patches-6.12/063-06-v6.15-net-airoha-Enable-TSO-Scatter-Gather-for-LAN-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2502,6 +2502,7 @@ static int airoha_alloc_gdm_port(struct +@@ -2518,6 +2518,7 @@ static int airoha_alloc_gdm_port(struct NETIF_F_SG | NETIF_F_TSO | NETIF_F_HW_TC; dev->features |= dev->hw_features; diff --git a/target/linux/airoha/patches-6.12/064-v6.15-net-airoha-Fix-dev-dsa_ptr-check-in-airoha_get_dsa_t.patch b/target/linux/airoha/patches-6.12/064-v6.15-net-airoha-Fix-dev-dsa_ptr-check-in-airoha_get_dsa_t.patch index f2b930d4a8..a795aca2f9 100644 --- a/target/linux/airoha/patches-6.12/064-v6.15-net-airoha-Fix-dev-dsa_ptr-check-in-airoha_get_dsa_t.patch +++ b/target/linux/airoha/patches-6.12/064-v6.15-net-airoha-Fix-dev-dsa_ptr-check-in-airoha_get_dsa_t.patch @@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1741,18 +1741,13 @@ static u32 airoha_get_dsa_tag(struct sk_ +@@ -1757,18 +1757,13 @@ static u32 airoha_get_dsa_tag(struct sk_ { #if IS_ENABLED(CONFIG_NET_DSA) struct ethhdr *ehdr; diff --git a/target/linux/airoha/patches-6.12/066-01-v6.15-net-airoha-Fix-qid-report-in-airoha_tc_get_htb_get_l.patch b/target/linux/airoha/patches-6.12/066-01-v6.15-net-airoha-Fix-qid-report-in-airoha_tc_get_htb_get_l.patch index b40e8222e1..708e79b457 100644 --- a/target/linux/airoha/patches-6.12/066-01-v6.15-net-airoha-Fix-qid-report-in-airoha_tc_get_htb_get_l.patch +++ b/target/linux/airoha/patches-6.12/066-01-v6.15-net-airoha-Fix-qid-report-in-airoha_tc_get_htb_get_l.patch @@ -66,7 +66,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2355,7 +2355,7 @@ static int airoha_tc_get_htb_get_leaf_qu +@@ -2371,7 +2371,7 @@ static int airoha_tc_get_htb_get_leaf_qu return -EINVAL; } diff --git a/target/linux/airoha/patches-6.12/066-02-v6.15-net-airoha-Fix-ETS-priomap-validation.patch b/target/linux/airoha/patches-6.12/066-02-v6.15-net-airoha-Fix-ETS-priomap-validation.patch index d7e4c66ba8..0395b75c12 100644 --- a/target/linux/airoha/patches-6.12/066-02-v6.15-net-airoha-Fix-ETS-priomap-validation.patch +++ b/target/linux/airoha/patches-6.12/066-02-v6.15-net-airoha-Fix-ETS-priomap-validation.patch @@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2028,7 +2028,7 @@ static int airoha_qdma_set_tx_ets_sched( +@@ -2044,7 +2044,7 @@ static int airoha_qdma_set_tx_ets_sched( struct tc_ets_qopt_offload_replace_params *p = &opt->replace_params; enum tx_sched_mode mode = TC_SCH_SP; u16 w[AIROHA_NUM_QOS_QUEUES] = {}; @@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski if (p->bands > AIROHA_NUM_QOS_QUEUES) return -EINVAL; -@@ -2046,17 +2046,17 @@ static int airoha_qdma_set_tx_ets_sched( +@@ -2062,17 +2062,17 @@ static int airoha_qdma_set_tx_ets_sched( * lowest priorities with respect to SP ones. * e.g: WRR0, WRR1, .., WRRm, SP0, SP1, .., SPn */ diff --git a/target/linux/airoha/patches-6.12/067-v6.15-net-airoha-Validate-egress-gdm-port-in-airoha_ppe_fo.patch b/target/linux/airoha/patches-6.12/067-v6.15-net-airoha-Validate-egress-gdm-port-in-airoha_ppe_fo.patch index 91f43f98b0..b15c79a040 100644 --- a/target/linux/airoha/patches-6.12/067-v6.15-net-airoha-Validate-egress-gdm-port-in-airoha_ppe_fo.patch +++ b/target/linux/airoha/patches-6.12/067-v6.15-net-airoha-Validate-egress-gdm-port-in-airoha_ppe_fo.patch @@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2451,6 +2451,19 @@ static void airoha_metadata_dst_free(str +@@ -2467,6 +2467,19 @@ static void airoha_metadata_dst_free(str } } diff --git a/target/linux/airoha/patches-6.12/069-v6.16-net-airoha-Add-matchall-filter-offload-support.patch b/target/linux/airoha/patches-6.12/069-v6.16-net-airoha-Add-matchall-filter-offload-support.patch index 4b8565aa6b..c72e728c07 100644 --- a/target/linux/airoha/patches-6.12/069-v6.16-net-airoha-Add-matchall-filter-offload-support.patch +++ b/target/linux/airoha/patches-6.12/069-v6.16-net-airoha-Add-matchall-filter-offload-support.patch @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni /* enable 1:N vlan action, init vlan table */ airoha_fe_set(eth, REG_MC_VLAN_EN, MC_VLAN_EN_MASK); -@@ -1631,7 +1650,6 @@ static void airhoha_set_gdm2_loopback(st +@@ -1647,7 +1666,6 @@ static void airhoha_set_gdm2_loopback(st if (port->id == 3) { /* FIXME: handle XSI_PCE1_PORT */ @@ -63,7 +63,7 @@ Signed-off-by: Paolo Abeni airoha_fe_rmw(eth, REG_FE_WAN_PORT, WAN1_EN_MASK | WAN1_MASK | WAN0_MASK, FIELD_PREP(WAN0_MASK, HSGMII_LAN_PCIE0_SRCPORT)); -@@ -2106,6 +2124,125 @@ static int airoha_tc_setup_qdisc_ets(str +@@ -2122,6 +2140,125 @@ static int airoha_tc_setup_qdisc_ets(str } } @@ -189,7 +189,7 @@ Signed-off-by: Paolo Abeni static int airoha_qdma_get_trtcm_param(struct airoha_qdma *qdma, int channel, u32 addr, enum trtcm_param_type param, enum trtcm_mode_type mode, -@@ -2270,10 +2407,142 @@ static int airoha_tc_htb_alloc_leaf_queu +@@ -2286,10 +2423,142 @@ static int airoha_tc_htb_alloc_leaf_queu return 0; } diff --git a/target/linux/airoha/patches-6.12/070-01-v6.16-net-airoha-Introduce-airoha_irq_bank-struct.patch b/target/linux/airoha/patches-6.12/070-01-v6.16-net-airoha-Introduce-airoha_irq_bank-struct.patch index 79fc513542..d036f6fe06 100644 --- a/target/linux/airoha/patches-6.12/070-01-v6.16-net-airoha-Introduce-airoha_irq_bank-struct.patch +++ b/target/linux/airoha/patches-6.12/070-01-v6.16-net-airoha-Introduce-airoha_irq_bank-struct.patch @@ -93,7 +93,7 @@ Signed-off-by: Jakub Kicinski RX_DONE_INT_MASK); return done; -@@ -944,7 +948,7 @@ unlock: +@@ -960,7 +964,7 @@ unlock: } if (done < budget && napi_complete(napi)) @@ -102,7 +102,7 @@ Signed-off-by: Jakub Kicinski TX_DONE_INT_MASK(id)); return done; -@@ -1175,13 +1179,16 @@ static int airoha_qdma_hw_init(struct ai +@@ -1191,13 +1195,16 @@ static int airoha_qdma_hw_init(struct ai int i; /* clear pending irqs */ @@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski /* setup irq binding */ for (i = 0; i < ARRAY_SIZE(qdma->q_tx); i++) { -@@ -1226,13 +1233,14 @@ static int airoha_qdma_hw_init(struct ai +@@ -1242,13 +1249,14 @@ static int airoha_qdma_hw_init(struct ai static irqreturn_t airoha_irq_handler(int irq, void *dev_instance) { @@ -142,7 +142,7 @@ Signed-off-by: Jakub Kicinski airoha_qdma_wr(qdma, REG_INT_STATUS(i), intr[i]); } -@@ -1240,7 +1248,7 @@ static irqreturn_t airoha_irq_handler(in +@@ -1256,7 +1264,7 @@ static irqreturn_t airoha_irq_handler(in return IRQ_NONE; if (intr[1] & RX_DONE_INT_MASK) { @@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski RX_DONE_INT_MASK); for (i = 0; i < ARRAY_SIZE(qdma->q_rx); i++) { -@@ -1257,7 +1265,7 @@ static irqreturn_t airoha_irq_handler(in +@@ -1273,7 +1281,7 @@ static irqreturn_t airoha_irq_handler(in if (!(intr[0] & TX_DONE_INT_MASK(i))) continue; @@ -160,7 +160,7 @@ Signed-off-by: Jakub Kicinski TX_DONE_INT_MASK(i)); napi_schedule(&qdma->q_tx_irq[i].napi); } -@@ -1266,6 +1274,39 @@ static irqreturn_t airoha_irq_handler(in +@@ -1282,6 +1290,39 @@ static irqreturn_t airoha_irq_handler(in return IRQ_HANDLED; } @@ -200,7 +200,7 @@ Signed-off-by: Jakub Kicinski static int airoha_qdma_init(struct platform_device *pdev, struct airoha_eth *eth, struct airoha_qdma *qdma) -@@ -1273,9 +1314,7 @@ static int airoha_qdma_init(struct platf +@@ -1289,9 +1330,7 @@ static int airoha_qdma_init(struct platf int err, id = qdma - ð->qdma[0]; const char *res; @@ -210,7 +210,7 @@ Signed-off-by: Jakub Kicinski res = devm_kasprintf(eth->dev, GFP_KERNEL, "qdma%d", id); if (!res) return -ENOMEM; -@@ -1285,12 +1324,7 @@ static int airoha_qdma_init(struct platf +@@ -1301,12 +1340,7 @@ static int airoha_qdma_init(struct platf return dev_err_probe(eth->dev, PTR_ERR(qdma->regs), "failed to iomap qdma%d regs\n", id); @@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski if (err) return err; -@@ -2781,7 +2815,7 @@ static int airoha_alloc_gdm_port(struct +@@ -2797,7 +2831,7 @@ static int airoha_alloc_gdm_port(struct dev->features |= dev->hw_features; dev->vlan_features = dev->hw_features; dev->dev.of_node = np; diff --git a/target/linux/airoha/patches-6.12/070-02-v6.16-net-airoha-Enable-multiple-IRQ-lines-support-in-airo.patch b/target/linux/airoha/patches-6.12/070-02-v6.16-net-airoha-Enable-multiple-IRQ-lines-support-in-airo.patch index 0f7b0cb57c..0d5a8b0121 100644 --- a/target/linux/airoha/patches-6.12/070-02-v6.16-net-airoha-Enable-multiple-IRQ-lines-support-in-airo.patch +++ b/target/linux/airoha/patches-6.12/070-02-v6.16-net-airoha-Enable-multiple-IRQ-lines-support-in-airo.patch @@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski return done; } -@@ -1178,17 +1188,24 @@ static int airoha_qdma_hw_init(struct ai +@@ -1194,17 +1204,24 @@ static int airoha_qdma_hw_init(struct ai { int i; @@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski /* setup irq binding */ for (i = 0; i < ARRAY_SIZE(qdma->q_tx); i++) { -@@ -1235,6 +1252,7 @@ static irqreturn_t airoha_irq_handler(in +@@ -1251,6 +1268,7 @@ static irqreturn_t airoha_irq_handler(in { struct airoha_irq_bank *irq_bank = dev_instance; struct airoha_qdma *qdma = irq_bank->qdma; @@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski u32 intr[ARRAY_SIZE(irq_bank->irqmask)]; int i; -@@ -1247,17 +1265,24 @@ static irqreturn_t airoha_irq_handler(in +@@ -1263,17 +1281,24 @@ static irqreturn_t airoha_irq_handler(in if (!test_bit(DEV_STATE_INITIALIZED, &qdma->eth->state)) return IRQ_NONE; diff --git a/target/linux/airoha/patches-6.12/074-01-v6.16-net-airoha-Do-not-store-hfwd-references-in-airoha_qd.patch b/target/linux/airoha/patches-6.12/074-01-v6.16-net-airoha-Do-not-store-hfwd-references-in-airoha_qd.patch index 1031964f7c..c620165d6b 100644 --- a/target/linux/airoha/patches-6.12/074-01-v6.16-net-airoha-Do-not-store-hfwd-references-in-airoha_qd.patch +++ b/target/linux/airoha/patches-6.12/074-01-v6.16-net-airoha-Do-not-store-hfwd-references-in-airoha_qd.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1077,17 +1077,13 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1093,17 +1093,13 @@ static int airoha_qdma_init_hfwd_queues( int size; size = HW_DSCP_NUM * sizeof(struct airoha_qdma_fwd_desc); diff --git a/target/linux/airoha/patches-6.12/074-02-v6.16-net-airoha-Add-the-capability-to-allocate-hwfd-buffe.patch b/target/linux/airoha/patches-6.12/074-02-v6.16-net-airoha-Add-the-capability-to-allocate-hwfd-buffe.patch index 5aa8f318d4..9766a223d6 100644 --- a/target/linux/airoha/patches-6.12/074-02-v6.16-net-airoha-Add-the-capability-to-allocate-hwfd-buffe.patch +++ b/target/linux/airoha/patches-6.12/074-02-v6.16-net-airoha-Add-the-capability-to-allocate-hwfd-buffe.patch @@ -27,7 +27,7 @@ Signed-off-by: Paolo Abeni #include #include #include -@@ -1072,9 +1073,11 @@ static void airoha_qdma_cleanup_tx_queue +@@ -1088,9 +1089,11 @@ static void airoha_qdma_cleanup_tx_queue static int airoha_qdma_init_hfwd_queues(struct airoha_qdma *qdma) { struct airoha_eth *eth = qdma->eth; @@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni size = HW_DSCP_NUM * sizeof(struct airoha_qdma_fwd_desc); if (!dmam_alloc_coherent(eth->dev, size, &dma_addr, GFP_KERNEL)) -@@ -1082,10 +1085,34 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1098,10 +1101,34 @@ static int airoha_qdma_init_hfwd_queues( airoha_qdma_wr(qdma, REG_FWD_DSCP_BASE, dma_addr); diff --git a/target/linux/airoha/patches-6.12/074-03-v6.16-net-airoha-Add-the-capability-to-allocate-hfwd-descr.patch b/target/linux/airoha/patches-6.12/074-03-v6.16-net-airoha-Add-the-capability-to-allocate-hfwd-descr.patch index ca1368270d..a23e860e66 100644 --- a/target/linux/airoha/patches-6.12/074-03-v6.16-net-airoha-Add-the-capability-to-allocate-hfwd-descr.patch +++ b/target/linux/airoha/patches-6.12/074-03-v6.16-net-airoha-Add-the-capability-to-allocate-hfwd-descr.patch @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni static void airoha_set_macaddr(struct airoha_gdm_port *port, const u8 *addr) { struct airoha_eth *eth = port->qdma->eth; -@@ -1124,7 +1115,7 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1140,7 +1131,7 @@ static int airoha_qdma_init_hfwd_queues( LMGR_INIT_START | LMGR_SRAM_MODE_MASK | HW_FWD_DESC_NUM_MASK, FIELD_PREP(HW_FWD_DESC_NUM_MASK, HW_DSCP_NUM) | diff --git a/target/linux/airoha/patches-6.12/075-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_allo.patch b/target/linux/airoha/patches-6.12/075-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_allo.patch index 3057e2f31f..87a16e22a0 100644 --- a/target/linux/airoha/patches-6.12/075-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_allo.patch +++ b/target/linux/airoha/patches-6.12/075-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_allo.patch @@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2880,7 +2880,15 @@ static int airoha_alloc_gdm_port(struct +@@ -2896,7 +2896,15 @@ static int airoha_alloc_gdm_port(struct if (err) return err; diff --git a/target/linux/airoha/patches-6.12/080-01-v6.16-net-airoha-Compute-number-of-descriptors-according-t.patch b/target/linux/airoha/patches-6.12/080-01-v6.16-net-airoha-Compute-number-of-descriptors-according-t.patch index 042ca743eb..3673cce068 100644 --- a/target/linux/airoha/patches-6.12/080-01-v6.16-net-airoha-Compute-number-of-descriptors-according-t.patch +++ b/target/linux/airoha/patches-6.12/080-01-v6.16-net-airoha-Compute-number-of-descriptors-according-t.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1065,19 +1065,13 @@ static void airoha_qdma_cleanup_tx_queue +@@ -1081,19 +1081,13 @@ static void airoha_qdma_cleanup_tx_queue static int airoha_qdma_init_hfwd_queues(struct airoha_qdma *qdma) { @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski name = devm_kasprintf(eth->dev, GFP_KERNEL, "qdma%d-buf", id); if (!name) return -ENOMEM; -@@ -1099,8 +1093,12 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1115,8 +1109,12 @@ static int airoha_qdma_init_hfwd_queues( rmem = of_reserved_mem_lookup(np); of_node_put(np); dma_addr = rmem->base; @@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski if (!dmam_alloc_coherent(eth->dev, size, &dma_addr, GFP_KERNEL)) return -ENOMEM; -@@ -1108,6 +1106,11 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1124,6 +1122,11 @@ static int airoha_qdma_init_hfwd_queues( airoha_qdma_wr(qdma, REG_FWD_BUF_BASE, dma_addr); @@ -66,7 +66,7 @@ Signed-off-by: Jakub Kicinski airoha_qdma_rmw(qdma, REG_HW_FWD_DSCP_CFG, HW_FWD_DSCP_PAYLOAD_SIZE_MASK, FIELD_PREP(HW_FWD_DSCP_PAYLOAD_SIZE_MASK, 0)); -@@ -1116,7 +1119,7 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1132,7 +1135,7 @@ static int airoha_qdma_init_hfwd_queues( airoha_qdma_rmw(qdma, REG_LMGR_INIT_CFG, LMGR_INIT_START | LMGR_SRAM_MODE_MASK | HW_FWD_DESC_NUM_MASK, diff --git a/target/linux/airoha/patches-6.12/080-02-v6.16-net-airoha-Differentiate-hwfd-buffer-size-for-QDMA0-.patch b/target/linux/airoha/patches-6.12/080-02-v6.16-net-airoha-Differentiate-hwfd-buffer-size-for-QDMA0-.patch index e6a90a335c..89f2bbc3e4 100644 --- a/target/linux/airoha/patches-6.12/080-02-v6.16-net-airoha-Differentiate-hwfd-buffer-size-for-QDMA0-.patch +++ b/target/linux/airoha/patches-6.12/080-02-v6.16-net-airoha-Differentiate-hwfd-buffer-size-for-QDMA0-.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1068,14 +1068,15 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1084,14 +1084,15 @@ static int airoha_qdma_init_hfwd_queues( int size, index, num_desc = HW_DSCP_NUM; struct airoha_eth *eth = qdma->eth; int id = qdma - ð->qdma[0]; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski index = of_property_match_string(eth->dev->of_node, "memory-region-names", name); if (index >= 0) { -@@ -1096,9 +1097,9 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1112,9 +1113,9 @@ static int airoha_qdma_init_hfwd_queues( /* Compute the number of hw descriptors according to the * reserved memory size and the payload buffer size */ @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski if (!dmam_alloc_coherent(eth->dev, size, &dma_addr, GFP_KERNEL)) return -ENOMEM; -@@ -1111,9 +1112,10 @@ static int airoha_qdma_init_hfwd_queues( +@@ -1127,9 +1128,10 @@ static int airoha_qdma_init_hfwd_queues( return -ENOMEM; airoha_qdma_wr(qdma, REG_FWD_DSCP_BASE, dma_addr); diff --git a/target/linux/airoha/patches-6.12/086-02-v6.18-net-airoha-Add-airoha_ppe_dev-struct-definition.patch b/target/linux/airoha/patches-6.12/086-02-v6.18-net-airoha-Add-airoha_ppe_dev-struct-definition.patch index fd76fc25f5..bfe0d85794 100644 --- a/target/linux/airoha/patches-6.12/086-02-v6.18-net-airoha-Add-airoha_ppe_dev-struct-definition.patch +++ b/target/linux/airoha/patches-6.12/086-02-v6.18-net-airoha-Add-airoha_ppe_dev-struct-definition.patch @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2601,13 +2601,15 @@ static int airoha_dev_setup_tc_block_cb( +@@ -2617,13 +2617,15 @@ static int airoha_dev_setup_tc_block_cb( void *type_data, void *cb_priv) { struct net_device *dev = cb_priv; diff --git a/target/linux/airoha/patches-6.12/089-v6.14-net-airoha-Fix-channel-configuration-for-ETS-Qdisc.patch b/target/linux/airoha/patches-6.12/089-v6.14-net-airoha-Fix-channel-configuration-for-ETS-Qdisc.patch index 02ce75b308..217bb795c5 100644 --- a/target/linux/airoha/patches-6.12/089-v6.14-net-airoha-Fix-channel-configuration-for-ETS-Qdisc.patch +++ b/target/linux/airoha/patches-6.12/089-v6.14-net-airoha-Fix-channel-configuration-for-ETS-Qdisc.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2183,11 +2183,14 @@ static int airoha_qdma_get_tx_ets_stats( +@@ -2199,11 +2199,14 @@ static int airoha_qdma_get_tx_ets_stats( static int airoha_tc_setup_qdisc_ets(struct airoha_gdm_port *port, struct tc_ets_qopt_offload *opt) { diff --git a/target/linux/airoha/patches-6.12/095-v6.19-net-airoha-Fix-loopback-mode-configuration-for-GDM2-.patch b/target/linux/airoha/patches-6.12/095-v6.19-net-airoha-Fix-loopback-mode-configuration-for-GDM2-.patch index 5c3fcc0c20..d06d86642b 100644 --- a/target/linux/airoha/patches-6.12/095-v6.19-net-airoha-Fix-loopback-mode-configuration-for-GDM2-.patch +++ b/target/linux/airoha/patches-6.12/095-v6.19-net-airoha-Fix-loopback-mode-configuration-for-GDM2-.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1715,7 +1715,9 @@ static void airhoha_set_gdm2_loopback(st +@@ -1731,7 +1731,9 @@ static void airhoha_set_gdm2_loopback(st airoha_fe_wr(eth, REG_GDM_RXCHN_EN(2), 0xffff); airoha_fe_rmw(eth, REG_GDM_LPBK_CFG(2), LPBK_CHAN_MASK | LPBK_MODE_MASK | LPBK_EN_MASK, diff --git a/target/linux/airoha/patches-6.12/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch b/target/linux/airoha/patches-6.12/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch index 66d72ded83..3619091b54 100644 --- a/target/linux/airoha/patches-6.12/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch +++ b/target/linux/airoha/patches-6.12/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2027,8 +2027,12 @@ static void airoha_ethtool_get_mac_stats +@@ -2043,8 +2043,12 @@ static void airoha_ethtool_get_mac_stats airoha_update_hw_stats(port); do { start = u64_stats_fetch_begin(&port->stats.syncp); diff --git a/target/linux/airoha/patches-6.12/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch b/target/linux/airoha/patches-6.12/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch index 7d78bd6c03..9521a05842 100644 --- a/target/linux/airoha/patches-6.12/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch +++ b/target/linux/airoha/patches-6.12/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch @@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2775,6 +2775,7 @@ static const struct ethtool_ops airoha_e +@@ -2791,6 +2791,7 @@ static const struct ethtool_ops airoha_e .get_drvinfo = airoha_ethtool_get_drvinfo, .get_eth_mac_stats = airoha_ethtool_get_mac_stats, .get_rmon_stats = airoha_ethtool_get_rmon_stats, diff --git a/target/linux/airoha/patches-6.12/098-v6.19-net-airoha-Take-into-account-out-of-order-tx-complet.patch b/target/linux/airoha/patches-6.12/098-v6.19-net-airoha-Take-into-account-out-of-order-tx-complet.patch index 46432b2480..7587b3492b 100644 --- a/target/linux/airoha/patches-6.12/098-v6.19-net-airoha-Take-into-account-out-of-order-tx-complet.patch +++ b/target/linux/airoha/patches-6.12/098-v6.19-net-airoha-Take-into-account-out-of-order-tx-complet.patch @@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1878,6 +1878,20 @@ static u32 airoha_get_dsa_tag(struct sk_ +@@ -1894,6 +1894,20 @@ static u32 airoha_get_dsa_tag(struct sk_ #endif } @@ -43,7 +43,7 @@ Signed-off-by: Paolo Abeni static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb, struct net_device *dev) { -@@ -1931,7 +1945,7 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -1947,7 +1961,7 @@ static netdev_tx_t airoha_dev_xmit(struc txq = netdev_get_tx_queue(dev, qid); nr_frags = 1 + skb_shinfo(skb)->nr_frags; diff --git a/target/linux/airoha/patches-6.12/099-03-v6.19-net-airoha-Add-airoha_eth_soc_data-struct.patch b/target/linux/airoha/patches-6.12/099-03-v6.19-net-airoha-Add-airoha_eth_soc_data-struct.patch index 63cb4de964..8332bde17d 100644 --- a/target/linux/airoha/patches-6.12/099-03-v6.19-net-airoha-Add-airoha_eth_soc_data-struct.patch +++ b/target/linux/airoha/patches-6.12/099-03-v6.19-net-airoha-Add-airoha_eth_soc_data-struct.patch @@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1392,8 +1392,7 @@ static int airoha_hw_init(struct platfor +@@ -1408,8 +1408,7 @@ static int airoha_hw_init(struct platfor int err, i; /* disable xsi */ @@ -31,7 +31,7 @@ Signed-off-by: Paolo Abeni if (err) return err; -@@ -2927,6 +2926,7 @@ free_metadata_dst: +@@ -2943,6 +2942,7 @@ free_metadata_dst: static int airoha_probe(struct platform_device *pdev) { @@ -39,7 +39,7 @@ Signed-off-by: Paolo Abeni struct device_node *np; struct airoha_eth *eth; int i, err; -@@ -2935,6 +2935,10 @@ static int airoha_probe(struct platform_ +@@ -2951,6 +2951,10 @@ static int airoha_probe(struct platform_ if (!eth) return -ENOMEM; @@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni eth->dev = &pdev->dev; err = dma_set_mask_and_coherent(eth->dev, DMA_BIT_MASK(32)); -@@ -2959,13 +2963,18 @@ static int airoha_probe(struct platform_ +@@ -2975,13 +2979,18 @@ static int airoha_probe(struct platform_ return err; } @@ -75,7 +75,7 @@ Signed-off-by: Paolo Abeni eth->xsi_rsts); if (err) { dev_err(eth->dev, "failed to get bulk xsi reset lines\n"); -@@ -3051,8 +3060,23 @@ static void airoha_remove(struct platfor +@@ -3067,8 +3076,23 @@ static void airoha_remove(struct platfor platform_set_drvdata(pdev, NULL); } diff --git a/target/linux/airoha/patches-6.12/099-04-v6.19-net-airoha-Generalize-airoha_ppe2_is_enabled-routine.patch b/target/linux/airoha/patches-6.12/099-04-v6.19-net-airoha-Generalize-airoha_ppe2_is_enabled-routine.patch index e82ce24e4f..dcaa5f056a 100644 --- a/target/linux/airoha/patches-6.12/099-04-v6.19-net-airoha-Generalize-airoha_ppe2_is_enabled-routine.patch +++ b/target/linux/airoha/patches-6.12/099-04-v6.19-net-airoha-Generalize-airoha_ppe2_is_enabled-routine.patch @@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni } /* GMD4 */ for (q = 0; q < pse_port_num_queues[FE_PSE_PORT_GDM4]; q++) -@@ -1767,8 +1774,11 @@ static int airoha_dev_init(struct net_de +@@ -1783,8 +1790,11 @@ static int airoha_dev_init(struct net_de airhoha_set_gdm2_loopback(port); fallthrough; case 2: diff --git a/target/linux/airoha/patches-6.12/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch b/target/linux/airoha/patches-6.12/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch index c6ecbdb829..427f8a04a6 100644 --- a/target/linux/airoha/patches-6.12/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch +++ b/target/linux/airoha/patches-6.12/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch @@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni /* enable 1:N vlan action, init vlan table */ airoha_fe_set(eth, REG_MC_VLAN_EN, MC_VLAN_EN_MASK); -@@ -1761,8 +1742,10 @@ static void airhoha_set_gdm2_loopback(st +@@ -1777,8 +1758,10 @@ static void airhoha_set_gdm2_loopback(st static int airoha_dev_init(struct net_device *dev) { struct airoha_gdm_port *port = netdev_priv(dev); @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni airoha_set_macaddr(port, dev->dev_addr); -@@ -1775,16 +1758,27 @@ static int airoha_dev_init(struct net_de +@@ -1791,16 +1774,27 @@ static int airoha_dev_init(struct net_de fallthrough; case 2: if (airoha_ppe_is_enabled(eth, 1)) { diff --git a/target/linux/airoha/patches-6.12/099-10-v6.19-net-airoha-Refactor-src-port-configuration-in-airhoh.patch b/target/linux/airoha/patches-6.12/099-10-v6.19-net-airoha-Refactor-src-port-configuration-in-airhoh.patch index 81409b68c9..bb13eb73c9 100644 --- a/target/linux/airoha/patches-6.12/099-10-v6.19-net-airoha-Refactor-src-port-configuration-in-airhoh.patch +++ b/target/linux/airoha/patches-6.12/099-10-v6.19-net-airoha-Refactor-src-port-configuration-in-airhoh.patch @@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1687,13 +1687,17 @@ static int airoha_dev_set_macaddr(struct +@@ -1703,13 +1703,17 @@ static int airoha_dev_set_macaddr(struct return 0; } @@ -43,7 +43,7 @@ Signed-off-by: Paolo Abeni airoha_set_gdm_port_fwd_cfg(eth, REG_GDM_FWD_CFG(2), pse_port); airoha_fe_clear(eth, REG_GDM_FWD_CFG(2), GDM_STRIP_CRC); -@@ -1714,29 +1718,25 @@ static void airhoha_set_gdm2_loopback(st +@@ -1730,29 +1734,25 @@ static void airhoha_set_gdm2_loopback(st airoha_fe_clear(eth, REG_FE_VIP_PORT_EN, BIT(2)); airoha_fe_clear(eth, REG_FE_IFC_PORT_EN, BIT(2)); @@ -89,7 +89,7 @@ Signed-off-by: Paolo Abeni } static int airoha_dev_init(struct net_device *dev) -@@ -1753,8 +1753,13 @@ static int airoha_dev_init(struct net_de +@@ -1769,8 +1769,13 @@ static int airoha_dev_init(struct net_de case 3: case 4: /* If GDM2 is active we can't enable loopback */ @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni fallthrough; case 2: if (airoha_ppe_is_enabled(eth, 1)) { -@@ -3072,11 +3077,38 @@ static const char * const en7581_xsi_rst +@@ -3088,11 +3093,38 @@ static const char * const en7581_xsi_rst "xfp-mac", }; diff --git a/target/linux/airoha/patches-6.12/099-12-v6.19-net-airoha-Add-AN7583-SoC-support.patch b/target/linux/airoha/patches-6.12/099-12-v6.19-net-airoha-Add-AN7583-SoC-support.patch index c3b5ccd175..35fe1fdefb 100644 --- a/target/linux/airoha/patches-6.12/099-12-v6.19-net-airoha-Add-AN7583-SoC-support.patch +++ b/target/linux/airoha/patches-6.12/099-12-v6.19-net-airoha-Add-AN7583-SoC-support.patch @@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1689,10 +1689,8 @@ static int airoha_dev_set_macaddr(struct +@@ -1705,10 +1705,8 @@ static int airoha_dev_set_macaddr(struct static int airhoha_set_gdm2_loopback(struct airoha_gdm_port *port) { @@ -29,7 +29,7 @@ Signed-off-by: Paolo Abeni int src_port; /* Forward the traffic to the proper GDM port */ -@@ -1704,6 +1702,8 @@ static int airhoha_set_gdm2_loopback(str +@@ -1720,6 +1718,8 @@ static int airhoha_set_gdm2_loopback(str /* Enable GDM2 loopback */ airoha_fe_wr(eth, REG_GDM_TXCHN_EN(2), 0xffffffff); airoha_fe_wr(eth, REG_GDM_RXCHN_EN(2), 0xffff); @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni airoha_fe_rmw(eth, REG_GDM_LPBK_CFG(2), LPBK_CHAN_MASK | LPBK_MODE_MASK | LPBK_EN_MASK, FIELD_PREP(LPBK_CHAN_MASK, chan) | -@@ -1718,6 +1718,8 @@ static int airhoha_set_gdm2_loopback(str +@@ -1734,6 +1734,8 @@ static int airhoha_set_gdm2_loopback(str airoha_fe_clear(eth, REG_FE_VIP_PORT_EN, BIT(2)); airoha_fe_clear(eth, REG_FE_IFC_PORT_EN, BIT(2)); @@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni src_port = eth->soc->ops.get_src_port_id(port, nbq); if (src_port < 0) return src_port; -@@ -1731,7 +1733,7 @@ static int airhoha_set_gdm2_loopback(str +@@ -1747,7 +1749,7 @@ static int airhoha_set_gdm2_loopback(str SP_CPORT_MASK(val), FE_PSE_PORT_CDM2 << __ffs(SP_CPORT_MASK(val))); @@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni airoha_fe_rmw(eth, REG_SRC_PORT_FC_MAP6, FC_ID_OF_SRC_PORT24_MASK, FIELD_PREP(FC_ID_OF_SRC_PORT24_MASK, 2)); -@@ -1900,6 +1902,22 @@ static bool airoha_dev_tx_queue_busy(str +@@ -1916,6 +1918,22 @@ static bool airoha_dev_tx_queue_busy(str return index >= tail; } @@ -79,7 +79,7 @@ Signed-off-by: Paolo Abeni static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb, struct net_device *dev) { -@@ -1940,7 +1958,7 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -1956,7 +1974,7 @@ static netdev_tx_t airoha_dev_xmit(struc } } @@ -88,7 +88,7 @@ Signed-off-by: Paolo Abeni msg1 = FIELD_PREP(QDMA_ETH_TXMSG_FPORT_MASK, fport) | FIELD_PREP(QDMA_ETH_TXMSG_METER_MASK, 0x7f); -@@ -3101,6 +3119,35 @@ static int airoha_en7581_get_src_port_id +@@ -3117,6 +3135,35 @@ static int airoha_en7581_get_src_port_id return -EINVAL; } @@ -124,7 +124,7 @@ Signed-off-by: Paolo Abeni static const struct airoha_eth_soc_data en7581_soc_data = { .version = 0x7581, .xsi_rsts_names = en7581_xsi_rsts_names, -@@ -3111,8 +3158,19 @@ static const struct airoha_eth_soc_data +@@ -3127,8 +3174,19 @@ static const struct airoha_eth_soc_data }, }; diff --git a/target/linux/airoha/patches-6.12/103-v6.19-net-airoha-Remove-code-duplication-in-airoha_regs.h.patch b/target/linux/airoha/patches-6.12/103-v6.19-net-airoha-Remove-code-duplication-in-airoha_regs.h.patch index 654f287b14..1bbb169760 100644 --- a/target/linux/airoha/patches-6.12/103-v6.19-net-airoha-Remove-code-duplication-in-airoha_regs.h.patch +++ b/target/linux/airoha/patches-6.12/103-v6.19-net-airoha-Remove-code-duplication-in-airoha_regs.h.patch @@ -172,7 +172,7 @@ Signed-off-by: Jakub Kicinski MBI_RX_AGE_SEL_MASK | MBI_TX_AGE_SEL_MASK, FIELD_PREP(MBI_RX_AGE_SEL_MASK, 3) | FIELD_PREP(MBI_TX_AGE_SEL_MASK, 3)); -@@ -1697,7 +1697,7 @@ static int airhoha_set_gdm2_loopback(str +@@ -1713,7 +1713,7 @@ static int airhoha_set_gdm2_loopback(str pse_port = port->id == AIROHA_GDM3_IDX ? FE_PSE_PORT_GDM3 : FE_PSE_PORT_GDM4; airoha_set_gdm_port_fwd_cfg(eth, REG_GDM_FWD_CFG(2), pse_port); diff --git a/target/linux/airoha/patches-6.12/104-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_prob.patch b/target/linux/airoha/patches-6.12/104-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_prob.patch index 58e48cb8d0..f90d67e0c9 100644 --- a/target/linux/airoha/patches-6.12/104-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_prob.patch +++ b/target/linux/airoha/patches-6.12/104-v6.16-net-airoha-Fix-an-error-handling-path-in-airoha_prob.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -3044,6 +3044,7 @@ static int airoha_probe(struct platform_ +@@ -3060,6 +3060,7 @@ static int airoha_probe(struct platform_ error_napi_stop: for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) airoha_qdma_stop_napi(ð->qdma[i]); diff --git a/target/linux/airoha/patches-6.12/104-v6.19-net-airoha-Fix-a-copy-and-paste-bug-in-probe.patch b/target/linux/airoha/patches-6.12/104-v6.19-net-airoha-Fix-a-copy-and-paste-bug-in-probe.patch index e87035ec54..5790de4536 100644 --- a/target/linux/airoha/patches-6.12/104-v6.19-net-airoha-Fix-a-copy-and-paste-bug-in-probe.patch +++ b/target/linux/airoha/patches-6.12/104-v6.19-net-airoha-Fix-a-copy-and-paste-bug-in-probe.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2990,11 +2990,11 @@ static int airoha_probe(struct platform_ +@@ -3006,11 +3006,11 @@ static int airoha_probe(struct platform_ return err; } diff --git a/target/linux/airoha/patches-6.12/108-v6.19-net-airoha-Add-the-capability-to-consume-out-of-orde.patch b/target/linux/airoha/patches-6.12/108-v6.19-net-airoha-Add-the-capability-to-consume-out-of-orde.patch index b09ebd57b4..93c43e1e6a 100644 --- a/target/linux/airoha/patches-6.12/108-v6.19-net-airoha-Add-the-capability-to-consume-out-of-orde.patch +++ b/target/linux/airoha/patches-6.12/108-v6.19-net-airoha-Add-the-capability-to-consume-out-of-orde.patch @@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -892,19 +892,13 @@ static int airoha_qdma_tx_napi_poll(stru +@@ -908,19 +908,13 @@ static int airoha_qdma_tx_napi_poll(stru dma_unmap_single(eth->dev, e->dma_addr, e->dma_len, DMA_TO_DEVICE); @@ -46,7 +46,7 @@ Signed-off-by: Jakub Kicinski if (skb) { u16 queue = skb_get_queue_mapping(skb); struct netdev_queue *txq; -@@ -949,6 +943,7 @@ static int airoha_qdma_init_tx_queue(str +@@ -965,6 +959,7 @@ static int airoha_qdma_init_tx_queue(str q->ndesc = size; q->qdma = qdma; q->free_thr = 1 + MAX_SKB_FRAGS; @@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski q->entry = devm_kzalloc(eth->dev, q->ndesc * sizeof(*q->entry), GFP_KERNEL); -@@ -961,9 +956,9 @@ static int airoha_qdma_init_tx_queue(str +@@ -977,9 +972,9 @@ static int airoha_qdma_init_tx_queue(str return -ENOMEM; for (i = 0; i < q->ndesc; i++) { @@ -66,7 +66,7 @@ Signed-off-by: Jakub Kicinski WRITE_ONCE(q->desc[i].ctrl, cpu_to_le32(val)); } -@@ -973,9 +968,9 @@ static int airoha_qdma_init_tx_queue(str +@@ -989,9 +984,9 @@ static int airoha_qdma_init_tx_queue(str airoha_qdma_wr(qdma, REG_TX_RING_BASE(qid), dma_addr); airoha_qdma_rmw(qdma, REG_TX_CPU_IDX(qid), TX_RING_CPU_IDX_MASK, @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -1031,17 +1026,21 @@ static int airoha_qdma_init_tx(struct ai +@@ -1047,17 +1042,21 @@ static int airoha_qdma_init_tx(struct ai static void airoha_qdma_cleanup_tx_queue(struct airoha_queue *q) { struct airoha_eth *eth = q->qdma->eth; @@ -104,7 +104,7 @@ Signed-off-by: Jakub Kicinski q->queued--; } spin_unlock_bh(&q->lock); -@@ -1883,20 +1882,6 @@ static u32 airoha_get_dsa_tag(struct sk_ +@@ -1899,20 +1898,6 @@ static u32 airoha_get_dsa_tag(struct sk_ #endif } @@ -125,7 +125,7 @@ Signed-off-by: Jakub Kicinski static int airoha_get_fe_port(struct airoha_gdm_port *port) { struct airoha_qdma *qdma = port->qdma; -@@ -1919,8 +1904,10 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -1935,8 +1920,10 @@ static netdev_tx_t airoha_dev_xmit(struc struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_qdma *qdma = port->qdma; u32 nr_frags, tag, msg0, msg1, len; @@ -136,7 +136,7 @@ Signed-off-by: Jakub Kicinski void *data; int i, qid; u16 index; -@@ -1966,7 +1953,7 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -1982,7 +1969,7 @@ static netdev_tx_t airoha_dev_xmit(struc txq = netdev_get_tx_queue(dev, qid); nr_frags = 1 + skb_shinfo(skb)->nr_frags; @@ -145,7 +145,7 @@ Signed-off-by: Jakub Kicinski /* not enough space in the queue */ netif_tx_stop_queue(txq); spin_unlock_bh(&q->lock); -@@ -1975,11 +1962,13 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -1991,11 +1978,13 @@ static netdev_tx_t airoha_dev_xmit(struc len = skb_headlen(skb); data = skb->data; @@ -161,7 +161,7 @@ Signed-off-by: Jakub Kicinski skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; dma_addr_t addr; u32 val; -@@ -1989,7 +1978,14 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -2005,7 +1994,14 @@ static netdev_tx_t airoha_dev_xmit(struc if (unlikely(dma_mapping_error(dev->dev.parent, addr))) goto error_unmap; @@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski val = FIELD_PREP(QDMA_DESC_LEN_MASK, len); if (i < nr_frags - 1) -@@ -2002,15 +1998,9 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -2018,15 +2014,9 @@ static netdev_tx_t airoha_dev_xmit(struc WRITE_ONCE(desc->msg1, cpu_to_le32(msg1)); WRITE_ONCE(desc->msg2, cpu_to_le32(0xffff)); @@ -193,7 +193,7 @@ Signed-off-by: Jakub Kicinski q->queued += i; skb_tx_timestamp(skb); -@@ -2019,7 +2009,7 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -2035,7 +2025,7 @@ static netdev_tx_t airoha_dev_xmit(struc if (netif_xmit_stopped(txq) || !netdev_xmit_more()) airoha_qdma_rmw(qdma, REG_TX_CPU_IDX(qid), TX_RING_CPU_IDX_MASK, @@ -202,7 +202,7 @@ Signed-off-by: Jakub Kicinski if (q->ndesc - q->queued < q->free_thr) netif_tx_stop_queue(txq); -@@ -2029,10 +2019,13 @@ static netdev_tx_t airoha_dev_xmit(struc +@@ -2045,10 +2035,13 @@ static netdev_tx_t airoha_dev_xmit(struc return NETDEV_TX_OK; error_unmap: diff --git a/target/linux/airoha/patches-6.12/116-v6.19-net-airoha-Move-net_devs-registration-in-a-dedicated.patch b/target/linux/airoha/patches-6.12/116-v6.19-net-airoha-Move-net_devs-registration-in-a-dedicated.patch index 685ab15b89..1c1e6c3632 100644 --- a/target/linux/airoha/patches-6.12/116-v6.19-net-airoha-Move-net_devs-registration-in-a-dedicated.patch +++ b/target/linux/airoha/patches-6.12/116-v6.19-net-airoha-Move-net_devs-registration-in-a-dedicated.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2924,19 +2924,26 @@ static int airoha_alloc_gdm_port(struct +@@ -2940,19 +2940,26 @@ static int airoha_alloc_gdm_port(struct port->id = id; eth->ports[p] = port; @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni } static int airoha_probe(struct platform_device *pdev) -@@ -3027,6 +3034,10 @@ static int airoha_probe(struct platform_ +@@ -3043,6 +3050,10 @@ static int airoha_probe(struct platform_ } } @@ -71,7 +71,7 @@ Signed-off-by: Paolo Abeni return 0; error_napi_stop: -@@ -3040,10 +3051,12 @@ error_hw_cleanup: +@@ -3056,10 +3067,12 @@ error_hw_cleanup: for (i = 0; i < ARRAY_SIZE(eth->ports); i++) { struct airoha_gdm_port *port = eth->ports[i]; diff --git a/target/linux/airoha/patches-6.12/117-v7.0-net-airoha-Use-gdm-port-enum-value-whenever-possible.patch b/target/linux/airoha/patches-6.12/117-v7.0-net-airoha-Use-gdm-port-enum-value-whenever-possible.patch index 552079fd9d..6f461be310 100644 --- a/target/linux/airoha/patches-6.12/117-v7.0-net-airoha-Use-gdm-port-enum-value-whenever-possible.patch +++ b/target/linux/airoha/patches-6.12/117-v7.0-net-airoha-Use-gdm-port-enum-value-whenever-possible.patch @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski airoha_fe_crsn_qsel_init(eth); -@@ -1690,27 +1690,29 @@ static int airhoha_set_gdm2_loopback(str +@@ -1706,27 +1706,29 @@ static int airhoha_set_gdm2_loopback(str /* Forward the traffic to the proper GDM port */ pse_port = port->id == AIROHA_GDM3_IDX ? FE_PSE_PORT_GDM3 : FE_PSE_PORT_GDM4; @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski /* XXX: handle XSI_USB_PORT and XSI_PCE1_PORT */ nbq = port->id == AIROHA_GDM3_IDX && airoha_is_7581(eth) ? 4 : 0; -@@ -1746,8 +1748,8 @@ static int airoha_dev_init(struct net_de +@@ -1762,8 +1764,8 @@ static int airoha_dev_init(struct net_de airoha_set_macaddr(port, dev->dev_addr); switch (port->id) { @@ -89,7 +89,7 @@ Signed-off-by: Jakub Kicinski /* If GDM2 is active we can't enable loopback */ if (!eth->ports[1]) { int err; -@@ -1757,7 +1759,7 @@ static int airoha_dev_init(struct net_de +@@ -1773,7 +1775,7 @@ static int airoha_dev_init(struct net_de return err; } fallthrough; @@ -98,7 +98,7 @@ Signed-off-by: Jakub Kicinski if (airoha_ppe_is_enabled(eth, 1)) { /* For PPE2 always use secondary cpu port. */ fe_cpu_port = FE_PSE_PORT_CDM2; -@@ -3100,14 +3102,14 @@ static const char * const en7581_xsi_rst +@@ -3116,14 +3118,14 @@ static const char * const en7581_xsi_rst static int airoha_en7581_get_src_port_id(struct airoha_gdm_port *port, int nbq) { switch (port->id) { @@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski /* 7581 SoC supports eth and usb serdes on GDM4 port */ if (!nbq) return HSGMII_LAN_7581_ETH_SRCPORT; -@@ -3131,12 +3133,12 @@ static const char * const an7583_xsi_rst +@@ -3147,12 +3149,12 @@ static const char * const an7583_xsi_rst static int airoha_an7583_get_src_port_id(struct airoha_gdm_port *port, int nbq) { switch (port->id) { diff --git a/target/linux/airoha/patches-6.12/120-v7.0-net-airoha-implement-get_link_ksettings.patch b/target/linux/airoha/patches-6.12/120-v7.0-net-airoha-implement-get_link_ksettings.patch index b2f1e36426..a5c8c64f0a 100644 --- a/target/linux/airoha/patches-6.12/120-v7.0-net-airoha-implement-get_link_ksettings.patch +++ b/target/linux/airoha/patches-6.12/120-v7.0-net-airoha-implement-get_link_ksettings.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2805,6 +2805,7 @@ static const struct ethtool_ops airoha_e +@@ -2821,6 +2821,7 @@ static const struct ethtool_ops airoha_e .get_drvinfo = airoha_ethtool_get_drvinfo, .get_eth_mac_stats = airoha_ethtool_get_mac_stats, .get_rmon_stats = airoha_ethtool_get_rmon_stats, diff --git a/target/linux/airoha/patches-6.12/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch b/target/linux/airoha/patches-6.12/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch index a0e983e41e..b920037a52 100644 --- a/target/linux/airoha/patches-6.12/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch +++ b/target/linux/airoha/patches-6.12/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch @@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1727,7 +1727,7 @@ static int airhoha_set_gdm2_loopback(str +@@ -1743,7 +1743,7 @@ static int airhoha_set_gdm2_loopback(str airoha_fe_rmw(eth, REG_SP_DFT_CPORT(src_port >> fls(SP_CPORT_DFT_MASK)), SP_CPORT_MASK(val), @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski if (port->id != AIROHA_GDM3_IDX && airoha_is_7581(eth)) airoha_fe_rmw(eth, REG_SRC_PORT_FC_MAP6, -@@ -1781,7 +1781,7 @@ static int airoha_dev_init(struct net_de +@@ -1797,7 +1797,7 @@ static int airoha_dev_init(struct net_de ppe_id = pse_port == FE_PSE_PORT_PPE2 ? 1 : 0; airoha_fe_rmw(eth, REG_PPE_DFT_CPORT0(ppe_id), DFT_CPORT_MASK(port->id), @@ -33,7 +33,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -2138,7 +2138,7 @@ static int airoha_qdma_set_chan_tx_sched +@@ -2154,7 +2154,7 @@ static int airoha_qdma_set_chan_tx_sched airoha_qdma_rmw(port->qdma, REG_CHAN_QOS_MODE(channel >> 3), CHAN_QOS_MODE_MASK(channel), diff --git a/target/linux/airoha/patches-6.12/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch b/target/linux/airoha/patches-6.12/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch index 5f9c6beb34..d4d58cebf5 100644 --- a/target/linux/airoha/patches-6.12/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch +++ b/target/linux/airoha/patches-6.12/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1729,10 +1729,12 @@ static int airhoha_set_gdm2_loopback(str +@@ -1745,10 +1745,12 @@ static int airhoha_set_gdm2_loopback(str SP_CPORT_MASK(val), __field_prep(SP_CPORT_MASK(val), FE_PSE_PORT_CDM2)); diff --git a/target/linux/airoha/patches-6.12/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch b/target/linux/airoha/patches-6.12/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch index e5bc30692a..31199a285f 100644 --- a/target/linux/airoha/patches-6.12/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch +++ b/target/linux/airoha/patches-6.12/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1611,6 +1611,7 @@ static int airoha_dev_open(struct net_de +@@ -1627,6 +1627,7 @@ static int airoha_dev_open(struct net_de int err, len = ETH_HLEN + dev->mtu + ETH_FCS_LEN; struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_qdma *qdma = port->qdma; @@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni netif_tx_start_all_queues(dev); err = airoha_set_vip_for_gdm_port(port, true); -@@ -1634,6 +1635,14 @@ static int airoha_dev_open(struct net_de +@@ -1650,6 +1651,14 @@ static int airoha_dev_open(struct net_de GLOBAL_CFG_RX_DMA_EN_MASK); atomic_inc(&qdma->users); @@ -41,7 +41,7 @@ Signed-off-by: Paolo Abeni return 0; } -@@ -1651,6 +1660,9 @@ static int airoha_dev_stop(struct net_de +@@ -1667,6 +1676,9 @@ static int airoha_dev_stop(struct net_de for (i = 0; i < ARRAY_SIZE(qdma->q_tx); i++) netdev_tx_reset_subqueue(dev, i); @@ -51,7 +51,7 @@ Signed-off-by: Paolo Abeni if (atomic_dec_and_test(&qdma->users)) { airoha_qdma_clear(qdma, REG_QDMA_GLOBAL_CFG, GLOBAL_CFG_TX_DMA_EN_MASK | -@@ -1744,7 +1756,7 @@ static int airoha_dev_init(struct net_de +@@ -1760,7 +1772,7 @@ static int airoha_dev_init(struct net_de struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_qdma *qdma = port->qdma; struct airoha_eth *eth = qdma->eth; @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni u8 ppe_id; airoha_set_macaddr(port, dev->dev_addr); -@@ -1765,7 +1777,7 @@ static int airoha_dev_init(struct net_de +@@ -1781,7 +1793,7 @@ static int airoha_dev_init(struct net_de if (airoha_ppe_is_enabled(eth, 1)) { /* For PPE2 always use secondary cpu port. */ fe_cpu_port = FE_PSE_PORT_CDM2; @@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni break; } fallthrough; -@@ -1774,13 +1786,11 @@ static int airoha_dev_init(struct net_de +@@ -1790,13 +1802,11 @@ static int airoha_dev_init(struct net_de /* For PPE1 select cpu port according to the running QDMA. */ fe_cpu_port = qdma_id ? FE_PSE_PORT_CDM2 : FE_PSE_PORT_CDM1; diff --git a/target/linux/airoha/patches-6.12/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch b/target/linux/airoha/patches-6.12/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch index 0e210f4920..1a6a9259c9 100644 --- a/target/linux/airoha/patches-6.12/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch +++ b/target/linux/airoha/patches-6.12/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch @@ -39,7 +39,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1754,11 +1754,13 @@ static int airhoha_set_gdm2_loopback(str +@@ -1770,11 +1770,13 @@ static int airhoha_set_gdm2_loopback(str static int airoha_dev_init(struct net_device *dev) { struct airoha_gdm_port *port = netdev_priv(dev); @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni airoha_set_macaddr(port, dev->dev_addr); switch (port->id) { -@@ -1782,7 +1784,7 @@ static int airoha_dev_init(struct net_de +@@ -1798,7 +1800,7 @@ static int airoha_dev_init(struct net_de } fallthrough; default: { @@ -64,7 +64,7 @@ Signed-off-by: Paolo Abeni /* For PPE1 select cpu port according to the running QDMA. */ fe_cpu_port = qdma_id ? FE_PSE_PORT_CDM2 : FE_PSE_PORT_CDM1; -@@ -2866,11 +2868,10 @@ bool airoha_is_valid_gdm_port(struct air +@@ -2882,11 +2884,10 @@ bool airoha_is_valid_gdm_port(struct air } static int airoha_alloc_gdm_port(struct airoha_eth *eth, @@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni struct net_device *dev; int err, p; u32 id; -@@ -2901,7 +2902,6 @@ static int airoha_alloc_gdm_port(struct +@@ -2917,7 +2918,6 @@ static int airoha_alloc_gdm_port(struct return -ENOMEM; } @@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni dev->netdev_ops = &airoha_netdev_ops; dev->ethtool_ops = &airoha_ethtool_ops; dev->max_mtu = AIROHA_MAX_MTU; -@@ -2913,7 +2913,6 @@ static int airoha_alloc_gdm_port(struct +@@ -2929,7 +2929,6 @@ static int airoha_alloc_gdm_port(struct dev->features |= dev->hw_features; dev->vlan_features = dev->hw_features; dev->dev.of_node = np; @@ -93,7 +93,7 @@ Signed-off-by: Paolo Abeni SET_NETDEV_DEV(dev, eth->dev); /* reserve hw queues for HTB offloading */ -@@ -2934,7 +2933,7 @@ static int airoha_alloc_gdm_port(struct +@@ -2950,7 +2949,7 @@ static int airoha_alloc_gdm_port(struct port = netdev_priv(dev); u64_stats_init(&port->stats.syncp); spin_lock_init(&port->stats.lock); @@ -102,7 +102,7 @@ Signed-off-by: Paolo Abeni port->dev = dev; port->id = id; eth->ports[p] = port; -@@ -3034,7 +3033,6 @@ static int airoha_probe(struct platform_ +@@ -3050,7 +3049,6 @@ static int airoha_probe(struct platform_ for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) airoha_qdma_start_napi(ð->qdma[i]); @@ -110,7 +110,7 @@ Signed-off-by: Paolo Abeni for_each_child_of_node(pdev->dev.of_node, np) { if (!of_device_is_compatible(np, "airoha,eth-mac")) continue; -@@ -3042,7 +3040,7 @@ static int airoha_probe(struct platform_ +@@ -3058,7 +3056,7 @@ static int airoha_probe(struct platform_ if (!of_device_is_available(np)) continue; diff --git a/target/linux/airoha/patches-6.12/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch b/target/linux/airoha/patches-6.12/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch index 2c87be0a6e..3c0abbba5c 100644 --- a/target/linux/airoha/patches-6.12/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch +++ b/target/linux/airoha/patches-6.12/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch @@ -32,7 +32,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1755,8 +1755,7 @@ static int airoha_dev_init(struct net_de +@@ -1771,8 +1771,7 @@ static int airoha_dev_init(struct net_de { struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_eth *eth = port->eth; @@ -42,7 +42,7 @@ Signed-off-by: Lorenzo Bianconi /* QDMA0 is used for lan ports while QDMA1 is used for WAN ports */ port->qdma = ð->qdma[!airoha_is_lan_gdm_port(port)]; -@@ -1774,28 +1773,13 @@ static int airoha_dev_init(struct net_de +@@ -1790,28 +1789,13 @@ static int airoha_dev_init(struct net_de if (err) return err; } @@ -75,7 +75,7 @@ Signed-off-by: Lorenzo Bianconi return 0; } -@@ -1898,7 +1882,7 @@ static u32 airoha_get_dsa_tag(struct sk_ +@@ -1914,7 +1898,7 @@ static u32 airoha_get_dsa_tag(struct sk_ #endif } diff --git a/target/linux/airoha/patches-6.12/133-v7.1-net-airoha-Rework-the-code-flow-in-airoha_remove-and.patch b/target/linux/airoha/patches-6.12/133-v7.1-net-airoha-Rework-the-code-flow-in-airoha_remove-and.patch index 5fd6debe56..39926c3adf 100644 --- a/target/linux/airoha/patches-6.12/133-v7.1-net-airoha-Rework-the-code-flow-in-airoha_remove-and.patch +++ b/target/linux/airoha/patches-6.12/133-v7.1-net-airoha-Rework-the-code-flow-in-airoha_remove-and.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1368,6 +1368,33 @@ static int airoha_qdma_init(struct platf +@@ -1384,6 +1384,33 @@ static int airoha_qdma_init(struct platf return airoha_qdma_hw_init(qdma); } @@ -57,7 +57,7 @@ Signed-off-by: Paolo Abeni static int airoha_hw_init(struct platform_device *pdev, struct airoha_eth *eth) { -@@ -1395,41 +1422,30 @@ static int airoha_hw_init(struct platfor +@@ -1411,41 +1438,30 @@ static int airoha_hw_init(struct platfor for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) { err = airoha_qdma_init(pdev, eth, ð->qdma[i]); if (err) @@ -110,7 +110,7 @@ Signed-off-by: Paolo Abeni } static void airoha_qdma_start_napi(struct airoha_qdma *qdma) -@@ -3012,7 +3028,7 @@ static int airoha_probe(struct platform_ +@@ -3028,7 +3044,7 @@ static int airoha_probe(struct platform_ err = airoha_hw_init(pdev, eth); if (err) @@ -119,7 +119,7 @@ Signed-off-by: Paolo Abeni for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) airoha_qdma_start_napi(ð->qdma[i]); -@@ -3040,10 +3056,6 @@ static int airoha_probe(struct platform_ +@@ -3056,10 +3072,6 @@ static int airoha_probe(struct platform_ error_napi_stop: for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) airoha_qdma_stop_napi(ð->qdma[i]); @@ -130,7 +130,7 @@ Signed-off-by: Paolo Abeni for (i = 0; i < ARRAY_SIZE(eth->ports); i++) { struct airoha_gdm_port *port = eth->ports[i]; -@@ -3055,6 +3067,8 @@ error_hw_cleanup: +@@ -3071,6 +3083,8 @@ error_hw_cleanup: unregister_netdev(port->dev); airoha_metadata_dst_free(port); } @@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni free_netdev(eth->napi_dev); platform_set_drvdata(pdev, NULL); -@@ -3066,10 +3080,8 @@ static void airoha_remove(struct platfor +@@ -3082,10 +3096,8 @@ static void airoha_remove(struct platfor struct airoha_eth *eth = platform_get_drvdata(pdev); int i; @@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni for (i = 0; i < ARRAY_SIZE(eth->ports); i++) { struct airoha_gdm_port *port = eth->ports[i]; -@@ -3080,9 +3092,9 @@ static void airoha_remove(struct platfor +@@ -3096,9 +3108,9 @@ static void airoha_remove(struct platfor unregister_netdev(port->dev); airoha_metadata_dst_free(port); } diff --git a/target/linux/airoha/patches-6.12/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch b/target/linux/airoha/patches-6.12/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch index 7515e5a79c..34c17702f3 100644 --- a/target/linux/airoha/patches-6.12/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch +++ b/target/linux/airoha/patches-6.12/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2957,6 +2957,8 @@ static int airoha_register_gdm_devices(s +@@ -2973,6 +2973,8 @@ static int airoha_register_gdm_devices(s return err; } diff --git a/target/linux/airoha/patches-6.12/135-v7.1-net-airoha-Add-missing-cleanup-bits-in-airoha_qdma_c.patch b/target/linux/airoha/patches-6.12/135-v7.1-net-airoha-Add-missing-cleanup-bits-in-airoha_qdma_c.patch deleted file mode 100644 index d9293c7673..0000000000 --- a/target/linux/airoha/patches-6.12/135-v7.1-net-airoha-Add-missing-cleanup-bits-in-airoha_qdma_c.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 514aac3599879a7ed48b7dc19e31145beb6958ac Mon Sep 17 00:00:00 2001 -From: Lorenzo Bianconi -Date: Fri, 27 Mar 2026 10:48:21 +0100 -Subject: [PATCH] net: airoha: Add missing cleanup bits in - airoha_qdma_cleanup_rx_queue() - -In order to properly cleanup hw rx QDMA queues and bring the device to -the initial state, reset rx DMA queue head/tail index. Moreover, reset -queued DMA descriptor fields. - -Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") -Tested-by: Madhur Agrawal -Signed-off-by: Lorenzo Bianconi -Link: https://patch.msgid.link/20260327-airoha_qdma_cleanup_rx_queue-fix-v1-1-369d6ab1511a@kernel.org -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/airoha/airoha_eth.c | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/airoha/airoha_eth.c -+++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -794,18 +794,34 @@ static int airoha_qdma_init_rx_queue(str - - static void airoha_qdma_cleanup_rx_queue(struct airoha_queue *q) - { -- struct airoha_eth *eth = q->qdma->eth; -+ struct airoha_qdma *qdma = q->qdma; -+ struct airoha_eth *eth = qdma->eth; -+ int qid = q - &qdma->q_rx[0]; - - while (q->queued) { - struct airoha_queue_entry *e = &q->entry[q->tail]; -+ struct airoha_qdma_desc *desc = &q->desc[q->tail]; - struct page *page = virt_to_head_page(e->buf); - - dma_sync_single_for_cpu(eth->dev, e->dma_addr, e->dma_len, - page_pool_get_dma_dir(q->page_pool)); - page_pool_put_full_page(q->page_pool, page, false); -+ /* Reset DMA descriptor */ -+ WRITE_ONCE(desc->ctrl, 0); -+ WRITE_ONCE(desc->addr, 0); -+ WRITE_ONCE(desc->data, 0); -+ WRITE_ONCE(desc->msg0, 0); -+ WRITE_ONCE(desc->msg1, 0); -+ WRITE_ONCE(desc->msg2, 0); -+ WRITE_ONCE(desc->msg3, 0); -+ - q->tail = (q->tail + 1) % q->ndesc; - q->queued--; - } -+ -+ q->head = q->tail; -+ airoha_qdma_rmw(qdma, REG_RX_DMA_IDX(qid), RX_RING_DMA_IDX_MASK, -+ FIELD_PREP(RX_RING_DMA_IDX_MASK, q->tail)); - } - - static int airoha_qdma_init_rx(struct airoha_qdma *qdma) diff --git a/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch index 4a5a1a32bd..c1b543a92c 100644 --- a/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch @@ -295,7 +295,7 @@ SVN-Revision: 35130 &sin->sin6_addr); sin->sin6_scope_id = 0; } -@@ -852,12 +852,12 @@ int ip6_datagram_send_ctl(struct net *ne +@@ -853,12 +853,12 @@ int ip6_datagram_send_ctl(struct net *ne } if (fl6->flowlabel&IPV6_FLOWINFO_MASK) { diff --git a/target/linux/bcm27xx/patches-6.12/950-0322-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch b/target/linux/bcm27xx/patches-6.12/950-0322-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch index aea33e7533..4e0895dc45 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0322-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0322-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch @@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c -@@ -4935,6 +4935,7 @@ static const struct { +@@ -4942,6 +4942,7 @@ static const struct { */ static int hci_dev_setup_sync(struct hci_dev *hdev) { @@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell int ret = 0; bool invalid_bdaddr; size_t i; -@@ -4963,7 +4964,8 @@ static int hci_dev_setup_sync(struct hci +@@ -4970,7 +4971,8 @@ static int hci_dev_setup_sync(struct hci test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); if (!ret) { if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) && diff --git a/target/linux/bcm27xx/patches-6.12/950-0502-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch b/target/linux/bcm27xx/patches-6.12/950-0502-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch index db23f1f1ff..ee48969572 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0502-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0502-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c -@@ -4935,7 +4935,8 @@ static const struct { +@@ -4942,7 +4942,8 @@ static const struct { */ static int hci_dev_setup_sync(struct hci_dev *hdev) { diff --git a/target/linux/bcm27xx/patches-6.12/950-0528-drm-Increase-plane_mask-to-64bit.patch b/target/linux/bcm27xx/patches-6.12/950-0528-drm-Increase-plane_mask-to-64bit.patch index 2c4861f986..1ae93a6b42 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0528-drm-Increase-plane_mask-to-64bit.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0528-drm-Increase-plane_mask-to-64bit.patch @@ -43,7 +43,7 @@ Signed-off-by: Dave Stevenson retry_disable: --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c -@@ -646,7 +646,7 @@ void drm_mode_config_validate(struct drm +@@ -643,7 +643,7 @@ void drm_mode_config_validate(struct drm struct drm_encoder *encoder; struct drm_crtc *crtc; struct drm_plane *plane; diff --git a/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch index 1fb8809180..4cdc71e443 100644 --- a/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau }; /* Specifies the type of the struct net_device::ml_priv pointer */ -@@ -2170,6 +2171,11 @@ struct net_device { +@@ -2173,6 +2174,11 @@ struct net_device { const struct tlsdev_ops *tlsdev_ops; #endif @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau unsigned int operstate; unsigned char link_mode; -@@ -2239,6 +2245,10 @@ struct net_device { +@@ -2242,6 +2248,10 @@ struct net_device { struct mctp_dev __rcu *mctp_ptr; #endif @@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3671,6 +3671,11 @@ static int xmit_one(struct sk_buff *skb, +@@ -3688,6 +3688,11 @@ static int xmit_one(struct sk_buff *skb, if (dev_nit_active(dev)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/kernel-6.12 b/target/linux/generic/kernel-6.12 index 427a005af7..c0791c53a5 100644 --- a/target/linux/generic/kernel-6.12 +++ b/target/linux/generic/kernel-6.12 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.12 = .80 -LINUX_KERNEL_HASH-6.12.80 = c92591d896e79ecddbc3319136f0c2f855e832b397de7593f013ad7590a43e53 +LINUX_VERSION-6.12 = .81 +LINUX_KERNEL_HASH-6.12.81 = c2b09c3643946a7097c5371e1dcb123c66505ea30fafd0b0a22dc1d5f0228847 diff --git a/target/linux/generic/pending-6.12/360-Revert-MIPS-mm-kmalloc-tlb_vpn-array-to-avoid-stack-.patch b/target/linux/generic/pending-6.12/360-Revert-MIPS-mm-kmalloc-tlb_vpn-array-to-avoid-stack-.patch index 522fccd8e2..72c422e0e9 100644 --- a/target/linux/generic/pending-6.12/360-Revert-MIPS-mm-kmalloc-tlb_vpn-array-to-avoid-stack-.patch +++ b/target/linux/generic/pending-6.12/360-Revert-MIPS-mm-kmalloc-tlb_vpn-array-to-avoid-stack-.patch @@ -39,7 +39,7 @@ This reverts commit 63a93d1cd6077d79735f804f5a4957bfb240280c. - tlb_vpn_size = tlbsize * sizeof(*tlb_vpns); - tlb_vpns = (use_slab ? -- kmalloc(tlb_vpn_size, GFP_KERNEL) : +- kmalloc(tlb_vpn_size, GFP_ATOMIC) : - memblock_alloc_raw(tlb_vpn_size, sizeof(*tlb_vpns))); - if (WARN_ON(!tlb_vpns)) - return; /* Pray local_flush_tlb_all() is good enough. */ diff --git a/target/linux/generic/pending-6.12/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-6.12/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 951e7f7e24..0d69783990 100644 --- a/target/linux/generic/pending-6.12/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-6.12/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -167,7 +167,7 @@ Signed-off-by: Steven Barth if (dev == ip6n->fb_tnl_dev) RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); else -@@ -790,6 +815,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, +@@ -795,6 +820,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, } EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl); @@ -275,7 +275,7 @@ Signed-off-by: Steven Barth static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, -@@ -855,6 +981,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl +@@ -860,6 +986,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); @@ -303,7 +303,7 @@ Signed-off-by: Steven Barth __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); -@@ -1004,6 +1151,7 @@ static void init_tel_txopt(struct ipv6_t +@@ -1009,6 +1156,7 @@ static void init_tel_txopt(struct ipv6_t opt->ops.opt_nflen = 8; } @@ -311,7 +311,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1293,6 +1441,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str +@@ -1298,6 +1446,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str u8 protocol) { struct ip6_tnl *t = netdev_priv(dev); @@ -319,7 +319,7 @@ Signed-off-by: Steven Barth struct ipv6hdr *ipv6h; const struct iphdr *iph; int encap_limit = -1; -@@ -1392,6 +1541,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str +@@ -1397,6 +1546,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield); @@ -338,7 +338,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1545,6 +1706,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1550,6 +1711,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.link = p->link; t->parms.proto = p->proto; t->parms.fwmark = p->fwmark; @@ -353,7 +353,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); } -@@ -1579,6 +1748,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1584,6 +1753,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -361,7 +361,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1962,6 +2132,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1967,6 +2137,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -377,7 +377,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1999,6 +2178,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -2004,6 +2183,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_FWMARK]) parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); @@ -424,7 +424,7 @@ Signed-off-by: Steven Barth } static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev, -@@ -2083,6 +2302,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2088,6 +2307,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -437,7 +437,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2112,6 +2337,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2117,6 +2342,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -462,7 +462,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2119,6 +2362,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2124,6 +2367,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -472,7 +472,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2128,9 +2374,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2133,9 +2379,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) || @@ -501,7 +501,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2170,6 +2434,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2175,6 +2439,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, [IFLA_IPTUN_FWMARK] = { .type = NLA_U32 }, diff --git a/target/linux/generic/pending-6.12/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch b/target/linux/generic/pending-6.12/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch index 0e55a56099..a9b753cf03 100644 --- a/target/linux/generic/pending-6.12/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch +++ b/target/linux/generic/pending-6.12/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch @@ -17,7 +17,7 @@ Signed-off-by: Christian Marangi --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -2226,7 +2226,7 @@ struct net_device { +@@ -2229,7 +2229,7 @@ struct net_device { #if IS_ENABLED(CONFIG_AX25) struct ax25_dev __rcu *ax25_ptr; #endif diff --git a/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch b/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch index 9141fa69b0..3f0354cd96 100644 --- a/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch +++ b/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch @@ -309,7 +309,7 @@ Signed-off-by: Felix Fietkau seq_printf(m, "%05x %s %7s", i, --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -@@ -522,24 +522,21 @@ static int +@@ -541,24 +541,21 @@ static int mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f) { struct mtk_flow_entry *entry; diff --git a/target/linux/generic/pending-6.12/750-net-sfp-add-quirk-for-QINIYEK-BJ-SFP-10G-T-copper-SF.patch b/target/linux/generic/pending-6.12/750-net-sfp-add-quirk-for-QINIYEK-BJ-SFP-10G-T-copper-SF.patch index fc2d26cb1c..ab6f135fb2 100644 --- a/target/linux/generic/pending-6.12/750-net-sfp-add-quirk-for-QINIYEK-BJ-SFP-10G-T-copper-SF.patch +++ b/target/linux/generic/pending-6.12/750-net-sfp-add-quirk-for-QINIYEK-BJ-SFP-10G-T-copper-SF.patch @@ -16,7 +16,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -557,6 +557,7 @@ static const struct sfp_quirk sfp_quirks +@@ -562,6 +562,7 @@ static const struct sfp_quirk sfp_quirks SFP_QUIRK_S("OEM", "SFP-2.5G-BX10-U", sfp_quirk_2500basex), SFP_QUIRK_F("OEM", "RTSFP-10", sfp_fixup_rollball_cc), SFP_QUIRK_F("OEM", "RTSFP-10G", sfp_fixup_rollball_cc), diff --git a/target/linux/generic/pending-6.12/791-tg3-Fix-DMA-allocations-on-57766-devices.patch b/target/linux/generic/pending-6.12/791-tg3-Fix-DMA-allocations-on-57766-devices.patch index 5181041ec0..fc4f298a9e 100644 --- a/target/linux/generic/pending-6.12/791-tg3-Fix-DMA-allocations-on-57766-devices.patch +++ b/target/linux/generic/pending-6.12/791-tg3-Fix-DMA-allocations-on-57766-devices.patch @@ -17,7 +17,7 @@ Signed-off-by: Pavan Chebbi --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c -@@ -17799,8 +17799,10 @@ static int tg3_init_one(struct pci_dev * +@@ -17810,8 +17810,10 @@ static int tg3_init_one(struct pci_dev * } else persist_dma_mask = dma_mask = DMA_BIT_MASK(64);