From 967520800a8aa45003c1899157309dddbd0317b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Fri, 31 Mar 2023 17:49:58 +0200 Subject: [PATCH 01/24] bmips: bcm6362/bcm63268: enable HW RNG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This enables the HW Random Number Generator on the BCM6362 and BCM63268 SoCs, which is the same one used on BCM6368 SoC. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/dts/bcm63268.dtsi | 12 ++++++++++++ target/linux/bmips/dts/bcm6362.dtsi | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/target/linux/bmips/dts/bcm63268.dtsi b/target/linux/bmips/dts/bcm63268.dtsi index 665b1bfecf0..e30cdd862f6 100644 --- a/target/linux/bmips/dts/bcm63268.dtsi +++ b/target/linux/bmips/dts/bcm63268.dtsi @@ -443,6 +443,18 @@ status = "disabled"; }; + random: rng@10002880 { + compatible = "brcm,bcm6368-rng"; + reg = <0x10002880 0x14>; + + clocks = <&periph_clk BCM63268_CLK_IPSEC>; + clock-names = "ipsec"; + + resets = <&periph_rst BCM63268_RST_IPSEC>; + + power-domains = <&periph_pwr BCM63268_POWER_DOMAIN_IPSEC>; + }; + ethernet: ethernet@1000d800 { compatible = "brcm,bcm63268-enetsw"; reg = <0x1000d800 0x80>, diff --git a/target/linux/bmips/dts/bcm6362.dtsi b/target/linux/bmips/dts/bcm6362.dtsi index 4f1d23e0019..d7fff43c441 100644 --- a/target/linux/bmips/dts/bcm6362.dtsi +++ b/target/linux/bmips/dts/bcm6362.dtsi @@ -476,6 +476,18 @@ status = "disabled"; }; + random: rng@10002880 { + compatible = "brcm,bcm6368-rng"; + reg = <0x10002880 0x14>; + + clocks = <&periph_clk BCM6362_CLK_IPSEC>; + clock-names = "ipsec"; + + resets = <&periph_rst BCM6362_RST_IPSEC>; + + power-domains = <&periph_pwr BCM6362_POWER_DOMAIN_IPSEC>; + }; + ethernet: ethernet@1000d800 { compatible = "brcm,bcm6362-enetsw"; reg = <0x1000d800 0x80>, From 791550b94fc791866e486e52d3c4d1d0378966ff Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Sun, 26 Mar 2023 22:50:42 +0200 Subject: [PATCH 02/24] ipq40xx: add reset button for Google WiFi (Gale) Add the external reset button for use with OpenWrt. Co-authored-by: Brian Norris Signed-off-by: Jan-Niklas Burfeind Reviewed-by: Brian Norris Tested-by: Brian Norris Signed-off-by: David Bauer --- .../files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts index 65f59333055..e4f47431e5f 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts @@ -49,16 +49,29 @@ }; }; }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&fw_pinmux>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&tlmm 57 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; }; &tlmm { - fw_pinmux { + fw_pinmux: fw_pinmux { wp { pins = "gpio53"; output-low; }; recovery { pins = "gpio57"; + function = "gpio"; bias-none; }; developer { From 9b005036f8d070594fc7f3374f82c81f0a692918 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Mon, 27 Mar 2023 07:29:39 +0200 Subject: [PATCH 03/24] ipq40xx: add LED functions for Google WiFi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add LED function properties for the LED controller to avoid failing driver probe with kernel 5.15. While at it, also define the OpenWrt LED indicator patterns for this device. Ref commit 583ac0e11df7 ("mpc85xx: update lp5521 led-controller node for 5.10") Google uses white for running and red for an issue Signed-off-by: Jan-Niklas Burfeind Tested-by: Andrijan Möcker Reviewed-by: Brian Norris Signed-off-by: David Bauer --- .../files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts index e4f47431e5f..f92c2897381 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts @@ -15,6 +15,10 @@ aliases { label-mac-device = &gmac0; + led-boot = &led0_blue; + led-failsafe = &led0_red; + led-running = &led0_blue; + led-upgrade = &led0_red; }; chosen { @@ -255,12 +259,13 @@ clock-mode = /bits/ 8 <1>; #if 1 - led@0 { + led0_red: led@0 { reg = <0>; chan-name = "LED0_Red"; led-cur = /bits/ 8 <0x64>; max-cur = /bits/ 8 <0x78>; color = ; + function = LED_FUNCTION_FAULT; }; led@1 { @@ -271,12 +276,13 @@ color = ; }; - led@2 { + led0_blue: led@2 { reg = <2>; chan-name = "LED0_Blue"; led-cur = /bits/ 8 <0x64>; max-cur = /bits/ 8 <0x78>; color = ; + function = LED_FUNCTION_POWER; }; #else /* @@ -285,6 +291,7 @@ * # echo 255 > /sys/class/leds/tricolor/brightness */ multi-led@2 { + function = LED_FUNCTION_POWER; reg = <2>; color = ; #address-cells = <1>; From 17c89fd71fbb1cce40547df1c1f38e668eaf88a8 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 21 Dec 2022 22:00:49 +0200 Subject: [PATCH 04/24] uboot-sunxi: bump to 2020.07 This is the newest release where 210-sunxi-deactivate-binman.patch still applies. Tested on A64-Olinuxino-eMMC. Signed-off-by: Stijn Tintel --- package/boot/uboot-sunxi/Makefile | 4 +-- .../003-add-theobroma-a31-pangolin.patch | 2 +- .../patches/062-A20-improve-gmac-upload.patch | 2 +- ...1-sun6i-sync-PLL1-multdiv-with-Boot1.patch | 2 +- .../093-sun6i-fix-PLL-LDO-voltselect.patch | 2 +- .../101-sun6i-support-console-on-UART2.patch | 2 +- ...-environment-for-dtc-binary-location.patch | 2 +- .../patches/210-sunxi-deactivate-binman.patch | 4 +-- .../230-disable-axp209-on-a13-olinuxino.diff | 2 +- .../250-sun8i-h3-zeropi-add-device-tree.patch | 2 +- ...2-sunxi-h3-add-support-for-nanopi-r1.patch | 2 +- ...nxi-h5-add-support-for-nanopi-r1s-h5.patch | 12 +------- ...-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch | 29 +++++++++++++++++++ 13 files changed, 43 insertions(+), 24 deletions(-) create mode 100644 package/boot/uboot-sunxi/patches/270-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index ae5d12e381f..cb0c93281d4 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2020.04 +PKG_VERSION:=2020.07 -PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 +PKG_HASH:=c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a PKG_MAINTAINER:=Zoltan HERPAI diff --git a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch index 29969a71abe..fab06e6a8e7 100644 --- a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch +++ b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch @@ -1,6 +1,6 @@ --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -455,6 +455,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ +@@ -475,6 +475,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-m9.dtb \ sun6i-a31-mele-a1000g-quad.dtb \ sun6i-a31-mixtile-loftq.dtb \ diff --git a/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch b/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch index b805bbd1693..27b476472cf 100644 --- a/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch +++ b/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch @@ -2,7 +2,7 @@ --- a/configs/A20-OLinuXino-Lime2_defconfig +++ b/configs/A20-OLinuXino-Lime2_defconfig -@@ -22,6 +22,7 @@ CONFIG_ETH_DESIGNWARE=y +@@ -23,6 +23,7 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_MII=y CONFIG_SUN7I_GMAC=y diff --git a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch index f2a2b5e48fc..c637ccb792a 100644 --- a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch +++ b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch @@ -14,7 +14,7 @@ More specifically, the following settings are now used: --- a/arch/arm/mach-sunxi/clock_sun6i.c +++ b/arch/arm/mach-sunxi/clock_sun6i.c -@@ -112,11 +112,12 @@ void clock_set_pll1(unsigned int clk) +@@ -114,11 +114,12 @@ void clock_set_pll1(unsigned int clk) struct sunxi_ccm_reg * const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; const int p = 0; diff --git a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch index b62209e1dcb..c20db1352ed 100644 --- a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch +++ b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch @@ -18,7 +18,7 @@ required setting for the PLL LDO is 1.37v as per the A31 manual. --- a/arch/arm/mach-sunxi/clock_sun6i.c +++ b/arch/arm/mach-sunxi/clock_sun6i.c -@@ -25,13 +25,26 @@ void clock_init_safe(void) +@@ -27,13 +27,26 @@ void clock_init_safe(void) struct sunxi_prcm_reg * const prcm = (struct sunxi_prcm_reg *)SUNXI_PRCM_BASE; diff --git a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch index 823c1568090..4cbf0ea1d8a 100644 --- a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch +++ b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch @@ -6,7 +6,7 @@ Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7) --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c -@@ -129,6 +129,10 @@ static int gpio_init(void) +@@ -132,6 +132,10 @@ static int gpio_init(void) sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1); sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1); sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP); diff --git a/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch b/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch index 482aa1a3693..8aeae91ef46 100644 --- a/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch +++ b/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch @@ -17,7 +17,7 @@ Cc: Simon Glass --- a/tools/fit_image.c +++ b/tools/fit_image.c -@@ -726,9 +726,14 @@ static int fit_handle_file(struct image_ +@@ -751,9 +751,14 @@ static int fit_handle_file(struct image_ } *cmd = '\0'; } else if (params->datafile) { diff --git a/package/boot/uboot-sunxi/patches/210-sunxi-deactivate-binman.patch b/package/boot/uboot-sunxi/patches/210-sunxi-deactivate-binman.patch index 5efebbd056b..48ddf6d318d 100644 --- a/package/boot/uboot-sunxi/patches/210-sunxi-deactivate-binman.patch +++ b/package/boot/uboot-sunxi/patches/210-sunxi-deactivate-binman.patch @@ -12,7 +12,7 @@ old way of generating images. --- a/Makefile +++ b/Makefile -@@ -1555,8 +1555,10 @@ endif +@@ -1607,8 +1607,10 @@ endif ifneq ($(CONFIG_ARCH_SUNXI),) ifeq ($(CONFIG_ARM64),) @@ -27,7 +27,7 @@ old way of generating images. $(call if_changed,cat) --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -962,7 +962,6 @@ config ARCH_SOCFPGA +@@ -995,7 +995,6 @@ config ARCH_SOCFPGA config ARCH_SUNXI bool "Support sunxi (Allwinner) SoCs" diff --git a/package/boot/uboot-sunxi/patches/230-disable-axp209-on-a13-olinuxino.diff b/package/boot/uboot-sunxi/patches/230-disable-axp209-on-a13-olinuxino.diff index b846cbf506d..bc8bd144d6a 100644 --- a/package/boot/uboot-sunxi/patches/230-disable-axp209-on-a13-olinuxino.diff +++ b/package/boot/uboot-sunxi/patches/230-disable-axp209-on-a13-olinuxino.diff @@ -8,7 +8,7 @@ # CONFIG_VIDEO_HDMI is not set CONFIG_VIDEO_VGA_VIA_LCD=y CONFIG_VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH=y -@@ -21,7 +20,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y +@@ -20,7 +19,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino" CONFIG_DFU_RAM=y CONFIG_FASTBOOT_CMD_OEM_FORMAT=y diff --git a/package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch b/package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch index 4250e4e9dbb..152e6089516 100644 --- a/package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch +++ b/package/boot/uboot-sunxi/patches/250-sun8i-h3-zeropi-add-device-tree.patch @@ -1,6 +1,6 @@ --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -539,7 +539,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ +@@ -559,7 +559,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ sun8i-h3-orangepi-plus.dtb \ sun8i-h3-orangepi-plus2e.dtb \ sun8i-h3-orangepi-zero-plus2.dtb \ diff --git a/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch b/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch index 058b29d95bf..5b3a68c602b 100644 --- a/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch +++ b/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch @@ -14,7 +14,7 @@ Signed-off-by: Jayantajit Gogoi --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -531,6 +531,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ +@@ -551,6 +551,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ sun8i-h3-nanopi-m1-plus.dtb \ sun8i-h3-nanopi-neo.dtb \ sun8i-h3-nanopi-neo-air.dtb \ diff --git a/package/boot/uboot-sunxi/patches/253-sunxi-h5-add-support-for-nanopi-r1s-h5.patch b/package/boot/uboot-sunxi/patches/253-sunxi-h5-add-support-for-nanopi-r1s-h5.patch index c6a8cd70d18..2c8d5a94593 100644 --- a/package/boot/uboot-sunxi/patches/253-sunxi-h5-add-support-for-nanopi-r1s-h5.patch +++ b/package/boot/uboot-sunxi/patches/253-sunxi-h5-add-support-for-nanopi-r1s-h5.patch @@ -25,11 +25,9 @@ Signed-off-by: Chukun Pan create mode 100644 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts create mode 100644 configs/nanopi_r1s_h5_defconfig -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index b8a382d1539..ed3d360bb10 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -555,6 +555,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \ +@@ -575,6 +575,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \ sun50i-h5-libretech-all-h5-cc.dtb \ sun50i-h5-nanopi-neo2.dtb \ sun50i-h5-nanopi-neo-plus2.dtb \ @@ -37,9 +35,6 @@ index b8a382d1539..ed3d360bb10 100644 sun50i-h5-orangepi-zero-plus.dtb \ sun50i-h5-orangepi-pc2.dtb \ sun50i-h5-orangepi-prime.dtb \ -diff --git a/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts b/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts -new file mode 100644 -index 00000000000..55bcdf8d1a0 --- /dev/null +++ b/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts @@ -0,0 +1,190 @@ @@ -233,8 +228,6 @@ index 00000000000..55bcdf8d1a0 + usb0_vbus-supply = <®_usb0_vbus>; + status = "okay"; +}; -diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS -index 2543c94de79..56a0ee3689b 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -358,6 +358,11 @@ M: Jelle van der Waa @@ -249,9 +242,6 @@ index 2543c94de79..56a0ee3689b 100644 NANOPI-A64 BOARD M: Jagan Teki S: Maintained -diff --git a/configs/nanopi_r1s_h5_defconfig b/configs/nanopi_r1s_h5_defconfig -new file mode 100644 -index 00000000000..27cf172d72a --- /dev/null +++ b/configs/nanopi_r1s_h5_defconfig @@ -0,0 +1,14 @@ diff --git a/package/boot/uboot-sunxi/patches/270-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch b/package/boot/uboot-sunxi/patches/270-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch new file mode 100644 index 00000000000..6ce2be908db --- /dev/null +++ b/package/boot/uboot-sunxi/patches/270-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch @@ -0,0 +1,29 @@ +From 20abdd7feefbb4fccef5c653e045911670237e8b Mon Sep 17 00:00:00 2001 +From: Stijn Tintel +Date: Thu, 22 Dec 2022 00:35:07 +0200 +Subject: [PATCH] arm: sunxi: increase SYS_MALLOC_F_LEN + +Version 2020.10 throws the following output after loading bl31: +alloc space exhausted + +This has been fixed in v2022.07, but the change is too intrusive to +backport. Instead, just modify the default for ARCH_SUNXI for now. + +See e05689242238 ("Kconfig: Change SYS_MALLOC_F_LEN default to 0x2000"). + +Signed-off-by: Stijn Tintel +--- + Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Kconfig ++++ b/Kconfig +@@ -146,7 +146,7 @@ config SYS_MALLOC_F_LEN + default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \ + ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \ + ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \ +- ARCH_LS1046A || ARCH_QEMU) ++ ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI) + default 0x400 + help + Before relocation, memory is very limited on many platforms. Still, From 53796f924849918e79ba251d1f1ecffff8d9ac27 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Tue, 20 Dec 2022 20:05:40 +0200 Subject: [PATCH 05/24] arm-trusted-firmware-sunxi: bump to 2.8 Use latest release build instead of a git snapshot. As this tarball extracts in a trusted-firmware-a-2.8 subdirectory, we no longer need to override the PKG_NAME defined in trusted-firmware-a.mk. The actual package name is still the same, so we don't need to update any dependencies. Tested on A64-OLinuXino-1Ge16GW. Signed-off-by: Stijn Tintel --- package/boot/arm-trusted-firmware-sunxi/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/package/boot/arm-trusted-firmware-sunxi/Makefile b/package/boot/arm-trusted-firmware-sunxi/Makefile index 447a8f4a453..0535640f957 100644 --- a/package/boot/arm-trusted-firmware-sunxi/Makefile +++ b/package/boot/arm-trusted-firmware-sunxi/Makefile @@ -7,14 +7,10 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=arm-trusted-firmware-sunxi +PKG_VERSION:=2.8 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/ARM-software/arm-trusted-firmware -PKG_SOURCE_DATE:=2020-11-17 -PKG_SOURCE_VERSION:=e2c509a39c6cc4dda8734e6509cdbe6e3603cdfc -PKG_MIRROR_HASH:=b212d369a5286ebbf6a5616486efa05fa54d4294fd6e9ba2e54fdfae9eda918d +PKG_HASH:=df4e0f3803479df0ea4cbf3330b59731bc2efc2112c951f9adb3685229163af9 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=license.md From 5c57d6c3820ac6ff21089cb30655ff2905bd8d3a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 1 Apr 2023 09:07:22 +0200 Subject: [PATCH 06/24] kernel: fix mtk_eth_soc flow accounting for MT7986 This was accidentally dropped when MT7981 support was added Signed-off-by: Felix Fietkau --- ...ethernet-mediatek-ppe-add-support-for-flow-accou.patch | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch b/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch index 6ca33152fca..60c32b67057 100644 --- a/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch +++ b/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch @@ -88,6 +88,14 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov .txrx = { .txd_size = sizeof(struct mtk_tx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2), +@@ -4847,6 +4850,7 @@ static const struct mtk_soc_data mt7986_ + .offload_version = 2, + .hash_offset = 4, + .foe_entry_size = sizeof(struct mtk_foe_entry), ++ .has_accounting = true, + .txrx = { + .txd_size = sizeof(struct mtk_tx_dma_v2), + .rxd_size = sizeof(struct mtk_rx_dma_v2), --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -1014,6 +1014,8 @@ struct mtk_reg_map { From 3c3d797c4dad224e214e473644f1e9d833f02eda Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 1 Apr 2023 09:07:54 +0200 Subject: [PATCH 07/24] busybox: enable taskset by default This is useful for controlling process affinity on SMP systems Signed-off-by: Felix Fietkau --- package/utils/busybox/Config-defaults.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 7b6cf900335..220d9eac204 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -1822,13 +1822,13 @@ config BUSYBOX_DEFAULT_SWITCH_ROOT default y config BUSYBOX_DEFAULT_TASKSET bool - default n + default y config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY bool - default n + default y config BUSYBOX_DEFAULT_FEATURE_TASKSET_CPULIST bool - default n + default y config BUSYBOX_DEFAULT_UEVENT bool default n From da4f7e51f3451ae5be509ae8bafaec20c6d3c01a Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 28 Mar 2023 13:38:57 +0200 Subject: [PATCH 08/24] mac80211: ath11k: restore 160MHz support Recent ath11k sync introduced a regression causing 80+80 and 160MHz to stop being advertised and thus not selectable due to the respective feature flags being cleared. So, until we get answers upstream to what was the reasoning behind this and it gets fixed, lets just remove the flag clearing to reanable 160MHz. Fixes: 789a0bac3535 ("mac80211: ath11k: sync with ath-next") Signed-off-by: Robert Marko --- ...4-wifi-ath11k-restore-160MHz-support.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/kernel/mac80211/patches/ath11k/904-wifi-ath11k-restore-160MHz-support.patch diff --git a/package/kernel/mac80211/patches/ath11k/904-wifi-ath11k-restore-160MHz-support.patch b/package/kernel/mac80211/patches/ath11k/904-wifi-ath11k-restore-160MHz-support.patch new file mode 100644 index 00000000000..61abb847d00 --- /dev/null +++ b/package/kernel/mac80211/patches/ath11k/904-wifi-ath11k-restore-160MHz-support.patch @@ -0,0 +1,29 @@ +From e0edb3ac33694ab6a2705f7b053948a926520d81 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Tue, 28 Mar 2023 13:30:30 +0200 +Subject: [PATCH] wifi: ath11k: restore 160MHz support + +The blamed commit started clearing 80+80 and 160MHz support flags for 5G. +This is preventing those modes from being advertised and thus used causing +a regression, so until this is properly sorted out lets remove the flag +clearing to restore 160MHz support. + +Fixes: 38dfe775d0ab ("wifi: ath11k: push MU-MIMO params from hostapd to hardware") +Signed-off-by: Robert Marko +--- + drivers/net/wireless/ath/ath11k/mac.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/drivers/net/wireless/ath/ath11k/mac.c ++++ b/drivers/net/wireless/ath/ath11k/mac.c +@@ -5552,10 +5552,6 @@ static int ath11k_mac_copy_he_cap(struct + + he_cap_elem->mac_cap_info[1] &= + IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK; +- he_cap_elem->phy_cap_info[0] &= +- ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G; +- he_cap_elem->phy_cap_info[0] &= +- ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G; + + he_cap_elem->phy_cap_info[5] &= + ~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK; From 19752bdfa3e75da8290f525186e9fd8349df9c93 Mon Sep 17 00:00:00 2001 From: Joe Mullally Date: Sun, 26 Feb 2023 22:01:22 +0000 Subject: [PATCH 09/24] kernel: add support for XMC XM25QH64C The XMC XM25QH64C is a 8MB SPI NOR chip. The patch is verified on TL-WPA8631P v3. Datasheet available at https://www.xmcwh.com/uploads/442/XM25QH64C.pdf Signed-off-by: Joe Mullally --- .../488-mtd-spi-nor-add-xmc-xm25qh64c.patch | 22 +++++++++++++++++++ .../488-mtd-spi-nor-add-xmc-xm25qh64c.patch | 22 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 target/linux/generic/pending-5.10/488-mtd-spi-nor-add-xmc-xm25qh64c.patch create mode 100644 target/linux/generic/pending-5.15/488-mtd-spi-nor-add-xmc-xm25qh64c.patch diff --git a/target/linux/generic/pending-5.10/488-mtd-spi-nor-add-xmc-xm25qh64c.patch b/target/linux/generic/pending-5.10/488-mtd-spi-nor-add-xmc-xm25qh64c.patch new file mode 100644 index 00000000000..236d1c2755f --- /dev/null +++ b/target/linux/generic/pending-5.10/488-mtd-spi-nor-add-xmc-xm25qh64c.patch @@ -0,0 +1,22 @@ +From: Joe Mullally +Subject: mtd/spi-nor/xmc: add support for XMC XM25QH64C + +The XMC XM25QH64C is a 8MB SPI NOR chip. The patch is verified on TL-WPA8631P v3. +Datasheet available at https://www.xmcwh.com/uploads/442/XM25QH64C.pdf + +Signed-off-by: Joe Mullally +--- + drivers/mtd/spi-nor/xmc.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/mtd/spi-nor/xmc.c ++++ b/drivers/mtd/spi-nor/xmc.c +@@ -12,6 +12,8 @@ static const struct flash_info xmc_parts + /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ + { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, ++ { "XM25QH64C", INFO(0x204017, 0, 64 * 1024, 128, ++ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256, diff --git a/target/linux/generic/pending-5.15/488-mtd-spi-nor-add-xmc-xm25qh64c.patch b/target/linux/generic/pending-5.15/488-mtd-spi-nor-add-xmc-xm25qh64c.patch new file mode 100644 index 00000000000..236d1c2755f --- /dev/null +++ b/target/linux/generic/pending-5.15/488-mtd-spi-nor-add-xmc-xm25qh64c.patch @@ -0,0 +1,22 @@ +From: Joe Mullally +Subject: mtd/spi-nor/xmc: add support for XMC XM25QH64C + +The XMC XM25QH64C is a 8MB SPI NOR chip. The patch is verified on TL-WPA8631P v3. +Datasheet available at https://www.xmcwh.com/uploads/442/XM25QH64C.pdf + +Signed-off-by: Joe Mullally +--- + drivers/mtd/spi-nor/xmc.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/mtd/spi-nor/xmc.c ++++ b/drivers/mtd/spi-nor/xmc.c +@@ -12,6 +12,8 @@ static const struct flash_info xmc_parts + /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ + { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, ++ { "XM25QH64C", INFO(0x204017, 0, 64 * 1024, 128, ++ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256, From ec8c837eabec8fa0d6b013d3b766d1a0f4612ecb Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 30 Mar 2023 11:39:17 -0400 Subject: [PATCH 10/24] kernel: bump 5.15 to 5.15.105 Manually rebased: Removed upstreamed: backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch[1] backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=9bbb3d3f218f1cf51f57a43cf8fd63b05be1b821 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=48f52431af9980582b6faa32ff8b581edb10486c Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia --- include/kernel-5.15 | 4 +- ...smsx95xx-fix-crimes-against-truesize.patch | 4 +- ...rs-remove-legacy_cursor_update-hacks.patch | 2 +- ...lti-gen-LRU-support-page-table-walks.patch | 2 +- ...terate-using-dsa_switch_for_each_use.patch | 4 +- ...opulate-supported_interfaces-and-mac.patch | 16 ++--- ...t-dsa-mt7530-remove-interface-checks.patch | 16 ++--- ...rop-use-of-phylink_helper_basex_spee.patch | 2 +- ...nly-indicate-linkmodes-that-can-be-s.patch | 6 +- ...-switch-to-use-phylink_get_linkmodes.patch | 12 ++-- ...530-partially-convert-to-phylink_pcs.patch | 30 ++++----- ...ove-autoneg-handling-to-PCS-validati.patch | 6 +- ...19-net-dsa-mt7530-mark-as-non-legacy.patch | 2 +- ...mt753x-fix-pcs-conversion-regression.patch | 4 +- ...t7530-rework-mt7530_hw_vlan_-add-del.patch | 6 +- ...et-dsa-mt7530-rework-mt753-01-_setup.patch | 8 +-- ...et-cpu-port-via-dp-cpu_dp-instead-of.patch | 16 ++--- ...dsa-b53-mmap-fix-device-tree-support.patch | 30 --------- ...cm-legacy-fix-daisy-chained-switches.patch | 65 ------------------- ...-add-support-for-in-band-link-status.patch | 12 ++-- ...t-dsa-mt7530-use-external-PCS-driver.patch | 20 +++--- .../hack-5.15/904-debloat_dma_buf.patch | 2 +- ...e-all-MACs-are-powered-down-before-r.patch | 2 +- ...y-simplify-phy_link_change-arguments.patch | 10 +-- .../721-NET-no-auto-carrier-off-support.patch | 4 +- .../850-awake-rt305x-dwc2-controller.patch | 2 +- 26 files changed, 96 insertions(+), 191 deletions(-) delete mode 100644 target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch delete mode 100644 target/linux/generic/backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 51d1c3c6fe7..8575ce5d917 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .104 -LINUX_KERNEL_HASH-5.15.104 = 71c532ce09992e470f3259ffeb38d2b5bba990c243a559e4726a57412bd36b54 +LINUX_VERSION-5.15 = .105 +LINUX_KERNEL_HASH-5.15.105 = 01b537650332d2852722a626169cf7e5e798d11f9b578171b477868555f5e44f diff --git a/target/linux/bcm27xx/patches-5.15/950-0032-smsx95xx-fix-crimes-against-truesize.patch b/target/linux/bcm27xx/patches-5.15/950-0032-smsx95xx-fix-crimes-against-truesize.patch index 0d8ba7eef89..5178d8f3d65 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0032-smsx95xx-fix-crimes-against-truesize.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0032-smsx95xx-fix-crimes-against-truesize.patch @@ -25,7 +25,7 @@ Signed-off-by: Steve Glendinning static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, u32 *data, int in_pm) { -@@ -1837,7 +1841,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1843,7 +1847,8 @@ static int smsc95xx_rx_fixup(struct usbn if (dev->net->features & NETIF_F_RXCSUM) smsc95xx_rx_csum_offload(skb); skb_trim(skb, skb->len - 4); /* remove fcs */ @@ -35,7 +35,7 @@ Signed-off-by: Steve Glendinning return 1; } -@@ -1855,7 +1860,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1861,7 +1866,8 @@ static int smsc95xx_rx_fixup(struct usbn if (dev->net->features & NETIF_F_RXCSUM) smsc95xx_rx_csum_offload(ax_skb); skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch b/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch index 167124faa1d..18c7a81f3a2 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch @@ -88,7 +88,7 @@ Signed-off-by: Maxime Ripard commit->event = kzalloc(sizeof(*commit->event), --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c -@@ -10821,6 +10821,19 @@ static int intel_atomic_commit(struct dr +@@ -10822,6 +10822,19 @@ static int intel_atomic_commit(struct dr state->base.legacy_cursor_update = false; } diff --git a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch index b0df223b7c4..dad21dccb58 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch @@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton /* forking complete and child started to run, tell ptracer */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -5007,6 +5007,7 @@ context_switch(struct rq *rq, struct tas +@@ -5010,6 +5010,7 @@ context_switch(struct rq *rq, struct tas * finish_task_switch()'s mmdrop(). */ switch_mm_irqs_off(prev->active_mm, next->mm, next); diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch index 845f2fa4b20..4142fd1d508 100644 --- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch +++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1194,27 +1194,31 @@ static int +@@ -1190,27 +1190,31 @@ static int mt7530_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *bridge) { @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski } /* Add the all other ports to this port matrix. */ -@@ -1319,24 +1323,28 @@ static void +@@ -1315,24 +1319,28 @@ static void mt7530_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *bridge) { diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch index 4ee326030dc..435f282845f 100644 --- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch +++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2407,6 +2407,32 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2412,6 +2412,32 @@ mt7531_setup(struct dsa_switch *ds) return 0; } @@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni static bool mt7530_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -2443,6 +2469,37 @@ static bool mt7531_is_rgmii_port(struct +@@ -2448,6 +2474,37 @@ static bool mt7531_is_rgmii_port(struct return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); } @@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -2919,6 +2976,18 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -2924,6 +2981,18 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, unsigned long *supported) -@@ -3154,6 +3223,7 @@ static const struct dsa_switch_ops mt753 +@@ -3159,6 +3228,7 @@ static const struct dsa_switch_ops mt753 .port_vlan_del = mt7530_port_vlan_del, .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .phylink_validate = mt753x_phylink_validate, .phylink_mac_link_state = mt753x_phylink_mac_link_state, .phylink_mac_config = mt753x_phylink_mac_config, -@@ -3171,6 +3241,7 @@ static const struct mt753x_info mt753x_t +@@ -3176,6 +3246,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3182,6 +3253,7 @@ static const struct mt753x_info mt753x_t +@@ -3187,6 +3258,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3194,6 +3266,7 @@ static const struct mt753x_info mt753x_t +@@ -3199,6 +3271,7 @@ static const struct mt753x_info mt753x_t .phy_write = mt7531_ind_phy_write, .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, @@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7531_phy_mode_supported, .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, -@@ -3256,6 +3329,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3261,6 +3334,7 @@ mt7530_probe(struct mdio_device *mdiodev */ if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch index 1d74aac8f54..38a24dc46b0 100644 --- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch +++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch @@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2433,37 +2433,6 @@ static void mt7530_mac_port_get_caps(str +@@ -2438,37 +2438,6 @@ static void mt7530_mac_port_get_caps(str } } @@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port) { return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); -@@ -2500,44 +2469,6 @@ static void mt7531_mac_port_get_caps(str +@@ -2505,44 +2474,6 @@ static void mt7531_mac_port_get_caps(str } } @@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -2792,9 +2723,6 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2797,9 +2728,6 @@ mt753x_phylink_mac_config(struct dsa_swi struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; @@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni switch (port) { case 0 ... 4: /* Internal phy */ if (state->interface != PHY_INTERFACE_MODE_GMII) -@@ -3010,12 +2938,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3015,12 +2943,6 @@ mt753x_phylink_validate(struct dsa_switc __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; struct mt7530_priv *priv = ds->priv; @@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni phylink_set_port_modes(mask); if (state->interface != PHY_INTERFACE_MODE_TRGMII && -@@ -3242,7 +3164,6 @@ static const struct mt753x_info mt753x_t +@@ -3247,7 +3169,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3254,7 +3175,6 @@ static const struct mt753x_info mt753x_t +@@ -3259,7 +3180,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3267,7 +3187,6 @@ static const struct mt753x_info mt753x_t +@@ -3272,7 +3192,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, -@@ -3330,7 +3249,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3335,7 +3254,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch index 3e97ad4a43e..e607a3c7d2c 100644 --- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch +++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2962,11 +2962,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -2967,11 +2967,6 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch index 97d3ff9c98c..63a33176303 100644 --- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch +++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2540,12 +2540,13 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2545,12 +2545,13 @@ static int mt7531_rgmii_setup(struct mt7 } static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port, @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni phylink_set(supported, 2500baseX_Full); phylink_set(supported, 2500baseT_Full); } -@@ -2918,16 +2919,18 @@ static void mt753x_phylink_get_caps(stru +@@ -2923,16 +2924,18 @@ static void mt753x_phylink_get_caps(stru static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, @@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -2950,12 +2953,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -2955,12 +2958,13 @@ mt753x_phylink_validate(struct dsa_switc } /* This switch only supports 1G full-duplex. */ diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch index 009b2bb583f..97699d4c5e3 100644 --- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch +++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2539,19 +2539,6 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2544,19 +2544,6 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni static void mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, -@@ -2918,51 +2905,21 @@ static void mt753x_phylink_get_caps(stru +@@ -2923,51 +2910,21 @@ static void mt753x_phylink_get_caps(stru } static void @@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); -@@ -3163,7 +3120,6 @@ static const struct mt753x_info mt753x_t +@@ -3168,7 +3125,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3174,7 +3130,6 @@ static const struct mt753x_info mt753x_t +@@ -3179,7 +3135,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3186,7 +3141,6 @@ static const struct mt753x_info mt753x_t +@@ -3191,7 +3146,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, .mac_pcs_an_restart = mt7531_sgmii_restart_an, -@@ -3248,7 +3202,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3253,7 +3207,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch index c7e004e2e7b..b9b74833d22 100644 --- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch +++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch @@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni /* String, offset, and register size in bytes if different from 4 bytes */ static const struct mt7530_mib_desc mt7530_mib[] = { MIB_DESC(1, 0x00, "TxDrop"), -@@ -2539,12 +2544,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2544,12 +2549,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni unsigned int val; /* For adjusting speed and duplex of SGMII force mode. */ -@@ -2570,6 +2574,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw +@@ -2575,6 +2579,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw /* MT7531 SGMII 1G force mode can only work in full duplex mode, * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not. @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni */ if ((speed == SPEED_10 || speed == SPEED_100) && duplex != DUPLEX_FULL) -@@ -2645,9 +2652,10 @@ static int mt7531_sgmii_setup_mode_an(st +@@ -2650,9 +2657,10 @@ static int mt7531_sgmii_setup_mode_an(st return 0; } @@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni u32 val; /* Only restart AN when AN is enabled */ -@@ -2704,6 +2712,24 @@ mt753x_mac_config(struct dsa_switch *ds, +@@ -2709,6 +2717,24 @@ mt753x_mac_config(struct dsa_switch *ds, return priv->info->mac_port_config(ds, port, mode, state->interface); } @@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) -@@ -2765,17 +2791,6 @@ unsupported: +@@ -2770,17 +2796,6 @@ unsupported: mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } @@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2785,16 +2800,13 @@ static void mt753x_phylink_mac_link_down +@@ -2790,16 +2805,13 @@ static void mt753x_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni } static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, -@@ -2807,8 +2819,6 @@ static void mt753x_phylink_mac_link_up(s +@@ -2812,8 +2824,6 @@ static void mt753x_phylink_mac_link_up(s struct mt7530_priv *priv = ds->priv; u32 mcr; @@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; /* MT753x MAC works in 1G full duplex mode for all up-clocked -@@ -2886,6 +2896,8 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -2891,6 +2901,8 @@ mt7531_cpu_port_config(struct dsa_switch return ret; mt7530_write(priv, MT7530_PMCR_P(port), PMCR_CPU_PORT_SETTING(priv->id)); @@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL, speed, DUPLEX_FULL, true, true); -@@ -2925,16 +2937,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -2930,16 +2942,13 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(state->advertising, state->advertising, mask); } @@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni pmsr = mt7530_read(priv, MT7530_PMSR_P(port)); state->link = (pmsr & PMSR_LINK); -@@ -2961,8 +2970,6 @@ mt7530_phylink_mac_link_state(struct dsa +@@ -2966,8 +2975,6 @@ mt7530_phylink_mac_link_state(struct dsa state->pause |= MLO_PAUSE_RX; if (pmsr & PMSR_TX_FC) state->pause |= MLO_PAUSE_TX; @@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni } static int -@@ -3004,32 +3011,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3009,32 +3016,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni if (ret) return ret; -@@ -3042,6 +3066,13 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3047,6 +3071,13 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni return ret; } -@@ -3103,9 +3134,8 @@ static const struct dsa_switch_ops mt753 +@@ -3108,9 +3139,8 @@ static const struct dsa_switch_ops mt753 .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, .phylink_validate = mt753x_phylink_validate, @@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni .phylink_mac_link_down = mt753x_phylink_mac_link_down, .phylink_mac_link_up = mt753x_phylink_mac_link_up, .get_mac_eee = mt753x_get_mac_eee, -@@ -3115,36 +3145,34 @@ static const struct dsa_switch_ops mt753 +@@ -3120,36 +3150,34 @@ static const struct dsa_switch_ops mt753 static const struct mt753x_info mt753x_table[] = { [ID_MT7621] = { .id = ID_MT7621, @@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni }, }; -@@ -3202,7 +3230,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3207,7 +3235,7 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch index 2ddfe8ccd04..4aa013aad79 100644 --- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch +++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2916,25 +2916,16 @@ static void mt753x_phylink_get_caps(stru +@@ -2921,25 +2921,16 @@ static void mt753x_phylink_get_caps(stru priv->info->mac_port_get_caps(ds, port, config); } @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni } static void mt7530_pcs_get_state(struct phylink_pcs *pcs, -@@ -3036,12 +3027,14 @@ static void mt7530_pcs_an_restart(struct +@@ -3041,12 +3032,14 @@ static void mt7530_pcs_an_restart(struct } static const struct phylink_pcs_ops mt7530_pcs_ops = { @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni .pcs_get_state = mt7531_pcs_get_state, .pcs_config = mt753x_pcs_config, .pcs_an_restart = mt7531_pcs_an_restart, -@@ -3133,7 +3126,6 @@ static const struct dsa_switch_ops mt753 +@@ -3138,7 +3131,6 @@ static const struct dsa_switch_ops mt753 .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch index e58089a3f85..d921d78733d 100644 --- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch +++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2913,6 +2913,12 @@ static void mt753x_phylink_get_caps(stru +@@ -2918,6 +2918,12 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch index 576d768fe21..e797b1ecb42 100644 --- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch +++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3051,9 +3051,16 @@ static int +@@ -3056,9 +3056,16 @@ static int mt753x_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski if (ret) return ret; -@@ -3065,13 +3072,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3070,13 +3077,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch index e33908c13d6..26d207ca6ab 100644 --- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch +++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1540,11 +1540,11 @@ static void +@@ -1536,11 +1536,11 @@ static void mt7530_hw_vlan_add(struct mt7530_priv *priv, struct mt7530_hw_vlan_entry *entry) { @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski /* Validate the entry with independent learning, create egress tag per * VLAN and joining the port as one of the port members. -@@ -1555,22 +1555,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p +@@ -1551,22 +1551,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p /* Decide whether adding tag or not for those outgoing packets from the * port inside the VLAN. @@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski } static void -@@ -1589,11 +1587,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p +@@ -1585,11 +1583,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p return; } diff --git a/target/linux/generic/backport-5.15/705-12-v6.0-net-dsa-mt7530-rework-mt753-01-_setup.patch b/target/linux/generic/backport-5.15/705-12-v6.0-net-dsa-mt7530-rework-mt753-01-_setup.patch index a50fe30164b..b02705cc701 100644 --- a/target/linux/generic/backport-5.15/705-12-v6.0-net-dsa-mt7530-rework-mt753-01-_setup.patch +++ b/target/linux/generic/backport-5.15/705-12-v6.0-net-dsa-mt7530-rework-mt753-01-_setup.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2105,11 +2105,12 @@ static int +@@ -2101,11 +2101,12 @@ static int mt7530_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; @@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski u32 id, val; int ret, i; -@@ -2117,7 +2118,19 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2113,7 +2114,19 @@ mt7530_setup(struct dsa_switch *ds) * controller also is the container for two GMACs nodes representing * as two netdev instances. */ @@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski ds->assisted_learning_on_cpu_port = true; ds->mtu_enforcement_ingress = true; -@@ -2281,6 +2294,7 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2286,6 +2299,7 @@ mt7531_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; struct mt7530_dummy_poll p; @@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski u32 val, id; int ret, i; -@@ -2355,8 +2369,11 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2360,8 +2374,11 @@ mt7531_setup(struct dsa_switch *ds) CORE_PLL_GROUP4, val); /* BPDU to CPU port */ diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch index 8563e7e136a..2bfa1ef438e 100644 --- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch +++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1044,6 +1044,7 @@ static int +@@ -1040,6 +1040,7 @@ static int mt7530_port_enable(struct dsa_switch *ds, int port, struct phy_device *phy) { @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1052,7 +1053,11 @@ mt7530_port_enable(struct dsa_switch *ds +@@ -1048,7 +1049,11 @@ mt7530_port_enable(struct dsa_switch *ds * restore the port matrix if the port is the member of a certain * bridge. */ @@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski priv->ports[port].enable = true; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, priv->ports[port].pm); -@@ -1200,7 +1205,8 @@ mt7530_port_bridge_join(struct dsa_switc +@@ -1196,7 +1201,8 @@ mt7530_port_bridge_join(struct dsa_switc struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1277,9 +1283,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ +@@ -1273,9 +1279,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ * the CPU port get out of VLAN filtering mode. */ if (all_user_ports_removed) { @@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT)); } } -@@ -1329,6 +1338,7 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1325,6 +1334,7 @@ mt7530_port_bridge_leave(struct dsa_swit struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1357,8 +1367,8 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1353,8 +1363,8 @@ mt7530_port_bridge_leave(struct dsa_swit */ if (priv->ports[port].enable) mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski /* When a port is removed from the bridge, the port would be set up * back to the default as is at initial boot which is a VLAN-unaware -@@ -1521,6 +1531,9 @@ static int +@@ -1517,6 +1527,9 @@ static int mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, struct netlink_ext_ack *extack) { @@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski if (vlan_filtering) { /* The port is being kept as VLAN-unaware port when bridge is * set up with vlan_filtering not being set, Otherwise, the -@@ -1528,7 +1541,7 @@ mt7530_port_vlan_filtering(struct dsa_sw +@@ -1524,7 +1537,7 @@ mt7530_port_vlan_filtering(struct dsa_sw * for becoming a VLAN-aware port. */ mt7530_port_set_vlan_aware(ds, port); diff --git a/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch b/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch deleted file mode 100644 index 8c277e6a3ef..00000000000 --- a/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 30796d0dcb6e41c6558a07950f2ce60c209da867 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Thu, 16 Mar 2023 18:28:07 +0100 -Subject: [PATCH] net: dsa: b53: mmap: fix device tree support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CPU port should also be enabled in order to get a working switch. - -Fixes: a5538a777b73 ("net: dsa: b53: mmap: Add device tree support") -Signed-off-by: Álvaro Fernández Rojas -Acked-by: Florian Fainelli -Link: https://lore.kernel.org/r/20230316172807.460146-1-noltari@gmail.com -Signed-off-by: Jakub Kicinski ---- - drivers/net/dsa/b53/b53_mmap.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/dsa/b53/b53_mmap.c -+++ b/drivers/net/dsa/b53/b53_mmap.c -@@ -263,7 +263,7 @@ static int b53_mmap_probe_of(struct plat - if (of_property_read_u32(of_port, "reg", ®)) - continue; - -- if (reg < B53_CPU_PORT) -+ if (reg < B53_N_PORTS) - pdata->enabled_ports |= BIT(reg); - } - diff --git a/target/linux/generic/backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch b/target/linux/generic/backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch deleted file mode 100644 index fdefa9ffb69..00000000000 --- a/target/linux/generic/backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 032a954061afd4b7426c3eb6bfd2952ef1e9a384 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Sun, 19 Mar 2023 10:55:40 +0100 -Subject: [PATCH] net: dsa: tag_brcm: legacy: fix daisy-chained switches -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When BCM63xx internal switches are connected to switches with a 4-byte -Broadcom tag, it does not identify the packet as VLAN tagged, so it adds one -based on its PVID (which is likely 0). -Right now, the packet is received by the BCM63xx internal switch and the 6-byte -tag is properly processed. The next step would to decode the corresponding -4-byte tag. However, the internal switch adds an invalid VLAN tag after the -6-byte tag and the 4-byte tag handling fails. -In order to fix this we need to remove the invalid VLAN tag after the 6-byte -tag before passing it to the 4-byte tag decoding. - -Fixes: 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags") -Signed-off-by: Álvaro Fernández Rojas -Reviewed-by: Michal Swiatkowski -Reviewed-by: Florian Fainelli -Link: https://lore.kernel.org/r/20230319095540.239064-1-noltari@gmail.com -Signed-off-by: Jakub Kicinski ---- - net/dsa/tag_brcm.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - ---- a/net/dsa/tag_brcm.c -+++ b/net/dsa/tag_brcm.c -@@ -7,6 +7,7 @@ - - #include - #include -+#include - #include - #include - -@@ -248,6 +249,7 @@ static struct sk_buff *brcm_leg_tag_xmit - static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb, - struct net_device *dev) - { -+ int len = BRCM_LEG_TAG_LEN; - int source_port; - u8 *brcm_tag; - -@@ -262,12 +264,16 @@ static struct sk_buff *brcm_leg_tag_rcv( - if (!skb->dev) - return NULL; - -+ /* VLAN tag is added by BCM63xx internal switch */ -+ if (netdev_uses_dsa(skb->dev)) -+ len += VLAN_HLEN; -+ - /* Remove Broadcom tag and update checksum */ -- skb_pull_rcsum(skb, BRCM_LEG_TAG_LEN); -+ skb_pull_rcsum(skb, len); - - dsa_default_offload_fwd_mark(skb); - -- dsa_strip_etype_header(skb, BRCM_LEG_TAG_LEN); -+ dsa_strip_etype_header(skb, len); - - return skb; - } diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch index 4a7e6ef7ad2..ebfbaccc9d7 100644 --- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch +++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2716,9 +2716,6 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2721,9 +2721,6 @@ mt7531_mac_config(struct dsa_switch *ds, case PHY_INTERFACE_MODE_NA: case PHY_INTERFACE_MODE_1000BASEX: case PHY_INTERFACE_MODE_2500BASEX: @@ -29,7 +29,7 @@ Signed-off-by: David S. Miller return mt7531_sgmii_setup_mode_force(priv, port, interface); default: return -EINVAL; -@@ -2794,13 +2791,6 @@ unsupported: +@@ -2799,13 +2796,6 @@ unsupported: return; } @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; -@@ -2937,6 +2927,9 @@ static void mt753x_phylink_get_caps(stru +@@ -2942,6 +2932,9 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller /* This driver does not make use of the speed, duplex, pause or the * advertisement in its mac_config, so it is safe to mark this driver * as non-legacy. -@@ -3002,6 +2995,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3007,6 +3000,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port)); state->link = !!(status & MT7531_SGMII_LINK_STATUS); @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller if (state->interface == PHY_INTERFACE_MODE_SGMII && (status & MT7531_SGMII_AN_ENABLE)) { val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port)); -@@ -3032,16 +3026,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3037,16 +3031,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -109,7 +109,7 @@ Signed-off-by: David S. Miller } static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, -@@ -3082,6 +3104,8 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3087,6 +3109,8 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch index f55b7aa8ea8..ee12399140b 100644 --- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch +++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch @@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich #include #include #include -@@ -2568,128 +2569,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2573,128 +2574,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich static int mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2712,11 +2596,11 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2717,11 +2601,11 @@ mt7531_mac_config(struct dsa_switch *ds, phydev = dp->slave->phydev; return mt7531_rgmii_setup(priv, port, interface, phydev); case PHY_INTERFACE_MODE_SGMII: @@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich default: return -EINVAL; } -@@ -2741,11 +2625,11 @@ mt753x_phylink_mac_select_pcs(struct dsa +@@ -2746,11 +2630,11 @@ mt753x_phylink_mac_select_pcs(struct dsa switch (interface) { case PHY_INTERFACE_MODE_TRGMII: @@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich default: return NULL; } -@@ -2986,86 +2870,6 @@ static void mt7530_pcs_get_state(struct +@@ -2991,86 +2875,6 @@ static void mt7530_pcs_get_state(struct state->pause |= MLO_PAUSE_TX; } @@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, phy_interface_t interface, const unsigned long *advertising, -@@ -3085,18 +2889,57 @@ static const struct phylink_pcs_ops mt75 +@@ -3090,18 +2894,57 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich int i, ret; /* Initialise the PCS devices */ -@@ -3104,8 +2947,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3109,8 +2952,6 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; @@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich } ret = priv->info->sw_setup(ds); -@@ -3120,6 +2961,16 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3125,6 +2966,16 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich return ret; } -@@ -3211,7 +3062,7 @@ static const struct mt753x_info mt753x_t +@@ -3216,7 +3067,7 @@ static const struct mt753x_info mt753x_t }, [ID_MT7531] = { .id = ID_MT7531, @@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, -@@ -3319,7 +3170,7 @@ static void +@@ -3324,7 +3175,7 @@ static void mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); @@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich if (!priv) return; -@@ -3338,6 +3189,10 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3343,6 +3194,10 @@ mt7530_remove(struct mdio_device *mdiode mt7530_free_irq(priv); dsa_unregister_switch(priv->ds); diff --git a/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch b/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch index beb1e31d933..0291a5e9bd8 100644 --- a/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch @@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4213,6 +4213,7 @@ int wake_up_state(struct task_struct *p, +@@ -4216,6 +4216,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch index 0226cef8c3f..d93ee0685b2 100644 --- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch +++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch @@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2342,6 +2342,10 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2347,6 +2347,10 @@ mt7531_setup(struct dsa_switch *ds) return -ENODEV; } diff --git a/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch b/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch index 9283900edf8..204756b7515 100644 --- a/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch +++ b/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch @@ -16,7 +16,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -59,13 +59,13 @@ static const char *phy_state_to_str(enum +@@ -71,13 +71,13 @@ static void phy_process_state_change(str static void phy_link_up(struct phy_device *phydev) { @@ -33,7 +33,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c phy_led_trigger_change_speed(phydev); } -@@ -551,7 +551,7 @@ int phy_start_cable_test(struct phy_devi +@@ -563,7 +563,7 @@ int phy_start_cable_test(struct phy_devi goto out; /* Mark the carrier down until the test is complete */ @@ -42,7 +42,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c netif_testing_on(dev); err = phydev->drv->cable_test_start(phydev); -@@ -622,7 +622,7 @@ int phy_start_cable_test_tdr(struct phy_ +@@ -634,7 +634,7 @@ int phy_start_cable_test_tdr(struct phy_ goto out; /* Mark the carrier down until the test is complete */ @@ -51,7 +51,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c netif_testing_on(dev); err = phydev->drv->cable_test_tdr_start(phydev, config); -@@ -694,7 +694,7 @@ static int phy_check_link_status(struct +@@ -706,7 +706,7 @@ static int phy_check_link_status(struct phy_link_up(phydev); } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev->state = PHY_NOLINK; @@ -60,7 +60,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c } return 0; -@@ -1177,7 +1177,7 @@ void phy_state_machine(struct work_struc +@@ -1192,7 +1192,7 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch index 365bdc68802..d80877b41f8 100644 --- a/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch +++ b/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -694,7 +694,10 @@ static int phy_check_link_status(struct +@@ -706,7 +706,10 @@ static int phy_check_link_status(struct phy_link_up(phydev); } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev->state = PHY_NOLINK; @@ -23,7 +23,7 @@ Signed-off-by: John Crispin } return 0; -@@ -1177,7 +1180,10 @@ void phy_state_machine(struct work_struc +@@ -1192,7 +1195,10 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-5.15/850-awake-rt305x-dwc2-controller.patch b/target/linux/ramips/patches-5.15/850-awake-rt305x-dwc2-controller.patch index 28f72a23ea7..3f2a524a75b 100644 --- a/target/linux/ramips/patches-5.15/850-awake-rt305x-dwc2-controller.patch +++ b/target/linux/ramips/patches-5.15/850-awake-rt305x-dwc2-controller.patch @@ -1,6 +1,6 @@ --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c -@@ -510,6 +510,12 @@ static int dwc2_driver_probe(struct plat +@@ -498,6 +498,12 @@ static int dwc2_driver_probe(struct plat if (retval) return retval; From 787ecdf66de6798540fb8b756404566341b4733c Mon Sep 17 00:00:00 2001 From: Felix Baumann Date: Fri, 31 Mar 2023 06:16:04 +0200 Subject: [PATCH 11/24] ramips: mt7621: ASUS RT-AX53U add NMBM, nest firmware Nests kernel and ubi into firmware partition in-order to be compatible with OEM firmware. This allows restoring oem firmware from a backup of firmware2. Add jffs2 partition which is present in the oem firmware. Add support for mediatek NMBM (wear leveling on newer mediatek devices). Exclude UBI partition from NMBM management. Continues PR #10685. Tested-by: Felix Baumann Signed-off-by: Felix Baumann --- .../linux/ramips/dts/mt7621_asus_rt-ax53u.dts | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts index cbd6a3ce07b..d740d00c6df 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts @@ -63,6 +63,11 @@ &nand { status = "okay"; + mediatek,nmbm; + mediatek,bmt-remap-range = + <0x000000 0x7e0000>, + <0x35e0000 0x7800000>; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; @@ -110,13 +115,22 @@ }; partition@3e0000 { - label = "kernel"; - reg = <0x3e0000 0x400000>; - }; + label = "firmware"; + reg = <0x3e0000 0x3200000>; - partition@7e0000 { - label = "ubi"; - reg = <0x7e0000 0x2e00000>; + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x2e00000>; + }; }; partition@35e0000 { @@ -124,7 +138,12 @@ reg = <0x35e0000 0x3200000>; }; - /* Last 8M possibly store the bad block table */ + partition@67e0000 { + label = "jffs2"; + reg = <0x67e0000 0x1020000>; + }; + + /* Last 8M are reserved for NMBM management (bad blocks) */ }; }; From 37dbe302158c7c567835ed64c118236dfc0425b2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 28 Mar 2023 15:29:19 -0700 Subject: [PATCH 12/24] ramips: mt7621: remove set-affinity script From https://github.com/openwrt/openwrt/pull/12280#issuecomment-1489279860 On Ethernet and WLAN, NAPI is threaded for all queues. This means that the processing work is not stuck on the CPU that fired the IRQ. Under heavy load, IRQs get disabled anyway, so it should not matter at all which CPUs the IRQs fire on. Basic testing indicates this to be true. There's no speedup or slowdown. Signed-off-by: Rosen Penev --- .../base-files/etc/init.d/set-irq-affinity | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100755 target/linux/ramips/mt7621/base-files/etc/init.d/set-irq-affinity diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/set-irq-affinity b/target/linux/ramips/mt7621/base-files/etc/init.d/set-irq-affinity deleted file mode 100755 index c118d928a76..00000000000 --- a/target/linux/ramips/mt7621/base-files/etc/init.d/set-irq-affinity +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 - -start() { - if grep -q 'processor.*: 2' /proc/cpuinfo; then - mask=4 - elif grep -q 'processor.*: 1' /proc/cpuinfo; then - mask=2 - else - return - fi - - for irq in $(grep "mt76..e" /proc/interrupts | cut -d: -f1 | sed 's, *,,') - do - echo "$mask" > "/proc/irq/$irq/smp_affinity" - [ $mask = 4 ] && mask=8 - done -} From 3efd49a588d7d7c800b03551552d120b8af44bb7 Mon Sep 17 00:00:00 2001 From: Linhui Liu Date: Fri, 31 Mar 2023 21:34:01 +0800 Subject: [PATCH 13/24] tools/squashfs4: enable parallel builds Run `time make tools/squashfs4/{clean,compile} -j$(nproc)` Before: real 0m8.803s user 0m12.415s sys 0m1.317s After: real 0m13.781s user 0m13.290s sys 0m1.528s Signed-off-by: Linhui Liu --- tools/squashfs4/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile index 7c8bcf1a72e..bcbe98e0ddc 100644 --- a/tools/squashfs4/Makefile +++ b/tools/squashfs4/Makefile @@ -17,11 +17,13 @@ PKG_SOURCE_DATE:=2022-03-17 PKG_SOURCE_VERSION:=afdd63fc386919b4aa40d573b0a6069414d14317 PKG_MIRROR_HASH:=59c294e00ddfc1f4bda658c7567584ce35fdd479c413ebdb1376981b27737be1 +HOST_BUILD_PARALLEL:=1 + include $(INCLUDE_DIR)/host-build.mk define Host/Compile +$(HOST_MAKE_VARS) \ - $(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \ + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/squashfs-tools \ XZ_SUPPORT=1 \ LZMA_XZ_SUPPORT=1 \ EXTRA_CFLAGS="-I$(STAGING_DIR_HOST)/include" \ From f0103c78d83866fa2649f4d874b94e646d13c591 Mon Sep 17 00:00:00 2001 From: Linhui Liu Date: Fri, 31 Mar 2023 21:42:09 +0800 Subject: [PATCH 14/24] tools/squashfs4: bump to 4.6.1 Changelogs: https://github.com/plougher/squashfs-tools/blob/4.6.1/CHANGES Removed upstreamed patches: - 001-Unsquashfs-Add-and-make-some-header-includes-conditi.patch - 002-Mksquashfs-Make-sysinfo-conditional.patch - 003-Only-use-available-CPUs.patch - 004-action-rework-strdupa-with-POSIX-strdup-and-free.patch - 005-Don-t-use-sigwaitinfo-sigtimedwait-if-not-supported.patch - 006-Move-sysinfo.h-into-the-linux-only-section-should-fi.patch - 007-Unsquashfs-fix-compilation-error-for-missing-sysctl..patch - 100-portability.patch Signed-off-by: Linhui Liu --- tools/squashfs4/Makefile | 8 +- ...nd-make-some-header-includes-conditi.patch | 39 ---- ...-Mksquashfs-Make-sysinfo-conditional.patch | 30 --- .../patches/003-Only-use-available-CPUs.patch | 92 --------- ...k-strdupa-with-POSIX-strdup-and-free.patch | 37 ---- ...itinfo-sigtimedwait-if-not-supported.patch | 192 ------------------ ...nto-the-linux-only-section-should-fi.patch | 49 ----- ...ompilation-error-for-missing-sysctl..patch | 26 --- tools/squashfs4/patches/100-portability.patch | 37 ---- ...t-multiple-lzma-configuration-optio.patch} | 0 10 files changed, 4 insertions(+), 506 deletions(-) delete mode 100644 tools/squashfs4/patches/001-Unsquashfs-Add-and-make-some-header-includes-conditi.patch delete mode 100644 tools/squashfs4/patches/002-Mksquashfs-Make-sysinfo-conditional.patch delete mode 100644 tools/squashfs4/patches/003-Only-use-available-CPUs.patch delete mode 100644 tools/squashfs4/patches/004-action-rework-strdupa-with-POSIX-strdup-and-free.patch delete mode 100644 tools/squashfs4/patches/005-Don-t-use-sigwaitinfo-sigtimedwait-if-not-supported.patch delete mode 100644 tools/squashfs4/patches/006-Move-sysinfo.h-into-the-linux-only-section-should-fi.patch delete mode 100644 tools/squashfs4/patches/007-Unsquashfs-fix-compilation-error-for-missing-sysctl..patch delete mode 100644 tools/squashfs4/patches/100-portability.patch rename tools/squashfs4/patches/{101-xz_wrapper-support-multiple-lzma-configuration-optio.patch => 100-xz_wrapper-support-multiple-lzma-configuration-optio.patch} (100%) diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile index bcbe98e0ddc..8f281c704df 100644 --- a/tools/squashfs4/Makefile +++ b/tools/squashfs4/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squashfs4 PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs -PKG_VERSION:=4.5.1 +PKG_VERSION:=4.6.1 PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools -PKG_SOURCE_DATE:=2022-03-17 -PKG_SOURCE_VERSION:=afdd63fc386919b4aa40d573b0a6069414d14317 -PKG_MIRROR_HASH:=59c294e00ddfc1f4bda658c7567584ce35fdd479c413ebdb1376981b27737be1 +PKG_SOURCE_DATE:=2023-03-26 +PKG_SOURCE_VERSION:=d8cb82d9840330f9344ec37b992595b5d7b44184 +PKG_MIRROR_HASH:=fc625af657ca284d69fbc32e3bb572d0afd566cf816b7c1c1b66dda0a0c2760a HOST_BUILD_PARALLEL:=1 diff --git a/tools/squashfs4/patches/001-Unsquashfs-Add-and-make-some-header-includes-conditi.patch b/tools/squashfs4/patches/001-Unsquashfs-Add-and-make-some-header-includes-conditi.patch deleted file mode 100644 index 2fdb5094925..00000000000 --- a/tools/squashfs4/patches/001-Unsquashfs-Add-and-make-some-header-includes-conditi.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a9119c969af0a5aa961d56978d5dd4f3eb952667 Mon Sep 17 00:00:00 2001 -From: Phillip Lougher -Date: Mon, 15 Aug 2022 17:04:43 +0100 -Subject: [PATCH 1/1] Unsquashfs: Add and make some header includes conditional - -Fixes https://github.com/plougher/squashfs-tools/issues/122 - -Signed-off-by: Phillip Lougher ---- - squashfs-tools/reader.c | 1 + - squashfs-tools/unsquashfs.c | 5 +++++ - 2 files changed, 6 insertions(+) - ---- a/squashfs-tools/reader.c -+++ b/squashfs-tools/reader.c -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - #include "squashfs_fs.h" - #include "mksquashfs.h" - #include "caches-queues-lists.h" ---- a/squashfs-tools/unsquashfs.c -+++ b/squashfs-tools/unsquashfs.c -@@ -32,8 +32,13 @@ - #include "stdarg.h" - #include "fnmatch_compat.h" - -+#ifdef __linux__ - #include - #include -+#elif defined __FreeBSD__ -+#include -+#endif -+ - #include - #include - #include diff --git a/tools/squashfs4/patches/002-Mksquashfs-Make-sysinfo-conditional.patch b/tools/squashfs4/patches/002-Mksquashfs-Make-sysinfo-conditional.patch deleted file mode 100644 index d152181f8a9..00000000000 --- a/tools/squashfs4/patches/002-Mksquashfs-Make-sysinfo-conditional.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 374e39a786a5acda841056bec26fd0e0c4d40dac Mon Sep 17 00:00:00 2001 -From: Phillip Lougher -Date: Mon, 15 Aug 2022 17:09:05 +0100 -Subject: [PATCH 1/1] Mksquashfs: Make sysinfo() conditional - -Fixes https://github.com/plougher/squashfs-tools/issues/123 - -Signed-off-by: Phillip Lougher ---- - squashfs-tools/mksquashfs.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -5802,6 +5802,7 @@ static int get_physical_memory() - long long page_size = sysconf(_SC_PAGESIZE); - int phys_mem; - -+#ifdef __linux__ - if(num_pages == -1 || page_size == -1) { - struct sysinfo sys; - int res = sysinfo(&sys); -@@ -5812,6 +5813,7 @@ static int get_physical_memory() - num_pages = sys.totalram; - page_size = sys.mem_unit; - } -+#endif - - phys_mem = num_pages * page_size >> 20; - diff --git a/tools/squashfs4/patches/003-Only-use-available-CPUs.patch b/tools/squashfs4/patches/003-Only-use-available-CPUs.patch deleted file mode 100644 index 4f608b9ed62..00000000000 --- a/tools/squashfs4/patches/003-Only-use-available-CPUs.patch +++ /dev/null @@ -1,92 +0,0 @@ -From bc8e655a420d2f62bb0597947e96dce7b4d3fb36 Mon Sep 17 00:00:00 2001 -From: Wessel Dankers -Date: Sun, 30 Oct 2022 19:29:28 +0100 -Subject: [PATCH] Only use available CPUs - -Not all online CPUs may be available for the current process, -especially when CPU affinity is involved. In such cases too many -threads will be created, which will then compete unnecessarily -for CPU time. - -Use sched_getaffinity() to determine the correct number of threads -to create. ---- - squashfs-tools/mksquashfs.c | 16 ++++++++++++---- - squashfs-tools/unsquashfs.c | 13 ++++++++++--- - 2 files changed, 22 insertions(+), 7 deletions(-) - ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -52,7 +52,9 @@ - #include - #include - --#ifndef linux -+#ifdef linux -+#include -+#else - #include - #endif - -@@ -5079,7 +5081,15 @@ static void initialise_threads(int readq - BAD_ERROR("Failed to set signal mask in intialise_threads\n"); - - if(processors == -1) { --#ifndef linux -+#ifdef linux -+ cpu_set_t cpu_set; -+ CPU_ZERO(&cpu_set); -+ -+ if(sched_getaffinity(0, sizeof cpu_set, &cpu_set) == -1) -+ processors = sysconf(_SC_NPROCESSORS_ONLN); -+ else -+ processors = CPU_COUNT(&cpu_set); -+#else - int mib[2]; - size_t len = sizeof(processors); - -@@ -5096,8 +5106,6 @@ static void initialise_threads(int readq - ERROR_EXIT(" Defaulting to 1\n"); - processors = 1; - } --#else -- processors = sysconf(_SC_NPROCESSORS_ONLN); - #endif - } - ---- a/squashfs-tools/unsquashfs.c -+++ b/squashfs-tools/unsquashfs.c -@@ -33,6 +33,7 @@ - #include "fnmatch_compat.h" - - #ifdef __linux__ -+#include - #include - #include - #elif defined __FreeBSD__ -@@ -2719,7 +2720,15 @@ void initialise_threads(int fragment_buf - } - - if(processors == -1) { --#ifndef linux -+#ifdef linux -+ cpu_set_t cpu_set; -+ CPU_ZERO(&cpu_set); -+ -+ if(sched_getaffinity(0, sizeof cpu_set, &cpu_set) == -1) -+ processors = sysconf(_SC_NPROCESSORS_ONLN); -+ else -+ processors = CPU_COUNT(&cpu_set); -+#else - int mib[2]; - size_t len = sizeof(processors); - -@@ -2735,8 +2744,6 @@ void initialise_threads(int fragment_buf - "Defaulting to 1\n"); - processors = 1; - } --#else -- processors = sysconf(_SC_NPROCESSORS_ONLN); - #endif - } - diff --git a/tools/squashfs4/patches/004-action-rework-strdupa-with-POSIX-strdup-and-free.patch b/tools/squashfs4/patches/004-action-rework-strdupa-with-POSIX-strdup-and-free.patch deleted file mode 100644 index 3d6f696c8ef..00000000000 --- a/tools/squashfs4/patches/004-action-rework-strdupa-with-POSIX-strdup-and-free.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 92e628ec0e26cf091d82356e3b74f73bedf4cfc8 Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Sat, 15 Oct 2022 00:11:20 +0200 -Subject: [PATCH] action: rework strdupa with POSIX strdup and free - -strdupa is not POSIX and cause compilation error on macos. -Fix this by using strdup and free. - -Signed-off-by: Christian Marangi -Signed-off-by: Phillip Lougher ---- - squashfs-tools/action.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - ---- a/squashfs-tools/action.c -+++ b/squashfs-tools/action.c -@@ -2415,9 +2415,17 @@ static char *get_start(char *s, int n) - - static int subpathname_fn(struct atom *atom, struct action_data *action_data) - { -- return fnmatch(atom->argv[0], get_start(strdupa(action_data->subpath), -- count_components(atom->argv[0])), -- FNM_PATHNAME|FNM_EXTMATCH) == 0; -+ char *s, *tmp; -+ int ret; -+ -+ s = tmp = strdup(action_data->subpath); -+ tmp = get_start(tmp, count_components(atom->argv[0])); -+ -+ ret = fnmatch(atom->argv[0], tmp, FNM_PATHNAME|FNM_EXTMATCH); -+ -+ free(s); -+ -+ return ret == 0; - } - - /* diff --git a/tools/squashfs4/patches/005-Don-t-use-sigwaitinfo-sigtimedwait-if-not-supported.patch b/tools/squashfs4/patches/005-Don-t-use-sigwaitinfo-sigtimedwait-if-not-supported.patch deleted file mode 100644 index 80e8824c46b..00000000000 --- a/tools/squashfs4/patches/005-Don-t-use-sigwaitinfo-sigtimedwait-if-not-supported.patch +++ /dev/null @@ -1,192 +0,0 @@ -From dbe9747b4f09bd2f4d63af06e55c2c3ed35bfca1 Mon Sep 17 00:00:00 2001 -From: Phillip Lougher -Date: Tue, 7 Feb 2023 23:09:30 +0000 -Subject: [PATCH] Don't use sigwaitinfo()/sigtimedwait() if not supported - -If sigwaitinfo() and sigtimedwait() are not supported, -use sigwait() instead. - -This will disable the queue/caches dump if ^\ (SIGQUIT) -is hit twice within a second. - -But the queue/caches dump is still available if SIGHUP -is sent to the program. - -Currently this check is applied to MAC OS X. FreeBSD and -NetBSD appear to have these functions. - -Signed-off-by: Phillip Lougher ---- - squashfs-tools/info.c | 25 ++------------- - squashfs-tools/signals.h | 54 ++++++++++++++++++++++++++++++++ - squashfs-tools/unsquashfs_info.c | 25 ++------------- - 3 files changed, 60 insertions(+), 44 deletions(-) - create mode 100644 squashfs-tools/signals.h - ---- a/squashfs-tools/info.c -+++ b/squashfs-tools/info.c -@@ -2,7 +2,7 @@ - * Create a squashfs filesystem. This is a highly compressed read only - * filesystem. - * -- * Copyright (c) 2013, 2014, 2019, 2021 -+ * Copyright (c) 2013, 2014, 2019, 2021, 2022, 2023 - * Phillip Lougher - * - * This program is free software; you can redistribute it and/or -@@ -42,6 +42,7 @@ - #include "mksquashfs_error.h" - #include "progressbar.h" - #include "caches-queues-lists.h" -+#include "signals.h" - - static int silent = 0; - static struct dir_ent *ent = NULL; -@@ -144,7 +145,6 @@ void dump_state() - void *info_thrd(void *arg) - { - sigset_t sigmask; -- struct timespec timespec = { .tv_sec = 1, .tv_nsec = 0 }; - int sig, waiting = 0; - - sigemptyset(&sigmask); -@@ -152,26 +152,7 @@ void *info_thrd(void *arg) - sigaddset(&sigmask, SIGHUP); - - while(1) { -- if(waiting) -- sig = sigtimedwait(&sigmask, NULL, ×pec); -- else -- sig = sigwaitinfo(&sigmask, NULL); -- -- if(sig == -1) { -- switch(errno) { -- case EAGAIN: -- /* interval timed out */ -- waiting = 0; -- /* FALLTHROUGH */ -- case EINTR: -- /* if waiting, the wait will be longer, but -- that's OK */ -- continue; -- default: -- BAD_ERROR("sigtimedwait/sigwaitinfo failed " -- "because %s\n", strerror(errno)); -- } -- } -+ sig = wait_for_signal(&sigmask, &waiting); - - if(sig == SIGQUIT && !waiting) { - print_filename(); ---- /dev/null -+++ b/squashfs-tools/signals.h -@@ -0,0 +1,54 @@ -+#ifndef SIGNALS_H -+#define SIGNALS_H -+/* -+ * Create a squashfs filesystem. This is a highly compressed read only -+ * filesystem. -+ * -+ * Copyright (c) 2023 -+ * Phillip Lougher -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2, -+ * or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * signals.h -+ */ -+ -+static inline int wait_for_signal(sigset_t *sigmask, int *waiting) -+{ -+ int sig; -+ -+#if defined(__APPLE__) && defined(__MACH__) -+ sigwait(sigmask, &sig); -+ *waiting = 0; -+#else -+ struct timespec timespec = { .tv_sec = 1, .tv_nsec = 0 }; -+ -+ while(1) { -+ if(*waiting) -+ sig = sigtimedwait(sigmask, NULL, ×pec); -+ else -+ sig = sigwaitinfo(sigmask, NULL); -+ -+ if(sig != -1) -+ break; -+ -+ if(errno == EAGAIN) -+ *waiting = 0; -+ else if(errno != EINTR) -+ BAD_ERROR("sigtimedwait/sigwaitinfo failed because %s\n", strerror(errno)); -+ } -+#endif -+ return sig; -+} -+#endif ---- a/squashfs-tools/unsquashfs_info.c -+++ b/squashfs-tools/unsquashfs_info.c -@@ -2,7 +2,7 @@ - * Create a squashfs filesystem. This is a highly compressed read only - * filesystem. - * -- * Copyright (c) 2013, 2021 -+ * Copyright (c) 2013, 2021, 2023 - * Phillip Lougher - * - * This program is free software; you can redistribute it and/or -@@ -40,6 +40,7 @@ - #include "squashfs_fs.h" - #include "unsquashfs.h" - #include "unsquashfs_error.h" -+#include "signals.h" - - char *pathname = NULL; - -@@ -96,7 +97,6 @@ void dump_state() - void *info_thrd(void *arg) - { - sigset_t sigmask; -- struct timespec timespec = { .tv_sec = 1, .tv_nsec = 0 }; - int sig, waiting = 0; - - sigemptyset(&sigmask); -@@ -104,26 +104,7 @@ void *info_thrd(void *arg) - sigaddset(&sigmask, SIGHUP); - - while(1) { -- if(waiting) -- sig = sigtimedwait(&sigmask, NULL, ×pec); -- else -- sig = sigwaitinfo(&sigmask, NULL); -- -- if(sig == -1) { -- switch(errno) { -- case EAGAIN: -- /* interval timed out */ -- waiting = 0; -- /* FALLTHROUGH */ -- case EINTR: -- /* if waiting, the wait will be longer, but -- that's OK */ -- continue; -- default: -- BAD_ERROR("sigtimedwait/sigwaitinfo failed " -- "because %s\n", strerror(errno)); -- } -- } -+ sig = wait_for_signal(&sigmask, &waiting); - - if(sig == SIGQUIT && !waiting) { - if(pathname) diff --git a/tools/squashfs4/patches/006-Move-sysinfo.h-into-the-linux-only-section-should-fi.patch b/tools/squashfs4/patches/006-Move-sysinfo.h-into-the-linux-only-section-should-fi.patch deleted file mode 100644 index 364356188ff..00000000000 --- a/tools/squashfs4/patches/006-Move-sysinfo.h-into-the-linux-only-section-should-fi.patch +++ /dev/null @@ -1,49 +0,0 @@ -From b2f6454a2b2517cfba7a24cf02e9bdf3b959c86a Mon Sep 17 00:00:00 2001 -From: Tony Butler -Date: Sat, 18 Feb 2023 13:20:48 -0800 -Subject: [PATCH] Move sysinfo.h into the linux-only section, should fix build - on MacOS. - -All compilers set `__linux__`, but `linux` may not be defined, and usage -was mixed. Use `__linux__` everywhere instead. - -Signed-off-by: Tony Butler ---- - squashfs-tools/mksquashfs.c | 6 +++--- - squashfs-tools/unsquashfs.c | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -50,9 +50,9 @@ - #include - #include - #include --#include - --#ifdef linux -+#ifdef __linux__ -+#include - #include - #else - #include -@@ -5081,7 +5081,7 @@ static void initialise_threads(int readq - BAD_ERROR("Failed to set signal mask in intialise_threads\n"); - - if(processors == -1) { --#ifdef linux -+#ifdef __linux__ - cpu_set_t cpu_set; - CPU_ZERO(&cpu_set); - ---- a/squashfs-tools/unsquashfs.c -+++ b/squashfs-tools/unsquashfs.c -@@ -2720,7 +2720,7 @@ void initialise_threads(int fragment_buf - } - - if(processors == -1) { --#ifdef linux -+#ifdef __linux__ - cpu_set_t cpu_set; - CPU_ZERO(&cpu_set); - diff --git a/tools/squashfs4/patches/007-Unsquashfs-fix-compilation-error-for-missing-sysctl..patch b/tools/squashfs4/patches/007-Unsquashfs-fix-compilation-error-for-missing-sysctl..patch deleted file mode 100644 index b7db00e4cb1..00000000000 --- a/tools/squashfs4/patches/007-Unsquashfs-fix-compilation-error-for-missing-sysctl..patch +++ /dev/null @@ -1,26 +0,0 @@ -From dcf492077ef10ed7550b6e2b38b81318645bbdd5 Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Sun, 19 Feb 2023 04:36:01 +0100 -Subject: [PATCH] Unsquashfs: fix compilation error for missing sysctl.h on - macos - -Currently the include of sys/sysctl.h is guarded and done only for -FreeBSD system. Remove this to fix compilation error on macos following -the same pattern done in mksquashfs.c - -Signed-off-by: Christian Marangi ---- - squashfs-tools/unsquashfs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/squashfs-tools/unsquashfs.c -+++ b/squashfs-tools/unsquashfs.c -@@ -36,7 +36,7 @@ - #include - #include - #include --#elif defined __FreeBSD__ -+#else - #include - #endif - diff --git a/tools/squashfs4/patches/100-portability.patch b/tools/squashfs4/patches/100-portability.patch deleted file mode 100644 index fe804d44763..00000000000 --- a/tools/squashfs4/patches/100-portability.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/squashfs-tools/xattr.c -+++ b/squashfs-tools/xattr.c -@@ -115,6 +115,7 @@ int xattr_get_prefix(struct xattr_list * - - static int read_xattrs_from_system(char *filename, struct xattr_list **xattrs) - { -+#if defined(linux) - ssize_t size, vsize; - char *xattr_names, *p; - int i; -@@ -227,6 +228,10 @@ failed: - free(xattr_list); - free(xattr_names); - return 0; -+#else -+ *xattrs = NULL; -+ return 0; -+#endif - } - - ---- a/squashfs-tools/unsquashfs_xattr.c -+++ b/squashfs-tools/unsquashfs_xattr.c -@@ -36,6 +36,7 @@ extern int strict_errors; - - int write_xattr(char *pathname, unsigned int xattr) - { -+#if defined(linux) - unsigned int count; - struct xattr_list *xattr_list; - int i; -@@ -147,4 +148,5 @@ int write_xattr(char *pathname, unsigned - free_xattr(xattr_list, count); - - return !failed; -+#endif - } diff --git a/tools/squashfs4/patches/101-xz_wrapper-support-multiple-lzma-configuration-optio.patch b/tools/squashfs4/patches/100-xz_wrapper-support-multiple-lzma-configuration-optio.patch similarity index 100% rename from tools/squashfs4/patches/101-xz_wrapper-support-multiple-lzma-configuration-optio.patch rename to tools/squashfs4/patches/100-xz_wrapper-support-multiple-lzma-configuration-optio.patch From fca03b4bad5743252de458198f3fe1d13b9f553d Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Wed, 29 Mar 2023 00:29:47 +0200 Subject: [PATCH 15/24] libtraceevent: update to 1.7.2 Changes: 1c6f0f3 libtraceevent: version 1.7.2 73f6a8a libtraceevent: Fix some missing commas in big endian blocks da2ea6b libtraceevent: Rename "ok" to "token_has_paren" in process_sizeof() e6f7cfa libtraceevent: No need for testing ok in else if (!ok) in process_sizeof() a4b1ba5 libtraceevent: Fix double free in parsing sizeof() Signed-off-by: Nick Hainke --- package/libs/libtraceevent/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libs/libtraceevent/Makefile b/package/libs/libtraceevent/Makefile index cfa5e465be8..5d8740faab4 100644 --- a/package/libs/libtraceevent/Makefile +++ b/package/libs/libtraceevent/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtraceevent -PKG_VERSION:=1.7.1 +PKG_VERSION:=1.7.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/ -PKG_HASH:=17b7131c106793c3b45477445bd32d295170c4245ed8348e03c17296e53009e1 +PKG_HASH:=a8b4bf8f05c06d1d6405f6d0038467a87e7ab218f0d8b0608d08bca5d1fc112a PKG_MAINTAINER:=Nick Hainke From 31b133022348ae86175a8dcd1d395dd870e7adc1 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Fri, 2 Dec 2022 23:12:23 +0100 Subject: [PATCH 16/24] kernel: modules: hfcpci: limit to devices with pci support Kmod-hfcpci and kmod-hfcmulti supports ISDN adapters over PCI. On targets without PCI support, this package is empty. Symbol CONFIG_MISDN_HFCMULTI and CONFIG_MISDN_HFCPCI depends on CONFIG_PCI. Signed-off-by: Aleksander Jan Bajkowski --- package/kernel/linux/modules/netdevices.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 2af84be6382..4973c0502ed 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -966,7 +966,7 @@ $(eval $(call KernelPackage,tg3)) define KernelPackage/hfcpci TITLE:=HFC PCI cards (single port) support for mISDN KCONFIG:=CONFIG_MISDN_HFCPCI - DEPENDS:=+kmod-misdn + DEPENDS:=@PCI_SUPPORT +kmod-misdn SUBMENU:=$(NETWORK_DEVICES_MENU) FILES:=$(LINUX_DIR)/drivers/isdn/hardware/mISDN/hfcpci.ko AUTOLOAD:=$(call AutoLoad,31,hfcpci) @@ -983,7 +983,7 @@ $(eval $(call KernelPackage,hfcpci)) define KernelPackage/hfcmulti TITLE:=HFC multiport cards (HFC-4S/8S/E1) support for mISDN KCONFIG:=CONFIG_MISDN_HFCMULTI - DEPENDS:=+kmod-misdn + DEPENDS:=@PCI_SUPPORT +kmod-misdn SUBMENU:=$(NETWORK_DEVICES_MENU) FILES:=$(LINUX_DIR)/drivers/isdn/hardware/mISDN/hfcmulti.ko AUTOLOAD:=$(call AutoLoad,31,hfcmulti) From 69a14e4230ef459a9787b1fa1776fbac59012dbb Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Fri, 2 Dec 2022 23:38:51 +0100 Subject: [PATCH 17/24] kernel: modules: tg3: limit to devices with pci support Kmod-tg3 supports Ethernet adapters over PCIe bus. On targets without PCI support, this package is empty. Symbol CONFIG_TIGON3 depends on CONFIG_PCI. Signed-off-by: Aleksander Jan Bajkowski --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 4973c0502ed..208518c3bfc 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -950,7 +950,7 @@ define KernelPackage/tg3 TITLE:=Broadcom Tigon3 Gigabit Ethernet KCONFIG:=CONFIG_TIGON3 \ CONFIG_TIGON3_HWMON=n - DEPENDS:=+!TARGET_bcm47xx:kmod-libphy +kmod-ptp + DEPENDS:=@PCI_SUPPORT +!TARGET_bcm47xx:kmod-libphy +kmod-ptp SUBMENU:=$(NETWORK_DEVICES_MENU) FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/tg3.ko AUTOLOAD:=$(call AutoLoad,19,tg3,1) From 2a04df39200dd1d5d3c3099c548bb9f82e03ab54 Mon Sep 17 00:00:00 2001 From: Muhammad AL-Qadhy Date: Tue, 21 Mar 2023 08:49:22 +0200 Subject: [PATCH 18/24] ramips: Add support for CJ-Hello HYC-G920 Hanyang Digitech Co., Ltd. MSIP-CMM-HYD-HYC-G920 CJ-Hello HYC-G920 SoC : MediaTek MT7621AT RAM : 256M (SK hynix H5TQ2G63FFR) FLASH : 16MB (Winbond W25Q128BV) WiFi : MediaTek MT7602EN bgn 2SS WiFi : MediaTek MT7612EN nac 2SS BTN : Reset LED : - Power RED - WAN Green - LAN {1-4} - WiFi 2.4 GHz Blue - WiFi 5 GHz Blue - USB Green **For MT7621 stage1 DDR Test** UART : J4 GND - 3V3 - TX - RX - GND / 57600-8N1 ``` MT7621 stage1 code 10:33:55 (ASIC) CPU=500000000 HZ BUS=166666666 HZ ``` **For u boot environment** UART : J4 GND - 3V3 - TX - RX - GND / 115200-8N1 **UART Menu** ``` Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. ``` **Steps** Press 4: Entr boot command line interface. On the pormpt enter. `setenv firmware_size 0xf60000` Then enter. `saveenv` Then enter. `reset` **Device will reboot** Set your IP 192.168.100.100/24 Connect your lan cable to wan port. **On the UART Menu** Press 2: Load system code then write to Flash via TFTP. Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) **enter** `Y` Please Input new ones /or Ctrl-C to discard Input device IP (192.168.100.55) ==:`192.168.100.55` Input server IP (192.168.100.100) ==:`192.168.100.100` Input Linux Kernel filename () ==:`openwrt-22.03.0-ramips-mt7621-hanyang_hyc-g920-squashfs-sysupgrade.bin` After uploading firmware image, device will boot Openwrt. Signed-off-by: Muhammad AL-Qadhy --- .../ramips/dts/mt7621_hanyang_hyc-g920.dts | 196 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 10 + 2 files changed, 206 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts diff --git a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts new file mode 100644 index 00000000000..db341ab87b8 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts @@ -0,0 +1,196 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "hanyang,hyc-g920", "mediatek,mt7621-soc"; + model = "CJ-Hello HYC-G920"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + bootargs-override = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "red:power"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + usb { + label = "green:usb"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + trigger-sources = <&ehci_port2>; + linux,default-trigger = "usbport"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "mac"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + + partition@fb0000 { + label = "config "; + reg = <0xfb0000 0x20000>; + read-only; + }; + + partition@fd0000 { + label = "config_bak "; + reg = <0xfd0000 0x20000>; + read-only; + }; + + partition@ff0000 { + label = "mac_bak "; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + + led { + led-sources = <2>; + led-active-low; + }; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + + led { + led-sources = <2>; + led-active-low; + }; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; +}; + +&state_default { + gpio { + groups = "sdhci"; + function = "gpio"; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index dfe9d346f10..066602dafd3 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -974,6 +974,16 @@ define Device/gnubee_gb-pc2 endef TARGET_DEVICES += gnubee_gb-pc2 +define Device/hanyang_hyc-g920 + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + DEVICE_VENDOR := Hanyang + DEVICE_MODEL := CJ-Hello HYC-G920 + IMAGE_SIZE := 15744k + DEVICE_PACKAGES := kmod-usb3 kmod-mt76x2 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += hanyang_hyc-g920 + define Device/h3c_tx180x $(Device/dsa-migration) BLOCKSIZE := 128k From 936df715de3d33947ce38ca232b05c2bd3ef58f1 Mon Sep 17 00:00:00 2001 From: Ruben Jenster Date: Thu, 23 Mar 2023 11:15:52 +0100 Subject: [PATCH 19/24] dnsmasq: add dhcphostsfile to ujail sandbox The dhcphostsfile must be mounted into the (ujail) sandbox. The file can not be accessed without this mount. Signed-off-by: Ruben Jenster --- package/network/services/dnsmasq/files/dnsmasq.init | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 21e330ec28c..608ef013f10 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -1212,6 +1212,7 @@ dnsmasq_start() [ ! -e "$logfacility" ] && touch "$logfacility" procd_add_jail_mount_rw "$logfacility" esac + [ -e "$hostsfile" ] && procd_add_jail_mount $hostsfile procd_close_instance } From cbf120c25541f180a79c28180be23286cabc78f8 Mon Sep 17 00:00:00 2001 From: Felix Baumann Date: Sat, 18 Mar 2023 06:55:12 +0100 Subject: [PATCH 20/24] ramips: mt7621: add migration script for WLAN PCI paths PCI paths of the WLAN devices have changed between kernel 5.10 and 5.15; migrate config so existing wifi-iface definitions don't break. This is implemented as a hotplug handler rather than a uci-defaults script as the migration script must run before the 10-wifi-detect hotplug handler. based on b452af23a8602ebf7bfb0eb084383ecd595face5 migration was forgotten when device trees were adjusted in 688697889c9ceb9d2d8d413d1abcc5fa7edb402b c77913be5be5f11a0f20dba1b45b96470099e8a8 fixes #9374 affected devices: Netgear R6220 Netgear WAC104 Netgear WNDR3700 v5 Zbtlink ZBT-WE1326 Wiflyer WF3526-P Arcadyan WE420223-99 Beeline Smartbox Flash (Arcadyan WG443223) MTS WG430223 (Arcadyan WG430223) Tested-by: Maximilian Baumgartner Tested-by: Mikhail Zhilkin Signed-off-by: Felix Baumann --- .../etc/hotplug.d/ieee80211/05-wifi-migrate | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate new file mode 100644 index 00000000000..6504dc81a58 --- /dev/null +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate @@ -0,0 +1,75 @@ +#!/bin/sh + +# This must run before 10-wifi-detect + + +[ "${ACTION}" = "add" ] || return + + +. /lib/functions.sh + + +check_radio() +{ + local cfg="$1" to="$2" + + config_get path "$cfg" path + + [ "$path" = "$to" ] && PATH_EXISTS=true +} + +do_migrate_radio() +{ + local cfg="$1" from="$2" to="$3" + + config_get path "$cfg" path + + [ "$path" = "$from" ] || return + + uci set "wireless.${cfg}.path=${to}" + WIRELESS_CHANGED=true + + logger -t wifi-migrate "Updated path of wireless.${cfg} from '${from}' to '${to}'" +} + +migrate_radio() +{ + local from="$1" to="$2" + + config_load wireless + + # Check if there is already a section with the target path: In this case, the system + # was already upgraded to a version without this migration script before; better bail out, + # as we can't be sure we don't break more than we fix. + PATH_EXISTS=false + config_foreach check_radio wifi-device "$to" + $PATH_EXISTS && return + + config_foreach do_migrate_radio wifi-device "$from" "$to" +} + + +WIRELESS_CHANGED=false + +case "$(board_name)" in +arcadyan,we420223-99|\ +beeline,smartbox-flash|\ +mts,wg430223) + migrate_radio '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0' '1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0' + migrate_radio '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1' '1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0+1' + ;; +netgear,r6220|\ +netgear,wac104|\ +netgear,wndr3700-v5) + migrate_radio '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0' '1e140000.pcie/pci0000:00/0000:00:02.0/0000:02:00.0' + ;; +zbtlink,zbt-we1326) + migrate_radio '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0' '1e140000.pcie/pci0000:00/0000:00:02.0/0000:02:00.0' + migrate_radio '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0' '1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0' + ;; + +esac + +$WIRELESS_CHANGED && uci commit wireless + +exit 0 From ed86454578efa1ae9e0ea522c8612e2b7c36b6dd Mon Sep 17 00:00:00 2001 From: Ian Dall Date: Fri, 10 Mar 2023 17:02:34 +1030 Subject: [PATCH 21/24] dnsmasq: configure dynamic dhcp6 and dhcp4 independently Given ipv6 has SLAAC it is quite plausible to wish to use dynamic dhcp4 but static dhcp6. This patch keeps dynamicdhcp as the default option for both, but is overridden by dynamicdhcpv6 or dynamicdhcpv4 Signed-off-by: Ian Dall --- package/network/services/dnsmasq/files/dnsmasq.init | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 608ef013f10..2a3327b0c6f 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -557,6 +557,8 @@ dhcp_add() { config_get leasetime "$cfg" leasetime 12h config_get options "$cfg" options config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1 + config_get_bool dynamicdhcpv4 "$cfg" dynamicdhcpv4 $dynamicdhcp + config_get_bool dynamicdhcpv6 "$cfg" dynamicdhcpv6 $dynamicdhcp config_get dhcpv4 "$cfg" dhcpv4 config_get dhcpv6 "$cfg" dhcpv6 @@ -586,12 +588,12 @@ dhcp_add() { # make sure the DHCP range is not empty if [ "$dhcpv4" != "disabled" ] && eval "$(ipcalc.sh "${subnet%%/*}" "$netmask" "$start" "$limit")" ; then - [ "$dynamicdhcp" = "0" ] && END="static" + [ "$dynamicdhcpv4" = "0" ] && END="static" xappend "--dhcp-range=$tags$nettag$START,$END,$NETMASK,$leasetime${options:+ $options}" fi - if [ "$dynamicdhcp" = "0" ] ; then + if [ "$dynamicdhcpv6" = "0" ] ; then dhcp6range="::,static" else dhcp6range="::1000,::ffff" From fdc857358747fcf0c905779e3f114af66feeab1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 1 Apr 2023 20:58:54 +0200 Subject: [PATCH 22/24] kernel: backport upstreamed DSA B53 MMAP patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the patch from pending to backport, since it has been accepted upstream: https://github.com/torvalds/linux/commit/45977e58ce65ed0459edc9a0466d9dfea09463f5 Signed-off-by: Álvaro Fernández Rojas --- ....3-0005-net-dsa-b53-mmap-add-phy-ops.patch | 49 ++++++++ ...-net-dsa-b53-mmap-add-more-63xx-SoCs.patch | 2 +- ...dsa-b53-mmap-allow-passing-a-chip-ID.patch | 4 +- .../776-net-dsa-b53-mmap-add-phy-ops.patch | 118 ------------------ 4 files changed, 52 insertions(+), 121 deletions(-) create mode 100644 target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch delete mode 100644 target/linux/generic/pending-5.15/776-net-dsa-b53-mmap-add-phy-ops.patch diff --git a/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch b/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch new file mode 100644 index 00000000000..f35ae2588b6 --- /dev/null +++ b/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch @@ -0,0 +1,49 @@ +From 45977e58ce65ed0459edc9a0466d9dfea09463f5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= +Date: Thu, 23 Mar 2023 20:48:41 +0100 +Subject: [PATCH] net: dsa: b53: mmap: add phy ops +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Implement phy_read16() and phy_write16() ops for B53 MMAP to avoid accessing +B53_PORT_MII_PAGE registers which hangs the device. +This access should be done through the MDIO Mux bus controller. + +Signed-off-by: Álvaro Fernández Rojas +Acked-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/dsa/b53/b53_mmap.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/drivers/net/dsa/b53/b53_mmap.c ++++ b/drivers/net/dsa/b53/b53_mmap.c +@@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_d + return 0; + } + ++static int b53_mmap_phy_read16(struct b53_device *dev, int addr, int reg, ++ u16 *value) ++{ ++ return -EIO; ++} ++ ++static int b53_mmap_phy_write16(struct b53_device *dev, int addr, int reg, ++ u16 value) ++{ ++ return -EIO; ++} ++ + static const struct b53_io_ops b53_mmap_ops = { + .read8 = b53_mmap_read8, + .read16 = b53_mmap_read16, +@@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ + .write32 = b53_mmap_write32, + .write48 = b53_mmap_write48, + .write64 = b53_mmap_write64, ++ .phy_read16 = b53_mmap_phy_read16, ++ .phy_write16 = b53_mmap_phy_write16, + }; + + static int b53_mmap_probe_of(struct platform_device *pdev, diff --git a/target/linux/generic/pending-5.15/773-net-dsa-b53-mmap-add-more-63xx-SoCs.patch b/target/linux/generic/pending-5.15/773-net-dsa-b53-mmap-add-more-63xx-SoCs.patch index 1e95425952a..e2da4e7f055 100644 --- a/target/linux/generic/pending-5.15/773-net-dsa-b53-mmap-add-more-63xx-SoCs.patch +++ b/target/linux/generic/pending-5.15/773-net-dsa-b53-mmap-add-more-63xx-SoCs.patch @@ -94,7 +94,7 @@ Reviewed-by: Florian Fainelli --- a/drivers/net/dsa/b53/b53_mmap.c +++ b/drivers/net/dsa/b53/b53_mmap.c -@@ -333,8 +333,11 @@ static void b53_mmap_shutdown(struct pla +@@ -347,8 +347,11 @@ static void b53_mmap_shutdown(struct pla static const struct of_device_id b53_mmap_of_table[] = { { .compatible = "brcm,bcm3384-switch" }, diff --git a/target/linux/generic/pending-5.15/774-net-dsa-b53-mmap-allow-passing-a-chip-ID.patch b/target/linux/generic/pending-5.15/774-net-dsa-b53-mmap-allow-passing-a-chip-ID.patch index b84ad12d012..456643f05d6 100644 --- a/target/linux/generic/pending-5.15/774-net-dsa-b53-mmap-allow-passing-a-chip-ID.patch +++ b/target/linux/generic/pending-5.15/774-net-dsa-b53-mmap-allow-passing-a-chip-ID.patch @@ -122,7 +122,7 @@ Signed-off-by: Álvaro Fernández Rojas .vlans = 4096, --- a/drivers/net/dsa/b53/b53_mmap.c +++ b/drivers/net/dsa/b53/b53_mmap.c -@@ -248,7 +248,7 @@ static int b53_mmap_probe_of(struct plat +@@ -262,7 +262,7 @@ static int b53_mmap_probe_of(struct plat return -ENOMEM; pdata->regs = mem; @@ -131,7 +131,7 @@ Signed-off-by: Álvaro Fernández Rojas pdata->big_endian = of_property_read_bool(np, "big-endian"); of_ports = of_get_child_by_name(np, "ports"); -@@ -332,14 +332,28 @@ static void b53_mmap_shutdown(struct pla +@@ -346,14 +346,28 @@ static void b53_mmap_shutdown(struct pla } static const struct of_device_id b53_mmap_of_table[] = { diff --git a/target/linux/generic/pending-5.15/776-net-dsa-b53-mmap-add-phy-ops.patch b/target/linux/generic/pending-5.15/776-net-dsa-b53-mmap-add-phy-ops.patch deleted file mode 100644 index 786e07c8bb5..00000000000 --- a/target/linux/generic/pending-5.15/776-net-dsa-b53-mmap-add-phy-ops.patch +++ /dev/null @@ -1,118 +0,0 @@ -From patchwork Thu Mar 23 19:48:41 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13186039 -X-Patchwork-Delegate: kuba@kernel.org -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 968C3C6FD1C - for ; Thu, 23 Mar 2023 19:48:57 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S230463AbjCWTs4 (ORCPT ); - Thu, 23 Mar 2023 15:48:56 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55372 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S231235AbjCWTsv (ORCPT - ); Thu, 23 Mar 2023 15:48:51 -0400 -Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com - [IPv6:2a00:1450:4864:20::431]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ECB01040F; - Thu, 23 Mar 2023 12:48:46 -0700 (PDT) -Received: by mail-wr1-x431.google.com with SMTP id i9so21784869wrp.3; - Thu, 23 Mar 2023 12:48:46 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679600924; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:from:to:cc:subject:date:message-id:reply-to; - bh=/D6faZLuMe7xaso6CO/2kkyQATErE9ouEiXJJAWuYSw=; - b=Sy0AoQ2nURFU7hQ4iDJucgH+I1i7hZxm6erI5lMl/wC/XyNRhAZD+ZJSzlFJBQDtoD - hZThEQp9Ad0QKaZFom1OzYTuNqWp1QWKY+AJFN/vyaEKWP/Q1jYAIRkTJK3c+qpZwesc - Oha96WNA7SfaVJ/HBCTlaPwV1/N7X5gOWxoqX59Fb4KDRLJ7PBASD6XXxTnaeFudYogB - Vg3Mq+rm/TApR/IPWANEO7KqEr6StC0P0EN1tSnfPdAkxSkByuM34l+pr5LXD8w91MGe - 1BQSl1vHyZQjR/WJmiZl1QAgSaJR0EVn2isPcjOIjQPBg+HQ4AY4MFoaOTm6RanKzloA - BtWw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679600924; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:x-gm-message-state:from:to:cc:subject:date:message-id - :reply-to; - bh=/D6faZLuMe7xaso6CO/2kkyQATErE9ouEiXJJAWuYSw=; - b=GoOv7EUR83WD3MWgKMC9ENLuaNcBHHis524Yrd5LxZOocYFmdtARV8Gfgk2WHyQ5lM - zoNvI+h6alZwbu2qWJq9KbAUekFUm5/qkjWvPGRMcQVt9aKiCI/nLy6zYG4tJSqT2kyX - FHbhy2GbJIriCm8ENoRfzE5RhAjxFuaaD+/apSEA5IK4a7hm+VKDWJDe+VF8C/Vah/Bp - tK2LG14OdhhwFmepUsr9lA7jzTqhyCAFklHW+frebH2K/D4ZzvcScvXTx3k+d8+7ZuYr - BkPI0fgMryZdYgeGDWnox5s1jIzQQn4laPpNczVMu06i9j8ANfjnZ9uICrpUDAAKgn+x - uGBg== -X-Gm-Message-State: AAQBX9efILx1adxeGqvUsSK8ibPnaoTHCJA78gzwtmsK+HYaaGH/yO4t - xPl4Q8TUvNTDcy2J2/mFy80= -X-Google-Smtp-Source: - AKy350bX5yENhBXAjV5ZhqRDlOsZvqU+xNCSUbf4jNQtqB8hjgDg9RB7fVuazc+3ZdlciEIHI1q/jg== -X-Received: by 2002:adf:f30c:0:b0:2cf:ed87:37c9 with SMTP id - i12-20020adff30c000000b002cfed8737c9mr200232wro.11.1679600924524; - Thu, 23 Mar 2023 12:48:44 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - p17-20020adfcc91000000b002c71dd1109fsm16952587wrj.47.2023.03.23.12.48.43 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Thu, 23 Mar 2023 12:48:44 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: f.fainelli@gmail.com, jonas.gorski@gmail.com, andrew@lunn.ch, - olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, - kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, - netdev@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH] net: dsa: b53: mmap: add phy ops -Date: Thu, 23 Mar 2023 20:48:41 +0100 -Message-Id: <20230323194841.1431878-1-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org -X-Patchwork-Delegate: kuba@kernel.org - -Implement phy_read16() and phy_write16() ops for B53 MMAP to avoid accessing -B53_PORT_MII_PAGE registers which hangs the device. -This access should be done through the MDIO Mux bus controller. - -Signed-off-by: Álvaro Fernández Rojas ---- - drivers/net/dsa/b53/b53_mmap.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - ---- a/drivers/net/dsa/b53/b53_mmap.c -+++ b/drivers/net/dsa/b53/b53_mmap.c -@@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_d - return 0; - } - -+static int b53_mmap_phy_read16(struct b53_device *dev, int addr, int reg, -+ u16 *value) -+{ -+ return -EIO; -+} -+ -+static int b53_mmap_phy_write16(struct b53_device *dev, int addr, int reg, -+ u16 value) -+{ -+ return -EIO; -+} -+ - static const struct b53_io_ops b53_mmap_ops = { - .read8 = b53_mmap_read8, - .read16 = b53_mmap_read16, -@@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ - .write32 = b53_mmap_write32, - .write48 = b53_mmap_write48, - .write64 = b53_mmap_write64, -+ .phy_read16 = b53_mmap_phy_read16, -+ .phy_write16 = b53_mmap_phy_write16, - }; - - static int b53_mmap_probe_of(struct platform_device *pdev, From 506bb436c678779e8ee54e83a7fb3e4e880037ec Mon Sep 17 00:00:00 2001 From: Andrey Erokhin Date: Tue, 7 Mar 2023 16:52:58 +0500 Subject: [PATCH 23/24] netifd: strip mask from IP address in DHCP client params ipaddr option can be in CIDR notation, but udhcp wants just an IP address Signed-off-by: Andrey Erokhin --- package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh index ea6d872eb49..636b4654ff0 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -67,7 +67,7 @@ proto_dhcp_setup() { -p /var/run/udhcpc-$iface.pid \ -s /lib/netifd/dhcp.script \ -f -t 0 -i "$iface" \ - ${ipaddr:+-r $ipaddr} \ + ${ipaddr:+-r ${ipaddr/\/*/}} \ ${hostname:+-x "hostname:$hostname"} \ ${vendorid:+-V "$vendorid"} \ $clientid $defaultreqopts $broadcast $norelease $dhcpopts From 18d516a649175a91d334e584fac51e64ff8dd9bf Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 Apr 2023 02:24:15 +0200 Subject: [PATCH 24/24] libnl-tiny: update to the latest version f5d9b7e libnl-tiny: fix duplicated branch in family.h 11b7c5f attr: add NLA_S* definitions Signed-off-by: Hauke Mehrtens --- package/libs/libnl-tiny/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile index 4f09861ed1e..7239c286fdd 100644 --- a/package/libs/libnl-tiny/Makefile +++ b/package/libs/libnl-tiny/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git -PKG_SOURCE_DATE:=2022-11-01 -PKG_SOURCE_VERSION:=db3b2cdbca5277723326a2720024a59fb821ae36 -PKG_MIRROR_HASH:=f6f9e2cb5366cda3be6d27a6320aa6cf3681c0b10df07b29ab4e4005e9f04f1c +PKG_SOURCE_DATE:=2023-04-02 +PKG_SOURCE_VERSION:=11b7c5f0745af2637b48131287f28689bb80ed3e +PKG_MIRROR_HASH:=9bcae026ad1fde81865ea113d24bbc70c2bd1945655d51cd00181c41b70570d2 CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1