From: Weijie Gao Date: Wed, 3 Jan 2024 17:58:18 +0000 (+0800) Subject: generic: 6.6: manually refresh backport patches X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a76397cd47f838907a3087341b0e1644c86bc230;p=openwrt%2Fstaging%2Fneocturne.git generic: 6.6: manually refresh backport patches Refresh backport patches that still needs to be merged for kernel 6.6. Signed-off-by: Weijie Gao --- diff --git a/target/linux/generic/backport-6.6/702-01-v6.7-net-phy-aquantia-move-to-separate-directory.patch b/target/linux/generic/backport-6.6/702-01-v6.7-net-phy-aquantia-move-to-separate-directory.patch index 0cad6c53d4..be4d4ccad9 100644 --- a/target/linux/generic/backport-6.6/702-01-v6.7-net-phy-aquantia-move-to-separate-directory.patch +++ b/target/linux/generic/backport-6.6/702-01-v6.7-net-phy-aquantia-move-to-separate-directory.patch @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -90,10 +90,7 @@ config ADIN1100_PHY +@@ -96,10 +96,7 @@ config ADIN1100_PHY Currently supports the: - ADIN1100 - Robust,Industrial, Low Power 10BASE-T1L Ethernet PHY @@ -40,7 +40,7 @@ Signed-off-by: David S. Miller tristate "Asix PHYs" --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -33,11 +33,7 @@ obj-y += $(sfp-obj-y) $(sfp-obj-m) +@@ -35,11 +35,7 @@ obj-y += $(sfp-obj-y) $(sfp-obj-m) obj-$(CONFIG_ADIN_PHY) += adin.o obj-$(CONFIG_ADIN1100_PHY) += adin1100.o obj-$(CONFIG_AMD_PHY) += amd.o @@ -323,7 +323,7 @@ Signed-off-by: David S. Miller + .config = aqr_hwmon_temp_config, +}; + -+static const struct hwmon_channel_info *aqr_hwmon_info[] = { ++static const struct hwmon_channel_info * const aqr_hwmon_info[] = { + &aqr_hwmon_chip, + &aqr_hwmon_temp, + NULL, @@ -363,7 +363,7 @@ Signed-off-by: David S. Miller +#endif --- /dev/null +++ b/drivers/net/phy/aquantia/aquantia_main.c -@@ -0,0 +1,842 @@ +@@ -0,0 +1,882 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for Aquantia PHY @@ -388,6 +388,8 @@ Signed-off-by: David S. Miller +#define PHY_ID_AQR107 0x03a1b4e0 +#define PHY_ID_AQCS109 0x03a1b5c2 +#define PHY_ID_AQR405 0x03a1b4b0 ++#define PHY_ID_AQR112 0x03a1b662 ++#define PHY_ID_AQR412 0x03a1b712 +#define PHY_ID_AQR113C 0x31c31c12 + +#define MDIO_PHYXS_VEND_IF_STATUS 0xe812 @@ -1167,6 +1169,42 @@ Signed-off-by: David S. Miller + .read_status = aqr_read_status, +}, +{ ++ PHY_ID_MATCH_MODEL(PHY_ID_AQR112), ++ .name = "Aquantia AQR112", ++ .probe = aqr107_probe, ++ .config_aneg = aqr_config_aneg, ++ .config_intr = aqr_config_intr, ++ .handle_interrupt = aqr_handle_interrupt, ++ .get_tunable = aqr107_get_tunable, ++ .set_tunable = aqr107_set_tunable, ++ .suspend = aqr107_suspend, ++ .resume = aqr107_resume, ++ .read_status = aqr107_read_status, ++ .get_rate_matching = aqr107_get_rate_matching, ++ .get_sset_count = aqr107_get_sset_count, ++ .get_strings = aqr107_get_strings, ++ .get_stats = aqr107_get_stats, ++ .link_change_notify = aqr107_link_change_notify, ++}, ++{ ++ PHY_ID_MATCH_MODEL(PHY_ID_AQR412), ++ .name = "Aquantia AQR412", ++ .probe = aqr107_probe, ++ .config_aneg = aqr_config_aneg, ++ .config_intr = aqr_config_intr, ++ .handle_interrupt = aqr_handle_interrupt, ++ .get_tunable = aqr107_get_tunable, ++ .set_tunable = aqr107_set_tunable, ++ .suspend = aqr107_suspend, ++ .resume = aqr107_resume, ++ .read_status = aqr107_read_status, ++ .get_rate_matching = aqr107_get_rate_matching, ++ .get_sset_count = aqr107_get_sset_count, ++ .get_strings = aqr107_get_strings, ++ .get_stats = aqr107_get_stats, ++ .link_change_notify = aqr107_link_change_notify, ++}, ++{ + PHY_ID_MATCH_MODEL(PHY_ID_AQR113C), + .name = "Aquantia AQR113C", + .probe = aqr107_probe, @@ -1197,6 +1235,8 @@ Signed-off-by: David S. Miller + { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, ++ { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, ++ { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, + { } +}; @@ -1421,7 +1461,7 @@ Signed-off-by: David S. Miller - .config = aqr_hwmon_temp_config, -}; - --static const struct hwmon_channel_info *aqr_hwmon_info[] = { +-static const struct hwmon_channel_info * const aqr_hwmon_info[] = { - &aqr_hwmon_chip, - &aqr_hwmon_temp, - NULL, @@ -1461,7 +1501,7 @@ Signed-off-by: David S. Miller -#endif --- a/drivers/net/phy/aquantia_main.c +++ /dev/null -@@ -1,842 +0,0 @@ +@@ -1,882 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Driver for Aquantia PHY @@ -1486,6 +1526,8 @@ Signed-off-by: David S. Miller -#define PHY_ID_AQR107 0x03a1b4e0 -#define PHY_ID_AQCS109 0x03a1b5c2 -#define PHY_ID_AQR405 0x03a1b4b0 +-#define PHY_ID_AQR112 0x03a1b662 +-#define PHY_ID_AQR412 0x03a1b712 -#define PHY_ID_AQR113C 0x31c31c12 - -#define MDIO_PHYXS_VEND_IF_STATUS 0xe812 @@ -2265,6 +2307,42 @@ Signed-off-by: David S. Miller - .read_status = aqr_read_status, -}, -{ +- PHY_ID_MATCH_MODEL(PHY_ID_AQR112), +- .name = "Aquantia AQR112", +- .probe = aqr107_probe, +- .config_aneg = aqr_config_aneg, +- .config_intr = aqr_config_intr, +- .handle_interrupt = aqr_handle_interrupt, +- .get_tunable = aqr107_get_tunable, +- .set_tunable = aqr107_set_tunable, +- .suspend = aqr107_suspend, +- .resume = aqr107_resume, +- .read_status = aqr107_read_status, +- .get_rate_matching = aqr107_get_rate_matching, +- .get_sset_count = aqr107_get_sset_count, +- .get_strings = aqr107_get_strings, +- .get_stats = aqr107_get_stats, +- .link_change_notify = aqr107_link_change_notify, +-}, +-{ +- PHY_ID_MATCH_MODEL(PHY_ID_AQR412), +- .name = "Aquantia AQR412", +- .probe = aqr107_probe, +- .config_aneg = aqr_config_aneg, +- .config_intr = aqr_config_intr, +- .handle_interrupt = aqr_handle_interrupt, +- .get_tunable = aqr107_get_tunable, +- .set_tunable = aqr107_set_tunable, +- .suspend = aqr107_suspend, +- .resume = aqr107_resume, +- .read_status = aqr107_read_status, +- .get_rate_matching = aqr107_get_rate_matching, +- .get_sset_count = aqr107_get_sset_count, +- .get_strings = aqr107_get_strings, +- .get_stats = aqr107_get_stats, +- .link_change_notify = aqr107_link_change_notify, +-}, +-{ - PHY_ID_MATCH_MODEL(PHY_ID_AQR113C), - .name = "Aquantia AQR113C", - .probe = aqr107_probe, @@ -2295,6 +2373,8 @@ Signed-off-by: David S. Miller - { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, +- { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, +- { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, - { } -}; diff --git a/target/linux/generic/backport-6.6/713-v6.9-01-net-phy-move-at803x-PHY-driver-to-dedicated-director.patch b/target/linux/generic/backport-6.6/713-v6.9-01-net-phy-move-at803x-PHY-driver-to-dedicated-director.patch index 8c9babea7b..ba89ecdb3c 100644 --- a/target/linux/generic/backport-6.6/713-v6.9-01-net-phy-move-at803x-PHY-driver-to-dedicated-director.patch +++ b/target/linux/generic/backport-6.6/713-v6.9-01-net-phy-move-at803x-PHY-driver-to-dedicated-director.patch @@ -25,9 +25,9 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -277,12 +277,7 @@ config NXP_TJA11XX_PHY - help - Currently supports the NXP TJA1100 and TJA1101 PHY. +@@ -318,12 +318,7 @@ config NCN26000_PHY + Currently supports the NCN26000 10BASE-T1S Industrial PHY + with MII interface. -config AT803X_PHY - tristate "Qualcomm Atheros AR803X PHYs and QCA833x PHYs" @@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski tristate "Quality Semiconductor PHYs" --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -34,7 +34,6 @@ obj-$(CONFIG_ADIN_PHY) += adin.o +@@ -36,7 +36,6 @@ obj-$(CONFIG_ADIN_PHY) += adin.o obj-$(CONFIG_ADIN1100_PHY) += adin1100.o obj-$(CONFIG_AMD_PHY) += amd.o obj-$(CONFIG_AQUANTIA_PHY) += aquantia/ @@ -49,9 +49,9 @@ Signed-off-by: Jakub Kicinski obj-$(CONFIG_AX88796B_PHY) += ax88796b.o obj-$(CONFIG_BCM54140_PHY) += bcm54140.o obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o -@@ -75,6 +74,7 @@ obj-$(CONFIG_MOTORCOMM_PHY) += motorcomm - obj-$(CONFIG_NATIONAL_PHY) += national.o +@@ -82,6 +81,7 @@ obj-$(CONFIG_NCN26000_PHY) += ncn26000.o obj-$(CONFIG_NXP_C45_TJA11XX_PHY) += nxp-c45-tja11xx.o + obj-$(CONFIG_NXP_CBTX_PHY) += nxp-cbtx.o obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o +obj-y += qcom/ obj-$(CONFIG_QSEMI_PHY) += qsemi.o @@ -2010,7 +2010,7 @@ Signed-off-by: Jakub Kicinski - return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, - QCA808X_MASTER_SLAVE_SEED_ENABLE, 0); - -- seed_value = prandom_u32_max(QCA808X_MASTER_SLAVE_SEED_RANGE); +- seed_value = get_random_u32_below(QCA808X_MASTER_SLAVE_SEED_RANGE); - return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, - QCA808X_MASTER_SLAVE_SEED_CFG | QCA808X_MASTER_SLAVE_SEED_ENABLE, - FIELD_PREP(QCA808X_MASTER_SLAVE_SEED_CFG, seed_value) | @@ -4772,7 +4772,7 @@ Signed-off-by: Jakub Kicinski + return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, + QCA808X_MASTER_SLAVE_SEED_ENABLE, 0); + -+ seed_value = prandom_u32_max(QCA808X_MASTER_SLAVE_SEED_RANGE); ++ seed_value = get_random_u32_below(QCA808X_MASTER_SLAVE_SEED_RANGE); + return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, + QCA808X_MASTER_SLAVE_SEED_CFG | QCA808X_MASTER_SLAVE_SEED_ENABLE, + FIELD_PREP(QCA808X_MASTER_SLAVE_SEED_CFG, seed_value) | diff --git a/target/linux/generic/backport-6.6/713-v6.9-05-net-phy-qcom-detach-qca808x-PHY-driver-from-at803x.patch b/target/linux/generic/backport-6.6/713-v6.9-05-net-phy-qcom-detach-qca808x-PHY-driver-from-at803x.patch index 597dcea4c0..d8092a8f3c 100644 --- a/target/linux/generic/backport-6.6/713-v6.9-05-net-phy-qcom-detach-qca808x-PHY-driver-from-at803x.patch +++ b/target/linux/generic/backport-6.6/713-v6.9-05-net-phy-qcom-detach-qca808x-PHY-driver-from-at803x.patch @@ -328,7 +328,7 @@ Signed-off-by: Jakub Kicinski - return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, - QCA808X_MASTER_SLAVE_SEED_ENABLE, 0); - -- seed_value = prandom_u32_max(QCA808X_MASTER_SLAVE_SEED_RANGE); +- seed_value = get_random_u32_below(QCA808X_MASTER_SLAVE_SEED_RANGE); - return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, - QCA808X_MASTER_SLAVE_SEED_CFG | QCA808X_MASTER_SLAVE_SEED_ENABLE, - FIELD_PREP(QCA808X_MASTER_SLAVE_SEED_CFG, seed_value) | @@ -1255,7 +1255,7 @@ Signed-off-by: Jakub Kicinski + return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, + QCA808X_MASTER_SLAVE_SEED_ENABLE, 0); + -+ seed_value = prandom_u32_max(QCA808X_MASTER_SLAVE_SEED_RANGE); ++ seed_value = get_random_u32_below(QCA808X_MASTER_SLAVE_SEED_RANGE); + return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED, + QCA808X_MASTER_SLAVE_SEED_CFG | QCA808X_MASTER_SLAVE_SEED_ENABLE, + FIELD_PREP(QCA808X_MASTER_SLAVE_SEED_CFG, seed_value) | 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 0cf01df3d3..6e5ac8c63a 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 @@ -242,7 +242,7 @@ Signed-off-by: David S. Miller refcount_t refcnt; unsigned long flags; size_t priv_size; -@@ -1763,10 +1764,10 @@ int phy_ethtool_get_link_ksettings(struc +@@ -1969,10 +1970,10 @@ int phy_ethtool_get_link_ksettings(struc int phy_ethtool_set_link_ksettings(struct net_device *ndev, const struct ethtool_link_ksettings *cmd); int phy_ethtool_nway_reset(struct net_device *ndev); @@ -253,11 +253,11 @@ Signed-off-by: David S. Miller - int addr, size_t priv_size); + int base_addr, size_t priv_size); - #if IS_ENABLED(CONFIG_PHYLIB) int __init mdio_bus_init(void); -@@ -1778,46 +1779,65 @@ int phy_ethtool_get_sset_count(struct ph - int phy_ethtool_get_stats(struct phy_device *phydev, - struct ethtool_stats *stats, u64 *data); + void mdio_bus_exit(void); +@@ -1995,46 +1996,65 @@ int __phy_hwtstamp_set(struct phy_device + struct kernel_hwtstamp_config *config, + struct netlink_ext_ack *extack); -static inline int phy_package_read(struct phy_device *phydev, u32 regnum) +static inline int phy_package_address(struct phy_device *phydev, 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 b355031aa5..50a454b2c9 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 @@ -115,9 +115,9 @@ Signed-off-by: David S. Miller /* auto scan for PHYs with empty reg property */ for_each_available_child_of_node(np, child) { - /* Skip PHYs with reg property set */ -- if (of_find_property(child, "reg", NULL)) +- if (of_property_present(child, "reg")) + /* Skip PHYs with reg property set or ethernet-phy-package node */ -+ if (of_find_property(child, "reg", NULL) || ++ if (of_property_present(child, "reg") || + of_node_name_eq(child, "ethernet-phy-package")) continue; 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 3c7bf6c132..00bbd3b80b 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 @@ -170,7 +170,7 @@ Signed-off-by: David S. Miller refcount_t refcnt; unsigned long flags; size_t priv_size; -@@ -1793,9 +1796,12 @@ int phy_ethtool_set_link_ksettings(struc +@@ -1971,9 +1974,12 @@ int phy_ethtool_set_link_ksettings(struc const struct ethtool_link_ksettings *cmd); int phy_ethtool_nway_reset(struct net_device *ndev); int phy_package_join(struct phy_device *phydev, int base_addr, size_t priv_size); @@ -181,5 +181,5 @@ Signed-off-by: David S. Miller +int devm_of_phy_package_join(struct device *dev, struct phy_device *phydev, + size_t priv_size); - #if IS_ENABLED(CONFIG_PHYLIB) int __init mdio_bus_init(void); + void mdio_bus_exit(void); 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 e20f94f1d4..e5f0c2f54d 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 @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -79,9 +79,9 @@ static int mtk_ppe_mib_wait_busy(struct +@@ -80,9 +80,9 @@ static int mtk_ppe_mib_wait_busy(struct int ret; u32 val; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau if (ret) dev_err(ppe->dev, "MIB table busy"); -@@ -89,17 +89,31 @@ static int mtk_ppe_mib_wait_busy(struct +@@ -90,17 +90,31 @@ static int mtk_ppe_mib_wait_busy(struct return ret; } @@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau cnt_r0 = readl(ppe->base + MTK_PPE_MIB_SER_R0); cnt_r1 = readl(ppe->base + MTK_PPE_MIB_SER_R1); -@@ -108,19 +122,19 @@ static int mtk_mib_entry_read(struct mtk +@@ -109,19 +123,19 @@ static int mtk_mib_entry_read(struct mtk if (mtk_is_netsys_v3_or_greater(ppe->eth)) { /* 64 bit for each counter */ u32 cnt_r3 = readl(ppe->base + MTK_PPE_MIB_SER_R3); @@ -76,9 +76,9 @@ Signed-off-by: Felix Fietkau u32 pkt_cnt_low = FIELD_GET(MTK_PPE_MIB_SER_R1_PKT_CNT_LOW, cnt_r1); u32 pkt_cnt_high = FIELD_GET(MTK_PPE_MIB_SER_R2_PKT_CNT_HIGH, cnt_r2); - *bytes = ((u64)byte_cnt_high << 32) | byte_cnt_low; -- *packets = (pkt_cnt_high << 16) | pkt_cnt_low; +- *packets = ((u64)pkt_cnt_high << 16) | pkt_cnt_low; + acct->bytes += ((u64)byte_cnt_high << 32) | byte_cnt_low; -+ acct->packets += (pkt_cnt_high << 16) | pkt_cnt_low; ++ acct->packets += ((u64)pkt_cnt_high << 16) | pkt_cnt_low; } - return 0; @@ -86,10 +86,11 @@ Signed-off-by: Felix Fietkau } static void mtk_ppe_cache_clear(struct mtk_ppe *ppe) -@@ -519,13 +533,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp +@@ -522,14 +536,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); +- - if (ppe->accounting) { - struct mtk_foe_accounting *acct; - @@ -100,7 +101,7 @@ Signed-off-by: Felix Fietkau } entry->hash = 0xffff; -@@ -550,11 +557,14 @@ static int __mtk_foe_entry_idle_time(str +@@ -554,11 +560,14 @@ static int __mtk_foe_entry_idle_time(str } static bool @@ -116,7 +117,7 @@ Signed-off-by: Felix Fietkau int len; if (hash == 0xffff) -@@ -565,18 +575,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp +@@ -569,18 +578,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp memcpy(&foe, hwe, len); if (!mtk_flow_entry_match(ppe->eth, entry, &foe, len) || @@ -155,7 +156,7 @@ Signed-off-by: Felix Fietkau struct mtk_flow_entry *cur; struct hlist_node *tmp; int idle; -@@ -585,7 +612,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe +@@ -589,7 +615,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe hlist_for_each_entry_safe(cur, tmp, &entry->l2_flows, l2_list) { int cur_idle; @@ -166,7 +167,7 @@ Signed-off-by: Felix Fietkau __mtk_foe_entry_clear(ppe, entry, false); continue; } -@@ -600,10 +629,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe +@@ -604,10 +632,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe } } @@ -196,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; -@@ -634,6 +682,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p +@@ -638,6 +685,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p dma_wmb(); @@ -209,7 +210,7 @@ Signed-off-by: Felix Fietkau mtk_ppe_cache_clear(ppe); } -@@ -796,21 +850,6 @@ out: +@@ -802,21 +855,6 @@ void __mtk_ppe_check_skb(struct mtk_ppe spin_unlock_bh(&ppe_lock); } @@ -231,7 +232,7 @@ Signed-off-by: Felix Fietkau int mtk_ppe_prepare_reset(struct mtk_ppe *ppe) { if (!ppe) -@@ -838,32 +877,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe +@@ -844,32 +882,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe return mtk_ppe_wait_busy(ppe); } @@ -283,7 +284,7 @@ Signed-off-by: Felix Fietkau void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash); -@@ -396,9 +399,8 @@ int mtk_foe_entry_set_queue(struct mtk_e +@@ -397,9 +400,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); @@ -308,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 -@@ -501,24 +501,21 @@ static int +@@ -505,24 +505,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-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 d83434fb2c..0a4a8ba0e1 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 -@@ -421,7 +421,7 @@ free_pagelist: +@@ -599,7 +599,7 @@ mtk_wed_free_tx_buffer(struct mtk_wed_device 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; -@@ -441,7 +441,7 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d +@@ -619,7 +619,7 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d static void mtk_wed_free_rx_buffer(struct mtk_wed_device *dev) { @@ -41,10 +41,10 @@ Signed-off-by: Paolo Abeni __le32 buf0; __le32 token; } __packed __aligned(4); -@@ -105,7 +105,7 @@ struct mtk_wed_device { +@@ -109,7 +109,7 @@ struct mtk_wed_device { + struct { int size; - struct page_frag_cache rx_page; - struct mtk_rxbm_desc *desc; + struct mtk_wed_bm_desc *desc; dma_addr_t desc_phys; 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 32ac37e8d0..4fc32e3e96 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 @@ -26,9 +26,9 @@ Signed-off-by: Paolo Abeni #define PHY_ID_AQR405 0x03a1b4b0 +#define PHY_ID_AQR111 0x03a1b610 +#define PHY_ID_AQR111B0 0x03a1b612 + #define PHY_ID_AQR112 0x03a1b662 + #define PHY_ID_AQR412 0x03a1b712 #define PHY_ID_AQR113C 0x31c31c12 - - #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 @@ -670,6 +672,16 @@ static int aqr107_probe(struct phy_devic return aqr_hwmon_probe(phydev); } @@ -91,12 +91,12 @@ Signed-off-by: Paolo Abeni PHY_ID_MATCH_MODEL(PHY_ID_AQR405), .name = "Aquantia AQR405", .config_aneg = aqr_config_aneg, -@@ -782,6 +832,8 @@ static struct mdio_device_id __maybe_unu +@@ -820,6 +870,8 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR111) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, - { } - }; 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 073bbbd49d..5be82455c1 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 @@ -17,15 +17,15 @@ 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 @@ - #define PHY_ID_AQR405 0x03a1b4b0 - #define PHY_ID_AQR111 0x03a1b610 #define PHY_ID_AQR111B0 0x03a1b612 + #define PHY_ID_AQR112 0x03a1b662 + #define PHY_ID_AQR412 0x03a1b712 +#define PHY_ID_AQR113 0x31c31c40 #define PHY_ID_AQR113C 0x31c31c12 #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 @@ -802,6 +803,25 @@ static struct phy_driver aqr_driver[] = - .read_status = aqr_read_status, + .link_change_notify = aqr107_link_change_notify, }, { + PHY_ID_MATCH_MODEL(PHY_ID_AQR113), @@ -51,9 +51,9 @@ Signed-off-by: David S. Miller .name = "Aquantia AQR113C", .probe = aqr107_probe, @@ -834,6 +854,7 @@ static struct mdio_device_id __maybe_unu - { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQR111) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, + { 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/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 965b8c91b2..7dcfe7d01b 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 @@ -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 @@ -26,6 +26,7 @@ - #define PHY_ID_AQR111B0 0x03a1b612 + #define PHY_ID_AQR412 0x03a1b712 #define PHY_ID_AQR113 0x31c31c40 #define PHY_ID_AQR113C 0x31c31c12 +#define PHY_ID_AQR813 0x31c31cb2 @@ -50,7 +50,7 @@ Signed-off-by: David S. Miller module_phy_driver(aqr_driver); @@ -856,6 +876,7 @@ static struct mdio_device_id __maybe_unu - { PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) }, diff --git a/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch b/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch index 95dd24881b..c02e7f8888 100644 --- a/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch +++ b/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -2527,9 +2527,13 @@ static void stmmac_bump_dma_threshold(st +@@ -2551,9 +2551,13 @@ static void stmmac_bump_dma_threshold(st * @priv: driver private structure * @budget: napi budget limiting this functions packet handling * @queue: TX queue index @@ -32,32 +32,34 @@ Signed-off-by: Paolo Abeni + bool *pending_packets) { struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue]; - unsigned int bytes_compl = 0, pkts_compl = 0; -@@ -2692,7 +2696,7 @@ static int stmmac_tx_clean(struct stmmac + struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[queue]; +@@ -2713,7 +2717,7 @@ static int stmmac_tx_clean(struct stmmac /* We still have pending packets, let's call for a new scheduling */ if (tx_q->dirty_tx != tx_q->cur_tx) - stmmac_tx_timer_arm(priv, queue); + *pending_packets = true; - __netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue)); - -@@ -5488,12 +5492,13 @@ static int stmmac_napi_poll_tx(struct na - struct stmmac_channel *ch = + u64_stats_update_begin(&txq_stats->napi_syncp); + u64_stats_add(&txq_stats->napi.tx_packets, tx_packets); +@@ -5603,6 +5607,7 @@ static int stmmac_napi_poll_tx(struct na container_of(napi, struct stmmac_channel, tx_napi); struct stmmac_priv *priv = ch->priv_data; + struct stmmac_txq_stats *txq_stats; + bool pending_packets = false; u32 chan = ch->index; int work_done; - priv->xstats.napi_poll++; +@@ -5611,7 +5616,7 @@ static int stmmac_napi_poll_tx(struct na + u64_stats_inc(&txq_stats->napi.poll); + u64_stats_update_end(&txq_stats->napi_syncp); - work_done = stmmac_tx_clean(priv, budget, chan); + work_done = stmmac_tx_clean(priv, budget, chan, &pending_packets); work_done = min(work_done, budget); if (work_done < budget && napi_complete_done(napi, work_done)) { -@@ -5504,6 +5509,10 @@ static int stmmac_napi_poll_tx(struct na +@@ -5622,6 +5627,10 @@ static int stmmac_napi_poll_tx(struct na spin_unlock_irqrestore(&ch->lock, flags); } @@ -68,22 +70,24 @@ Signed-off-by: Paolo Abeni return work_done; } -@@ -5512,12 +5521,13 @@ static int stmmac_napi_poll_rxtx(struct +@@ -5630,6 +5639,7 @@ static int stmmac_napi_poll_rxtx(struct struct stmmac_channel *ch = container_of(napi, struct stmmac_channel, rxtx_napi); struct stmmac_priv *priv = ch->priv_data; + bool tx_pending_packets = false; int rx_done, tx_done, rxtx_done; - u32 chan = ch->index; - - priv->xstats.napi_poll++; + struct stmmac_rxq_stats *rxq_stats; + struct stmmac_txq_stats *txq_stats; +@@ -5645,7 +5655,7 @@ static int stmmac_napi_poll_rxtx(struct + u64_stats_inc(&txq_stats->napi.poll); + u64_stats_update_end(&txq_stats->napi_syncp); - tx_done = stmmac_tx_clean(priv, budget, chan); + tx_done = stmmac_tx_clean(priv, budget, chan, &tx_pending_packets); tx_done = min(tx_done, budget); rx_done = stmmac_rx_zc(priv, budget, chan); -@@ -5542,6 +5552,10 @@ static int stmmac_napi_poll_rxtx(struct +@@ -5670,6 +5680,10 @@ static int stmmac_napi_poll_rxtx(struct spin_unlock_irqrestore(&ch->lock, flags); } diff --git a/target/linux/generic/backport-6.6/815-v6.7-4-leds-turris-omnia-Add-support-for-enabling-disabling.patch b/target/linux/generic/backport-6.6/815-v6.7-4-leds-turris-omnia-Add-support-for-enabling-disabling.patch index e98397922d..813e6e5673 100644 --- a/target/linux/generic/backport-6.6/815-v6.7-4-leds-turris-omnia-Add-support-for-enabling-disabling.patch +++ b/target/linux/generic/backport-6.6/815-v6.7-4-leds-turris-omnia-Add-support-for-enabling-disabling.patch @@ -217,10 +217,10 @@ Signed-off-by: Lee Jones + return le16_to_cpu(reply); +} + - static int omnia_leds_probe(struct i2c_client *client, - const struct i2c_device_id *id) + static int omnia_leds_probe(struct i2c_client *client) { -@@ -383,6 +471,21 @@ static int omnia_leds_probe(struct i2c_c + struct device *dev = &client->dev; +@@ -382,6 +470,21 @@ static int omnia_leds_probe(struct i2c_c leds->client = client; i2c_set_clientdata(client, leds); diff --git a/target/linux/generic/backport-6.6/819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch b/target/linux/generic/backport-6.6/819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch index e722109f91..b03ce68092 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch +++ b/target/linux/generic/backport-6.6/819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch @@ -20,8 +20,8 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -20,29 +20,7 @@ - #include +@@ -19,29 +19,7 @@ + #include #include -struct nvmem_device {