From d05c07ef9804fabe29f1b8604f1e60018fe0c52d Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Fri, 3 May 2024 16:43:56 +0100 Subject: [PATCH] kernel: bump 6.1 to 6.1.90 Signed-off-by: Rui Salvaterra --- include/kernel-6.1 | 4 +- .../209-b44-register-adm-switch.patch | 6 +- .../bcm47xx/patches-6.1/210-b44_phy_fix.patch | 2 +- .../hack-6.1/901-debloat_sock_diag.patch | 4 +- .../generic/hack-6.1/902-debloat_proc.patch | 2 +- ...ional-threading-for-backlog-processi.patch | 8 +- ...x8m-pcie-Refine-register-definitions.patch | 6 +- ...x8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch | 197 ------------------ ...x8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch | 6 +- 9 files changed, 19 insertions(+), 216 deletions(-) delete mode 100644 target/linux/imx/patches-6.1/002-6.2-phy-freescale-imx8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 6717917ac1edc4..7dc45f9b7e11e9 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .89 -LINUX_KERNEL_HASH-6.1.89 = 12bab8e092618d1d4eeaf4201e6e70054c94896198956bd84ff0e908b0264719 +LINUX_VERSION-6.1 = .90 +LINUX_KERNEL_HASH-6.1.90 = 83a3d72e764fceda2c1fc68a4ea6b91253a28da56a688a2b61776b0d19788e1d diff --git a/target/linux/bcm47xx/patches-6.1/209-b44-register-adm-switch.patch b/target/linux/bcm47xx/patches-6.1/209-b44-register-adm-switch.patch index af4e218f9ec2da..1b9dcb3adc3c18 100644 --- a/target/linux/bcm47xx/patches-6.1/209-b44-register-adm-switch.patch +++ b/target/linux/bcm47xx/patches-6.1/209-b44-register-adm-switch.patch @@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch #include #include -@@ -2249,6 +2251,69 @@ static void b44_adjust_link(struct net_d +@@ -2251,6 +2253,69 @@ static void b44_adjust_link(struct net_d } } @@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch static int b44_register_phy_one(struct b44 *bp) { __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; -@@ -2285,6 +2350,9 @@ static int b44_register_phy_one(struct b +@@ -2287,6 +2352,9 @@ static int b44_register_phy_one(struct b if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) && (sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) { @@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch dev_info(sdev->dev, "could not find PHY at %i, use fixed one\n", bp->phy_addr); -@@ -2479,6 +2547,7 @@ static void b44_remove_one(struct ssb_de +@@ -2481,6 +2549,7 @@ static void b44_remove_one(struct ssb_de unregister_netdev(dev); if (bp->flags & B44_FLAG_EXTERNAL_PHY) b44_unregister_phy_one(bp); diff --git a/target/linux/bcm47xx/patches-6.1/210-b44_phy_fix.patch b/target/linux/bcm47xx/patches-6.1/210-b44_phy_fix.patch index ffe029b9fe784a..af9736518b83a7 100644 --- a/target/linux/bcm47xx/patches-6.1/210-b44_phy_fix.patch +++ b/target/linux/bcm47xx/patches-6.1/210-b44_phy_fix.patch @@ -43,7 +43,7 @@ if (bp->flags & B44_FLAG_EXTERNAL_PHY) return 0; -@@ -2179,6 +2204,8 @@ static int b44_get_invariants(struct b44 +@@ -2181,6 +2206,8 @@ static int b44_get_invariants(struct b44 * valid PHY address. */ bp->phy_addr &= 0x1F; diff --git a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch index ec71f9af4be03e..09b59478aae2ba 100644 --- a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau static void sock_def_write_space_wfree(struct sock *sk); static void sock_def_write_space(struct sock *sk); -@@ -585,6 +587,18 @@ discard_and_relse: +@@ -586,6 +588,18 @@ discard_and_relse: } EXPORT_SYMBOL(__sk_receive_skb); @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *, u32)); INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *, -@@ -2188,9 +2202,11 @@ static void __sk_free(struct sock *sk) +@@ -2189,9 +2203,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); diff --git a/target/linux/generic/hack-6.1/902-debloat_proc.patch b/target/linux/generic/hack-6.1/902-debloat_proc.patch index a90169efc9c202..d9de0b4fec6878 100644 --- a/target/linux/generic/hack-6.1/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.1/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -4114,6 +4114,8 @@ static __net_initdata struct pernet_oper +@@ -4115,6 +4115,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch index 69b272173815c4..6ccc3eb389833d 100644 --- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch +++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch @@ -177,15 +177,15 @@ Signed-off-by: Felix Fietkau sd->backlog.weight = weight_p; --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c -@@ -29,6 +29,7 @@ static int int_3600 = 3600; - static int min_sndbuf = SOCK_MIN_SNDBUF; +@@ -30,6 +30,7 @@ static int min_sndbuf = SOCK_MIN_SNDBUF; static int min_rcvbuf = SOCK_MIN_RCVBUF; static int max_skb_frags = MAX_SKB_FRAGS; + static int min_mem_pcpu_rsv = SK_MEMORY_PCPU_RESERVE; +static int backlog_threaded; static int net_msg_warn; /* Unused, but still a sysctl */ -@@ -112,6 +113,23 @@ static int rps_sock_flow_sysctl(struct c +@@ -113,6 +114,23 @@ static int rps_sock_flow_sysctl(struct c } #endif /* CONFIG_RPS */ @@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_NET_FLOW_LIMIT static DEFINE_MUTEX(flow_limit_update_mutex); -@@ -473,6 +491,15 @@ static struct ctl_table net_core_table[] +@@ -482,6 +500,15 @@ static struct ctl_table net_core_table[] .proc_handler = rps_sock_flow_sysctl }, #endif diff --git a/target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch b/target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch index 0af479aae94b8f..01731755df11b7 100644 --- a/target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch +++ b/target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch @@ -20,7 +20,7 @@ Reviewed-by: Lucas Stach --- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c +++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c -@@ -31,12 +31,10 @@ +@@ -32,12 +32,10 @@ #define IMX8MM_PCIE_PHY_CMN_REG065 0x194 #define ANA_AUX_RX_TERM (BIT(7) | BIT(4)) #define ANA_AUX_TX_LVL GENMASK(3, 0) @@ -35,8 +35,8 @@ Reviewed-by: Lucas Stach #define IMX8MM_GPR_PCIE_REF_CLK_SEL GENMASK(25, 24) #define IMX8MM_GPR_PCIE_REF_CLK_PLL FIELD_PREP(IMX8MM_GPR_PCIE_REF_CLK_SEL, 0x3) -@@ -131,9 +129,8 @@ static int imx8_pcie_phy_power_on(struct - reset_control_deassert(imx8_phy->reset); +@@ -152,9 +150,8 @@ static int imx8_pcie_phy_power_on(struct + } /* Polling to check the phy is ready or not. */ - ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG75, diff --git a/target/linux/imx/patches-6.1/002-6.2-phy-freescale-imx8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch b/target/linux/imx/patches-6.1/002-6.2-phy-freescale-imx8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch deleted file mode 100644 index c2264c0bb4c43e..00000000000000 --- a/target/linux/imx/patches-6.1/002-6.2-phy-freescale-imx8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch +++ /dev/null @@ -1,197 +0,0 @@ -From fb681544808b85c0cdf41a627401e5d470633914 Mon Sep 17 00:00:00 2001 -From: Richard Zhu -Date: Thu, 13 Oct 2022 09:47:01 +0800 -Subject: [PATCH 2/3] phy: freescale: imx8m-pcie: Refine i.MX8MM PCIe PHY - driver - -To make it more flexible and easy to expand. Refine i.MX8MM PCIe PHY -driver. -- Use gpr compatible string to avoid the codes duplications when add - another platform PCIe PHY support. -- Re-arrange the codes to let it more flexible and easy to expand. -No functional change. Re-arrange the TX tuning, since internal registers -can be wrote through APB interface before assertion of CMN_RST. - -Signed-off-by: Richard Zhu -Signed-off-by: Lucas Stach -Tested-by: Marek Vasut -Tested-by: Richard Leitner -Tested-by: Alexander Stein -Reviewed-by: Lucas Stach -Reviewed-by: Ahmad Fatoum ---- - drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 106 +++++++++++++-------- - 1 file changed, 66 insertions(+), 40 deletions(-) - ---- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c -+++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -45,6 +46,15 @@ - #define IMX8MM_GPR_PCIE_SSC_EN BIT(16) - #define IMX8MM_GPR_PCIE_AUX_EN_OVERRIDE BIT(9) - -+enum imx8_pcie_phy_type { -+ IMX8MM, -+}; -+ -+struct imx8_pcie_phy_drvdata { -+ const char *gpr; -+ enum imx8_pcie_phy_type variant; -+}; -+ - struct imx8_pcie_phy { - void __iomem *base; - struct clk *clk; -@@ -55,6 +65,7 @@ struct imx8_pcie_phy { - u32 tx_deemph_gen1; - u32 tx_deemph_gen2; - bool clkreq_unused; -+ const struct imx8_pcie_phy_drvdata *drvdata; - }; - - static int imx8_pcie_phy_power_on(struct phy *phy) -@@ -66,31 +77,17 @@ static int imx8_pcie_phy_power_on(struct - reset_control_assert(imx8_phy->reset); - - pad_mode = imx8_phy->refclk_pad_mode; -- /* Set AUX_EN_OVERRIDE 1'b0, when the CLKREQ# isn't hooked */ -- regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -- IMX8MM_GPR_PCIE_AUX_EN_OVERRIDE, -- imx8_phy->clkreq_unused ? -- 0 : IMX8MM_GPR_PCIE_AUX_EN_OVERRIDE); -- regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -- IMX8MM_GPR_PCIE_AUX_EN, -- IMX8MM_GPR_PCIE_AUX_EN); -- regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -- IMX8MM_GPR_PCIE_POWER_OFF, 0); -- regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -- IMX8MM_GPR_PCIE_SSC_EN, 0); -- -- regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -- IMX8MM_GPR_PCIE_REF_CLK_SEL, -- pad_mode == IMX8_PCIE_REFCLK_PAD_INPUT ? -- IMX8MM_GPR_PCIE_REF_CLK_EXT : -- IMX8MM_GPR_PCIE_REF_CLK_PLL); -- usleep_range(100, 200); -- -- /* Do the PHY common block reset */ -- regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -- IMX8MM_GPR_PCIE_CMN_RST, -- IMX8MM_GPR_PCIE_CMN_RST); -- usleep_range(200, 500); -+ switch (imx8_phy->drvdata->variant) { -+ case IMX8MM: -+ /* Tune PHY de-emphasis setting to pass PCIe compliance. */ -+ if (imx8_phy->tx_deemph_gen1) -+ writel(imx8_phy->tx_deemph_gen1, -+ imx8_phy->base + PCIE_PHY_TRSV_REG5); -+ if (imx8_phy->tx_deemph_gen2) -+ writel(imx8_phy->tx_deemph_gen2, -+ imx8_phy->base + PCIE_PHY_TRSV_REG6); -+ break; -+ } - - if (pad_mode == IMX8_PCIE_REFCLK_PAD_INPUT || - pad_mode == IMX8_PCIE_REFCLK_PAD_UNUSED) { -@@ -118,15 +115,37 @@ static int imx8_pcie_phy_power_on(struct - imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG065); - } - -- /* Tune PHY de-emphasis setting to pass PCIe compliance. */ -- if (imx8_phy->tx_deemph_gen1) -- writel(imx8_phy->tx_deemph_gen1, -- imx8_phy->base + PCIE_PHY_TRSV_REG5); -- if (imx8_phy->tx_deemph_gen2) -- writel(imx8_phy->tx_deemph_gen2, -- imx8_phy->base + PCIE_PHY_TRSV_REG6); -+ /* Set AUX_EN_OVERRIDE 1'b0, when the CLKREQ# isn't hooked */ -+ regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -+ IMX8MM_GPR_PCIE_AUX_EN_OVERRIDE, -+ imx8_phy->clkreq_unused ? -+ 0 : IMX8MM_GPR_PCIE_AUX_EN_OVERRIDE); -+ regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -+ IMX8MM_GPR_PCIE_AUX_EN, -+ IMX8MM_GPR_PCIE_AUX_EN); -+ regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -+ IMX8MM_GPR_PCIE_POWER_OFF, 0); -+ regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -+ IMX8MM_GPR_PCIE_SSC_EN, 0); - -- reset_control_deassert(imx8_phy->reset); -+ regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -+ IMX8MM_GPR_PCIE_REF_CLK_SEL, -+ pad_mode == IMX8_PCIE_REFCLK_PAD_INPUT ? -+ IMX8MM_GPR_PCIE_REF_CLK_EXT : -+ IMX8MM_GPR_PCIE_REF_CLK_PLL); -+ usleep_range(100, 200); -+ -+ /* Do the PHY common block reset */ -+ regmap_update_bits(imx8_phy->iomuxc_gpr, IOMUXC_GPR14, -+ IMX8MM_GPR_PCIE_CMN_RST, -+ IMX8MM_GPR_PCIE_CMN_RST); -+ -+ switch (imx8_phy->drvdata->variant) { -+ case IMX8MM: -+ reset_control_deassert(imx8_phy->reset); -+ usleep_range(200, 500); -+ break; -+ } - - /* Polling to check the phy is ready or not. */ - ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG075, -@@ -157,6 +176,17 @@ static const struct phy_ops imx8_pcie_ph - .owner = THIS_MODULE, - }; - -+static const struct imx8_pcie_phy_drvdata imx8mm_drvdata = { -+ .gpr = "fsl,imx8mm-iomuxc-gpr", -+ .variant = IMX8MM, -+}; -+ -+static const struct of_device_id imx8_pcie_phy_of_match[] = { -+ {.compatible = "fsl,imx8mm-pcie-phy", .data = &imx8mm_drvdata, }, -+ { }, -+}; -+MODULE_DEVICE_TABLE(of, imx8_pcie_phy_of_match); -+ - static int imx8_pcie_phy_probe(struct platform_device *pdev) - { - struct phy_provider *phy_provider; -@@ -169,6 +199,8 @@ static int imx8_pcie_phy_probe(struct pl - if (!imx8_phy) - return -ENOMEM; - -+ imx8_phy->drvdata = of_device_get_match_data(dev); -+ - /* get PHY refclk pad mode */ - of_property_read_u32(np, "fsl,refclk-pad-mode", - &imx8_phy->refclk_pad_mode); -@@ -194,7 +226,7 @@ static int imx8_pcie_phy_probe(struct pl - - /* Grab GPR config register range */ - imx8_phy->iomuxc_gpr = -- syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); -+ syscon_regmap_lookup_by_compatible(imx8_phy->drvdata->gpr); - if (IS_ERR(imx8_phy->iomuxc_gpr)) { - dev_err(dev, "unable to find iomuxc registers\n"); - return PTR_ERR(imx8_phy->iomuxc_gpr); -@@ -222,12 +254,6 @@ static int imx8_pcie_phy_probe(struct pl - return PTR_ERR_OR_ZERO(phy_provider); - } - --static const struct of_device_id imx8_pcie_phy_of_match[] = { -- {.compatible = "fsl,imx8mm-pcie-phy",}, -- { }, --}; --MODULE_DEVICE_TABLE(of, imx8_pcie_phy_of_match); -- - static struct platform_driver imx8_pcie_phy_driver = { - .probe = imx8_pcie_phy_probe, - .driver = { diff --git a/target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch b/target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch index 03b41e4153029a..dbcfd40e573578 100644 --- a/target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch +++ b/target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch @@ -57,7 +57,7 @@ Reviewed-by: Ahmad Fatoum } if (pad_mode == IMX8_PCIE_REFCLK_PAD_INPUT || -@@ -141,6 +145,9 @@ static int imx8_pcie_phy_power_on(struct +@@ -143,6 +147,9 @@ static int imx8_pcie_phy_power_on(struct IMX8MM_GPR_PCIE_CMN_RST); switch (imx8_phy->drvdata->variant) { @@ -67,7 +67,7 @@ Reviewed-by: Ahmad Fatoum case IMX8MM: reset_control_deassert(imx8_phy->reset); usleep_range(200, 500); -@@ -181,8 +188,14 @@ static const struct imx8_pcie_phy_drvdat +@@ -183,8 +190,14 @@ static const struct imx8_pcie_phy_drvdat .variant = IMX8MM, }; @@ -82,7 +82,7 @@ Reviewed-by: Ahmad Fatoum { }, }; MODULE_DEVICE_TABLE(of, imx8_pcie_phy_of_match); -@@ -238,6 +251,14 @@ static int imx8_pcie_phy_probe(struct pl +@@ -240,6 +253,14 @@ static int imx8_pcie_phy_probe(struct pl return PTR_ERR(imx8_phy->reset); }