From: Weijie Gao Date: Fri, 8 Mar 2024 14:03:01 +0000 (+0800) Subject: generic: 6.6: refresh backport patches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6bac820c0f6aa804eeef022875706ada70f1360f;p=openwrt%2Fstaging%2Fjow.git generic: 6.6: refresh backport patches Refresh backport patches with make target/linux/refresh. Signed-off-by: Weijie Gao --- diff --git a/target/linux/generic/backport-6.6/702-02-v6.7-net-phy-aquantia-move-MMD_VEND-define-to-header.patch b/target/linux/generic/backport-6.6/702-02-v6.7-net-phy-aquantia-move-MMD_VEND-define-to-header.patch index 2b94522723..66fbf2444d 100644 --- a/target/linux/generic/backport-6.6/702-02-v6.7-net-phy-aquantia-move-MMD_VEND-define-to-header.patch +++ b/target/linux/generic/backport-6.6/702-02-v6.7-net-phy-aquantia-move-MMD_VEND-define-to-header.patch @@ -119,7 +119,7 @@ Signed-off-by: David S. Miller static umode_t aqr_hwmon_is_visible(const void *data, --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c -@@ -89,61 +89,6 @@ +@@ -91,61 +91,6 @@ #define MDIO_C22EXT_STAT_SGMII_TX_FRAME_ALIGN_ERR 0xd31a #define MDIO_C22EXT_STAT_SGMII_TX_RUNT_FRAMES 0xd31b diff --git a/target/linux/generic/backport-6.6/702-03-v6.7-net-phy-aquantia-add-firmware-load-support.patch b/target/linux/generic/backport-6.6/702-03-v6.7-net-phy-aquantia-add-firmware-load-support.patch index aa52b3baa6..1ae5966df6 100644 --- a/target/linux/generic/backport-6.6/702-03-v6.7-net-phy-aquantia-add-firmware-load-support.patch +++ b/target/linux/generic/backport-6.6/702-03-v6.7-net-phy-aquantia-add-firmware-load-support.patch @@ -484,7 +484,7 @@ Signed-off-by: David S. Miller +} --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c -@@ -656,11 +656,17 @@ static int aqr107_resume(struct phy_devi +@@ -658,11 +658,17 @@ static int aqr107_resume(struct phy_devi static int aqr107_probe(struct phy_device *phydev) { diff --git a/target/linux/generic/backport-6.6/714-v6.8-01-net-phy-make-addr-type-u8-in-phy_package_shared-stru.patch b/target/linux/generic/backport-6.6/714-v6.8-01-net-phy-make-addr-type-u8-in-phy_package_shared-stru.patch index 6decc3430b..456259281f 100644 --- a/target/linux/generic/backport-6.6/714-v6.8-01-net-phy-make-addr-type-u8-in-phy_package_shared-stru.patch +++ b/target/linux/generic/backport-6.6/714-v6.8-01-net-phy-make-addr-type-u8-in-phy_package_shared-stru.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -330,7 +330,7 @@ struct mdio_bus_stats { +@@ -338,7 +338,7 @@ struct mdio_bus_stats { * phy_package_leave(). */ struct phy_package_shared { diff --git a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch index 6e5ac8c63a..b95f15a581 100644 --- a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch +++ b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch @@ -87,7 +87,7 @@ Signed-off-by: David S. Miller phy_unlock_mdio_bus(phydev); --- a/drivers/net/phy/mscc/mscc.h +++ b/drivers/net/phy/mscc/mscc.h -@@ -414,6 +414,11 @@ struct vsc8531_private { +@@ -416,6 +416,11 @@ struct vsc8531_private { * gpio_lock: used for PHC operations. Common for all PHYs as the load/save GPIO * is shared. */ @@ -101,7 +101,7 @@ Signed-off-by: David S. Miller }; --- a/drivers/net/phy/mscc/mscc_main.c +++ b/drivers/net/phy/mscc/mscc_main.c -@@ -700,7 +700,7 @@ int phy_base_write(struct phy_device *ph +@@ -711,7 +711,7 @@ int phy_base_write(struct phy_device *ph dump_stack(); } @@ -110,7 +110,7 @@ Signed-off-by: David S. Miller } /* phydev->bus->mdio_lock should be locked when using this function */ -@@ -711,7 +711,7 @@ int phy_base_read(struct phy_device *phy +@@ -722,7 +722,7 @@ int phy_base_read(struct phy_device *phy dump_stack(); } @@ -121,7 +121,7 @@ Signed-off-by: David S. Miller u32 vsc85xx_csr_read(struct phy_device *phydev, --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1602,20 +1602,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 +@@ -1650,20 +1650,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 /** * phy_package_join - join a common PHY group * @phydev: target phy_device struct @@ -151,7 +151,7 @@ Signed-off-by: David S. Miller * * This will set the shared pointer of the phydev to the shared storage. * If this is the first call for a this cookie the shared storage will be -@@ -1625,17 +1627,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 +@@ -1673,17 +1675,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 * Returns < 1 on error, 0 on success. Esp. calling phy_package_join() * with the same cookie but a different priv_size is an error. */ @@ -172,7 +172,7 @@ Signed-off-by: David S. Miller if (!shared) { ret = -ENOMEM; shared = kzalloc(sizeof(*shared), GFP_KERNEL); -@@ -1647,9 +1649,9 @@ int phy_package_join(struct phy_device * +@@ -1695,9 +1697,9 @@ int phy_package_join(struct phy_device * goto err_free; shared->priv_size = priv_size; } @@ -184,7 +184,7 @@ Signed-off-by: David S. Miller } else { ret = -EINVAL; if (priv_size && priv_size != shared->priv_size) -@@ -1687,7 +1689,7 @@ void phy_package_leave(struct phy_device +@@ -1735,7 +1737,7 @@ void phy_package_leave(struct phy_device return; if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) { @@ -193,7 +193,7 @@ Signed-off-by: David S. Miller mutex_unlock(&bus->shared_lock); kfree(shared->priv); kfree(shared); -@@ -1706,7 +1708,8 @@ static void devm_phy_package_leave(struc +@@ -1754,7 +1756,8 @@ static void devm_phy_package_leave(struc * devm_phy_package_join - resource managed phy_package_join() * @dev: device that is registering this PHY package * @phydev: target phy_device struct @@ -203,7 +203,7 @@ Signed-off-by: David S. Miller * @priv_size: if non-zero allocate this amount of bytes for private data * * Managed phy_package_join(). Shared storage fetched by this function, -@@ -1714,7 +1717,7 @@ static void devm_phy_package_leave(struc +@@ -1762,7 +1765,7 @@ static void devm_phy_package_leave(struc * phy_package_join() for more information. */ int devm_phy_package_join(struct device *dev, struct phy_device *phydev, @@ -212,7 +212,7 @@ Signed-off-by: David S. Miller { struct phy_device **ptr; int ret; -@@ -1724,7 +1727,7 @@ int devm_phy_package_join(struct device +@@ -1772,7 +1775,7 @@ int devm_phy_package_join(struct device if (!ptr) return -ENOMEM; @@ -223,7 +223,7 @@ Signed-off-by: David S. Miller *ptr = phydev; --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -319,7 +319,8 @@ struct mdio_bus_stats { +@@ -327,7 +327,8 @@ struct mdio_bus_stats { /** * struct phy_package_shared - Shared information in PHY packages @@ -233,7 +233,7 @@ Signed-off-by: David S. Miller * @refcnt: Number of PHYs connected to this shared data * @flags: Initialization of PHY package * @priv_size: Size of the shared private data @priv -@@ -330,7 +331,7 @@ struct mdio_bus_stats { +@@ -338,7 +339,7 @@ struct mdio_bus_stats { * phy_package_leave(). */ struct phy_package_shared { diff --git a/target/linux/generic/backport-6.6/714-v6.8-03-net-phy-restructure-__phy_write-read_mmd-to-helper-a.patch b/target/linux/generic/backport-6.6/714-v6.8-03-net-phy-restructure-__phy_write-read_mmd-to-helper-a.patch index 4a17d46453..f0ca35a1f0 100644 --- a/target/linux/generic/backport-6.6/714-v6.8-03-net-phy-restructure-__phy_write-read_mmd-to-helper-a.patch +++ b/target/linux/generic/backport-6.6/714-v6.8-03-net-phy-restructure-__phy_write-read_mmd-to-helper-a.patch @@ -20,7 +20,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy-core.c +++ b/drivers/net/phy/phy-core.c -@@ -528,6 +528,28 @@ static void mmd_phy_indirect(struct mii_ +@@ -540,6 +540,28 @@ static void mmd_phy_indirect(struct mii_ devad | MII_MMD_CTRL_NOINCR); } @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller /** * __phy_read_mmd - Convenience function for reading a register * from an MMD on a given PHY. -@@ -539,26 +561,14 @@ static void mmd_phy_indirect(struct mii_ +@@ -551,26 +573,14 @@ static void mmd_phy_indirect(struct mii_ */ int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) { @@ -81,7 +81,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(__phy_read_mmd); -@@ -595,28 +605,14 @@ EXPORT_SYMBOL(phy_read_mmd); +@@ -607,28 +617,14 @@ EXPORT_SYMBOL(phy_read_mmd); */ int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val) { diff --git a/target/linux/generic/backport-6.6/714-v6.8-04-net-phy-add-support-for-PHY-package-MMD-read-write.patch b/target/linux/generic/backport-6.6/714-v6.8-04-net-phy-add-support-for-PHY-package-MMD-read-write.patch index a628a37929..c20d2ec0c0 100644 --- a/target/linux/generic/backport-6.6/714-v6.8-04-net-phy-add-support-for-PHY-package-MMD-read-write.patch +++ b/target/linux/generic/backport-6.6/714-v6.8-04-net-phy-add-support-for-PHY-package-MMD-read-write.patch @@ -22,7 +22,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy-core.c +++ b/drivers/net/phy/phy-core.c -@@ -639,6 +639,146 @@ int phy_write_mmd(struct phy_device *phy +@@ -651,6 +651,146 @@ int phy_write_mmd(struct phy_device *phy EXPORT_SYMBOL(phy_write_mmd); /** @@ -171,7 +171,7 @@ Signed-off-by: David S. Miller * @regnum: register number to modify --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -1840,6 +1840,22 @@ static inline int __phy_package_write(st +@@ -2057,6 +2057,22 @@ static inline int __phy_package_write(st return __mdiobus_write(phydev->mdio.bus, addr, regnum, val); } diff --git a/target/linux/generic/backport-6.6/716-v6.9-02-net-phy-add-support-for-scanning-PHY-in-PHY-packages.patch b/target/linux/generic/backport-6.6/716-v6.9-02-net-phy-add-support-for-scanning-PHY-in-PHY-packages.patch index 50a454b2c9..81f2d1d8e6 100644 --- a/target/linux/generic/backport-6.6/716-v6.9-02-net-phy-add-support-for-scanning-PHY-in-PHY-packages.patch +++ b/target/linux/generic/backport-6.6/716-v6.9-02-net-phy-add-support-for-scanning-PHY-in-PHY-packages.patch @@ -143,7 +143,7 @@ Signed-off-by: David S. Miller } --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c -@@ -448,19 +448,34 @@ EXPORT_SYMBOL(of_mdio_find_bus); +@@ -455,19 +455,34 @@ EXPORT_SYMBOL(of_mdio_find_bus); * found, set the of_node pointer for the mdio device. This allows * auto-probed phy devices to be supplied with information passed in * via DT. @@ -185,7 +185,7 @@ Signed-off-by: David S. Miller addr = of_mdio_parse_addr(dev, child); if (addr < 0) continue; -@@ -470,9 +485,22 @@ static void of_mdiobus_link_mdiodev(stru +@@ -477,9 +492,22 @@ static void of_mdiobus_link_mdiodev(stru /* The refcount on "child" is passed to the mdio * device. Do _not_ use of_node_put(child) here. */ diff --git a/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch b/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch index 00bbd3b80b..f3e814b1a0 100644 --- a/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch +++ b/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch @@ -27,7 +27,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1648,6 +1648,7 @@ int phy_package_join(struct phy_device * +@@ -1698,6 +1698,7 @@ int phy_package_join(struct phy_device * shared->priv_size = priv_size; } shared->base_addr = base_addr; @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller refcount_set(&shared->refcnt, 1); bus->shared[base_addr] = shared; } else { -@@ -1671,6 +1672,63 @@ err_unlock: +@@ -1721,6 +1722,63 @@ err_unlock: EXPORT_SYMBOL_GPL(phy_package_join); /** @@ -99,7 +99,7 @@ Signed-off-by: David S. Miller * phy_package_leave - leave a common PHY group * @phydev: target phy_device struct * -@@ -1686,6 +1744,10 @@ void phy_package_leave(struct phy_device +@@ -1736,6 +1794,10 @@ void phy_package_leave(struct phy_device if (!shared) return; @@ -110,7 +110,7 @@ Signed-off-by: David S. Miller if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) { bus->shared[shared->base_addr] = NULL; mutex_unlock(&bus->shared_lock); -@@ -1739,6 +1801,40 @@ int devm_phy_package_join(struct device +@@ -1789,6 +1851,40 @@ int devm_phy_package_join(struct device EXPORT_SYMBOL_GPL(devm_phy_package_join); /** @@ -153,7 +153,7 @@ Signed-off-by: David S. Miller * --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -321,6 +321,7 @@ struct mdio_bus_stats { +@@ -329,6 +329,7 @@ struct mdio_bus_stats { * struct phy_package_shared - Shared information in PHY packages * @base_addr: Base PHY address of PHY package used to combine PHYs * in one package and for offset calculation of phy_package_read/write @@ -161,7 +161,7 @@ Signed-off-by: David S. Miller * @refcnt: Number of PHYs connected to this shared data * @flags: Initialization of PHY package * @priv_size: Size of the shared private data @priv -@@ -332,6 +333,8 @@ struct mdio_bus_stats { +@@ -340,6 +341,8 @@ struct mdio_bus_stats { */ struct phy_package_shared { u8 base_addr; diff --git a/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch b/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch index acaa4a644e..0441c8f60f 100644 --- a/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch +++ b/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c -@@ -609,10 +609,11 @@ static int bcm54616s_config_aneg(struct +@@ -665,10 +665,11 @@ static int bcm54616s_config_aneg(struct static int bcm54616s_read_status(struct phy_device *phydev) { struct bcm54616s_phy_priv *priv = phydev->priv; @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -2549,12 +2549,15 @@ EXPORT_SYMBOL(genphy_read_status); +@@ -2607,12 +2607,15 @@ EXPORT_SYMBOL(genphy_read_status); /** * genphy_c37_read_status - check the link status and update current link state * @phydev: target phy_device struct @@ -58,7 +58,7 @@ Signed-off-by: David S. Miller { int lpa, err, old_link = phydev->link; -@@ -2564,9 +2567,13 @@ int genphy_c37_read_status(struct phy_de +@@ -2622,9 +2625,13 @@ int genphy_c37_read_status(struct phy_de return err; /* why bother the PHY if nothing can have changed */ @@ -89,7 +89,7 @@ Signed-off-by: David S. Miller } --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -1688,7 +1688,7 @@ int genphy_write_mmd_unsupported(struct +@@ -1849,7 +1849,7 @@ int genphy_write_mmd_unsupported(struct /* Clause 37 */ int genphy_c37_config_aneg(struct phy_device *phydev); diff --git a/target/linux/generic/backport-6.6/720-v6.9-net-mdio-ipq4019-add-support-for-clock-frequency-pro.patch b/target/linux/generic/backport-6.6/720-v6.9-net-mdio-ipq4019-add-support-for-clock-frequency-pro.patch index e6a240dbda..6749d7b0d9 100644 --- a/target/linux/generic/backport-6.6/720-v6.9-net-mdio-ipq4019-add-support-for-clock-frequency-pro.patch +++ b/target/linux/generic/backport-6.6/720-v6.9-net-mdio-ipq4019-add-support-for-clock-frequency-pro.patch @@ -90,7 +90,7 @@ Signed-off-by: David S. Miller }; static int ipq4019_mdio_wait_busy(struct mii_bus *bus) -@@ -179,6 +191,38 @@ static int ipq4019_mdio_write(struct mii +@@ -203,6 +215,38 @@ static int ipq4019_mdio_write_c22(struct return 0; } @@ -129,7 +129,7 @@ Signed-off-by: David S. Miller static int ipq_mdio_reset(struct mii_bus *bus) { struct ipq4019_mdio_data *priv = bus->priv; -@@ -201,10 +245,58 @@ static int ipq_mdio_reset(struct mii_bus +@@ -225,10 +269,58 @@ static int ipq_mdio_reset(struct mii_bus return ret; ret = clk_prepare_enable(priv->mdio_clk); @@ -191,7 +191,7 @@ Signed-off-by: David S. Miller } static int ipq4019_mdio_probe(struct platform_device *pdev) -@@ -228,6 +320,11 @@ static int ipq4019_mdio_probe(struct pla +@@ -252,6 +344,11 @@ static int ipq4019_mdio_probe(struct pla if (IS_ERR(priv->mdio_clk)) return PTR_ERR(priv->mdio_clk); diff --git a/target/linux/generic/backport-6.6/751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch b/target/linux/generic/backport-6.6/751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch index 8b8a8e11c7..2689712228 100644 --- a/target/linux/generic/backport-6.6/751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch +++ b/target/linux/generic/backport-6.6/751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -476,42 +476,43 @@ int mtk_foe_entry_set_queue(struct mtk_e +@@ -477,42 +477,43 @@ int mtk_foe_entry_set_queue(struct mtk_e return 0; } @@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, entry->hash); hwe->ib1 &= ~MTK_FOE_IB1_STATE; -@@ -531,7 +532,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp +@@ -533,7 +534,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp if (entry->type != MTK_FLOW_TYPE_L2_SUBFLOW) return; @@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau kfree(entry); } -@@ -547,66 +549,55 @@ static int __mtk_foe_entry_idle_time(str +@@ -549,66 +551,55 @@ static int __mtk_foe_entry_idle_time(str return now - timestamp; } @@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau } static void -@@ -649,7 +640,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p +@@ -651,7 +642,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry) { spin_lock_bh(&ppe_lock); @@ -191,7 +191,7 @@ Signed-off-by: Felix Fietkau spin_unlock_bh(&ppe_lock); } -@@ -696,8 +688,8 @@ mtk_foe_entry_commit_subflow(struct mtk_ +@@ -698,8 +690,8 @@ mtk_foe_entry_commit_subflow(struct mtk_ { const struct mtk_soc_data *soc = ppe->eth->soc; struct mtk_flow_entry *flow_info; @@ -201,7 +201,7 @@ Signed-off-by: Felix Fietkau u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP; int type; -@@ -705,30 +697,30 @@ mtk_foe_entry_commit_subflow(struct mtk_ +@@ -707,30 +699,30 @@ mtk_foe_entry_commit_subflow(struct mtk_ if (!flow_info) return; @@ -242,7 +242,7 @@ Signed-off-by: Felix Fietkau } void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash) -@@ -738,9 +730,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe +@@ -740,9 +732,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, hash); struct mtk_flow_entry *entry; struct mtk_foe_bridge key = {}; @@ -254,7 +254,7 @@ Signed-off-by: Felix Fietkau u8 *tag; spin_lock_bh(&ppe_lock); -@@ -748,20 +742,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe +@@ -750,20 +744,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe if (FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == MTK_FOE_STATE_BIND) goto out; @@ -281,7 +281,7 @@ Signed-off-by: Felix Fietkau continue; } -@@ -810,9 +798,17 @@ out: +@@ -814,9 +802,17 @@ out: int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry) { diff --git a/target/linux/generic/backport-6.6/751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch b/target/linux/generic/backport-6.6/751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch index e5f0c2f54d..a93f80ac79 100644 --- a/target/linux/generic/backport-6.6/751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch +++ b/target/linux/generic/backport-6.6/751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch @@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau } static void mtk_ppe_cache_clear(struct mtk_ppe *ppe) -@@ -522,14 +536,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp +@@ -520,14 +534,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID); dma_wmb(); mtk_ppe_cache_clear(ppe); @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau } entry->hash = 0xffff; -@@ -554,11 +560,14 @@ static int __mtk_foe_entry_idle_time(str +@@ -552,11 +558,14 @@ static int __mtk_foe_entry_idle_time(str } static bool @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau int len; if (hash == 0xffff) -@@ -569,18 +578,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp +@@ -567,18 +576,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp memcpy(&foe, hwe, len); if (!mtk_flow_entry_match(ppe->eth, entry, &foe, len) || @@ -156,7 +156,7 @@ Signed-off-by: Felix Fietkau struct mtk_flow_entry *cur; struct hlist_node *tmp; int idle; -@@ -589,7 +615,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe +@@ -587,7 +613,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe hlist_for_each_entry_safe(cur, tmp, &entry->l2_flows, l2_list) { int cur_idle; @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau __mtk_foe_entry_clear(ppe, entry, false); continue; } -@@ -604,10 +632,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe +@@ -602,10 +630,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe } } @@ -197,7 +197,7 @@ Signed-off-by: Felix Fietkau struct mtk_eth *eth = ppe->eth; u16 timestamp = mtk_eth_timestamp(eth); struct mtk_foe_entry *hwe; -@@ -638,6 +685,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p +@@ -636,6 +683,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p dma_wmb(); @@ -210,7 +210,7 @@ Signed-off-by: Felix Fietkau mtk_ppe_cache_clear(ppe); } -@@ -802,21 +855,6 @@ void __mtk_ppe_check_skb(struct mtk_ppe +@@ -800,21 +853,6 @@ out: spin_unlock_bh(&ppe_lock); } @@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau int mtk_ppe_prepare_reset(struct mtk_ppe *ppe) { if (!ppe) -@@ -844,32 +882,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe +@@ -842,32 +880,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe return mtk_ppe_wait_busy(ppe); } @@ -284,7 +284,7 @@ Signed-off-by: Felix Fietkau void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash); -@@ -397,9 +400,8 @@ int mtk_foe_entry_set_queue(struct mtk_e +@@ -396,9 +399,8 @@ int mtk_foe_entry_set_queue(struct mtk_e unsigned int queue); int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); @@ -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 -@@ -505,24 +505,21 @@ static int +@@ -501,24 +501,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/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch b/target/linux/generic/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch index cd7fb92e20..d6ef40cd5b 100644 --- a/target/linux/generic/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch +++ b/target/linux/generic/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch @@ -14,7 +14,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -1712,19 +1712,20 @@ mtk_wed_irq_set_mask(struct mtk_wed_devi +@@ -1713,19 +1713,20 @@ mtk_wed_irq_set_mask(struct mtk_wed_devi int mtk_wed_flow_add(int index) { struct mtk_wed_hw *hw = hw_list[index]; @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller goto out; } -@@ -1743,14 +1744,15 @@ void mtk_wed_flow_remove(int index) +@@ -1744,14 +1745,15 @@ void mtk_wed_flow_remove(int index) { struct mtk_wed_hw *hw = hw_list[index]; diff --git a/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch b/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch index 2948188650..af4600a986 100644 --- a/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch +++ b/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch @@ -15,7 +15,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -277,7 +277,7 @@ mtk_wed_assign(struct mtk_wed_device *de +@@ -278,7 +278,7 @@ mtk_wed_assign(struct mtk_wed_device *de if (!hw->wed_dev) goto out; @@ -24,7 +24,7 @@ Signed-off-by: Paolo Abeni return NULL; /* MT7986 WED devices do not have any pcie slot restrictions */ -@@ -358,7 +358,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d +@@ -359,7 +359,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d desc->buf0 = cpu_to_le32(buf_phys); desc->buf1 = cpu_to_le32(buf_phys + txd_size); @@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size) | FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1, MTK_WED_BUF_SIZE - txd_size) | -@@ -497,7 +497,7 @@ mtk_wed_set_ext_int(struct mtk_wed_devic +@@ -498,7 +498,7 @@ mtk_wed_set_ext_int(struct mtk_wed_devic { u32 mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK; @@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR; else mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH | -@@ -576,7 +576,7 @@ mtk_wed_dma_disable(struct mtk_wed_devic +@@ -577,7 +577,7 @@ mtk_wed_dma_disable(struct mtk_wed_devic MTK_WDMA_GLO_CFG_RX_INFO1_PRERES | MTK_WDMA_GLO_CFG_RX_INFO2_PRERES); @@ -51,7 +51,7 @@ Signed-off-by: Paolo Abeni regmap_write(dev->hw->mirror, dev->hw->index * 4, 0); wdma_clr(dev, MTK_WDMA_GLO_CFG, MTK_WDMA_GLO_CFG_RX_INFO3_PRERES); -@@ -605,7 +605,7 @@ mtk_wed_stop(struct mtk_wed_device *dev) +@@ -606,7 +606,7 @@ mtk_wed_stop(struct mtk_wed_device *dev) wdma_w32(dev, MTK_WDMA_INT_GRP2, 0); wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0); @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni return; wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0); -@@ -624,7 +624,7 @@ mtk_wed_deinit(struct mtk_wed_device *de +@@ -625,7 +625,7 @@ mtk_wed_deinit(struct mtk_wed_device *de MTK_WED_CTRL_WED_TX_BM_EN | MTK_WED_CTRL_WED_TX_FREE_AGENT_EN); @@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni return; wed_clr(dev, MTK_WED_CTRL, -@@ -730,7 +730,7 @@ mtk_wed_bus_init(struct mtk_wed_device * +@@ -731,7 +731,7 @@ mtk_wed_bus_init(struct mtk_wed_device * static void mtk_wed_set_wpdma(struct mtk_wed_device *dev) { @@ -78,7 +78,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys); } else { mtk_wed_bus_init(dev); -@@ -761,7 +761,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev +@@ -762,7 +762,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev MTK_WED_WDMA_GLO_CFG_IDLE_DMAD_SUPPLY; wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set); @@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni u32 offset = dev->hw->index ? 0x04000400 : 0; wdma_set(dev, MTK_WDMA_GLO_CFG, -@@ -934,7 +934,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -935,7 +935,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE); @@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_TX_BM_TKID, FIELD_PREP(MTK_WED_TX_BM_TKID_START, dev->wlan.token_start) | -@@ -967,7 +967,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -968,7 +968,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d mtk_wed_reset(dev, MTK_WED_RESET_TX_BM); @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_TX_BM_EN | MTK_WED_CTRL_WED_TX_FREE_AGENT_EN); -@@ -1217,7 +1217,7 @@ mtk_wed_reset_dma(struct mtk_wed_device +@@ -1218,7 +1218,7 @@ mtk_wed_reset_dma(struct mtk_wed_device } dev->init_done = false; @@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni return; if (!busy) { -@@ -1343,7 +1343,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev +@@ -1344,7 +1344,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev MTK_WED_CTRL_WED_TX_BM_EN | MTK_WED_CTRL_WED_TX_FREE_AGENT_EN); @@ -123,7 +123,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER, MTK_WED_PCIE_INT_TRIGGER_STATUS); -@@ -1416,7 +1416,7 @@ mtk_wed_dma_enable(struct mtk_wed_device +@@ -1417,7 +1417,7 @@ mtk_wed_dma_enable(struct mtk_wed_device MTK_WDMA_GLO_CFG_RX_INFO1_PRERES | MTK_WDMA_GLO_CFG_RX_INFO2_PRERES); @@ -132,7 +132,7 @@ Signed-off-by: Paolo Abeni wdma_set(dev, MTK_WDMA_GLO_CFG, MTK_WDMA_GLO_CFG_RX_INFO3_PRERES); } else { -@@ -1465,7 +1465,7 @@ mtk_wed_start(struct mtk_wed_device *dev +@@ -1466,7 +1466,7 @@ mtk_wed_start(struct mtk_wed_device *dev mtk_wed_set_ext_int(dev, true); @@ -141,7 +141,7 @@ Signed-off-by: Paolo Abeni u32 val = dev->wlan.wpdma_phys | MTK_PCIE_MIRROR_MAP_EN | FIELD_PREP(MTK_PCIE_MIRROR_MAP_WED_ID, dev->hw->index); -@@ -1550,7 +1550,7 @@ mtk_wed_attach(struct mtk_wed_device *de +@@ -1551,7 +1551,7 @@ mtk_wed_attach(struct mtk_wed_device *de } mtk_wed_hw_init_early(dev); @@ -150,7 +150,7 @@ Signed-off-by: Paolo Abeni regmap_update_bits(hw->hifsys, HIFSYS_DMA_AG_MAP, BIT(hw->index), 0); } else { -@@ -1618,7 +1618,7 @@ static int +@@ -1619,7 +1619,7 @@ static int mtk_wed_txfree_ring_setup(struct mtk_wed_device *dev, void __iomem *regs) { struct mtk_wed_ring *ring = &dev->txfree_ring; @@ -159,7 +159,7 @@ Signed-off-by: Paolo Abeni /* * For txfree event handling, the same DMA ring is shared between WED -@@ -1676,7 +1676,7 @@ mtk_wed_irq_get(struct mtk_wed_device *d +@@ -1677,7 +1677,7 @@ mtk_wed_irq_get(struct mtk_wed_device *d { u32 val, ext_mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK; @@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni ext_mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR; else ext_mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH | -@@ -1843,7 +1843,7 @@ mtk_wed_setup_tc(struct mtk_wed_device * +@@ -1844,7 +1844,7 @@ mtk_wed_setup_tc(struct mtk_wed_device * { struct mtk_wed_hw *hw = wed->hw; @@ -177,7 +177,7 @@ Signed-off-by: Paolo Abeni return -EOPNOTSUPP; switch (type) { -@@ -1917,9 +1917,9 @@ void mtk_wed_add_hw(struct device_node * +@@ -1918,9 +1918,9 @@ void mtk_wed_add_hw(struct device_node * hw->wdma = wdma; hw->index = index; hw->irq = irq; @@ -210,7 +210,7 @@ Signed-off-by: Paolo Abeni { --- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c +++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c -@@ -263,7 +263,7 @@ void mtk_wed_hw_add_debugfs(struct mtk_w +@@ -261,7 +261,7 @@ void mtk_wed_hw_add_debugfs(struct mtk_w debugfs_create_u32("regidx", 0600, dir, &hw->debugfs_reg); debugfs_create_file_unsafe("regval", 0600, dir, hw, &fops_regval); debugfs_create_file_unsafe("txinfo", 0400, dir, hw, &wed_txinfo_fops); diff --git a/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch b/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch index bc34aa33a9..d5bacde325 100644 --- a/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch +++ b/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch @@ -15,7 +15,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -605,7 +605,7 @@ mtk_wed_stop(struct mtk_wed_device *dev) +@@ -606,7 +606,7 @@ mtk_wed_stop(struct mtk_wed_device *dev) wdma_w32(dev, MTK_WDMA_INT_GRP2, 0); wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0); @@ -24,7 +24,7 @@ Signed-off-by: Paolo Abeni return; wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0); -@@ -732,16 +732,21 @@ mtk_wed_set_wpdma(struct mtk_wed_device +@@ -733,16 +733,21 @@ mtk_wed_set_wpdma(struct mtk_wed_device { if (mtk_wed_is_v1(dev->hw)) { wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys); @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -973,15 +978,17 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -974,15 +979,17 @@ mtk_wed_hw_init(struct mtk_wed_device *d MTK_WED_CTRL_WED_TX_FREE_AGENT_EN); } else { wed_clr(dev, MTK_WED_TX_TKID_CTRL, MTK_WED_TX_TKID_CTRL_PAUSE); @@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni } wed_clr(dev, MTK_WED_TX_BM_CTRL, MTK_WED_TX_BM_CTRL_PAUSE); -@@ -1353,8 +1360,6 @@ mtk_wed_configure_irq(struct mtk_wed_dev +@@ -1354,8 +1361,6 @@ mtk_wed_configure_irq(struct mtk_wed_dev wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask); } else { @@ -91,7 +91,7 @@ Signed-off-by: Paolo Abeni /* initail tx interrupt trigger */ wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX, MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN | -@@ -1373,15 +1378,20 @@ mtk_wed_configure_irq(struct mtk_wed_dev +@@ -1374,15 +1379,20 @@ mtk_wed_configure_irq(struct mtk_wed_dev FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_TX_FREE_DONE_TRIG, dev->wlan.txfree_tbit)); @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_WDMA_INT_CLR, wdma_mask); wed_set(dev, MTK_WED_WDMA_INT_CTRL, -@@ -1400,6 +1410,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev +@@ -1401,6 +1411,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev static void mtk_wed_dma_enable(struct mtk_wed_device *dev) { @@ -130,7 +130,7 @@ Signed-off-by: Paolo Abeni wed_set(dev, MTK_WED_WPDMA_INT_CTRL, MTK_WED_WPDMA_INT_CTRL_SUBRT_ADV); wed_set(dev, MTK_WED_GLO_CFG, -@@ -1419,33 +1431,33 @@ mtk_wed_dma_enable(struct mtk_wed_device +@@ -1420,33 +1432,33 @@ mtk_wed_dma_enable(struct mtk_wed_device if (mtk_wed_is_v1(dev->hw)) { wdma_set(dev, MTK_WDMA_GLO_CFG, MTK_WDMA_GLO_CFG_RX_INFO3_PRERES); @@ -186,7 +186,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -1472,7 +1484,7 @@ mtk_wed_start(struct mtk_wed_device *dev +@@ -1473,7 +1485,7 @@ mtk_wed_start(struct mtk_wed_device *dev val |= BIT(0) | (BIT(1) * !!dev->hw->index); regmap_write(dev->hw->mirror, dev->hw->index * 4, val); @@ -195,7 +195,7 @@ Signed-off-by: Paolo Abeni /* driver set mid ready and only once */ wed_w32(dev, MTK_WED_EXT_INT_MASK1, MTK_WED_EXT_INT_STATUS_WPDMA_MID_RDY); -@@ -1484,7 +1496,6 @@ mtk_wed_start(struct mtk_wed_device *dev +@@ -1485,7 +1497,6 @@ mtk_wed_start(struct mtk_wed_device *dev if (mtk_wed_rro_cfg(dev)) return; @@ -203,7 +203,7 @@ Signed-off-by: Paolo Abeni } mtk_wed_set_512_support(dev, dev->wlan.wcid_512); -@@ -1550,13 +1561,14 @@ mtk_wed_attach(struct mtk_wed_device *de +@@ -1551,13 +1562,14 @@ mtk_wed_attach(struct mtk_wed_device *de } mtk_wed_hw_init_early(dev); diff --git a/target/linux/generic/backport-6.6/752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch b/target/linux/generic/backport-6.6/752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch index 0a4a8ba0e1..618624adf7 100644 --- a/target/linux/generic/backport-6.6/752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch +++ b/target/linux/generic/backport-6.6/752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch @@ -12,7 +12,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -599,7 +599,7 @@ mtk_wed_free_tx_buffer(struct mtk_wed_device +@@ -422,7 +422,7 @@ free_pagelist: static int mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev) { @@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni dma_addr_t desc_phys; dev->rx_buf_ring.size = dev->wlan.rx_nbuf; -@@ -619,7 +619,7 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d +@@ -442,7 +442,7 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d static void mtk_wed_free_rx_buffer(struct mtk_wed_device *dev) { @@ -41,7 +41,7 @@ Signed-off-by: Paolo Abeni __le32 buf0; __le32 token; } __packed __aligned(4); -@@ -109,7 +109,7 @@ struct mtk_wed_device { +@@ -104,7 +104,7 @@ struct mtk_wed_device { struct { int size; diff --git a/target/linux/generic/backport-6.6/752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch b/target/linux/generic/backport-6.6/752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch index 8000a8759e..15dbaf0f6f 100644 --- a/target/linux/generic/backport-6.6/752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch +++ b/target/linux/generic/backport-6.6/752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch @@ -15,7 +15,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -299,9 +299,9 @@ out: +@@ -300,9 +300,9 @@ out: static int mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev) { @@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni int token = dev->wlan.token_start; int ring_size; int n_pages; -@@ -342,7 +342,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d +@@ -343,7 +343,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d return -ENOMEM; } @@ -36,7 +36,7 @@ Signed-off-by: Paolo Abeni dma_sync_single_for_cpu(dev->hw->dev, page_phys, PAGE_SIZE, DMA_BIDIRECTIONAL); -@@ -386,8 +387,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d +@@ -387,8 +388,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d static void mtk_wed_free_tx_buffer(struct mtk_wed_device *dev) { @@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni int page_idx; int i; -@@ -399,13 +400,12 @@ mtk_wed_free_tx_buffer(struct mtk_wed_de +@@ -400,13 +401,12 @@ mtk_wed_free_tx_buffer(struct mtk_wed_de for (i = 0, page_idx = 0; i < dev->tx_buf_ring.size; i += MTK_WED_BUF_PER_PAGE) { diff --git a/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch b/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch index c43114fb5b..71b32c545b 100644 --- a/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch +++ b/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch @@ -11,7 +11,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -48,6 +48,26 @@ struct mtk_wed_flow_block_priv { +@@ -49,6 +49,26 @@ struct mtk_wed_flow_block_priv { struct net_device *dev; }; @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni static void wed_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val) { -@@ -746,7 +766,7 @@ mtk_wed_set_wpdma(struct mtk_wed_device +@@ -747,7 +767,7 @@ mtk_wed_set_wpdma(struct mtk_wed_device return; wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo); @@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -940,22 +960,10 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -941,22 +961,10 @@ mtk_wed_hw_init(struct mtk_wed_device *d wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE); if (mtk_wed_is_v1(dev->hw)) { @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_TX_BM_DYN_THR, FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) | MTK_WED_TX_BM_DYN_THR_HI_V2); -@@ -970,6 +978,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -971,6 +979,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d MTK_WED_TX_TKID_DYN_THR_HI); } @@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni mtk_wed_reset(dev, MTK_WED_RESET_TX_BM); if (mtk_wed_is_v1(dev->hw)) { -@@ -1104,13 +1117,8 @@ mtk_wed_rx_reset(struct mtk_wed_device * +@@ -1105,13 +1118,8 @@ mtk_wed_rx_reset(struct mtk_wed_device * if (ret) { mtk_wed_reset(dev, MTK_WED_RESET_WED_RX_DMA); } else { @@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_RESET_IDX, 0); } -@@ -1163,7 +1171,8 @@ mtk_wed_reset_dma(struct mtk_wed_device +@@ -1164,7 +1172,8 @@ mtk_wed_reset_dma(struct mtk_wed_device if (busy) { mtk_wed_reset(dev, MTK_WED_RESET_WED_TX_DMA); } else { @@ -108,7 +108,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_RESET_IDX, 0); } -@@ -1255,7 +1264,6 @@ static int +@@ -1256,7 +1265,6 @@ static int mtk_wed_wdma_rx_ring_setup(struct mtk_wed_device *dev, int idx, int size, bool reset) { @@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni struct mtk_wed_ring *wdma; if (idx >= ARRAY_SIZE(dev->rx_wdma)) -@@ -1263,7 +1271,7 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we +@@ -1264,7 +1272,7 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we wdma = &dev->rx_wdma[idx]; if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE, @@ -125,7 +125,7 @@ Signed-off-by: Paolo Abeni return -ENOMEM; wdma_w32(dev, MTK_WDMA_RING_RX(idx) + MTK_WED_RING_OFS_BASE, -@@ -1284,7 +1292,6 @@ static int +@@ -1285,7 +1293,6 @@ static int mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size, bool reset) { @@ -133,7 +133,7 @@ Signed-off-by: Paolo Abeni struct mtk_wed_ring *wdma; if (idx >= ARRAY_SIZE(dev->tx_wdma)) -@@ -1292,7 +1299,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we +@@ -1293,7 +1300,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we wdma = &dev->tx_wdma[idx]; if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE, @@ -142,7 +142,7 @@ Signed-off-by: Paolo Abeni return -ENOMEM; wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE, -@@ -1931,7 +1938,12 @@ void mtk_wed_add_hw(struct device_node * +@@ -1932,7 +1939,12 @@ void mtk_wed_add_hw(struct device_node * hw->irq = irq; hw->version = eth->soc->version; @@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni hw->mirror = syscon_regmap_lookup_by_phandle(eth_np, "mediatek,pcie-mirror"); hw->hifsys = syscon_regmap_lookup_by_phandle(eth_np, -@@ -1945,6 +1957,8 @@ void mtk_wed_add_hw(struct device_node * +@@ -1946,6 +1958,8 @@ void mtk_wed_add_hw(struct device_node * regmap_write(hw->mirror, 0, 0); regmap_write(hw->mirror, 4, 0); } diff --git a/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch b/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch index f874899c5b..12733b142f 100644 --- a/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch +++ b/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch @@ -13,7 +13,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -195,6 +195,7 @@ static const struct mtk_reg_map mt7988_r +@@ -197,6 +197,7 @@ static const struct mtk_reg_map mt7988_r .wdma_base = { [0] = 0x4800, [1] = 0x4c00, @@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni } --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -16,17 +16,19 @@ +@@ -17,17 +17,19 @@ #include #include #include "mtk_eth_soc.h" @@ -68,7 +68,7 @@ Signed-off-by: Paolo Abeni #define MTK_WED_TX_RING_SIZE 2048 #define MTK_WED_WDMA_RING_SIZE 1024 -@@ -40,7 +42,10 @@ +@@ -41,7 +43,10 @@ #define MTK_WED_RRO_QUE_CNT 8192 #define MTK_WED_MIOD_ENTRY_CNT 128 @@ -80,7 +80,7 @@ Signed-off-by: Paolo Abeni static DEFINE_MUTEX(hw_lock); struct mtk_wed_flow_block_priv { -@@ -55,6 +60,7 @@ static const struct mtk_wed_soc_data mt7 +@@ -56,6 +61,7 @@ static const struct mtk_wed_soc_data mt7 .reset_idx_tx_mask = GENMASK(3, 0), .reset_idx_rx_mask = GENMASK(17, 16), }, @@ -88,7 +88,7 @@ Signed-off-by: Paolo Abeni .wdma_desc_size = sizeof(struct mtk_wdma_desc), }; -@@ -65,6 +71,18 @@ static const struct mtk_wed_soc_data mt7 +@@ -66,6 +72,18 @@ static const struct mtk_wed_soc_data mt7 .reset_idx_tx_mask = GENMASK(1, 0), .reset_idx_rx_mask = GENMASK(7, 6), }, @@ -107,7 +107,7 @@ Signed-off-by: Paolo Abeni .wdma_desc_size = 2 * sizeof(struct mtk_wdma_desc), }; -@@ -319,33 +337,38 @@ out: +@@ -320,33 +338,38 @@ out: static int mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev) { @@ -159,7 +159,7 @@ Signed-off-by: Paolo Abeni dma_addr_t page_phys, buf_phys; struct page *page; void *buf; -@@ -371,28 +394,31 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d +@@ -372,28 +395,31 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d buf_phys = page_phys; for (s = 0; s < MTK_WED_BUF_PER_PAGE; s++) { @@ -209,7 +209,7 @@ Signed-off-by: Paolo Abeni buf += MTK_WED_BUF_SIZE; buf_phys += MTK_WED_BUF_SIZE; } -@@ -408,31 +434,31 @@ static void +@@ -409,31 +435,31 @@ static void mtk_wed_free_tx_buffer(struct mtk_wed_device *dev) { struct mtk_wed_buf *page_list = dev->tx_buf_ring.pages; @@ -251,7 +251,7 @@ Signed-off-by: Paolo Abeni free_pagelist: kfree(page_list); -@@ -517,13 +543,23 @@ mtk_wed_set_ext_int(struct mtk_wed_devic +@@ -518,13 +544,23 @@ mtk_wed_set_ext_int(struct mtk_wed_devic { u32 mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK; @@ -277,7 +277,7 @@ Signed-off-by: Paolo Abeni if (!dev->hw->num_flows) mask &= ~MTK_WED_EXT_INT_STATUS_TKID_WO_PYLD; -@@ -535,6 +571,9 @@ mtk_wed_set_ext_int(struct mtk_wed_devic +@@ -536,6 +572,9 @@ mtk_wed_set_ext_int(struct mtk_wed_devic static void mtk_wed_set_512_support(struct mtk_wed_device *dev, bool enable) { @@ -287,7 +287,7 @@ Signed-off-by: Paolo Abeni if (enable) { wed_w32(dev, MTK_WED_TXDP_CTRL, MTK_WED_TXDP_DW9_OVERWR); wed_w32(dev, MTK_WED_TXP_DW1, -@@ -609,6 +648,14 @@ mtk_wed_dma_disable(struct mtk_wed_devic +@@ -610,6 +649,14 @@ mtk_wed_dma_disable(struct mtk_wed_devic MTK_WED_WPDMA_RX_D_RX_DRV_EN); wed_clr(dev, MTK_WED_WDMA_GLO_CFG, MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK); @@ -302,7 +302,7 @@ Signed-off-by: Paolo Abeni } mtk_wed_set_512_support(dev, false); -@@ -651,6 +698,14 @@ mtk_wed_deinit(struct mtk_wed_device *de +@@ -652,6 +699,14 @@ mtk_wed_deinit(struct mtk_wed_device *de MTK_WED_CTRL_RX_ROUTE_QM_EN | MTK_WED_CTRL_WED_RX_BM_EN | MTK_WED_CTRL_RX_RRO_QM_EN); @@ -317,7 +317,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -700,21 +755,37 @@ mtk_wed_detach(struct mtk_wed_device *de +@@ -701,21 +756,37 @@ mtk_wed_detach(struct mtk_wed_device *de mutex_unlock(&hw_lock); } @@ -362,7 +362,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_PCIE_INT_CTRL, FIELD_PREP(MTK_WED_PCIE_INT_CTRL_POLL_EN, 2)); -@@ -722,19 +793,9 @@ mtk_wed_bus_init(struct mtk_wed_device * +@@ -723,19 +794,9 @@ mtk_wed_bus_init(struct mtk_wed_device * /* pcie interrupt control: pola/source selection */ wed_set(dev, MTK_WED_PCIE_INT_CTRL, MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA | @@ -385,7 +385,7 @@ Signed-off-by: Paolo Abeni break; } case MTK_WED_BUS_AXI: -@@ -772,18 +833,19 @@ mtk_wed_set_wpdma(struct mtk_wed_device +@@ -773,18 +834,19 @@ mtk_wed_set_wpdma(struct mtk_wed_device static void mtk_wed_hw_init_early(struct mtk_wed_device *dev) { @@ -412,7 +412,7 @@ Signed-off-by: Paolo Abeni wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set); if (mtk_wed_is_v1(dev->hw)) { -@@ -931,11 +993,18 @@ mtk_wed_route_qm_hw_init(struct mtk_wed_ +@@ -932,11 +994,18 @@ mtk_wed_route_qm_hw_init(struct mtk_wed_ } /* configure RX_ROUTE_QM */ @@ -436,7 +436,7 @@ Signed-off-by: Paolo Abeni /* enable RX_ROUTE_QM */ wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_RX_ROUTE_QM_EN); } -@@ -948,22 +1017,30 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -949,22 +1018,30 @@ mtk_wed_hw_init(struct mtk_wed_device *d dev->init_done = true; mtk_wed_set_ext_int(dev, false); @@ -475,7 +475,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_TX_BM_DYN_THR, FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) | MTK_WED_TX_BM_DYN_THR_HI_V2); -@@ -973,9 +1050,6 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -974,9 +1051,6 @@ mtk_wed_hw_init(struct mtk_wed_device *d dev->tx_buf_ring.size / 128) | FIELD_PREP(MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM, dev->tx_buf_ring.size / 128)); @@ -485,7 +485,7 @@ Signed-off-by: Paolo Abeni } wed_w32(dev, dev->hw->soc->regmap.tx_bm_tkid, -@@ -985,26 +1059,62 @@ mtk_wed_hw_init(struct mtk_wed_device *d +@@ -986,26 +1060,62 @@ mtk_wed_hw_init(struct mtk_wed_device *d mtk_wed_reset(dev, MTK_WED_RESET_TX_BM); @@ -561,7 +561,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -1302,6 +1412,24 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we +@@ -1303,6 +1413,24 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we dev->hw->soc->wdma_desc_size, true)) return -ENOMEM; @@ -586,7 +586,7 @@ Signed-off-by: Paolo Abeni wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE, wdma->desc_phys); wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_COUNT, -@@ -1367,6 +1495,9 @@ mtk_wed_configure_irq(struct mtk_wed_dev +@@ -1368,6 +1496,9 @@ mtk_wed_configure_irq(struct mtk_wed_dev wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask); } else { @@ -596,7 +596,7 @@ Signed-off-by: Paolo Abeni /* initail tx interrupt trigger */ wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX, MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN | -@@ -1419,33 +1550,60 @@ mtk_wed_dma_enable(struct mtk_wed_device +@@ -1420,33 +1551,60 @@ mtk_wed_dma_enable(struct mtk_wed_device { int i; @@ -668,7 +668,7 @@ Signed-off-by: Paolo Abeni wed_clr(dev, MTK_WED_WPDMA_GLO_CFG, MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP | MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV); -@@ -1457,11 +1615,22 @@ mtk_wed_dma_enable(struct mtk_wed_device +@@ -1458,11 +1616,22 @@ mtk_wed_dma_enable(struct mtk_wed_device MTK_WED_WDMA_GLO_CFG_TX_DRV_EN | MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK); @@ -693,7 +693,7 @@ Signed-off-by: Paolo Abeni for (i = 0; i < MTK_WED_RX_QUEUES; i++) mtk_wed_check_wfdma_rx_fill(dev, i); -@@ -1501,6 +1670,12 @@ mtk_wed_start(struct mtk_wed_device *dev +@@ -1502,6 +1671,12 @@ mtk_wed_start(struct mtk_wed_device *dev wed_r32(dev, MTK_WED_EXT_INT_MASK1); wed_r32(dev, MTK_WED_EXT_INT_MASK2); @@ -706,7 +706,7 @@ Signed-off-by: Paolo Abeni if (mtk_wed_rro_cfg(dev)) return; } -@@ -1552,6 +1727,7 @@ mtk_wed_attach(struct mtk_wed_device *de +@@ -1553,6 +1728,7 @@ mtk_wed_attach(struct mtk_wed_device *de dev->irq = hw->irq; dev->wdma_idx = hw->index; dev->version = hw->version; @@ -714,7 +714,7 @@ Signed-off-by: Paolo Abeni if (hw->eth->dma_dev == hw->eth->dev && of_dma_is_coherent(hw->eth->dev->of_node)) -@@ -1619,6 +1795,23 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev +@@ -1620,6 +1796,23 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev ring->reg_base = MTK_WED_RING_TX(idx); ring->wpdma = regs; @@ -738,7 +738,7 @@ Signed-off-by: Paolo Abeni /* WED -> WPDMA */ wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_BASE, ring->desc_phys); wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_COUNT, MTK_WED_TX_RING_SIZE); -@@ -1693,15 +1886,13 @@ mtk_wed_rx_ring_setup(struct mtk_wed_dev +@@ -1694,15 +1887,13 @@ mtk_wed_rx_ring_setup(struct mtk_wed_dev static u32 mtk_wed_irq_get(struct mtk_wed_device *dev, u32 mask) { @@ -759,7 +759,7 @@ Signed-off-by: Paolo Abeni val = wed_r32(dev, MTK_WED_EXT_INT_STATUS); wed_w32(dev, MTK_WED_EXT_INT_STATUS, val); -@@ -1942,6 +2133,9 @@ void mtk_wed_add_hw(struct device_node * +@@ -1943,6 +2134,9 @@ void mtk_wed_add_hw(struct device_node * case 2: hw->soc = &mt7986_data; break; @@ -1254,7 +1254,7 @@ Signed-off-by: Paolo Abeni #define MTK_WO_MCU_CFG_LS_HW_VER_ADDR (MTK_WO_MCU_CFG_LS_BASE + 0x000) --- a/include/linux/soc/mediatek/mtk_wed.h +++ b/include/linux/soc/mediatek/mtk_wed.h -@@ -139,6 +139,8 @@ struct mtk_wed_device { +@@ -138,6 +138,8 @@ struct mtk_wed_device { u32 wpdma_rx; bool wcid_512; @@ -1263,7 +1263,7 @@ Signed-off-by: Paolo Abeni u16 token_start; unsigned int nbuf; -@@ -212,10 +214,12 @@ mtk_wed_device_attach(struct mtk_wed_dev +@@ -211,10 +213,12 @@ mtk_wed_device_attach(struct mtk_wed_dev return ret; } diff --git a/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch b/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch index e91ae69d08..5e12343de2 100644 --- a/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch +++ b/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch @@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -585,22 +585,15 @@ mtk_wed_set_512_support(struct mtk_wed_d +@@ -586,22 +586,15 @@ mtk_wed_set_512_support(struct mtk_wed_d } } @@ -41,7 +41,7 @@ Signed-off-by: Paolo Abeni if (cur_idx == MTK_WED_RX_RING_SIZE - 1) break; -@@ -609,12 +602,10 @@ mtk_wed_check_wfdma_rx_fill(struct mtk_w +@@ -610,12 +603,10 @@ mtk_wed_check_wfdma_rx_fill(struct mtk_w if (i == 3) { dev_err(dev->hw->dev, "rx dma enable failed\n"); @@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -1545,6 +1536,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev +@@ -1546,6 +1537,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev wed_w32(dev, MTK_WED_INT_MASK, irq_mask); } @@ -64,7 +64,7 @@ Signed-off-by: Paolo Abeni static void mtk_wed_dma_enable(struct mtk_wed_device *dev) { -@@ -1632,8 +1624,26 @@ mtk_wed_dma_enable(struct mtk_wed_device +@@ -1633,8 +1625,26 @@ mtk_wed_dma_enable(struct mtk_wed_device wdma_set(dev, MTK_WDMA_WRBK_TX_CFG, MTK_WDMA_WRBK_TX_CFG_WRBK_EN); } diff --git a/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch b/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch index 6534d73d8e..f70886aa0d 100644 --- a/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch +++ b/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch @@ -15,7 +15,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -438,7 +438,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e +@@ -439,7 +439,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e } int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry, @@ -25,7 +25,7 @@ Signed-off-by: Paolo Abeni { struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); u32 *ib2 = mtk_foe_entry_ib2(eth, entry); -@@ -450,6 +451,7 @@ int mtk_foe_entry_set_wdma(struct mtk_et +@@ -451,6 +452,7 @@ int mtk_foe_entry_set_wdma(struct mtk_et MTK_FOE_IB2_WDMA_WINFO_V2; l2->w3info = FIELD_PREP(MTK_FOE_WINFO_WCID_V3, wcid) | FIELD_PREP(MTK_FOE_WINFO_BSS_V3, bss); @@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni case 0: --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -29,6 +29,8 @@ +@@ -30,6 +30,8 @@ #define MTK_WED_RX_PAGE_BUF_PER_PAGE (PAGE_SIZE / 128) #define MTK_WED_RX_RING_SIZE 1536 #define MTK_WED_RX_PG_BM_CNT 8192 @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni #define MTK_WED_TX_RING_SIZE 2048 #define MTK_WED_WDMA_RING_SIZE 1024 -@@ -172,6 +174,23 @@ mtk_wdma_rx_reset(struct mtk_wed_device +@@ -173,6 +175,23 @@ mtk_wdma_rx_reset(struct mtk_wed_device return ret; } @@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni static void mtk_wdma_tx_reset(struct mtk_wed_device *dev) { -@@ -335,6 +354,118 @@ out: +@@ -336,6 +355,118 @@ out: } static int @@ -248,7 +248,7 @@ Signed-off-by: Paolo Abeni mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev) { u32 desc_size = dev->hw->soc->tx_ring_desc_size; -@@ -708,6 +839,7 @@ __mtk_wed_detach(struct mtk_wed_device * +@@ -709,6 +840,7 @@ __mtk_wed_detach(struct mtk_wed_device * mtk_wdma_rx_reset(dev); mtk_wed_reset(dev, MTK_WED_RESET_WED); @@ -256,7 +256,7 @@ Signed-off-by: Paolo Abeni mtk_wed_free_tx_buffer(dev); mtk_wed_free_tx_rings(dev); -@@ -1128,23 +1260,6 @@ mtk_wed_ring_reset(struct mtk_wed_ring * +@@ -1129,23 +1261,6 @@ mtk_wed_ring_reset(struct mtk_wed_ring * } } @@ -280,7 +280,7 @@ Signed-off-by: Paolo Abeni static int mtk_wed_rx_reset(struct mtk_wed_device *dev) { -@@ -1691,6 +1806,7 @@ mtk_wed_start(struct mtk_wed_device *dev +@@ -1692,6 +1807,7 @@ mtk_wed_start(struct mtk_wed_device *dev } mtk_wed_set_512_support(dev, dev->wlan.wcid_512); @@ -288,7 +288,7 @@ Signed-off-by: Paolo Abeni mtk_wed_dma_enable(dev); dev->running = true; -@@ -1747,6 +1863,10 @@ mtk_wed_attach(struct mtk_wed_device *de +@@ -1748,6 +1864,10 @@ mtk_wed_attach(struct mtk_wed_device *de if (ret) goto out; @@ -416,7 +416,7 @@ Signed-off-by: Paolo Abeni #define MTK_WED_PCIE_BASE1 0x11310000 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -928,6 +928,7 @@ struct net_device_path { +@@ -917,6 +917,7 @@ struct net_device_path { u8 queue; u16 wcid; u8 bss; @@ -426,7 +426,7 @@ Signed-off-by: Paolo Abeni }; --- a/include/linux/soc/mediatek/mtk_wed.h +++ b/include/linux/soc/mediatek/mtk_wed.h -@@ -129,6 +129,7 @@ struct mtk_wed_device { +@@ -128,6 +128,7 @@ struct mtk_wed_device { enum mtk_wed_bus_tye bus_type; void __iomem *base; u32 phy_base; @@ -434,7 +434,7 @@ Signed-off-by: Paolo Abeni u32 wpdma_phys; u32 wpdma_int; -@@ -147,10 +148,12 @@ struct mtk_wed_device { +@@ -146,10 +147,12 @@ struct mtk_wed_device { unsigned int rx_nbuf; unsigned int rx_npkt; unsigned int rx_size; @@ -447,7 +447,7 @@ Signed-off-by: Paolo Abeni u32 (*init_buf)(void *ptr, dma_addr_t phys, int token_id); int (*offload_enable)(struct mtk_wed_device *wed); -@@ -224,6 +227,15 @@ static inline bool mtk_wed_get_rx_capa(s +@@ -223,6 +226,15 @@ static inline bool mtk_wed_get_rx_capa(s #else return false; #endif diff --git a/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch b/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch index 0cf4c18875..5c3015c338 100644 --- a/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch +++ b/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch @@ -13,7 +13,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -26,7 +26,7 @@ +@@ -27,7 +27,7 @@ #define MTK_WED_BUF_SIZE 2048 #define MTK_WED_PAGE_BUF_SIZE 128 #define MTK_WED_BUF_PER_PAGE (PAGE_SIZE / 2048) @@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni #define MTK_WED_RX_RING_SIZE 1536 #define MTK_WED_RX_PG_BM_CNT 8192 #define MTK_WED_AMSDU_BUF_SIZE (PAGE_SIZE << 4) -@@ -596,6 +596,68 @@ free_pagelist: +@@ -597,6 +597,68 @@ free_pagelist: } static int @@ -91,7 +91,7 @@ Signed-off-by: Paolo Abeni mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev) { struct mtk_wed_bm_desc *desc; -@@ -612,7 +674,42 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d +@@ -613,7 +675,42 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d dev->rx_buf_ring.desc_phys = desc_phys; dev->wlan.init_rx_buf(dev, dev->wlan.rx_npkt); @@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -626,6 +723,28 @@ mtk_wed_free_rx_buffer(struct mtk_wed_de +@@ -627,6 +724,28 @@ mtk_wed_free_rx_buffer(struct mtk_wed_de dev->wlan.release_rx_buf(dev); dma_free_coherent(dev->hw->dev, dev->rx_buf_ring.size * sizeof(*desc), desc, dev->rx_buf_ring.desc_phys); @@ -164,7 +164,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -639,6 +758,8 @@ mtk_wed_rx_buffer_hw_init(struct mtk_wed +@@ -640,6 +759,8 @@ mtk_wed_rx_buffer_hw_init(struct mtk_wed wed_w32(dev, MTK_WED_RX_BM_DYN_ALLOC_TH, FIELD_PREP(MTK_WED_RX_BM_DYN_ALLOC_TH_H, 0xffff)); wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_RX_BM_EN); @@ -173,7 +173,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -934,6 +1055,8 @@ mtk_wed_bus_init(struct mtk_wed_device * +@@ -935,6 +1056,8 @@ mtk_wed_bus_init(struct mtk_wed_device * static void mtk_wed_set_wpdma(struct mtk_wed_device *dev) { @@ -182,7 +182,7 @@ Signed-off-by: Paolo Abeni if (mtk_wed_is_v1(dev->hw)) { wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys); return; -@@ -951,6 +1074,15 @@ mtk_wed_set_wpdma(struct mtk_wed_device +@@ -952,6 +1075,15 @@ mtk_wed_set_wpdma(struct mtk_wed_device wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo); wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx); @@ -198,7 +198,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -1762,6 +1894,165 @@ mtk_wed_dma_enable(struct mtk_wed_device +@@ -1763,6 +1895,165 @@ mtk_wed_dma_enable(struct mtk_wed_device } static void @@ -364,7 +364,7 @@ Signed-off-by: Paolo Abeni mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask) { int i; -@@ -2215,6 +2506,10 @@ void mtk_wed_add_hw(struct device_node * +@@ -2216,6 +2507,10 @@ void mtk_wed_add_hw(struct device_node * .detach = mtk_wed_detach, .ppe_check = mtk_wed_ppe_check, .setup_tc = mtk_wed_setup_tc, @@ -395,7 +395,7 @@ Signed-off-by: Paolo Abeni struct { int size; -@@ -120,6 +124,13 @@ struct mtk_wed_device { +@@ -119,6 +123,13 @@ struct mtk_wed_device { dma_addr_t fdbk_phys; } rro; @@ -409,7 +409,7 @@ Signed-off-by: Paolo Abeni /* filled by driver: */ struct { union { -@@ -138,6 +149,8 @@ struct mtk_wed_device { +@@ -137,6 +148,8 @@ struct mtk_wed_device { u32 wpdma_txfree; u32 wpdma_rx_glo; u32 wpdma_rx; @@ -418,7 +418,7 @@ Signed-off-by: Paolo Abeni bool wcid_512; bool hw_rro; -@@ -152,9 +165,20 @@ struct mtk_wed_device { +@@ -151,9 +164,20 @@ struct mtk_wed_device { u8 tx_tbit[MTK_WED_TX_QUEUES]; u8 rx_tbit[MTK_WED_RX_QUEUES]; @@ -439,7 +439,7 @@ Signed-off-by: Paolo Abeni u32 (*init_buf)(void *ptr, dma_addr_t phys, int token_id); int (*offload_enable)(struct mtk_wed_device *wed); void (*offload_disable)(struct mtk_wed_device *wed); -@@ -193,6 +217,14 @@ struct mtk_wed_ops { +@@ -192,6 +216,14 @@ struct mtk_wed_ops { void (*irq_set_mask)(struct mtk_wed_device *dev, u32 mask); int (*setup_tc)(struct mtk_wed_device *wed, struct net_device *dev, enum tc_setup_type type, void *type_data); @@ -454,7 +454,7 @@ Signed-off-by: Paolo Abeni }; extern const struct mtk_wed_ops __rcu *mtk_soc_wed_ops; -@@ -264,6 +296,15 @@ static inline bool mtk_wed_is_amsdu_supp +@@ -263,6 +295,15 @@ static inline bool mtk_wed_is_amsdu_supp #define mtk_wed_device_dma_reset(_dev) (_dev)->ops->reset_dma(_dev) #define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) \ (_dev)->ops->setup_tc(_dev, _netdev, _type, _type_data) @@ -470,7 +470,7 @@ Signed-off-by: Paolo Abeni #else static inline bool mtk_wed_device_active(struct mtk_wed_device *dev) { -@@ -283,6 +324,10 @@ static inline bool mtk_wed_device_active +@@ -282,6 +323,10 @@ static inline bool mtk_wed_device_active #define mtk_wed_device_stop(_dev) do {} while (0) #define mtk_wed_device_dma_reset(_dev) do {} while (0) #define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) -EOPNOTSUPP diff --git a/target/linux/generic/backport-6.6/752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch b/target/linux/generic/backport-6.6/752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch index f491d2fd80..9730c3042f 100644 --- a/target/linux/generic/backport-6.6/752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch +++ b/target/linux/generic/backport-6.6/752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch @@ -412,7 +412,7 @@ Signed-off-by: Paolo Abeni mtk_wed_reg_set(void *data, u64 val) { struct mtk_wed_hw *hw = data; -@@ -266,7 +624,16 @@ void mtk_wed_hw_add_debugfs(struct mtk_w +@@ -264,7 +622,16 @@ void mtk_wed_hw_add_debugfs(struct mtk_w debugfs_create_u32("regidx", 0600, dir, &hw->debugfs_reg); debugfs_create_file_unsafe("regval", 0600, dir, hw, &fops_regval); debugfs_create_file_unsafe("txinfo", 0400, dir, hw, &wed_txinfo_fops); diff --git a/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch b/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch index aaaabf05e8..18aa4107db 100644 --- a/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch +++ b/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch @@ -13,7 +13,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -148,6 +148,90 @@ mtk_wdma_read_reset(struct mtk_wed_devic +@@ -149,6 +149,90 @@ mtk_wdma_read_reset(struct mtk_wed_devic return wdma_r32(dev, MTK_WDMA_GLO_CFG); } @@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni static int mtk_wdma_rx_reset(struct mtk_wed_device *dev) { -@@ -160,6 +244,7 @@ mtk_wdma_rx_reset(struct mtk_wed_device +@@ -161,6 +245,7 @@ mtk_wdma_rx_reset(struct mtk_wed_device if (ret) dev_err(dev->hw->dev, "rx reset failed\n"); @@ -112,7 +112,7 @@ Signed-off-by: Paolo Abeni wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_RX); wdma_w32(dev, MTK_WDMA_RESET_IDX, 0); -@@ -192,6 +277,84 @@ mtk_wed_poll_busy(struct mtk_wed_device +@@ -193,6 +278,84 @@ mtk_wed_poll_busy(struct mtk_wed_device } static void @@ -197,7 +197,7 @@ Signed-off-by: Paolo Abeni mtk_wdma_tx_reset(struct mtk_wed_device *dev) { u32 status, mask = MTK_WDMA_GLO_CFG_TX_DMA_BUSY; -@@ -202,6 +365,7 @@ mtk_wdma_tx_reset(struct mtk_wed_device +@@ -203,6 +366,7 @@ mtk_wdma_tx_reset(struct mtk_wed_device !(status & mask), 0, 10000)) dev_err(dev->hw->dev, "tx reset failed\n"); @@ -205,7 +205,7 @@ Signed-off-by: Paolo Abeni wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_TX); wdma_w32(dev, MTK_WDMA_RESET_IDX, 0); -@@ -1405,13 +1569,33 @@ mtk_wed_rx_reset(struct mtk_wed_device * +@@ -1406,13 +1570,33 @@ mtk_wed_rx_reset(struct mtk_wed_device * if (ret) return ret; @@ -239,7 +239,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX, MTK_WED_WPDMA_RX_D_RST_CRX_IDX | MTK_WED_WPDMA_RX_D_RST_DRV_IDX); -@@ -1439,23 +1623,52 @@ mtk_wed_rx_reset(struct mtk_wed_device * +@@ -1440,23 +1624,52 @@ mtk_wed_rx_reset(struct mtk_wed_device * wed_w32(dev, MTK_WED_RROQM_RST_IDX, 0); } @@ -298,7 +298,7 @@ Signed-off-by: Paolo Abeni mtk_wed_reset(dev, MTK_WED_RESET_WDMA_TX_DRV); /* reset wed rx dma */ -@@ -1476,6 +1689,14 @@ mtk_wed_rx_reset(struct mtk_wed_device * +@@ -1477,6 +1690,14 @@ mtk_wed_rx_reset(struct mtk_wed_device * MTK_WED_CTRL_WED_RX_BM_BUSY); mtk_wed_reset(dev, MTK_WED_RESET_RX_BM); @@ -313,7 +313,7 @@ Signed-off-by: Paolo Abeni /* wo change to enable state */ val = MTK_WED_WO_STATE_ENABLE; ret = mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO, -@@ -1493,6 +1714,7 @@ mtk_wed_rx_reset(struct mtk_wed_device * +@@ -1494,6 +1715,7 @@ mtk_wed_rx_reset(struct mtk_wed_device * false); } mtk_wed_free_rx_buffer(dev); @@ -321,7 +321,7 @@ Signed-off-by: Paolo Abeni return 0; } -@@ -1526,15 +1748,41 @@ mtk_wed_reset_dma(struct mtk_wed_device +@@ -1527,15 +1749,41 @@ mtk_wed_reset_dma(struct mtk_wed_device /* 2. reset WDMA rx DMA */ busy = !!mtk_wdma_rx_reset(dev); @@ -364,7 +364,7 @@ Signed-off-by: Paolo Abeni wed_w32(dev, MTK_WED_WDMA_RESET_IDX, MTK_WED_WDMA_RESET_IDX_RX | MTK_WED_WDMA_RESET_IDX_DRV); wed_w32(dev, MTK_WED_WDMA_RESET_IDX, 0); -@@ -1550,8 +1798,13 @@ mtk_wed_reset_dma(struct mtk_wed_device +@@ -1551,8 +1799,13 @@ mtk_wed_reset_dma(struct mtk_wed_device wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_TX_FREE_AGENT_EN); for (i = 0; i < 100; i++) { @@ -380,7 +380,7 @@ Signed-off-by: Paolo Abeni break; } -@@ -1573,6 +1826,8 @@ mtk_wed_reset_dma(struct mtk_wed_device +@@ -1574,6 +1827,8 @@ mtk_wed_reset_dma(struct mtk_wed_device mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_INT_AGENT); mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_TX_DRV); mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_RX_DRV); @@ -389,7 +389,7 @@ Signed-off-by: Paolo Abeni } else { wed_w32(dev, MTK_WED_WPDMA_RESET_IDX, MTK_WED_WPDMA_RESET_IDX_TX | -@@ -1589,7 +1844,14 @@ mtk_wed_reset_dma(struct mtk_wed_device +@@ -1590,7 +1845,14 @@ mtk_wed_reset_dma(struct mtk_wed_device wed_w32(dev, MTK_WED_RESET_IDX, 0); } @@ -405,7 +405,7 @@ Signed-off-by: Paolo Abeni } static int -@@ -1841,6 +2103,7 @@ mtk_wed_dma_enable(struct mtk_wed_device +@@ -1842,6 +2104,7 @@ mtk_wed_dma_enable(struct mtk_wed_device MTK_WED_WPDMA_GLO_CFG_RX_DRV_UNS_VER_FORCE_4); wdma_set(dev, MTK_WDMA_PREF_RX_CFG, MTK_WDMA_PREF_RX_CFG_PREF_EN); @@ -413,7 +413,7 @@ Signed-off-by: Paolo Abeni } wed_clr(dev, MTK_WED_WPDMA_GLO_CFG, -@@ -1904,6 +2167,12 @@ mtk_wed_start_hw_rro(struct mtk_wed_devi +@@ -1905,6 +2168,12 @@ mtk_wed_start_hw_rro(struct mtk_wed_devi if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro) return; diff --git a/target/linux/generic/backport-6.6/760-v6.9-net-phy-aquantia-add-AQR111-and-AQR111B0-PHY-ID.patch b/target/linux/generic/backport-6.6/760-v6.9-net-phy-aquantia-add-AQR111-and-AQR111B0-PHY-ID.patch index 4fc32e3e96..4190a3d328 100644 --- a/target/linux/generic/backport-6.6/760-v6.9-net-phy-aquantia-add-AQR111-and-AQR111B0-PHY-ID.patch +++ b/target/linux/generic/backport-6.6/760-v6.9-net-phy-aquantia-add-AQR111-and-AQR111B0-PHY-ID.patch @@ -29,7 +29,7 @@ Signed-off-by: Paolo Abeni #define PHY_ID_AQR112 0x03a1b662 #define PHY_ID_AQR412 0x03a1b712 #define PHY_ID_AQR113C 0x31c31c12 -@@ -670,6 +672,16 @@ static int aqr107_probe(struct phy_devic +@@ -672,6 +674,16 @@ static int aqr107_probe(struct phy_devic return aqr_hwmon_probe(phydev); } @@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni static struct phy_driver aqr_driver[] = { { PHY_ID_MATCH_MODEL(PHY_ID_AQ1202), -@@ -744,6 +756,44 @@ static struct phy_driver aqr_driver[] = +@@ -746,6 +758,44 @@ static struct phy_driver aqr_driver[] = .link_change_notify = aqr107_link_change_notify, }, { diff --git a/target/linux/generic/backport-6.6/761-v6.9-net-phy-aquantia-add-AQR113-PHY-ID.patch b/target/linux/generic/backport-6.6/761-v6.9-net-phy-aquantia-add-AQR113-PHY-ID.patch index 5be82455c1..cd9161d023 100644 --- a/target/linux/generic/backport-6.6/761-v6.9-net-phy-aquantia-add-AQR113-PHY-ID.patch +++ b/target/linux/generic/backport-6.6/761-v6.9-net-phy-aquantia-add-AQR113-PHY-ID.patch @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c -@@ -24,6 +24,7 @@ +@@ -26,6 +26,7 @@ #define PHY_ID_AQR111B0 0x03a1b612 #define PHY_ID_AQR112 0x03a1b662 #define PHY_ID_AQR412 0x03a1b712 @@ -24,7 +24,7 @@ Signed-off-by: David S. Miller #define PHY_ID_AQR113C 0x31c31c12 #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 -@@ -802,6 +803,25 @@ static struct phy_driver aqr_driver[] = +@@ -840,6 +841,25 @@ static struct phy_driver aqr_driver[] = .link_change_notify = aqr107_link_change_notify, }, { @@ -50,7 +50,7 @@ Signed-off-by: David S. Miller PHY_ID_MATCH_MODEL(PHY_ID_AQR113C), .name = "Aquantia AQR113C", .probe = aqr107_probe, -@@ -834,6 +854,7 @@ static struct mdio_device_id __maybe_unu +@@ -874,6 +894,7 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) }, diff --git a/target/linux/generic/backport-6.6/762-v6.9-net-phy-aquantia-add-AQR813-PHY-ID.patch b/target/linux/generic/backport-6.6/762-v6.9-net-phy-aquantia-add-AQR813-PHY-ID.patch index 7dcfe7d01b..fbdf810b35 100644 --- a/target/linux/generic/backport-6.6/762-v6.9-net-phy-aquantia-add-AQR813-PHY-ID.patch +++ b/target/linux/generic/backport-6.6/762-v6.9-net-phy-aquantia-add-AQR813-PHY-ID.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c -@@ -26,6 +26,7 @@ +@@ -28,6 +28,7 @@ #define PHY_ID_AQR412 0x03a1b712 #define PHY_ID_AQR113 0x31c31c40 #define PHY_ID_AQR113C 0x31c31c12 @@ -23,7 +23,7 @@ Signed-off-by: David S. Miller #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) -@@ -840,6 +841,25 @@ static struct phy_driver aqr_driver[] = +@@ -878,6 +879,25 @@ static struct phy_driver aqr_driver[] = .get_stats = aqr107_get_stats, .link_change_notify = aqr107_link_change_notify, }, @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller }; module_phy_driver(aqr_driver); -@@ -856,6 +876,7 @@ static struct mdio_device_id __maybe_unu +@@ -896,6 +916,7 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, diff --git a/target/linux/generic/backport-6.6/770-net-introduce-napi_is_scheduled-helper.patch b/target/linux/generic/backport-6.6/770-net-introduce-napi_is_scheduled-helper.patch index 789b93e9f9..821fd60a2d 100644 --- a/target/linux/generic/backport-6.6/770-net-introduce-napi_is_scheduled-helper.patch +++ b/target/linux/generic/backport-6.6/770-net-introduce-napi_is_scheduled-helper.patch @@ -25,7 +25,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/chelsio/cxgb3/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb3/sge.c -@@ -2507,14 +2507,6 @@ static int napi_rx_handler(struct napi_s +@@ -2501,14 +2501,6 @@ static int napi_rx_handler(struct napi_s return work_done; } @@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni * @adap: the adapter --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c -@@ -1479,7 +1479,7 @@ static void rtw89_core_rx_to_mac80211(st +@@ -1744,7 +1744,7 @@ static void rtw89_core_rx_to_mac80211(st struct napi_struct *napi = &rtwdev->napi; /* In low power mode, napi isn't scheduled. Receive it to netif. */ @@ -53,7 +53,7 @@ Signed-off-by: Paolo Abeni rtw89_core_hw_to_sband_rate(rx_status); --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -468,6 +468,29 @@ static inline bool napi_prefer_busy_poll +@@ -480,6 +480,29 @@ static inline bool napi_prefer_busy_poll return test_bit(NAPI_STATE_PREFER_BUSY_POLL, &n->state); } @@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni /** --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6533,7 +6533,7 @@ static int __napi_poll(struct napi_struc +@@ -6555,7 +6555,7 @@ static int __napi_poll(struct napi_struc * accidentally calling ->poll() when NAPI is not scheduled. */ work = 0; diff --git a/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch b/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch index aa0d730bc8..3951715fc6 100644 --- a/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch +++ b/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch @@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -2974,13 +2974,25 @@ static void stmmac_tx_timer_arm(struct s +@@ -3003,13 +3003,25 @@ static void stmmac_tx_timer_arm(struct s { struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue]; u32 tx_coal_timer = priv->tx_coal_timer[queue]; diff --git a/target/linux/generic/backport-6.6/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch b/target/linux/generic/backport-6.6/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch index bce54eba4f..f56c48b4b8 100644 --- a/target/linux/generic/backport-6.6/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch +++ b/target/linux/generic/backport-6.6/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch @@ -27,7 +27,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h -@@ -287,7 +287,7 @@ struct stmmac_safety_stats { +@@ -318,7 +318,7 @@ struct stmmac_safety_stats { #define MIN_DMA_RIWT 0x10 #define DEF_DMA_RIWT 0xa0 /* Tx coalesce parameters */ diff --git a/target/linux/generic/backport-6.6/795-v6.7-16-r8152-use-napi_gro_frags.patch b/target/linux/generic/backport-6.6/795-v6.7-16-r8152-use-napi_gro_frags.patch index 3c9680a279..85b320f15a 100644 --- a/target/linux/generic/backport-6.6/795-v6.7-16-r8152-use-napi_gro_frags.patch +++ b/target/linux/generic/backport-6.6/795-v6.7-16-r8152-use-napi_gro_frags.patch @@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -2583,8 +2583,9 @@ static int rx_bottom(struct r8152 *tp, i +@@ -2584,8 +2584,9 @@ static int rx_bottom(struct r8152 *tp, i while (urb->actual_length > len_used) { struct net_device *netdev = tp->netdev; struct net_device_stats *stats = &netdev->stats; @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski WARN_ON_ONCE(skb_queue_len(&tp->rx_queue) >= 1000); -@@ -2597,45 +2598,77 @@ static int rx_bottom(struct r8152 *tp, i +@@ -2598,45 +2599,77 @@ static int rx_bottom(struct r8152 *tp, i break; pkt_len -= ETH_FCS_LEN; diff --git a/target/linux/generic/backport-6.6/815-v6.7-3-leds-turris-omnia-Support-HW-controlled-mode-via-pri.patch b/target/linux/generic/backport-6.6/815-v6.7-3-leds-turris-omnia-Support-HW-controlled-mode-via-pri.patch index 00773ab0f6..bed20f9e99 100644 --- a/target/linux/generic/backport-6.6/815-v6.7-3-leds-turris-omnia-Support-HW-controlled-mode-via-pri.patch +++ b/target/linux/generic/backport-6.6/815-v6.7-3-leds-turris-omnia-Support-HW-controlled-mode-via-pri.patch @@ -49,7 +49,7 @@ Signed-off-by: Lee Jones --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig -@@ -164,6 +164,7 @@ config LEDS_TURRIS_OMNIA +@@ -188,6 +188,7 @@ config LEDS_TURRIS_OMNIA depends on I2C depends on MACH_ARMADA_38X || COMPILE_TEST depends on OF @@ -187,7 +187,7 @@ Signed-off-by: Lee Jones /* put the LED into software mode */ ret = omnia_cmd_write_u8(client, CMD_LED_MODE, -@@ -309,6 +385,12 @@ static int omnia_leds_probe(struct i2c_c +@@ -308,6 +384,12 @@ static int omnia_leds_probe(struct i2c_c mutex_init(&leds->lock); diff --git a/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch index 35b15776fb..80c9836010 100644 --- a/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch +++ b/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch @@ -67,7 +67,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -523,6 +523,7 @@ static int mtd_nvmem_add(struct mtd_info +@@ -552,6 +552,7 @@ static int mtd_nvmem_add(struct mtd_info config.dev = &mtd->dev; config.name = dev_name(&mtd->dev); config.owner = THIS_MODULE; @@ -75,7 +75,7 @@ Signed-off-by: Greg Kroah-Hartman config.reg_read = mtd_nvmem_reg_read; config.size = mtd->size; config.word_size = 1; -@@ -891,6 +892,7 @@ static struct nvmem_device *mtd_otp_nvme +@@ -898,6 +899,7 @@ static struct nvmem_device *mtd_otp_nvme config.name = compatible; config.id = NVMEM_DEVID_AUTO; config.owner = THIS_MODULE; @@ -95,7 +95,7 @@ Signed-off-by: Greg Kroah-Hartman .stride = sizeof(u32), --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -998,9 +998,11 @@ struct nvmem_device *nvmem_register(cons +@@ -1003,9 +1003,11 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; @@ -122,7 +122,7 @@ Signed-off-by: Greg Kroah-Hartman .stride = 1, --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c -@@ -616,6 +616,7 @@ static int imx_ocotp_probe(struct platfo +@@ -615,6 +615,7 @@ static int imx_ocotp_probe(struct platfo return PTR_ERR(priv->clk); priv->params = of_device_get_match_data(&pdev->dev); @@ -142,7 +142,7 @@ Signed-off-by: Greg Kroah-Hartman econfig->reg_read = meson_efuse_read; --- a/drivers/nvmem/meson-mx-efuse.c +++ b/drivers/nvmem/meson-mx-efuse.c -@@ -211,6 +211,7 @@ static int meson_mx_efuse_probe(struct p +@@ -210,6 +210,7 @@ static int meson_mx_efuse_probe(struct p efuse->config.owner = THIS_MODULE; efuse->config.dev = &pdev->dev; efuse->config.priv = efuse; @@ -212,7 +212,7 @@ Signed-off-by: Greg Kroah-Hartman .read_only = true, --- a/drivers/nvmem/sc27xx-efuse.c +++ b/drivers/nvmem/sc27xx-efuse.c -@@ -248,6 +248,7 @@ static int sc27xx_efuse_probe(struct pla +@@ -247,6 +247,7 @@ static int sc27xx_efuse_probe(struct pla econfig.reg_read = sc27xx_efuse_read; econfig.priv = efuse; econfig.dev = &pdev->dev; @@ -262,7 +262,7 @@ Signed-off-by: Greg Kroah-Hartman .size = QAC628_OTP_SIZE, --- a/drivers/nvmem/sunxi_sid.c +++ b/drivers/nvmem/sunxi_sid.c -@@ -154,6 +154,7 @@ static int sunxi_sid_probe(struct platfo +@@ -153,6 +153,7 @@ static int sunxi_sid_probe(struct platfo nvmem_cfg->dev = dev; nvmem_cfg->name = "sunxi-sid"; nvmem_cfg->type = NVMEM_TYPE_OTP; diff --git a/target/linux/generic/backport-6.6/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch b/target/linux/generic/backport-6.6/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch index 7d80ad37f1..39be82d4bf 100644 --- a/target/linux/generic/backport-6.6/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch +++ b/target/linux/generic/backport-6.6/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -531,7 +531,6 @@ static int mtd_nvmem_add(struct mtd_info +@@ -560,7 +560,6 @@ static int mtd_nvmem_add(struct mtd_info config.read_only = true; config.root_only = true; config.ignore_wp = true; @@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman mtd->nvmem = nvmem_register(&config); --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -936,7 +936,7 @@ struct nvmem_device *nvmem_register(cons +@@ -941,7 +941,7 @@ struct nvmem_device *nvmem_register(cons nvmem->nkeepout = config->nkeepout; if (config->of_node) nvmem->dev.of_node = config->of_node; diff --git a/target/linux/generic/backport-6.6/818-v6.8-of-device-Export-of_device_make_bus_id.patch b/target/linux/generic/backport-6.6/818-v6.8-of-device-Export-of_device_make_bus_id.patch index 564fe9822d..95e1a7b5fc 100644 --- a/target/linux/generic/backport-6.6/818-v6.8-of-device-Export-of_device_make_bus_id.patch +++ b/target/linux/generic/backport-6.6/818-v6.8-of-device-Export-of_device_make_bus_id.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/of/device.c +++ b/drivers/of/device.c -@@ -395,3 +395,44 @@ int of_device_uevent_modalias(struct dev +@@ -304,3 +304,44 @@ int of_device_uevent_modalias(const stru return 0; } EXPORT_SYMBOL_GPL(of_device_uevent_modalias); @@ -69,7 +69,7 @@ Signed-off-by: Greg Kroah-Hartman +EXPORT_SYMBOL_GPL(of_device_make_bus_id); --- a/drivers/of/platform.c +++ b/drivers/of/platform.c -@@ -64,46 +64,6 @@ EXPORT_SYMBOL(of_find_device_by_node); +@@ -98,46 +98,6 @@ static const struct of_device_id of_skip */ /** @@ -118,7 +118,7 @@ Signed-off-by: Greg Kroah-Hartman * @bus_id: Name to assign to the device. May be null to use default name. --- a/include/linux/of_device.h +++ b/include/linux/of_device.h -@@ -56,6 +56,9 @@ static inline int of_dma_configure(struc +@@ -40,6 +40,9 @@ static inline int of_dma_configure(struc { return of_dma_configure_id(dev, np, force_dma, NULL); } @@ -128,7 +128,7 @@ Signed-off-by: Greg Kroah-Hartman #else /* CONFIG_OF */ static inline int of_driver_match_device(struct device *dev, -@@ -113,6 +116,9 @@ static inline int of_dma_configure(struc +@@ -82,6 +85,9 @@ static inline int of_dma_configure(struc { return 0; } diff --git a/target/linux/generic/backport-6.6/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch b/target/linux/generic/backport-6.6/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch index 2093fac8a1..59175c8051 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -848,14 +848,6 @@ static int nvmem_add_cells_from_layout(s +@@ -847,14 +847,6 @@ static int nvmem_add_cells_from_layout(s } #if IS_ENABLED(CONFIG_OF) diff --git a/target/linux/generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch b/target/linux/generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch index db2d8c1b46..1f39dfea2f 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -817,7 +817,7 @@ static int nvmem_add_cells_from_layout(s +@@ -816,7 +816,7 @@ static int nvmem_add_cells_from_layout(s int ret; if (layout && layout->add_cells) { diff --git a/target/linux/generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch b/target/linux/generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch index 65aa37f834..d2c274033e 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -676,7 +676,6 @@ static int nvmem_validate_keepouts(struc +@@ -675,7 +675,6 @@ static int nvmem_validate_keepouts(struc static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np) { @@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman struct device *dev = &nvmem->dev; struct device_node *child; const __be32 *addr; -@@ -706,8 +705,8 @@ static int nvmem_add_cells_from_dt(struc +@@ -705,8 +704,8 @@ static int nvmem_add_cells_from_dt(struc info.np = of_node_get(child); @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman ret = nvmem_add_one_cell(nvmem, &info); kfree(info.name); -@@ -896,6 +895,7 @@ struct nvmem_device *nvmem_register(cons +@@ -895,6 +894,7 @@ struct nvmem_device *nvmem_register(cons kref_init(&nvmem->refcnt); INIT_LIST_HEAD(&nvmem->cells); @@ -54,7 +54,7 @@ Signed-off-by: Greg Kroah-Hartman if (!nvmem->owner && config->dev->driver) --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c -@@ -584,17 +584,12 @@ static const struct of_device_id imx_oco +@@ -583,17 +583,12 @@ static const struct of_device_id imx_oco }; MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids); @@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman static int imx_ocotp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -620,7 +615,7 @@ static int imx_ocotp_probe(struct platfo +@@ -619,7 +614,7 @@ static int imx_ocotp_probe(struct platfo imx_ocotp_nvmem_config.size = 4 * priv->params->nregs; imx_ocotp_nvmem_config.dev = dev; imx_ocotp_nvmem_config.priv = priv; diff --git a/target/linux/generic/backport-6.6/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch b/target/linux/generic/backport-6.6/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch index 1881332340..ce33b52328 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch @@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman # Devices --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -56,9 +56,6 @@ static LIST_HEAD(nvmem_lookup_list); +@@ -55,9 +55,6 @@ static LIST_HEAD(nvmem_lookup_list); static BLOCKING_NOTIFIER_HEAD(nvmem_notifier); @@ -84,7 +84,7 @@ Signed-off-by: Greg Kroah-Hartman static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes) { -@@ -741,97 +738,22 @@ static int nvmem_add_cells_from_fixed_la +@@ -740,97 +737,22 @@ static int nvmem_add_cells_from_fixed_la return err; } @@ -189,7 +189,7 @@ Signed-off-by: Greg Kroah-Hartman const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem, struct nvmem_layout *layout) { -@@ -839,7 +761,7 @@ const void *nvmem_layout_get_match_data( +@@ -838,7 +760,7 @@ const void *nvmem_layout_get_match_data( const struct of_device_id *match; layout_np = of_nvmem_layout_get_container(nvmem); @@ -198,7 +198,7 @@ Signed-off-by: Greg Kroah-Hartman return match ? match->data : NULL; } -@@ -951,19 +873,6 @@ struct nvmem_device *nvmem_register(cons +@@ -950,19 +872,6 @@ struct nvmem_device *nvmem_register(cons goto err_put_device; } @@ -218,7 +218,7 @@ Signed-off-by: Greg Kroah-Hartman if (config->cells) { rval = nvmem_add_cells(nvmem, config->cells, config->ncells); if (rval) -@@ -984,24 +893,24 @@ struct nvmem_device *nvmem_register(cons +@@ -983,24 +892,24 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; @@ -249,7 +249,7 @@ Signed-off-by: Greg Kroah-Hartman if (config->compat) nvmem_sysfs_remove_compat(nvmem, config); err_put_device: -@@ -1023,7 +932,7 @@ static void nvmem_device_release(struct +@@ -1022,7 +931,7 @@ static void nvmem_device_release(struct device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom); nvmem_device_remove_all_cells(nvmem); @@ -258,7 +258,7 @@ Signed-off-by: Greg Kroah-Hartman device_unregister(&nvmem->dev); } -@@ -1325,6 +1234,12 @@ nvmem_cell_get_from_lookup(struct device +@@ -1324,6 +1233,12 @@ nvmem_cell_get_from_lookup(struct device return cell; } @@ -271,7 +271,7 @@ Signed-off-by: Greg Kroah-Hartman #if IS_ENABLED(CONFIG_OF) static struct nvmem_cell_entry * nvmem_find_cell_entry_by_node(struct nvmem_device *nvmem, struct device_node *np) -@@ -1343,6 +1258,18 @@ nvmem_find_cell_entry_by_node(struct nvm +@@ -1342,6 +1257,18 @@ nvmem_find_cell_entry_by_node(struct nvm return cell; } @@ -290,7 +290,7 @@ Signed-off-by: Greg Kroah-Hartman /** * of_nvmem_cell_get() - Get a nvmem cell from given device node and cell id * -@@ -1405,16 +1332,29 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1404,16 +1331,29 @@ struct nvmem_cell *of_nvmem_cell_get(str return ERR_CAST(nvmem); } @@ -322,7 +322,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } -@@ -1528,6 +1468,7 @@ void nvmem_cell_put(struct nvmem_cell *c +@@ -1527,6 +1467,7 @@ void nvmem_cell_put(struct nvmem_cell *c kfree(cell); __nvmem_device_put(nvmem); @@ -330,7 +330,7 @@ Signed-off-by: Greg Kroah-Hartman } EXPORT_SYMBOL_GPL(nvmem_cell_put); -@@ -2105,11 +2046,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name); +@@ -2104,11 +2045,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name); static int __init nvmem_init(void) { diff --git a/target/linux/generic/backport-6.6/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch b/target/linux/generic/backport-6.6/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch index 89872bec2e..4a1f9aefc8 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch @@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -300,6 +300,43 @@ static umode_t nvmem_bin_attr_is_visible +@@ -299,6 +299,43 @@ static umode_t nvmem_bin_attr_is_visible return nvmem_bin_attr_get_umode(nvmem); } @@ -89,7 +89,7 @@ Signed-off-by: Greg Kroah-Hartman /* default read/write permissions */ static struct bin_attribute bin_attr_rw_nvmem = { .attr = { -@@ -321,11 +358,21 @@ static const struct attribute_group nvme +@@ -320,11 +357,21 @@ static const struct attribute_group nvme .is_bin_visible = nvmem_bin_attr_is_visible, }; @@ -111,7 +111,7 @@ Signed-off-by: Greg Kroah-Hartman static struct bin_attribute bin_attr_nvmem_eeprom_compat = { .attr = { .name = "eeprom", -@@ -381,6 +428,68 @@ static void nvmem_sysfs_remove_compat(st +@@ -380,6 +427,68 @@ static void nvmem_sysfs_remove_compat(st device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom); } @@ -180,7 +180,7 @@ Signed-off-by: Greg Kroah-Hartman #else /* CONFIG_NVMEM_SYSFS */ static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, -@@ -740,11 +849,25 @@ static int nvmem_add_cells_from_fixed_la +@@ -739,11 +848,25 @@ static int nvmem_add_cells_from_fixed_la int nvmem_layout_register(struct nvmem_layout *layout) { @@ -207,7 +207,7 @@ Signed-off-by: Greg Kroah-Hartman } EXPORT_SYMBOL_GPL(nvmem_layout_register); -@@ -903,10 +1026,20 @@ struct nvmem_device *nvmem_register(cons +@@ -902,10 +1025,20 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_dev; diff --git a/target/linux/generic/backport-6.6/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch b/target/linux/generic/backport-6.6/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch index 1bf3ba35b6..400004c617 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -855,7 +855,7 @@ int nvmem_layout_register(struct nvmem_l +@@ -854,7 +854,7 @@ int nvmem_layout_register(struct nvmem_l return -EINVAL; /* Populate the cells */ diff --git a/target/linux/generic/backport-6.6/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch b/target/linux/generic/backport-6.6/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch index 514b5f2de5..510f3dd841 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch @@ -24,7 +24,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -877,19 +877,6 @@ void nvmem_layout_unregister(struct nvme +@@ -876,19 +876,6 @@ void nvmem_layout_unregister(struct nvme } EXPORT_SYMBOL_GPL(nvmem_layout_unregister); diff --git a/target/linux/generic/backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch b/target/linux/generic/backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch index aa0bbaa0c5..ccdcc09736 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -2164,6 +2164,19 @@ const char *nvmem_dev_name(struct nvmem_ +@@ -2163,6 +2163,19 @@ const char *nvmem_dev_name(struct nvmem_ } EXPORT_SYMBOL_GPL(nvmem_dev_name); diff --git a/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch b/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch index 2969462838..fa2056b69a 100644 --- a/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch +++ b/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch @@ -16,7 +16,7 @@ Signed-off-by: Linus Walleij --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -72,9 +72,9 @@ config SFP +@@ -69,9 +69,9 @@ config SFP comment "MII PHY device drivers" config AMD_PHY diff --git a/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch b/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch index 1c8e014a1a..2ae209f9e1 100644 --- a/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch +++ b/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch @@ -35,7 +35,7 @@ Signed-off-by: Lee Jones if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &trigger_data->mode) && trigger_data->duplex == DUPLEX_HALF) blink_on = true; -@@ -286,6 +298,9 @@ static ssize_t netdev_led_attr_show(stru +@@ -289,6 +301,9 @@ static ssize_t netdev_led_attr_show(stru case TRIGGER_NETDEV_LINK_10: case TRIGGER_NETDEV_LINK_100: case TRIGGER_NETDEV_LINK_1000: @@ -45,7 +45,7 @@ Signed-off-by: Lee Jones case TRIGGER_NETDEV_HALF_DUPLEX: case TRIGGER_NETDEV_FULL_DUPLEX: case TRIGGER_NETDEV_TX: -@@ -316,6 +331,9 @@ static ssize_t netdev_led_attr_store(str +@@ -319,6 +334,9 @@ static ssize_t netdev_led_attr_store(str case TRIGGER_NETDEV_LINK_10: case TRIGGER_NETDEV_LINK_100: case TRIGGER_NETDEV_LINK_1000: @@ -55,7 +55,7 @@ Signed-off-by: Lee Jones case TRIGGER_NETDEV_HALF_DUPLEX: case TRIGGER_NETDEV_FULL_DUPLEX: case TRIGGER_NETDEV_TX: -@@ -334,7 +352,10 @@ static ssize_t netdev_led_attr_store(str +@@ -337,7 +355,10 @@ static ssize_t netdev_led_attr_store(str if (test_bit(TRIGGER_NETDEV_LINK, &mode) && (test_bit(TRIGGER_NETDEV_LINK_10, &mode) || test_bit(TRIGGER_NETDEV_LINK_100, &mode) || @@ -67,7 +67,7 @@ Signed-off-by: Lee Jones return -EINVAL; cancel_delayed_work_sync(&trigger_data->work); -@@ -364,6 +385,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD +@@ -367,6 +388,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD DEFINE_NETDEV_TRIGGER(link_10, TRIGGER_NETDEV_LINK_10); DEFINE_NETDEV_TRIGGER(link_100, TRIGGER_NETDEV_LINK_100); DEFINE_NETDEV_TRIGGER(link_1000, TRIGGER_NETDEV_LINK_1000); @@ -77,7 +77,7 @@ Signed-off-by: Lee Jones DEFINE_NETDEV_TRIGGER(half_duplex, TRIGGER_NETDEV_HALF_DUPLEX); DEFINE_NETDEV_TRIGGER(full_duplex, TRIGGER_NETDEV_FULL_DUPLEX); DEFINE_NETDEV_TRIGGER(tx, TRIGGER_NETDEV_TX); -@@ -422,6 +446,9 @@ static struct attribute *netdev_trig_att +@@ -425,6 +449,9 @@ static struct attribute *netdev_trig_att &dev_attr_link_10.attr, &dev_attr_link_100.attr, &dev_attr_link_1000.attr, @@ -87,7 +87,7 @@ Signed-off-by: Lee Jones &dev_attr_full_duplex.attr, &dev_attr_half_duplex.attr, &dev_attr_rx.attr, -@@ -519,6 +546,9 @@ static void netdev_trig_work(struct work +@@ -522,6 +549,9 @@ static void netdev_trig_work(struct work test_bit(TRIGGER_NETDEV_LINK_10, &trigger_data->mode) || test_bit(TRIGGER_NETDEV_LINK_100, &trigger_data->mode) || test_bit(TRIGGER_NETDEV_LINK_1000, &trigger_data->mode) || @@ -99,7 +99,7 @@ Signed-off-by: Lee Jones interval = jiffies_to_msecs( --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -533,6 +533,9 @@ enum led_trigger_netdev_modes { +@@ -588,6 +588,9 @@ enum led_trigger_netdev_modes { TRIGGER_NETDEV_LINK_10, TRIGGER_NETDEV_LINK_100, TRIGGER_NETDEV_LINK_1000, diff --git a/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch b/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch index 0182e6d1a2..30390299c8 100644 --- a/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch +++ b/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch @@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -3138,6 +3138,7 @@ static int of_phy_led(struct phy_device +@@ -3198,6 +3198,7 @@ static int of_phy_led(struct phy_device struct device *dev = &phydev->mdio.dev; struct led_init_data init_data = {}; struct led_classdev *cdev; @@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski struct phy_led *phyled; u32 index; int err; -@@ -3155,6 +3156,21 @@ static int of_phy_led(struct phy_device +@@ -3215,6 +3216,21 @@ static int of_phy_led(struct phy_device if (index > U8_MAX) return -EINVAL; @@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski cdev->brightness_set_blocking = phy_led_set_brightness; --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -791,6 +791,15 @@ struct phy_led { +@@ -870,6 +870,15 @@ struct phy_led { #define to_phy_led(d) container_of(d, struct phy_led, led_cdev) @@ -76,7 +76,7 @@ Signed-off-by: Jakub Kicinski /** * struct phy_driver - Driver structure for a particular PHY type * -@@ -1059,6 +1068,19 @@ struct phy_driver { +@@ -1146,6 +1155,19 @@ struct phy_driver { int (*led_hw_control_get)(struct phy_device *dev, u8 index, unsigned long *rules); diff --git a/target/linux/generic/backport-6.6/894-v6.8-net-ethtool-implement-ethtool_puts.patch b/target/linux/generic/backport-6.6/894-v6.8-net-ethtool-implement-ethtool_puts.patch index 5094a6d774..9c61ff27ab 100644 --- a/target/linux/generic/backport-6.6/894-v6.8-net-ethtool-implement-ethtool_puts.patch +++ b/target/linux/generic/backport-6.6/894-v6.8-net-ethtool-implement-ethtool_puts.patch @@ -103,7 +103,7 @@ Signed-off-by: Justin Stitt --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h -@@ -843,4 +843,17 @@ int ethtool_get_phc_vclocks(struct net_d +@@ -1052,4 +1052,17 @@ static inline int ethtool_mm_frag_size_m * next string. */ extern __printf(2, 3) void ethtool_sprintf(u8 **data, const char *fmt, ...); @@ -123,7 +123,7 @@ Signed-off-by: Justin Stitt #endif /* _LINUX_ETHTOOL_H */ --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c -@@ -1974,6 +1974,13 @@ __printf(2, 3) void ethtool_sprintf(u8 * +@@ -1991,6 +1991,13 @@ __printf(2, 3) void ethtool_sprintf(u8 * } EXPORT_SYMBOL(ethtool_sprintf);