diff --git a/README.md b/README.md index c6e97118a8..804657b1f8 100644 --- a/README.md +++ b/README.md @@ -48,15 +48,15 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens ``` Note: - - For the for love of god please do __not__ use ROOT user to build your image. + - Do everything as an unprivileged user, not root, without sudo. - Using CPUs based on other architectures should be fine to compile ImmortalWrt, but more hacks are needed - No warranty at all. - - You must __not__ have spaces in PATH or in the work folders on the drive. + - You must __not__ have spaces or non-ascii characters in PATH or in the work folders on the drive. - If you're using Windows Subsystem for Linux (or WSL), removing Windows folders from PATH is required, please see [Build system setup WSL](https://openwrt.org/docs/guide-developer/build-system/wsl) documentation. - Using macOS as the host build OS is __not__ recommended. No warranty at all. You can get tips from [Build system setup macOS](https://openwrt.org/docs/guide-developer/build-system/buildroot.exigence.macosx) documentation. - For more details, please see [Build system setup](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) documentation. ### Quickstart - 1. Run `git clone -b --single-branch https://github.com/immortalwrt/immortalwrt` to clone the source code. + 1. Run `git clone -b --single-branch --filter=blob:none https://github.com/immortalwrt/immortalwrt` to clone the source code. 2. Run `cd immortalwrt` to enter source directory. 3. Run `./scripts/feeds update -a` to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default 4. Run `./scripts/feeds install -a` to install symlinks for all obtained packages into package/feeds/ diff --git a/include/download.mk b/include/download.mk index 99a3e0140d..8e4dd3158c 100644 --- a/include/download.mk +++ b/include/download.mk @@ -203,7 +203,7 @@ define DownloadMethod/rawgit cd $(TMP_DIR)/dl && \ rm -rf $(SUBDIR) && \ [ \! -d $(SUBDIR) ] && \ - git clone $(OPTS) $(URL) $(SUBDIR) && \ + git clone --filter=blob:none $(OPTS) $(URL) $(SUBDIR) && \ (cd $(SUBDIR) && git checkout $(VERSION) && \ git submodule update --init --recursive) && \ echo "Packing checkout..." && \ diff --git a/include/image-commands.mk b/include/image-commands.mk index f5df8b7a0d..201bb70d7d 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -339,6 +339,13 @@ define Build/qemu-image fi endef +define Build/qsdk-ipq-factory-mmc + $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \ + $@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS) + PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + @mv $@.new $@ +endef + define Build/qsdk-ipq-factory-nand $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \ $@.its ubi $@ diff --git a/include/kernel-5.4 b/include/kernel-5.4 index a31315270a..dbfc8efbd1 100644 --- a/include/kernel-5.4 +++ b/include/kernel-5.4 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.4 = .238 -LINUX_KERNEL_HASH-5.4.238 = 70a2b2da85598eba6a73cdc0749e441cbdf3011d9babcb7028a46aa8d98aa91f +LINUX_VERSION-5.4 = .248 +LINUX_KERNEL_HASH-5.4.248 = 3abed132e76c6575733acba39eaa54f6d8f4b1dc951b0e601a33959743b13e35 diff --git a/package/Makefile b/package/Makefile index 209be34674..4b8df7f484 100644 --- a/package/Makefile +++ b/package/Makefile @@ -92,6 +92,10 @@ $(curdir)/index: FORCE $(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \ { echo ""; echo ""; } >> Packages;; \ esac; \ + echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \ + sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \ + echo '}}' >> index.json; \ + sed -i 's/, }}/}}/' index.json; \ gzip -9nc Packages > Packages.gz; \ ); done ifdef CONFIG_SIGNED_PACKAGES diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 522ac082ff..a2d967a83f 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -49,6 +49,7 @@ generate_static_network() { uci -q batch <<-EOF delete network.globals set network.globals='globals' + set network.globals.ula_prefix='auto' EOF } diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index e1bd2772b0..277c6ba791 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -72,6 +72,18 @@ define U-Boot/orangepi-r1-plus-lts-rk3328 USE_RKBIN:=1 endef +define U-Boot/roc-cc-rk3328 + BUILD_SUBTARGET:=armv8 + NAME:=ROC-RK3328-CC + BUILD_DEVICES:= \ + firefly_roc-rk3328-cc + DEPENDS:=+PACKAGE_u-boot-roc-cc-rk3328:arm-trusted-firmware-rk3328 + PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor + ATF:=rk322xh_bl31_v1.46.elf + OF_PLATDATA:=$(1) + USE_RKBIN:=1 +endef + # RK3399 boards @@ -86,6 +98,17 @@ define U-Boot/nanopi-r4s-rk3399 USE_RKBIN:=1 endef +define U-Boot/nanopi-r4se-rk3399 + BUILD_SUBTARGET:=armv8 + NAME:=NanoPi R4SE + BUILD_DEVICES:= \ + friendlyarm_nanopi-r4se + DEPENDS:=+PACKAGE_u-boot-nanopi-r4se-rk3399:arm-trusted-firmware-rk3399 + PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor + ATF:=rk3399_bl31_v1.35.elf + USE_RKBIN:=1 +endef + define U-Boot/rock-pi-4-rk3399 BUILD_SUBTARGET:=armv8 NAME:=Rock Pi 4 @@ -108,12 +131,14 @@ endef UBOOT_TARGETS := \ nanopi-r4s-rk3399 \ + nanopi-r4se-rk3399 \ rock-pi-4-rk3399 \ rockpro64-rk3399 \ nanopi-r2c-rk3328 \ nanopi-r2s-rk3328 \ orangepi-r1-plus-rk3328 \ - orangepi-r1-plus-lts-rk3328 + orangepi-r1-plus-lts-rk3328 \ + roc-cc-rk3328 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes diff --git a/package/boot/uboot-rockchip/patches/101-rock64pro-disable-CONFIG_USE_PREBOOT.patch b/package/boot/uboot-rockchip/patches/101-rock64pro-disable-CONFIG_USE_PREBOOT.patch index f630818358..174c9ea29c 100644 --- a/package/boot/uboot-rockchip/patches/101-rock64pro-disable-CONFIG_USE_PREBOOT.patch +++ b/package/boot/uboot-rockchip/patches/101-rock64pro-disable-CONFIG_USE_PREBOOT.patch @@ -17,9 +17,9 @@ Signed-off-by: Marty Jones --- a/configs/rockpro64-rk3399_defconfig +++ b/configs/rockpro64-rk3399_defconfig -@@ -12,7 +12,6 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y +@@ -12,7 +12,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y - CONFIG_DEFAULT_DEVICE_TREE="rk3399-rockpro64" CONFIG_DEBUG_UART=y -CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb" diff --git a/package/boot/uboot-rockchip/patches/200-rockchip-rk3328-Add-support-for-Orangepi-R1-Plus.patch b/package/boot/uboot-rockchip/patches/200-rockchip-rk3328-Add-support-for-Orangepi-R1-Plus.patch index de94544e15..32fc939f72 100644 --- a/package/boot/uboot-rockchip/patches/200-rockchip-rk3328-Add-support-for-Orangepi-R1-Plus.patch +++ b/package/boot/uboot-rockchip/patches/200-rockchip-rk3328-Add-support-for-Orangepi-R1-Plus.patch @@ -10,7 +10,7 @@ rk3328-rock-pi-e.dtb --- /dev/null +++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi -@@ -0,0 +1,1 @@ +@@ -0,0 +1 @@ +#include "rk3328-nanopi-r2s-u-boot.dtsi" --- /dev/null +++ b/arch/arm/dts/rk3328-orangepi-r1-plus.dts @@ -55,7 +55,7 @@ +}; --- a/board/rockchip/evb_rk3328/MAINTAINERS +++ b/board/rockchip/evb_rk3328/MAINTAINERS -@@ -12,6 +12,13 @@ F: configs/nanopi-r2s-rk3328_defconfig +@@ -12,6 +12,13 @@ F: configs/nanopi-r2s-rk3328_defcon F: arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi F: arch/arm/dts/rk3328-nanopi-r2s.dts diff --git a/package/boot/uboot-rockchip/patches/201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch b/package/boot/uboot-rockchip/patches/201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch index 2e3dc1740d..d757d2ac3b 100644 --- a/package/boot/uboot-rockchip/patches/201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch +++ b/package/boot/uboot-rockchip/patches/201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch @@ -1,5 +1,3 @@ -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index d3e89ca3ba..d5f64ac432 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -108,6 +108,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \ @@ -10,9 +8,6 @@ index d3e89ca3ba..d5f64ac432 100644 rk3328-nanopi-r2s.dtb \ rk3328-orangepi-r1-plus.dtb \ rk3328-roc-cc.dtb \ -diff --git a/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi -new file mode 100644 -index 0000000000..c2e86d0f0e --- /dev/null +++ b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi @@ -0,0 +1,7 @@ @@ -23,9 +18,6 @@ index 0000000000..c2e86d0f0e + */ + +#include "rk3328-nanopi-r2s-u-boot.dtsi" -diff --git a/arch/arm/dts/rk3328-nanopi-r2c.dts b/arch/arm/dts/rk3328-nanopi-r2c.dts -new file mode 100644 -index 0000000000..adf91a0306 --- /dev/null +++ b/arch/arm/dts/rk3328-nanopi-r2c.dts @@ -0,0 +1,47 @@ @@ -76,9 +68,6 @@ index 0000000000..adf91a0306 +&wan_led { + label = "nanopi-r2c:green:wan"; +}; -diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig -new file mode 100644 -index 0000000000..7bc7a3274f --- /dev/null +++ b/configs/nanopi-r2c-rk3328_defconfig @@ -0,0 +1,98 @@ diff --git a/package/boot/uboot-rockchip/patches/203-rockchip-rk3399-Add-support-for-FriendlyARM-NanoPi-R.patch b/package/boot/uboot-rockchip/patches/203-rockchip-rk3399-Add-support-for-FriendlyARM-NanoPi-R.patch new file mode 100644 index 0000000000..54928de906 --- /dev/null +++ b/package/boot/uboot-rockchip/patches/203-rockchip-rk3399-Add-support-for-FriendlyARM-NanoPi-R.patch @@ -0,0 +1,101 @@ +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -137,6 +137,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ + rk3399-nanopi-m4b.dtb \ + rk3399-nanopi-neo4.dtb \ + rk3399-nanopi-r4s.dtb \ ++ rk3399-nanopi-r4se.dtb \ + rk3399-orangepi.dtb \ + rk3399-pinebook-pro.dtb \ + rk3399-puma-haikou.dtb \ +--- /dev/null ++++ b/arch/arm/dts/rk3399-nanopi-r4se-u-boot.dtsi +@@ -0,0 +1,3 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "rk3399-nanopi-r4s-u-boot.dtsi" +--- /dev/null ++++ b/arch/arm/dts/rk3399-nanopi-r4se.dts +@@ -0,0 +1,17 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT) ++ ++/dts-v1/; ++#include "rk3399-nanopi-r4s.dts" ++ ++/ { ++ model = "FriendlyElec NanoPi R4SE"; ++ compatible = "friendlyarm,nanopi-r4se", "rockchip,rk3399"; ++}; ++ ++&emmc_phy { ++ status = "okay"; ++}; ++ ++&sdhci { ++ status = "okay"; ++}; +--- /dev/null ++++ b/configs/nanopi-r4se-rk3399_defconfig +@@ -0,0 +1,62 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_ROCKCHIP=y ++CONFIG_SYS_TEXT_BASE=0x00200000 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_ENV_OFFSET=0x3F8000 ++CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4se" ++CONFIG_ROCKCHIP_RK3399=y ++CONFIG_TARGET_EVB_RK3399=y ++CONFIG_DEBUG_UART_BASE=0xFF1A0000 ++CONFIG_DEBUG_UART_CLOCK=24000000 ++CONFIG_DEBUG_UART=y ++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-r4se.dtb" ++CONFIG_DISPLAY_BOARDINFO_LATE=y ++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set ++CONFIG_SPL_STACK_R=y ++CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 ++CONFIG_TPL=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_USB=y ++# CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_TIME=y ++CONFIG_SPL_OF_CONTROL=y ++CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_ROCKCHIP_GPIO=y ++CONFIG_SYS_I2C_ROCKCHIP=y ++CONFIG_MMC_DW=y ++CONFIG_MMC_DW_ROCKCHIP=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_ROCKCHIP=y ++CONFIG_DM_ETH=y ++CONFIG_ETH_DESIGNWARE=y ++CONFIG_GMAC_ROCKCHIP=y ++CONFIG_PMIC_RK8XX=y ++CONFIG_REGULATOR_PWM=y ++CONFIG_REGULATOR_RK8XX=y ++CONFIG_PWM_ROCKCHIP=y ++CONFIG_RAM_RK3399_LPDDR4=y ++CONFIG_BAUDRATE=1500000 ++CONFIG_DEBUG_UART_SHIFT=2 ++CONFIG_SYSRESET=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_DWC3=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_GENERIC=y ++CONFIG_USB_KEYBOARD=y ++CONFIG_USB_HOST_ETHER=y ++CONFIG_USB_ETHER_ASIX=y ++CONFIG_USB_ETHER_ASIX88179=y ++CONFIG_USB_ETHER_MCS7830=y ++CONFIG_USB_ETHER_RTL8152=y ++CONFIG_USB_ETHER_SMSC95XX=y ++CONFIG_DM_VIDEO=y ++CONFIG_DISPLAY=y ++CONFIG_VIDEO_ROCKCHIP=y ++CONFIG_DISPLAY_ROCKCHIP_HDMI=y ++CONFIG_SPL_TINY_MEMSET=y ++CONFIG_ERRNO_STR=y diff --git a/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-decl.h b/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-decl.h new file mode 100644 index 0000000000..72675609cd --- /dev/null +++ b/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-decl.h @@ -0,0 +1,24 @@ +/* + * DO NOT MODIFY + * + * Declares externs for all device/uclass instances. + * This was generated by dtoc from a .dtb (device tree binary) file. + */ + +#include +#include + +/* driver declarations - these allow DM_DRIVER_GET() to be used */ +extern U_BOOT_DRIVER(rockchip_rk3328_cru); +extern U_BOOT_DRIVER(rockchip_rk3328_dmc); +extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc); +extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc); +extern U_BOOT_DRIVER(ns16550_serial); +extern U_BOOT_DRIVER(rockchip_rk3328_grf); + +/* uclass driver declarations - needed for DM_UCLASS_DRIVER_REF() */ +extern UCLASS_DRIVER(clk); +extern UCLASS_DRIVER(mmc); +extern UCLASS_DRIVER(ram); +extern UCLASS_DRIVER(serial); +extern UCLASS_DRIVER(syscon); diff --git a/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-plat.c b/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-plat.c new file mode 100644 index 0000000000..aa03298e58 --- /dev/null +++ b/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-plat.c @@ -0,0 +1,189 @@ +/* + * DO NOT MODIFY + * + * Declares the U_BOOT_DRIVER() records and platform data. + * This was generated by dtoc from a .dtb (device tree binary) file. + */ + +/* Allow use of U_BOOT_DRVINFO() in this file */ +#define DT_PLAT_C + +#include +#include +#include + +/* + * driver_info declarations, ordered by 'struct driver_info' linker_list idx: + * + * idx driver_info driver + * --- -------------------- -------------------- + * 0: clock_controller_at_ff440000 rockchip_rk3328_cru + * 1: dmc rockchip_rk3328_dmc + * 2: mmc_at_ff500000 rockchip_rk3288_dw_mshc + * 3: mmc_at_ff520000 rockchip_rk3288_dw_mshc + * 4: serial_at_ff130000 ns16550_serial + * 5: syscon_at_ff100000 rockchip_rk3328_grf + * --- -------------------- -------------------- + */ + +/* + * Node /clock-controller@ff440000 index 0 + * driver rockchip_rk3328_cru parent None + */ +static struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = { + .reg = {0xff440000, 0x1000}, + .rockchip_grf = 0x3a, +}; +U_BOOT_DRVINFO(clock_controller_at_ff440000) = { + .name = "rockchip_rk3328_cru", + .plat = &dtv_clock_controller_at_ff440000, + .plat_size = sizeof(dtv_clock_controller_at_ff440000), + .parent_idx = -1, +}; + +/* + * Node /dmc index 1 + * driver rockchip_rk3328_dmc parent None + */ +static struct dtd_rockchip_rk3328_dmc dtv_dmc = { + .reg = {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000, + 0xff720000, 0x1000, 0xff798000, 0x1000}, + .rockchip_sdram_params = {0x1, 0xa, 0x2, 0x1, 0x0, 0x0, 0x11, 0x0, + 0x11, 0x0, 0x0, 0x94291288, 0x0, 0x27, 0x462, 0x15, + 0x242, 0xff, 0x14d, 0x0, 0x1, 0x0, 0x0, 0x0, + 0x43049010, 0x64, 0x28003b, 0xd0, 0x20053, 0xd4, 0x220000, 0xd8, + 0x100, 0xdc, 0x40000, 0xe0, 0x0, 0xe4, 0x110000, 0xe8, + 0x420, 0xec, 0x400, 0xf4, 0xf011f, 0x100, 0x9060b06, 0x104, + 0x20209, 0x108, 0x505040a, 0x10c, 0x40400c, 0x110, 0x5030206, 0x114, + 0x3030202, 0x120, 0x3030b03, 0x124, 0x20208, 0x180, 0x1000040, 0x184, + 0x0, 0x190, 0x7030003, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240, + 0x6000604, 0x244, 0x201, 0x250, 0xf00, 0x490, 0x1, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xc, 0x28, 0xa, 0x2c, + 0x0, 0x30, 0x9, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79, + 0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87, + 0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78, + 0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77, + 0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77, + 0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, + 0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9, + 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, + 0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77, + 0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78, + 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69, + 0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x79, 0x9}, +}; +U_BOOT_DRVINFO(dmc) = { + .name = "rockchip_rk3328_dmc", + .plat = &dtv_dmc, + .plat_size = sizeof(dtv_dmc), + .parent_idx = -1, +}; + +/* + * Node /mmc@ff500000 index 2 + * driver rockchip_rk3288_dw_mshc parent None + */ +static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff500000 = { + .bus_width = 0x4, + .cap_mmc_highspeed = true, + .cap_sd_highspeed = true, + .clocks = { + {0, {317}}, + {0, {33}}, + {0, {74}}, + {0, {78}},}, + .disable_wp = true, + .fifo_depth = 0x100, + .interrupts = {0x0, 0xc, 0x4}, + .max_frequency = 0x8f0d180, + .pinctrl_0 = {0x47, 0x48, 0x49, 0x4a}, + .pinctrl_names = "default", + .reg = {0xff500000, 0x4000}, + .sd_uhs_sdr104 = true, + .sd_uhs_sdr12 = true, + .sd_uhs_sdr25 = true, + .sd_uhs_sdr50 = true, + .u_boot_spl_fifo_mode = true, + .vmmc_supply = 0x4b, + .vqmmc_supply = 0x1e, +}; +U_BOOT_DRVINFO(mmc_at_ff500000) = { + .name = "rockchip_rk3288_dw_mshc", + .plat = &dtv_mmc_at_ff500000, + .plat_size = sizeof(dtv_mmc_at_ff500000), + .parent_idx = -1, +}; + +/* + * Node /mmc@ff520000 index 3 + * driver rockchip_rk3288_dw_mshc parent None + */ +static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff520000 = { + .bus_width = 0x8, + .cap_mmc_highspeed = true, + .clocks = { + {0, {319}}, + {0, {35}}, + {0, {76}}, + {0, {80}},}, + .fifo_depth = 0x100, + .interrupts = {0x0, 0xe, 0x4}, + .max_frequency = 0x8f0d180, + .mmc_ddr_1_8v = true, + .mmc_hs200_1_8v = true, + .non_removable = true, + .pinctrl_0 = {0x4c, 0x4d, 0x4e, 0x0}, + .pinctrl_names = "default", + .reg = {0xff520000, 0x4000}, + .u_boot_spl_fifo_mode = true, + .vmmc_supply = 0x1c, + .vqmmc_supply = 0x1d, +}; +U_BOOT_DRVINFO(mmc_at_ff520000) = { + .name = "rockchip_rk3288_dw_mshc", + .plat = &dtv_mmc_at_ff520000, + .plat_size = sizeof(dtv_mmc_at_ff520000), + .parent_idx = -1, +}; + +/* + * Node /serial@ff130000 index 4 + * driver ns16550_serial parent None + */ +static struct dtd_ns16550_serial dtv_serial_at_ff130000 = { + .clock_frequency = 0x16e3600, + .clocks = { + {0, {40}}, + {0, {212}},}, + .dma_names = {"tx", "rx"}, + .dmas = {0x10, 0x6, 0x10, 0x7}, + .interrupts = {0x0, 0x39, 0x4}, + .pinctrl_0 = 0x26, + .pinctrl_names = "default", + .reg = {0xff130000, 0x100}, + .reg_io_width = 0x4, + .reg_shift = 0x2, +}; +U_BOOT_DRVINFO(serial_at_ff130000) = { + .name = "ns16550_serial", + .plat = &dtv_serial_at_ff130000, + .plat_size = sizeof(dtv_serial_at_ff130000), + .parent_idx = -1, +}; + +/* + * Node /syscon@ff100000 index 5 + * driver rockchip_rk3328_grf parent None + */ +static struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = { + .reg = {0xff100000, 0x1000}, +}; +U_BOOT_DRVINFO(syscon_at_ff100000) = { + .name = "rockchip_rk3328_grf", + .plat = &dtv_syscon_at_ff100000, + .plat_size = sizeof(dtv_syscon_at_ff100000), + .parent_idx = -1, +}; + diff --git a/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-structs-gen.h b/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-structs-gen.h new file mode 100644 index 0000000000..5b729fc57f --- /dev/null +++ b/package/boot/uboot-rockchip/src/of-platdata/roc-cc-rk3328/dt-structs-gen.h @@ -0,0 +1,55 @@ +/* + * DO NOT MODIFY + * + * Defines the structs used to hold devicetree data. + * This was generated by dtoc from a .dtb (device tree binary) file. + */ + +#include +#include +struct dtd_ns16550_serial { + fdt32_t clock_frequency; + struct phandle_1_arg clocks[2]; + const char * dma_names[2]; + fdt32_t dmas[4]; + fdt32_t interrupts[3]; + fdt32_t pinctrl_0; + const char * pinctrl_names; + fdt64_t reg[2]; + fdt32_t reg_io_width; + fdt32_t reg_shift; +}; +struct dtd_rockchip_rk3288_dw_mshc { + fdt32_t bus_width; + bool cap_mmc_highspeed; + bool cap_sd_highspeed; + struct phandle_1_arg clocks[4]; + bool disable_wp; + fdt32_t fifo_depth; + fdt32_t interrupts[3]; + fdt32_t max_frequency; + bool mmc_ddr_1_8v; + bool mmc_hs200_1_8v; + bool non_removable; + fdt32_t pinctrl_0[4]; + const char * pinctrl_names; + fdt64_t reg[2]; + bool sd_uhs_sdr104; + bool sd_uhs_sdr12; + bool sd_uhs_sdr25; + bool sd_uhs_sdr50; + bool u_boot_spl_fifo_mode; + fdt32_t vmmc_supply; + fdt32_t vqmmc_supply; +}; +struct dtd_rockchip_rk3328_cru { + fdt64_t reg[2]; + fdt32_t rockchip_grf; +}; +struct dtd_rockchip_rk3328_dmc { + fdt64_t reg[12]; + fdt32_t rockchip_sdram_params[196]; +}; +struct dtd_rockchip_rk3328_grf { + fdt64_t reg[2]; +}; diff --git a/package/emortal/autocore/Makefile b/package/emortal/autocore/Makefile index e35d2179a9..8a0a444e7c 100644 --- a/package/emortal/autocore/Makefile +++ b/package/emortal/autocore/Makefile @@ -48,7 +48,7 @@ define Package/autocore/install/Default $(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d $(CP) ./files/generic/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/ -ifeq ($(filter mediatek%, $(TARGETID)),) +ifeq ($(filter ipq%, $(TARGETID)),) $(INSTALL_BIN) ./files/generic/ethinfo $(1)/sbin/ $(INSTALL_DIR) $(1)/www/luci-static/resources/view/status/include diff --git a/package/emortal/automount/Makefile b/package/emortal/automount/Makefile index bf139ae216..d444ffdcde 100644 --- a/package/emortal/automount/Makefile +++ b/package/emortal/automount/Makefile @@ -20,6 +20,7 @@ define Package/automount MAINTAINER:=Lean DEPENDS:= \ +block-mount \ + +e2fsprogs \ +kmod-usb-storage \ +kmod-usb-storage-extras \ +!TARGET_ramips:kmod-usb-storage-uas \ diff --git a/package/emortal/default-settings/Makefile b/package/emortal/default-settings/Makefile index 492767ad48..16398e16bc 100644 --- a/package/emortal/default-settings/Makefile +++ b/package/emortal/default-settings/Makefile @@ -22,6 +22,7 @@ define Package/default-settings SECTION:=luci CATEGORY:=LuCI TITLE:=LuCI support for Default Settings + DEPENDS:=+luci PKGARCH:=all DEPENDS:=+luci-lib-base endef @@ -29,7 +30,7 @@ endef define Package/default-settings-chn $(Package/default-settings) TITLE+= (Optimize for CHN users) - DEPENDS:=+default-settings +@LUCI_LANG_zh_Hans + DEPENDS:=+default-settings +@LUCI_LANG_zh_Hans +luci-i18n-base-zh-cn endef define Build/Compile diff --git a/package/firmware/linux-firmware/intel.mk b/package/firmware/linux-firmware/intel.mk index 923701c703..968c61f64c 100644 --- a/package/firmware/linux-firmware/intel.mk +++ b/package/firmware/linux-firmware/intel.mk @@ -7,6 +7,13 @@ define Package/ibt-firmware/install endef $(eval $(call BuildPackage,ibt-firmware)) +Package/iwlwifi-firmware-ax200 = $(call Package/firmware-default,Intel AX200 firmware) +define Package/iwlwifi-firmware-ax200/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-cc-a0-62.ucode $(1)/lib/firmware +endef +$(eval $(call BuildPackage,iwlwifi-firmware-ax200)) + Package/iwl3945-firmware = $(call Package/firmware-default,Intel IWL3945 firmware) define Package/iwl3945-firmware/install $(INSTALL_DIR) $(1)/lib/firmware diff --git a/package/kernel/ice/Makefile b/package/kernel/ice/Makefile new file mode 100644 index 0000000000..1b17b7640f --- /dev/null +++ b/package/kernel/ice/Makefile @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2023 ImmortalWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=ice +PKG_VERSION:=1.11.14 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/e1000/ice%20stable/$(PKG_VERSION)/ +PKG_HASH:=6419424dd82163d5965f646ec5c826c6706d93e6d3b5c33e2a4f8cef9070a812 + +PKG_MAINTAINER:=Tianling Shen +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/ice-vendor + SUBMENU:=Network Devices + TITLE:=Intel(R) Ethernet Controller E810 Family support (vendor driver) + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DEPENDS:=@PCI_SUPPORT +kmod-ptp @TARGET_x86 + CONFLICTS:=kmod-ice + FILES:=$(PKG_BUILD_DIR)/src/ice.ko + AUTOLOAD:=$(call AutoProbe,ice) +endef + +define KernelPackage/ice-vendor/description + Kernel modules for Intel(R) Ethernet Controller E810 Series +endef + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M=$(PKG_BUILD_DIR)/src \ + modules +endef + +$(eval $(call KernelPackage,ice-vendor)) diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index 0d20ba2ea9..695e2329a9 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef CONFIG_XFRM #include #endif @@ -199,7 +200,12 @@ static inline void mailbox_aal_rx_handler(void); static irqreturn_t mailbox_irq_handler(int, void *); static inline void mailbox_signal(unsigned int, int); static void do_ppe_tasklet(unsigned long); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \ + !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235)) +DECLARE_TASKLET(g_dma_tasklet, do_ppe_tasklet, 0); +#else DECLARE_TASKLET_OLD(g_dma_tasklet, do_ppe_tasklet); +#endif /* * QSB & HTU setting functions diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c index 18c715a290..5ee966c014 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c @@ -127,7 +127,11 @@ static int ptm_stop(struct net_device *); static int ptm_napi_poll(struct napi_struct *, int); static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *); static int ptm_ioctl(struct net_device *, struct ifreq *, int); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *); +#else +static void ptm_tx_timeout(struct net_device *, unsigned int txqueue); +#endif /* * DSL Data LED @@ -511,7 +515,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *dev) +#else +static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue) +#endif { int ndev; diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index 70ba557e2a..f13908db62 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -77,7 +77,11 @@ static int ptm_stop(struct net_device *); static int ptm_napi_poll(struct napi_struct *, int); static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *); static int ptm_ioctl(struct net_device *, struct ifreq *, int); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *); +#else +static void ptm_tx_timeout(struct net_device *, unsigned int txqueue); +#endif static inline struct sk_buff* alloc_skb_rx(void); static inline struct sk_buff* alloc_skb_tx(unsigned int); @@ -125,7 +129,12 @@ static char *g_net_dev_name[1] = {"dsl0"}; static int g_ptm_prio_queue_map[8]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \ + !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235)) +static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0); +#else static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet); +#endif unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR; @@ -451,7 +460,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *dev) +#else +static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue) +#endif { ASSERT(dev == g_net_dev[0], "incorrect device"); diff --git a/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch index 1318e71e3f..9c012301de 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch @@ -1,11 +1,51 @@ +--- a/src/drv_tapi_linux.c ++++ b/src/drv_tapi_linux.c +@@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX + */ + static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) + struct sched_param sched_params; +- + sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH; + sched_setscheduler(current, SCHED_FIFO, &sched_params); ++#else ++ sched_set_fifo_low(current); ++#endif + } + #endif /* LINUX_2_6 */ + +@@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F + */ + IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority) + { ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)) + struct sched_param sched_params; + IFX_int32_t ret; + +@@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify + } + + return (ret < 0) ? IFX_ERROR : IFX_SUCCESS; ++#else ++ sched_set_fifo_low(current); ++ return IFX_SUCCESS; ++#endif + } + + --- a/src/drv_tapi_kpi.c +++ b/src/drv_tapi_kpi.c -@@ -134,7 +134,7 @@ extern IFX_int32_t block_ingre +@@ -134,7 +134,12 @@ extern IFX_int32_t block_ingre /* ========================================================================== */ static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo); #ifdef KPI_TASKLET --DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \ ++ !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235)) + DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L); ++#else +DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler); ++#endif #endif /* KPI_TASKLET */ static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread); static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup); diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 975d639816..ebfac1490a 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -744,6 +744,22 @@ endef $(eval $(call KernelPackage,iavf)) +define KernelPackage/ice + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Intel(R) Ethernet Controller E810 Series support + DEPENDS:=@PCI_SUPPORT +kmod-ptp + KCONFIG:=CONFIG_ICE + FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ice/ice.ko + AUTOLOAD:=$(call AutoProbe,ice) +endef + +define KernelPackage/ice/description + Kernel modules for Intel(R) Ethernet Controller E810 Series +endef + +$(eval $(call KernelPackage,ice)) + + define KernelPackage/b44 TITLE:=Broadcom 44xx driver KCONFIG:=CONFIG_B44 @@ -1180,12 +1196,13 @@ define KernelPackage/mlx5-core CONFIG_MLX5_EN_IPSEC=n \ CONFIG_MLX5_EN_RXNFC=y \ CONFIG_MLX5_EN_TLS=n \ - CONFIG_MLX5_ESWITCH=n \ + CONFIG_MLX5_ESWITCH=y \ CONFIG_MLX5_FPGA=n \ CONFIG_MLX5_FPGA_IPSEC=n \ CONFIG_MLX5_FPGA_TLS=n \ CONFIG_MLX5_MPFS=y \ CONFIG_MLX5_SW_STEERING=n \ + CONFIG_MLX5_CLS_ACT=n \ CONFIG_MLX5_TC_CT=n \ CONFIG_MLX5_TLS=n AUTOLOAD:=$(call AutoProbe,mlx5_core) @@ -1198,6 +1215,50 @@ endef $(eval $(call KernelPackage,mlx5-core)) +define KernelPackage/qlcnic + SUBMENU:=$(NETWORK_DEVICES_MENU) + DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core + TITLE:=QLogic QLE8240 and QLE8242 device support + KCONFIG:= \ + CONFIG_QLCNIC \ + CONFIG_QLCNIC_HWMON=y \ + CONFIG_QLCNIC_SRIOV=y + FILES:=$(LINUX_DIR)/drivers/net/ethernet/qlogic/qlcnic/qlcnic.ko + AUTOLOAD:=$(call AutoProbe,qlcnic) +endef + +define KernelPackage/qlcnic/description + This driver supports QLogic QLE8240 and QLE8242 Converged Ethernet + devices. +endef + +$(eval $(call KernelPackage,qlcnic)) + + +define KernelPackage/qede + SUBMENU:=$(NETWORK_DEVICES_MENU) + DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-lib-crc8 +kmod-lib-zlib-inflate + TITLE:=QLogic FastLinQ 10/25/40/100Gb Ethernet NIC device support + KCONFIG:= \ + CONFIG_QED \ + CONFIG_QED_SRIOV=y \ + CONFIG_QEDE \ + CONFIG_QEDF=n \ + CONFIG_QEDI=n + FILES:= \ + $(LINUX_DIR)/drivers/net/ethernet/qlogic/qed/qed.ko \ + $(LINUX_DIR)/drivers/net/ethernet/qlogic/qede/qede.ko + AUTOLOAD:=$(call AutoProbe,qed qede) +endef + +define KernelPackage/qede/description + This driver supports QLogic FastLinQ 25/40/100Gb Ethernet NIC + devices. +endef + +$(eval $(call KernelPackage,qede)) + + define KernelPackage/sfp SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=SFP cage support diff --git a/package/kernel/mac80211/patches/subsys/347-wifi-ieee80211-correctly-mark-FTM-frames-non-buffera.patch b/package/kernel/mac80211/patches/subsys/347-wifi-ieee80211-correctly-mark-FTM-frames-non-buffera.patch new file mode 100644 index 0000000000..ac707de53e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/347-wifi-ieee80211-correctly-mark-FTM-frames-non-buffera.patch @@ -0,0 +1,134 @@ +From: Johannes Berg +Date: Wed, 29 Mar 2023 16:46:26 +0200 +Subject: [PATCH] wifi: ieee80211: correctly mark FTM frames non-bufferable + +The checks of whether or not a frame is bufferable were not +taking into account that some action frames aren't, such as +FTM. Check this, which requires some changes to the function +ieee80211_is_bufferable_mmpdu() since we need the whole skb +for the checks now. + +Signed-off-by: Johannes Berg +Reviewed-by: Greenman, Gregory +Reviewed-by: Peer, Ilan +--- + +--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +@@ -551,8 +551,9 @@ static void iwl_mvm_skb_prepare_status(s + + static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm, + struct ieee80211_tx_info *info, +- struct ieee80211_hdr *hdr) ++ struct sk_buff *skb) + { ++ struct ieee80211_hdr *hdr = (void *)skb->data; + struct iwl_mvm_vif *mvmvif = + iwl_mvm_vif_from_mac80211(info->control.vif); + __le16 fc = hdr->frame_control; +@@ -571,7 +572,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st + * reason 7 ("Class 3 frame received from nonassociated STA"). + */ + if (ieee80211_is_mgmt(fc) && +- (!ieee80211_is_bufferable_mmpdu(fc) || ++ (!ieee80211_is_bufferable_mmpdu(skb) || + ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc))) + return mvm->probe_queue; + +@@ -689,7 +690,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv + else + sta_id = mvmvif->mcast_sta.sta_id; + +- queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info, hdr); ++ queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info, skb); + } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { + queue = mvm->snif_queue; + sta_id = mvm->snif_sta.sta_id; +--- a/include/linux/ieee80211.h ++++ b/include/linux/ieee80211.h +@@ -738,20 +738,6 @@ static inline bool ieee80211_is_any_null + } + + /** +- * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU +- * @fc: frame control field in little-endian byteorder +- */ +-static inline bool ieee80211_is_bufferable_mmpdu(__le16 fc) +-{ +- /* IEEE 802.11-2012, definition of "bufferable management frame"; +- * note that this ignores the IBSS special case. */ +- return ieee80211_is_mgmt(fc) && +- (ieee80211_is_action(fc) || +- ieee80211_is_disassoc(fc) || +- ieee80211_is_deauth(fc)); +-} +- +-/** + * ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set + * @seq_ctrl: frame sequence control bytes in little-endian byteorder + */ +@@ -3672,6 +3658,44 @@ static inline u8 *ieee80211_get_DA(struc + } + + /** ++ * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU ++ * @skb: the skb to check, starting with the 802.11 header ++ */ ++static inline bool ieee80211_is_bufferable_mmpdu(struct sk_buff *skb) ++{ ++ struct ieee80211_mgmt *mgmt = (void *)skb->data; ++ __le16 fc = mgmt->frame_control; ++ ++ /* ++ * IEEE 802.11 REVme D2.0 definition of bufferable MMPDU; ++ * note that this ignores the IBSS special case. ++ */ ++ if (!ieee80211_is_mgmt(fc)) ++ return false; ++ ++ if (ieee80211_is_disassoc(fc) || ieee80211_is_deauth(fc)) ++ return true; ++ ++ if (!ieee80211_is_action(fc)) ++ return false; ++ ++ if (skb->len < offsetofend(typeof(*mgmt), u.action.u.ftm.action_code)) ++ return true; ++ ++ /* action frame - additionally check for non-bufferable FTM */ ++ ++ if (mgmt->u.action.category != WLAN_CATEGORY_PUBLIC && ++ mgmt->u.action.category != WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION) ++ return true; ++ ++ if (mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM_REQUEST || ++ mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM) ++ return false; ++ ++ return true; ++} ++ ++/** + * _ieee80211_is_robust_mgmt_frame - check if frame is a robust management frame + * @hdr: the frame (buffer must include at least the first octet of payload) + */ +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -487,7 +487,7 @@ ieee80211_tx_h_unicast_ps_buf(struct iee + int ac = skb_get_queue_mapping(tx->skb); + + if (ieee80211_is_mgmt(hdr->frame_control) && +- !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) { ++ !ieee80211_is_bufferable_mmpdu(tx->skb)) { + info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER; + return TX_CONTINUE; + } +@@ -1282,7 +1282,7 @@ static struct txq_info *ieee80211_get_tx + if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) && + unlikely(!ieee80211_is_data_present(hdr->frame_control))) { + if ((!ieee80211_is_mgmt(hdr->frame_control) || +- ieee80211_is_bufferable_mmpdu(hdr->frame_control) || ++ ieee80211_is_bufferable_mmpdu(skb) || + vif->type == NL80211_IFTYPE_STATION) && + sta && sta->uploaded) { + /* diff --git a/package/kernel/mac80211/patches/subsys/348-wifi-mac80211-flush-queues-on-STA-removal.patch b/package/kernel/mac80211/patches/subsys/348-wifi-mac80211-flush-queues-on-STA-removal.patch new file mode 100644 index 0000000000..3e148a9d7e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/348-wifi-mac80211-flush-queues-on-STA-removal.patch @@ -0,0 +1,36 @@ +From: Johannes Berg +Date: Mon, 13 Mar 2023 11:42:12 +0100 +Subject: [PATCH] wifi: mac80211: flush queues on STA removal + +When we remove a station, we first make it unreachable, +then we (must) remove its keys, and then remove the +station itself. Depending on the hardware design, if +we have hardware crypto at all, frames still sitting +on hardware queues may then be transmitted without a +valid key, possibly unencrypted or with a fixed key. + +Fix this by flushing the queues when removing stations +so this cannot happen. + +Cc: stable@vger.kernel.org +Signed-off-by: Johannes Berg +Reviewed-by: Greenman, Gregory +--- + +--- a/net/mac80211/sta_info.c ++++ b/net/mac80211/sta_info.c +@@ -1070,6 +1070,14 @@ static void __sta_info_destroy_part2(str + WARN_ON_ONCE(ret); + } + ++ /* Flush queues before removing keys, as that might remove them ++ * from hardware, and then depending on the offload method, any ++ * frames sitting on hardware queues might be sent out without ++ * any encryption at all. ++ */ ++ if (local->ops->set_key) ++ ieee80211_flush_queues(local, sta->sdata, false); ++ + /* now keys can no longer be reached */ + ieee80211_free_sta_keys(local, sta); + diff --git a/package/kernel/mac80211/patches/subsys/349-wifi-iwlwifi-mvm-support-flush-on-AP-interfaces.patch b/package/kernel/mac80211/patches/subsys/349-wifi-iwlwifi-mvm-support-flush-on-AP-interfaces.patch new file mode 100644 index 0000000000..0b070b144e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/349-wifi-iwlwifi-mvm-support-flush-on-AP-interfaces.patch @@ -0,0 +1,34 @@ +From: Johannes Berg +Date: Mon, 13 Mar 2023 12:02:58 +0100 +Subject: [PATCH] wifi: iwlwifi: mvm: support flush on AP interfaces + +Support TX flush on AP interfaces so that we will do a +proper flush for frames on the queue before keys are +removed. + +Signed-off-by: Johannes Berg +Reviewed-by: Greenman, Gregory +--- + +--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +@@ -4817,9 +4817,6 @@ static void iwl_mvm_mac_flush(struct iee + return; + } + +- if (vif->type != NL80211_IFTYPE_STATION) +- return; +- + /* Make sure we're done with the deferred traffic before flushing */ + flush_work(&mvm->add_stream_wk); + +@@ -4837,9 +4834,6 @@ static void iwl_mvm_mac_flush(struct iee + if (mvmsta->vif != vif) + continue; + +- /* make sure only TDLS peers or the AP are flushed */ +- WARN_ON(i != mvmvif->ap_sta_id && !sta->tdls); +- + if (drop) { + if (iwl_mvm_flush_sta(mvm, mvmsta, false)) + IWL_ERR(mvm, "flush request fail\n"); diff --git a/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-add-flush_sta-method.patch b/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-add-flush_sta-method.patch new file mode 100644 index 0000000000..ae2ef8352e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-add-flush_sta-method.patch @@ -0,0 +1,91 @@ +From: Johannes Berg +Date: Mon, 13 Mar 2023 11:53:51 +0100 +Subject: [PATCH] wifi: mac80211: add flush_sta method + +Some drivers like iwlwifi might have per-STA queues, so we +may want to flush/drop just those queues rather than all +when removing a station. Add a separate method for that. + +Signed-off-by: Johannes Berg +Reviewed-by: Greenman, Gregory +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -3688,6 +3688,10 @@ struct ieee80211_prep_tx_info { + * Note that vif can be NULL. + * The callback can sleep. + * ++ * @flush_sta: Flush or drop all pending frames from the hardware queue(s) for ++ * the given station, as it's about to be removed. ++ * The callback can sleep. ++ * + * @channel_switch: Drivers that need (or want) to offload the channel + * switch operation for CSAs received from the AP may implement this + * callback. They must then call ieee80211_chswitch_done() to indicate +@@ -4116,6 +4120,8 @@ struct ieee80211_ops { + #endif + void (*flush)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + u32 queues, bool drop); ++ void (*flush_sta)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ++ struct ieee80211_sta *sta); + void (*channel_switch)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_channel_switch *ch_switch); +--- a/net/mac80211/driver-ops.h ++++ b/net/mac80211/driver-ops.h +@@ -639,6 +639,21 @@ static inline void drv_flush(struct ieee + trace_drv_return_void(local); + } + ++static inline void drv_flush_sta(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ struct sta_info *sta) ++{ ++ might_sleep(); ++ ++ if (sdata && !check_sdata_in_driver(sdata)) ++ return; ++ ++ trace_drv_flush_sta(local, sdata, &sta->sta); ++ if (local->ops->flush_sta) ++ local->ops->flush_sta(&local->hw, &sdata->vif, &sta->sta); ++ trace_drv_return_void(local); ++} ++ + static inline void drv_channel_switch(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct ieee80211_channel_switch *ch_switch) +--- a/net/mac80211/sta_info.c ++++ b/net/mac80211/sta_info.c +@@ -1075,8 +1075,12 @@ static void __sta_info_destroy_part2(str + * frames sitting on hardware queues might be sent out without + * any encryption at all. + */ +- if (local->ops->set_key) +- ieee80211_flush_queues(local, sta->sdata, false); ++ if (local->ops->set_key) { ++ if (local->ops->flush_sta) ++ drv_flush_sta(local, sta->sdata, sta); ++ else ++ ieee80211_flush_queues(local, sta->sdata, false); ++ } + + /* now keys can no longer be reached */ + ieee80211_free_sta_keys(local, sta); +--- a/net/mac80211/trace.h ++++ b/net/mac80211/trace.h +@@ -1140,6 +1140,13 @@ TRACE_EVENT(drv_flush, + ) + ); + ++DEFINE_EVENT(sta_event, drv_flush_sta, ++ TP_PROTO(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ struct ieee80211_sta *sta), ++ TP_ARGS(local, sdata, sta) ++); ++ + TRACE_EVENT(drv_channel_switch, + TP_PROTO(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, diff --git a/package/kernel/mac80211/patches/subsys/351-wifi-iwlwifi-mvm-support-new-flush_sta-method.patch b/package/kernel/mac80211/patches/subsys/351-wifi-iwlwifi-mvm-support-new-flush_sta-method.patch new file mode 100644 index 0000000000..31f60ce024 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/351-wifi-iwlwifi-mvm-support-new-flush_sta-method.patch @@ -0,0 +1,53 @@ +From: Johannes Berg +Date: Mon, 13 Mar 2023 12:05:35 +0100 +Subject: [PATCH] wifi: iwlwifi: mvm: support new flush_sta method + +For iwlwifi this is simple to implement, and on newer hardware +it's an improvement since we have per-station queues. + +Signed-off-by: Johannes Berg +Reviewed-by: Greenman, Gregory +--- + +--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +@@ -4853,6 +4853,31 @@ static void iwl_mvm_mac_flush(struct iee + iwl_trans_wait_tx_queues_empty(mvm->trans, msk); + } + ++static void iwl_mvm_mac_flush_sta(struct ieee80211_hw *hw, ++ struct ieee80211_vif *vif, ++ struct ieee80211_sta *sta) ++{ ++ struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); ++ int i; ++ ++ mutex_lock(&mvm->mutex); ++ for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) { ++ struct iwl_mvm_sta *mvmsta; ++ struct ieee80211_sta *tmp; ++ ++ tmp = rcu_dereference_protected(mvm->fw_id_to_mac_id[i], ++ lockdep_is_held(&mvm->mutex)); ++ if (tmp != sta) ++ continue; ++ ++ mvmsta = iwl_mvm_sta_from_mac80211(sta); ++ ++ if (iwl_mvm_flush_sta(mvm, mvmsta, false)) ++ IWL_ERR(mvm, "flush request fail\n"); ++ } ++ mutex_unlock(&mvm->mutex); ++} ++ + static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx, + struct survey_info *survey) + { +@@ -5366,6 +5391,7 @@ const struct ieee80211_ops iwl_mvm_hw_op + .mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx, + .mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover, + .flush = iwl_mvm_mac_flush, ++ .flush_sta = iwl_mvm_mac_flush_sta, + .sched_scan_start = iwl_mvm_mac_sched_scan_start, + .sched_scan_stop = iwl_mvm_mac_sched_scan_stop, + .set_key = iwl_mvm_mac_set_key, diff --git a/package/kernel/mac80211/patches/subsys/997-backport-API-from-v6.1.patch b/package/kernel/mac80211/patches/subsys/997-backport-API-from-v6.1.patch index 142d1b2a88..9a45d2e05a 100644 --- a/package/kernel/mac80211/patches/subsys/997-backport-API-from-v6.1.patch +++ b/package/kernel/mac80211/patches/subsys/997-backport-API-from-v6.1.patch @@ -158,7 +158,7 @@ u8 drv_priv[] __aligned(sizeof(void *)); --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h -@@ -1916,6 +1916,73 @@ struct ieee80211_he_mu_edca_param_ac_rec +@@ -1902,6 +1902,73 @@ struct ieee80211_he_mu_edca_param_ac_rec } __packed; /** @@ -232,7 +232,7 @@ * struct ieee80211_mu_edca_param_set - MU EDCA Parameter Set element * * This structure is the "MU EDCA Parameter Set element" fields as -@@ -2228,6 +2295,12 @@ int ieee80211_get_vht_max_nss(struct iee +@@ -2214,6 +2281,12 @@ int ieee80211_get_vht_max_nss(struct iee #define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US 0x80 #define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_RESERVED 0xc0 #define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_MASK 0xc0 @@ -245,7 +245,7 @@ #define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x01 -@@ -3982,4 +4055,7 @@ enum ieee80211_range_params_max_total_lt +@@ -4006,4 +4079,7 @@ enum ieee80211_range_params_max_total_lt IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_UNSPECIFIED, }; diff --git a/package/kernel/mt76/patches/110-api_update.patch b/package/kernel/mt76/patches/110-api_update.patch new file mode 100644 index 0000000000..27bd6286b0 --- /dev/null +++ b/package/kernel/mt76/patches/110-api_update.patch @@ -0,0 +1,11 @@ +--- a/tx.c ++++ b/tx.c +@@ -325,7 +325,7 @@ mt76_tx(struct mt76_phy *phy, struct iee + if ((dev->drv->drv_flags & MT_DRV_HW_MGMT_TXQ) && + !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) && + !ieee80211_is_data(hdr->frame_control) && +- !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) { ++ !ieee80211_is_bufferable_mmpdu(skb)) { + qid = MT_TXQ_PSD; + } + diff --git a/package/kernel/mt76/patches/120-wifi-mt76-ignore-key-disable-commands.patch b/package/kernel/mt76/patches/120-wifi-mt76-ignore-key-disable-commands.patch new file mode 100644 index 0000000000..b1ebb9ee94 --- /dev/null +++ b/package/kernel/mt76/patches/120-wifi-mt76-ignore-key-disable-commands.patch @@ -0,0 +1,301 @@ +From: Felix Fietkau +Date: Wed, 22 Mar 2023 10:17:49 +0100 +Subject: [PATCH] wifi: mt76: ignore key disable commands + +This helps avoid cleartext leakage of already queued or powersave buffered +packets, when a reassoc triggers the key deletion. + +Cc: stable@vger.kernel.org +Signed-off-by: Felix Fietkau +--- + +--- a/mt7603/main.c ++++ b/mt7603/main.c +@@ -512,15 +512,15 @@ mt7603_set_key(struct ieee80211_hw *hw, + !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) + return -EOPNOTSUPP; + +- if (cmd == SET_KEY) { +- key->hw_key_idx = wcid->idx; +- wcid->hw_key_idx = idx; +- } else { ++ if (cmd != SET_KEY) { + if (idx == wcid->hw_key_idx) + wcid->hw_key_idx = -1; + +- key = NULL; ++ return 0; + } ++ ++ key->hw_key_idx = wcid->idx; ++ wcid->hw_key_idx = idx; + mt76_wcid_key_setup(&dev->mt76, wcid, key); + + return mt7603_wtbl_set_key(dev, wcid->idx, key); +--- a/mt7615/mac.c ++++ b/mt7615/mac.c +@@ -1193,8 +1193,7 @@ EXPORT_SYMBOL_GPL(mt7615_mac_enable_rtsc + static int + mt7615_mac_wtbl_update_key(struct mt7615_dev *dev, struct mt76_wcid *wcid, + struct ieee80211_key_conf *key, +- enum mt76_cipher_type cipher, u16 cipher_mask, +- enum set_key_cmd cmd) ++ enum mt76_cipher_type cipher, u16 cipher_mask) + { + u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx) + 30 * 4; + u8 data[32] = {}; +@@ -1203,27 +1202,18 @@ mt7615_mac_wtbl_update_key(struct mt7615 + return -EINVAL; + + mt76_rr_copy(dev, addr, data, sizeof(data)); +- if (cmd == SET_KEY) { +- if (cipher == MT_CIPHER_TKIP) { +- /* Rx/Tx MIC keys are swapped */ +- memcpy(data, key->key, 16); +- memcpy(data + 16, key->key + 24, 8); +- memcpy(data + 24, key->key + 16, 8); +- } else { +- if (cipher_mask == BIT(cipher)) +- memcpy(data, key->key, key->keylen); +- else if (cipher != MT_CIPHER_BIP_CMAC_128) +- memcpy(data, key->key, 16); +- if (cipher == MT_CIPHER_BIP_CMAC_128) +- memcpy(data + 16, key->key, 16); +- } ++ if (cipher == MT_CIPHER_TKIP) { ++ /* Rx/Tx MIC keys are swapped */ ++ memcpy(data, key->key, 16); ++ memcpy(data + 16, key->key + 24, 8); ++ memcpy(data + 24, key->key + 16, 8); + } else { ++ if (cipher_mask == BIT(cipher)) ++ memcpy(data, key->key, key->keylen); ++ else if (cipher != MT_CIPHER_BIP_CMAC_128) ++ memcpy(data, key->key, 16); + if (cipher == MT_CIPHER_BIP_CMAC_128) +- memset(data + 16, 0, 16); +- else if (cipher_mask) +- memset(data, 0, 16); +- if (!cipher_mask) +- memset(data, 0, sizeof(data)); ++ memcpy(data + 16, key->key, 16); + } + + mt76_wr_copy(dev, addr, data, sizeof(data)); +@@ -1234,7 +1224,7 @@ mt7615_mac_wtbl_update_key(struct mt7615 + static int + mt7615_mac_wtbl_update_pk(struct mt7615_dev *dev, struct mt76_wcid *wcid, + enum mt76_cipher_type cipher, u16 cipher_mask, +- int keyidx, enum set_key_cmd cmd) ++ int keyidx) + { + u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx), w0, w1; + +@@ -1253,9 +1243,7 @@ mt7615_mac_wtbl_update_pk(struct mt7615_ + else + w0 &= ~MT_WTBL_W0_RX_IK_VALID; + +- if (cmd == SET_KEY && +- (cipher != MT_CIPHER_BIP_CMAC_128 || +- cipher_mask == BIT(cipher))) { ++ if (cipher != MT_CIPHER_BIP_CMAC_128 || cipher_mask == BIT(cipher)) { + w0 &= ~MT_WTBL_W0_KEY_IDX; + w0 |= FIELD_PREP(MT_WTBL_W0_KEY_IDX, keyidx); + } +@@ -1272,19 +1260,10 @@ mt7615_mac_wtbl_update_pk(struct mt7615_ + + static void + mt7615_mac_wtbl_update_cipher(struct mt7615_dev *dev, struct mt76_wcid *wcid, +- enum mt76_cipher_type cipher, u16 cipher_mask, +- enum set_key_cmd cmd) ++ enum mt76_cipher_type cipher, u16 cipher_mask) + { + u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx); + +- if (!cipher_mask) { +- mt76_clear(dev, addr + 2 * 4, MT_WTBL_W2_KEY_TYPE); +- return; +- } +- +- if (cmd != SET_KEY) +- return; +- + if (cipher == MT_CIPHER_BIP_CMAC_128 && + cipher_mask & ~BIT(MT_CIPHER_BIP_CMAC_128)) + return; +@@ -1295,8 +1274,7 @@ mt7615_mac_wtbl_update_cipher(struct mt7 + + int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, + struct mt76_wcid *wcid, +- struct ieee80211_key_conf *key, +- enum set_key_cmd cmd) ++ struct ieee80211_key_conf *key) + { + enum mt76_cipher_type cipher; + u16 cipher_mask = wcid->cipher; +@@ -1306,19 +1284,14 @@ int __mt7615_mac_wtbl_set_key(struct mt7 + if (cipher == MT_CIPHER_NONE) + return -EOPNOTSUPP; + +- if (cmd == SET_KEY) +- cipher_mask |= BIT(cipher); +- else +- cipher_mask &= ~BIT(cipher); +- +- mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask, cmd); +- err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask, +- cmd); ++ cipher_mask |= BIT(cipher); ++ mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask); ++ err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask); + if (err < 0) + return err; + + err = mt7615_mac_wtbl_update_pk(dev, wcid, cipher, cipher_mask, +- key->keyidx, cmd); ++ key->keyidx); + if (err < 0) + return err; + +@@ -1329,13 +1302,12 @@ int __mt7615_mac_wtbl_set_key(struct mt7 + + int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, + struct mt76_wcid *wcid, +- struct ieee80211_key_conf *key, +- enum set_key_cmd cmd) ++ struct ieee80211_key_conf *key) + { + int err; + + spin_lock_bh(&dev->mt76.lock); +- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd); ++ err = __mt7615_mac_wtbl_set_key(dev, wcid, key); + spin_unlock_bh(&dev->mt76.lock); + + return err; +--- a/mt7615/main.c ++++ b/mt7615/main.c +@@ -391,18 +391,17 @@ static int mt7615_set_key(struct ieee802 + + if (cmd == SET_KEY) + *wcid_keyidx = idx; +- else if (idx == *wcid_keyidx) +- *wcid_keyidx = -1; +- else ++ else { ++ if (idx == *wcid_keyidx) ++ *wcid_keyidx = -1; + goto out; ++ } + +- mt76_wcid_key_setup(&dev->mt76, wcid, +- cmd == SET_KEY ? key : NULL); +- ++ mt76_wcid_key_setup(&dev->mt76, wcid, key); + if (mt76_is_mmio(&dev->mt76)) +- err = mt7615_mac_wtbl_set_key(dev, wcid, key, cmd); ++ err = mt7615_mac_wtbl_set_key(dev, wcid, key); + else +- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd); ++ err = __mt7615_mac_wtbl_set_key(dev, wcid, key); + + out: + mt7615_mutex_release(dev); +--- a/mt7615/mt7615.h ++++ b/mt7615/mt7615.h +@@ -491,11 +491,9 @@ int mt7615_mac_write_txwi(struct mt7615_ + void mt7615_mac_set_timing(struct mt7615_phy *phy); + int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, + struct mt76_wcid *wcid, +- struct ieee80211_key_conf *key, +- enum set_key_cmd cmd); ++ struct ieee80211_key_conf *key); + int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, struct mt76_wcid *wcid, +- struct ieee80211_key_conf *key, +- enum set_key_cmd cmd); ++ struct ieee80211_key_conf *key); + void mt7615_mac_reset_work(struct work_struct *work); + u32 mt7615_mac_get_sta_tid_sn(struct mt7615_dev *dev, int wcid, u8 tid); + +--- a/mt76x02_util.c ++++ b/mt76x02_util.c +@@ -454,20 +454,20 @@ int mt76x02_set_key(struct ieee80211_hw + msta = sta ? (struct mt76x02_sta *)sta->drv_priv : NULL; + wcid = msta ? &msta->wcid : &mvif->group_wcid; + +- if (cmd == SET_KEY) { +- key->hw_key_idx = wcid->idx; +- wcid->hw_key_idx = idx; +- if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) { +- key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX; +- wcid->sw_iv = true; +- } +- } else { ++ if (cmd != SET_KEY) { + if (idx == wcid->hw_key_idx) { + wcid->hw_key_idx = -1; + wcid->sw_iv = false; + } + +- key = NULL; ++ return 0; ++ } ++ ++ key->hw_key_idx = wcid->idx; ++ wcid->hw_key_idx = idx; ++ if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) { ++ key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX; ++ wcid->sw_iv = true; + } + mt76_wcid_key_setup(&dev->mt76, wcid, key); + +--- a/mt7915/main.c ++++ b/mt7915/main.c +@@ -399,16 +399,15 @@ static int mt7915_set_key(struct ieee802 + mt7915_mcu_add_bss_info(phy, vif, true); + } + +- if (cmd == SET_KEY) ++ if (cmd == SET_KEY) { + *wcid_keyidx = idx; +- else if (idx == *wcid_keyidx) +- *wcid_keyidx = -1; +- else ++ } else { ++ if (idx == *wcid_keyidx) ++ *wcid_keyidx = -1; + goto out; ++ } + +- mt76_wcid_key_setup(&dev->mt76, wcid, +- cmd == SET_KEY ? key : NULL); +- ++ mt76_wcid_key_setup(&dev->mt76, wcid, key); + err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip, + key, MCU_EXT_CMD(STA_REC_UPDATE), + &msta->wcid, cmd); +--- a/mt7921/main.c ++++ b/mt7921/main.c +@@ -568,16 +568,15 @@ static int mt7921_set_key(struct ieee802 + + mt7921_mutex_acquire(dev); + +- if (cmd == SET_KEY) ++ if (cmd == SET_KEY) { + *wcid_keyidx = idx; +- else if (idx == *wcid_keyidx) +- *wcid_keyidx = -1; +- else ++ } else { ++ if (idx == *wcid_keyidx) ++ *wcid_keyidx = -1; + goto out; ++ } + +- mt76_wcid_key_setup(&dev->mt76, wcid, +- cmd == SET_KEY ? key : NULL); +- ++ mt76_wcid_key_setup(&dev->mt76, wcid, key); + err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip, + key, MCU_UNI_CMD(STA_REC_UPDATE), + &msta->wcid, cmd); diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index cbdb3e3b3e..bd3e18cf89 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.1.1 -PKG_BUGFIX:=t +PKG_BUGFIX:=u PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 ENGINES_DIR=engines-1.1 @@ -28,7 +28,7 @@ PKG_SOURCE_URL:= \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/ -PKG_HASH:=8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b +PKG_HASH:=e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6 PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE @@ -338,6 +338,7 @@ define Build/Configure --libdir=lib \ --openssldir=/etc/ssl \ --cross-compile-prefix="$(TARGET_CROSS)" \ + $(TARGET_CFLAGS) \ $(TARGET_CPPFLAGS) \ $(TARGET_LDFLAGS) \ $(OPENSSL_OPTIONS) && \ diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile index 398a27bb98..d7d1f1bb1f 100644 --- a/package/libs/uclient/Makefile +++ b/package/libs/uclient/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git -PKG_MIRROR_HASH:=7c443cac02a734dd312c65618f4de17248d188317f30a9fac192c1503b3d5c05 -PKG_SOURCE_DATE:=2021-05-14 -PKG_SOURCE_VERSION:=6a6011df3429ffa5958d12b1327eeda4fd9daa47 +PKG_MIRROR_HASH:=16c6c97f45d9737fb40628ea22ae347541a1e37d8d1576e04ffbaa5fc92f3b6d +PKG_SOURCE_DATE:=2023-04-13 +PKG_SOURCE_VERSION:=007d945467499f43656b141171d31f5643b83a6c CMAKE_INSTALL:=1 PKG_BUILD_DEPENDS:=ustream-ssl diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index db5ea57473..429c938602 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=comgt PKG_VERSION:=0.32 -PKG_RELEASE:=33 +PKG_RELEASE:=35 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/comgt @@ -79,6 +79,7 @@ define Package/comgt/install $(INSTALL_DATA) ./files/getcarrier.gcom $(1)/etc/gcom/getcarrier.gcom $(INSTALL_DATA) ./files/getcnum.gcom $(1)/etc/gcom/getcnum.gcom $(INSTALL_DATA) ./files/getimsi.gcom $(1)/etc/gcom/getimsi.gcom + $(INSTALL_DATA) ./files/runcommand.gcom $(1)/etc/gcom/runcommand.gcom $(INSTALL_DIR) $(1)/etc/hotplug.d/tty $(INSTALL_CONF) ./files/3g.usb $(1)/etc/hotplug.d/tty/30-3g $(INSTALL_DIR) $(1)/lib/netifd/proto @@ -96,7 +97,6 @@ endef define Package/comgt-ncm/install $(INSTALL_DIR) $(1)/etc/gcom $(INSTALL_DATA) ./files/ncm.json $(1)/etc/gcom/ncm.json - $(INSTALL_DATA) ./files/runcommand.gcom $(1)/etc/gcom/runcommand.gcom $(INSTALL_DIR) $(1)/lib/netifd/proto $(INSTALL_BIN) ./files/ncm.sh $(1)/lib/netifd/proto/ncm.sh endef diff --git a/package/network/utils/comgt/files/3g.sh b/package/network/utils/comgt/files/3g.sh index 9220cbf5a0..42ba894e59 100644 --- a/package/network/utils/comgt/files/3g.sh +++ b/package/network/utils/comgt/files/3g.sh @@ -72,6 +72,8 @@ proto_3g_setup() { *) CODE="2,2";; esac export MODE="AT^SYSCFG=${CODE},3FFFFFFF,2,4" + elif echo "$cardinfo" | grep -q "MikroTik"; then + COMMAND="AT+CFUN=1" gcom -d "$device" -s /etc/gcom/runcommand.gcom || return 1 fi if [ -n "$pincode" ]; then diff --git a/package/network/utils/comgt/files/ncm.json b/package/network/utils/comgt/files/ncm.json index bbdb30c5ee..df0810ddbc 100644 --- a/package/network/utils/comgt/files/ncm.json +++ b/package/network/utils/comgt/files/ncm.json @@ -74,5 +74,55 @@ "connect": "AT+CGACT=1,${profile}", "finalize": "AT+CGDATA=\\\"M-MBIM\\\",${profile},1", "disconnect": "AT+CGACT=0,${profile}" + }, + "quectel": { + "initialize": [ + "AT+CFUN=1" + ], + "configure": [ + "at+qicsgp=${profile},${context_type},\\\"${apn}\\\",\\\"${username}\\\",\\\"${password}\\\",0" + ], + "modes": { + "lte": "AT+QCFG=\\\"nwscanmode\\\",3", + "umts": "AT+QCFG=\\\"nwscanmode\\\",2", + "gsm": "AT+QCFG=\\\"nwscanmode\\\",1", + "auto": "AT+QCFG=\\\"nwscanmode\\\",0" + }, + "connect": "AT+qnetdevctl=1,${profile},1", + "disconnect": "AT+qnetdevctl=0,${profile},0" + }, + "\"zte": { + "initialize": [ + "AT+CFUN=1" + ], + "configure": [ + "AT+ZGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",\\\"\\\",0,0", + "AT+ZGPCOAUTH=${profile},\\\"${username}\\\",\\\"${password}\\\",0" + ], + "connect": "AT+ZGACT=1,${profile}", + "disconnect": "AT+ZGACT=0,${profile}" + }, + "\"marvell\"": { + "initialize": [ + "AT+CFUN=1" + ], + "configure": [ + "AT+ZGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",\\\"\\\",0,0", + "AT+ZGPCOAUTH=${profile},\\\"${username}\\\",\\\"${password}\\\",0" + ], + "connect": "AT+ZGACT=1,${profile}", + "disconnect": "AT+ZGACT=0,${profile}" + }, + "\"mikrotik\"": { + "configure": [ + "AT+CFUN=4", + "AT+ZGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",0", + "AT+ZDHCPLEASE=10", + "AT+CFUN=1" + ], + "waitforconnect": "\\\"+ZCONSTAT: 1,${context_type}\\\",\\\"+ZGIPDNS: ${context_type}\\\"", + "connect": "AT+ZGACT=1,${context_type}", + "finalize": "AT+ZDHCPLEASE=0", + "disconnect": "AT+ZGACT=0,1" } } diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh index 6545091c82..ed50f08d76 100644 --- a/package/network/utils/comgt/files/ncm.sh +++ b/package/network/utils/comgt/files/ncm.sh @@ -30,6 +30,8 @@ proto_ncm_setup() { local device apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS json_get_vars device apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS + local context_type + [ "$metric" = "" ] && metric="0" [ -n "$profile" ] || profile=1 @@ -37,6 +39,10 @@ proto_ncm_setup() { pdptype=$(echo "$pdptype" | awk '{print toupper($0)}') [ "$pdptype" = "IP" -o "$pdptype" = "IPV6" -o "$pdptype" = "IPV4V6" ] || pdptype="IP" + [ "$pdptype" = "IPV4V6" ] && context_type=3 + [ -z "$context_type" -a "$pdptype" = "IPV6" ] && context_type=2 + [ -n "$context_type" ] || context_type=1 + [ -n "$ctl_device" ] && device=$ctl_device [ -n "$device" ] || { @@ -71,10 +77,25 @@ proto_ncm_setup() { return 1 } - [ -n "$delay" ] && sleep "$delay" - - manufacturer=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk 'NF && $0 !~ /AT\+CGMI/ { sub(/\+CGMI: /,""); print tolower($1); exit; }') - [ $? -ne 0 -o -z "$manufacturer" ] && { + start=$(date +%s) + while true; do + manufacturer=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk 'NF && $0 !~ /AT\+CGMI/ { sub(/\+CGMI: /,""); print tolower($1); exit; }') + [ "$manufacturer" = "error" ] && { + manufacturer="" + } + [ -n "$manufacturer" ] && { + break + } + [ -z "$delay" ] && { + break + } + sleep 1 + elapsed=$(($(date +%s) - start)) + [ "$elapsed" -gt "$delay" ] && { + break + } + done + [ -z "$manufacturer" ] && { echo "Failed to get modem information" proto_notify_error "$interface" GETINFO_FAILED return 1 diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile index ba76664339..0d626750f0 100644 --- a/package/system/ca-certificates/Makefile +++ b/package/system/ca-certificates/Makefile @@ -7,17 +7,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ca-certificates -PKG_VERSION:=20211016 +PKG_VERSION:=20230311 PKG_RELEASE:=1 PKG_MAINTAINER:= PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates -PKG_HASH:=2ae9b6dc5f40c25d6d7fe55e07b54f12a8967d1955d3b7b2f42ee46266eeef88 +PKG_HASH:=83de934afa186e279d1ed08ea0d73f5cf43a6fbfb5f00874b6db3711c64576f3 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +TAR_OPTIONS+= --strip-components 1 +TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) + define Package/ca-certificates SECTION:=base CATEGORY:=Base system @@ -34,13 +37,6 @@ define Package/ca-bundle PROVIDES:=ca-certs endef -define Build/Prepare - $(DECOMPRESS_CMD) $(HOST_TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) - $(Build/Patch) -endef - -MAKE_PATH := work - define Build/Install mkdir -p \ $(PKG_INSTALL_DIR)/usr/sbin \ diff --git a/package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch b/package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch index add01f42c0..09092617f1 100644 --- a/package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch +++ b/package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch @@ -18,8 +18,8 @@ Reported-by: Chen Minqiang Reported-by: Shane Synan Signed-off-by: Christian Lamparter --- ---- a/work/mozilla/certdata2pem.py -+++ b/work/mozilla/certdata2pem.py +--- a/mozilla/certdata2pem.py ++++ b/mozilla/certdata2pem.py @@ -21,16 +21,12 @@ # USA. @@ -42,8 +42,8 @@ Signed-off-by: Christian Lamparter if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]: continue - -- cert = x509.load_der_x509_certificate(obj['CKA_VALUE']) -- if cert.not_valid_after < datetime.datetime.now(): +- cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE'])) +- if cert.not_valid_after < datetime.datetime.utcnow(): - print('!'*74) - print('Trusted but expired certificate found: %s' % obj['CKA_LABEL']) - print('!'*74) diff --git a/package/system/procd/patches/0001-uxc-fix-compilation-error-caused-by-unused-variable.patch b/package/system/procd/patches/0001-uxc-fix-compilation-error-caused-by-unused-variable.patch index 6c1a21ebea..6e8c30777a 100644 --- a/package/system/procd/patches/0001-uxc-fix-compilation-error-caused-by-unused-variable.patch +++ b/package/system/procd/patches/0001-uxc-fix-compilation-error-caused-by-unused-variable.patch @@ -10,8 +10,6 @@ Signed-off-by: Christian Marangi uxc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/uxc.c b/uxc.c -index eb40eb2..b22d838 100644 --- a/uxc.c +++ b/uxc.c @@ -80,6 +80,8 @@ static struct blob_buf conf; @@ -31,6 +29,3 @@ index eb40eb2..b22d838 100644 int signal = SIGTERM; int c; --- -2.37.2 - diff --git a/package/system/procd/patches/0002-jail-correctly-check-for-null-pointer.patch b/package/system/procd/patches/0002-jail-correctly-check-for-null-pointer.patch new file mode 100644 index 0000000000..5028e23da8 --- /dev/null +++ b/package/system/procd/patches/0002-jail-correctly-check-for-null-pointer.patch @@ -0,0 +1,25 @@ +From 24f6bc4322754a753e4e3e413659d542fa798c7b Mon Sep 17 00:00:00 2001 +From: Philipp Meier +Date: Tue, 8 Nov 2022 14:38:37 +0100 +Subject: [PATCH] jail: correctly check for null pointer + +Handle case where opts.sysctl is not used. + +Signed-off-by: Philipp Meier +--- + jail/jail.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/jail/jail.c ++++ b/jail/jail.c +@@ -213,6 +213,10 @@ static void free_hooklist(struct hook_ex + + static void free_sysctl(void) { + struct sysctl_val *cur; ++ ++ if (!opts.sysctl) ++ return; ++ + cur = *opts.sysctl; + + while (cur) { diff --git a/package/system/procd/patches/0003-jail-ignore-missing-.dynamic-sect.patch b/package/system/procd/patches/0003-jail-ignore-missing-.dynamic-sect.patch new file mode 100644 index 0000000000..486f0f839c --- /dev/null +++ b/package/system/procd/patches/0003-jail-ignore-missing-.dynamic-sect.patch @@ -0,0 +1,45 @@ +From 93b2c2d5ed4ca369a9ea48163024125b958212b5 Mon Sep 17 00:00:00 2001 +From: Yuteng Zhong +Date: Sun, 9 Oct 2022 22:53:27 +0800 +Subject: [PATCH] jail: ignore missing .dynamic sect + +A static-linked binary doesn't have a .dynamic section, but when +starting ujail with -r or -w will automatically search for PT_DYNAMIC in +ELF and exit with failure if it is not found. + +github issue: https://github.com/openwrt/openwrt/issues/10933 + +Signed-off-by: Yuteng Zhong +--- + jail/elf.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/jail/elf.c ++++ b/jail/elf.c +@@ -240,18 +240,18 @@ int elf_load_deps(const char *path, cons + + gcc_mips64_bug_work_around = 1; + #endif +- if (elf_find_section(map, PT_LOAD, &load_offset, NULL, &load_vaddr)) { +- ERROR("failed to load the .load section from %s\n", path); +- return -1; ++ if (elf_find_section(map, PT_INTERP, &interp_offset, NULL, NULL) == 0) { ++ add_path_and_deps(map+interp_offset, 1, -1, 0); + } + +- if (elf_find_section(map, PT_DYNAMIC, &dyn_offset, &dyn_size, NULL)) { +- ERROR("failed to load the .dynamic section from %s\n", path); +- return -1; ++ if (elf_find_section(map, PT_LOAD, &load_offset, NULL, &load_vaddr)) { ++ DEBUG("failed to load the .load section from %s\n", path); ++ return 0; + } + +- if (elf_find_section(map, PT_INTERP, &interp_offset, NULL, NULL) == 0) { +- add_path_and_deps(map+interp_offset, 1, -1, 0); ++ if (elf_find_section(map, PT_DYNAMIC, &dyn_offset, &dyn_size, NULL)) { ++ DEBUG("failed to load the .dynamic section from %s\n", path); ++ return 0; + } + + int clazz = map[EI_CLASS]; diff --git a/package/utils/mhz/Makefile b/package/utils/mhz/Makefile index b09d9906ab..9b6f318d69 100644 --- a/package/utils/mhz/Makefile +++ b/package/utils/mhz/Makefile @@ -5,11 +5,13 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/wtarreau/mhz.git -PKG_SOURCE_DATE:=2022-08-18 -PKG_SOURCE_VERSION:=6ec38cbb1371d20078a7a5059dd9faa5b281b2d9 -PKG_MIRROR_HASH:=37559cc8b5e08d23c09878d63cf81ea8d123be45408f3e76e1dc042766a746a7 +PKG_SOURCE_DATE:=2023-06-17 +PKG_SOURCE_VERSION:=11aac2399780a1f7ea9f007b14af0464797d5cf1 +PKG_MIRROR_HASH:=b3ea0c9e6f111755c4207addef0ea210ace86bc6910c959c6fc489026897676f PKG_MAINTAINER:=Robert Marko +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk @@ -20,9 +22,13 @@ define Package/mhz URL:=https://github.com/wtarreau/mhz endef +define Package/mhz/description + Tool to mathematically calculate the current CPU frequency. +endef + define Package/mhz/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mhz $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mhz $(1)/usr/sbin/mhz endef $(eval $(call BuildPackage,mhz)) diff --git a/scripts/feeds b/scripts/feeds index 499354391b..e972a7d654 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -164,9 +164,9 @@ my %update_method = ( 'controldir' => ".git", 'revision' => "git rev-parse --short HEAD | tr -d '\n'"}, 'src-git-full' => { - 'init' => "git clone '%s' '%s'", - 'init_branch' => "git clone --branch '%s' '%s' '%s'", - 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -", + 'init' => "git clone --filter=blob:none '%s' '%s'", + 'init_branch' => "git clone --filter=blob:none --branch '%s' '%s' '%s'", + 'init_commit' => "git clone --filter=blob:none '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -", 'update' => "git pull --ff-only", 'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)", 'post_update' => "git submodule update --init --recursive", diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index aeae98aacd..eadb0ebe85 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -47,6 +47,7 @@ Building images: make image EXTRA_IMAGE_NAME="" # Add this to the output image filename (sanitized) make image DISABLED_SERVICES=" [ [ ..]]" # Which services in /etc/init.d/ should be disabled make image ADD_LOCAL_KEY=1 # store locally generated signing key in built images + make image ROOTFS_PARTSIZE="" # override the default rootfs partition size in MegaBytes Print manifest: List "all" packages which get installed into the image. @@ -243,7 +244,8 @@ image: $(if $(FILES),USER_FILES="$(FILES)") \ $(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \ $(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)") \ - $(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)")) + $(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)") \ + $(if $(ROOTFS_PARTSIZE),CONFIG_TARGET_ROOTFS_PARTSIZE="$(ROOTFS_PARTSIZE)")) manifest: FORCE $(MAKE) -s _check_profile diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch index 0da57d3ddd..1ab1de3f46 100644 --- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -23,7 +23,7 @@ produce a noisy warning. xhci->quirks |= XHCI_RESET_ON_RESUME; --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -427,10 +427,14 @@ static int xhci_try_enable_msi(struct us +@@ -431,10 +431,14 @@ static int xhci_try_enable_msi(struct us free_irq(hcd->irq, hcd); hcd->irq = 0; diff --git a/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch b/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch index eedc7498be..0a43402536 100644 --- a/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch +++ b/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch @@ -46,7 +46,7 @@ Cc: linux-mips@vger.kernel.org --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -538,11 +538,88 @@ static void __init check_kernel_sections +@@ -539,11 +539,88 @@ static void __init check_kernel_sections } } @@ -140,7 +140,7 @@ Cc: linux-mips@vger.kernel.org /* * arch_mem_init - initialize memory management subsystem -@@ -570,48 +647,12 @@ static void __init arch_mem_init(char ** +@@ -571,48 +648,12 @@ static void __init arch_mem_init(char ** { extern void plat_mem_setup(void); diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch index 5b67fcda6d..ca50a4c109 100644 --- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch @@ -292,7 +292,7 @@ #endif /* _LINUX_TYPES_H */ --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c -@@ -1444,8 +1444,8 @@ struct sk_buff *inet_gro_receive(struct +@@ -1446,8 +1446,8 @@ struct sk_buff *inet_gro_receive(struct if (unlikely(ip_fast_csum((u8 *)iph, 5))) goto out_unlock; @@ -754,7 +754,7 @@ ptr = ip6hoff + sizeof(struct ipv6hdr); --- a/include/net/neighbour.h +++ b/include/net/neighbour.h -@@ -275,8 +275,10 @@ static inline bool neigh_key_eq128(const +@@ -270,8 +270,10 @@ static inline bool neigh_key_eq128(const const u32 *n32 = (const u32 *)n->primary_key; const u32 *p32 = pkey; diff --git a/target/linux/bcm27xx/Makefile b/target/linux/bcm27xx/Makefile index d89ca62f2d..7a12934202 100644 --- a/target/linux/bcm27xx/Makefile +++ b/target/linux/bcm27xx/Makefile @@ -26,7 +26,7 @@ DEFAULT_PACKAGES += \ kmod-usb-hid \ kmod-sound-core kmod-sound-arm-bcm2835 \ kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \ - partx-utils mkf2fs e2fsprogs \ + partx-utils mkf2fs automount \ autocore-arm luci-app-cpufreq KERNELNAME:=Image dtbs diff --git a/target/linux/bcm27xx/patches-5.4/950-0003-smsx95xx-fix-crimes-against-truesize.patch b/target/linux/bcm27xx/patches-5.4/950-0003-smsx95xx-fix-crimes-against-truesize.patch index 2355037880..cde0f2d2c9 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0003-smsx95xx-fix-crimes-against-truesize.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0003-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) { -@@ -1964,7 +1968,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1970,7 +1974,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; } -@@ -1982,7 +1987,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1988,7 +1993,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.4/950-0013-firmware-Updated-mailbox-header.patch b/target/linux/bcm27xx/patches-5.4/950-0013-firmware-Updated-mailbox-header.patch index 4c149e7825..e353521987 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0013-firmware-Updated-mailbox-header.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0013-firmware-Updated-mailbox-header.patch @@ -18,7 +18,7 @@ Subject: [PATCH] firmware: Updated mailbox header struct rpi_firmware; enum rpi_firmware_property_status { -@@ -159,5 +161,6 @@ static inline struct rpi_firmware *rpi_f +@@ -169,5 +171,6 @@ static inline struct rpi_firmware *devm_ return NULL; } #endif diff --git a/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch b/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch index 9000b5c0ed..d924a133c6 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch @@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -8566,8 +8566,6 @@ int alloc_contig_range(unsigned long sta +@@ -8582,8 +8582,6 @@ int alloc_contig_range(unsigned long sta /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch index c2d725efe5..43cfc28522 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch @@ -222,7 +222,7 @@ Signed-off-by: Yaroslav Rosomakho static inline int mmc_blk_part_switch(struct mmc_card *card, unsigned int part_type); -@@ -2890,6 +2897,7 @@ static int mmc_blk_probe(struct mmc_card +@@ -2895,6 +2902,7 @@ static int mmc_blk_probe(struct mmc_card { struct mmc_blk_data *md, *part_md; char cap_str[10]; @@ -230,7 +230,7 @@ Signed-off-by: Yaroslav Rosomakho /* * Check that the card supports the command class(es) we need. -@@ -2897,7 +2905,16 @@ static int mmc_blk_probe(struct mmc_card +@@ -2902,7 +2910,16 @@ static int mmc_blk_probe(struct mmc_card if (!(card->csd.cmdclass & CCC_BLOCK_READ)) return -ENODEV; @@ -248,7 +248,7 @@ Signed-off-by: Yaroslav Rosomakho card->complete_wq = alloc_workqueue("mmc_complete", WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); -@@ -2912,9 +2929,14 @@ static int mmc_blk_probe(struct mmc_card +@@ -2917,9 +2934,14 @@ static int mmc_blk_probe(struct mmc_card string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, cap_str, sizeof(cap_str)); diff --git a/target/linux/bcm27xx/patches-5.4/950-0052-firmware-bcm2835-Support-ARCH_BCM270x.patch b/target/linux/bcm27xx/patches-5.4/950-0052-firmware-bcm2835-Support-ARCH_BCM270x.patch index a561e589db..2f6c37cce3 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0052-firmware-bcm2835-Support-ARCH_BCM270x.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0052-firmware-bcm2835-Support-ARCH_BCM270x.patch @@ -27,8 +27,8 @@ Signed-off-by: Noralf Trønnes --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -29,6 +29,8 @@ struct rpi_firmware { - u32 enabled; +@@ -32,6 +32,8 @@ struct rpi_firmware { + struct kref consumers; }; +static struct platform_device *g_pdev; @@ -36,32 +36,32 @@ Signed-off-by: Noralf Trønnes static DEFINE_MUTEX(transaction_lock); static void response_callback(struct mbox_client *cl, void *msg) -@@ -238,6 +240,7 @@ static int rpi_firmware_probe(struct pla - init_completion(&fw->c); +@@ -269,6 +271,7 @@ static int rpi_firmware_probe(struct pla + kref_init(&fw->consumers); platform_set_drvdata(pdev, fw); + g_pdev = pdev; rpi_firmware_print_firmware_revision(fw); rpi_register_hwmon_driver(dev, fw); -@@ -265,6 +268,7 @@ static int rpi_firmware_remove(struct pl - platform_device_unregister(rpi_clk); +@@ -297,6 +300,7 @@ static int rpi_firmware_remove(struct pl rpi_clk = NULL; - mbox_free_channel(fw->chan); + + rpi_firmware_put(fw); + g_pdev = NULL; return 0; } -@@ -277,7 +281,7 @@ static int rpi_firmware_remove(struct pl +@@ -311,7 +315,7 @@ static int rpi_firmware_remove(struct pl */ struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) { - struct platform_device *pdev = of_find_device_by_node(firmware_node); + struct platform_device *pdev = g_pdev; + struct rpi_firmware *fw; if (!pdev) - return NULL; -@@ -301,7 +305,18 @@ static struct platform_driver rpi_firmwa +@@ -365,7 +369,18 @@ static struct platform_driver rpi_firmwa .shutdown = rpi_firmware_shutdown, .remove = rpi_firmware_remove, }; diff --git a/target/linux/bcm27xx/patches-5.4/950-0055-Added-Device-IDs-for-August-DVB-T-205.patch b/target/linux/bcm27xx/patches-5.4/950-0055-Added-Device-IDs-for-August-DVB-T-205.patch index f0c1896e33..87152ffe32 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0055-Added-Device-IDs-for-August-DVB-T-205.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0055-Added-Device-IDs-for-August-DVB-T-205.patch @@ -9,7 +9,7 @@ Subject: [PATCH] Added Device IDs for August DVB-T 205 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c -@@ -1947,6 +1947,10 @@ static const struct usb_device_id rtl28x +@@ -1967,6 +1967,10 @@ static const struct usb_device_id rtl28x &rtl28xxu_props, "Compro VideoMate U650F", NULL) }, { DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd394, &rtl28xxu_props, "MaxMedia HU394-T", NULL) }, diff --git a/target/linux/bcm27xx/patches-5.4/950-0094-raspberrypi-firmware-Export-the-general-transaction-.patch b/target/linux/bcm27xx/patches-5.4/950-0094-raspberrypi-firmware-Export-the-general-transaction-.patch index 02f1a6ffd4..b00f45f3db 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0094-raspberrypi-firmware-Export-the-general-transaction-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0094-raspberrypi-firmware-Export-the-general-transaction-.patch @@ -13,7 +13,7 @@ Signed-off-by: Eric Anholt --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -43,7 +43,7 @@ static void response_callback(struct mbo +@@ -46,7 +46,7 @@ static void response_callback(struct mbo * Sends a request to the firmware through the BCM2835 mailbox driver, * and synchronously waits for the reply. */ @@ -22,7 +22,7 @@ Signed-off-by: Eric Anholt rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) { u32 message = MBOX_MSG(chan, data); -@@ -68,6 +68,7 @@ rpi_firmware_transaction(struct rpi_firm +@@ -71,6 +71,7 @@ rpi_firmware_transaction(struct rpi_firm return ret; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0114-firmware-raspberrypi-Notify-firmware-of-a-reboot.patch b/target/linux/bcm27xx/patches-5.4/950-0114-firmware-raspberrypi-Notify-firmware-of-a-reboot.patch index 1db30c9cc1..947bce99a7 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0114-firmware-raspberrypi-Notify-firmware-of-a-reboot.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0114-firmware-raspberrypi-Notify-firmware-of-a-reboot.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -12,6 +12,7 @@ +@@ -13,6 +13,7 @@ #include #include #include @@ -21,7 +21,7 @@ Signed-off-by: Phil Elwell #include #define MBOX_MSG(chan, data28) (((data28) & ~0xf) | ((chan) & 0xf)) -@@ -177,6 +178,26 @@ int rpi_firmware_property(struct rpi_fir +@@ -180,6 +181,26 @@ int rpi_firmware_property(struct rpi_fir } EXPORT_SYMBOL_GPL(rpi_firmware_property); @@ -48,7 +48,7 @@ Signed-off-by: Phil Elwell static void rpi_firmware_print_firmware_revision(struct rpi_firmware *fw) { -@@ -307,15 +328,32 @@ static struct platform_driver rpi_firmwa +@@ -371,15 +392,32 @@ static struct platform_driver rpi_firmwa .remove = rpi_firmware_remove, }; diff --git a/target/linux/bcm27xx/patches-5.4/950-0123-firmware-raspberrypi-Add-backward-compatible-get_thr.patch b/target/linux/bcm27xx/patches-5.4/950-0123-firmware-raspberrypi-Add-backward-compatible-get_thr.patch index 6049c55acb..b842e4b2b2 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0123-firmware-raspberrypi-Add-backward-compatible-get_thr.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0123-firmware-raspberrypi-Add-backward-compatible-get_thr.patch @@ -16,15 +16,15 @@ Signed-off-by: Stefan Wahren --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -28,6 +28,7 @@ struct rpi_firmware { - struct mbox_chan *chan; /* The property channel. */ - struct completion c; +@@ -31,6 +31,7 @@ struct rpi_firmware { u32 enabled; + + struct kref consumers; + u32 get_throttled; }; static struct platform_device *g_pdev; -@@ -174,6 +175,12 @@ int rpi_firmware_property(struct rpi_fir +@@ -177,6 +178,12 @@ int rpi_firmware_property(struct rpi_fir kfree(data); @@ -37,7 +37,7 @@ Signed-off-by: Stefan Wahren return ret; } EXPORT_SYMBOL_GPL(rpi_firmware_property); -@@ -198,6 +205,27 @@ static int rpi_firmware_notify_reboot(st +@@ -201,6 +208,27 @@ static int rpi_firmware_notify_reboot(st return 0; } @@ -65,7 +65,7 @@ Signed-off-by: Stefan Wahren static void rpi_firmware_print_firmware_revision(struct rpi_firmware *fw) { -@@ -230,6 +258,11 @@ rpi_register_hwmon_driver(struct device +@@ -233,6 +261,11 @@ rpi_register_hwmon_driver(struct device rpi_hwmon = platform_device_register_data(dev, "raspberrypi-hwmon", -1, NULL, 0); diff --git a/target/linux/bcm27xx/patches-5.4/950-0131-firmware-raspberrypi-Report-the-fw-variant-during-pr.patch b/target/linux/bcm27xx/patches-5.4/950-0131-firmware-raspberrypi-Report-the-fw-variant-during-pr.patch index c0d3eb0d67..6531b4c516 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0131-firmware-raspberrypi-Report-the-fw-variant-during-pr.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0131-firmware-raspberrypi-Report-the-fw-variant-during-pr.patch @@ -27,7 +27,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -229,21 +229,55 @@ static const struct attribute_group rpi_ +@@ -232,21 +232,55 @@ static const struct attribute_group rpi_ static void rpi_firmware_print_firmware_revision(struct rpi_firmware *fw) { @@ -90,7 +90,7 @@ Signed-off-by: Dave Stevenson } static void -@@ -298,6 +332,7 @@ static int rpi_firmware_probe(struct pla +@@ -329,6 +363,7 @@ static int rpi_firmware_probe(struct pla g_pdev = pdev; rpi_firmware_print_firmware_revision(fw); diff --git a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch index 796f7dfe0a..225e7bc2b0 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell /* Disable rate control for now */ bcmgenet_tdma_ring_writel(priv, index, flow_period_val, TDMA_FLOW_PERIOD); -@@ -3591,9 +3591,12 @@ static int bcmgenet_probe(struct platfor +@@ -3592,9 +3592,12 @@ static int bcmgenet_probe(struct platfor netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1); /* Set default coalescing parameters */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch index 5837187b26..530805e355 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch @@ -70,7 +70,7 @@ Signed-off-by: Jonathan Bell * @dev: the device whose endpoint is being disabled --- a/include/linux/usb.h +++ b/include/linux/usb.h -@@ -1821,6 +1821,8 @@ extern int usb_clear_halt(struct usb_dev +@@ -1826,6 +1826,8 @@ extern int usb_clear_halt(struct usb_dev extern int usb_reset_configuration(struct usb_device *dev); extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); extern void usb_reset_endpoint(struct usb_device *dev, unsigned int epaddr); diff --git a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 39ce3f939b..61ab2ac3f4 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1487,6 +1487,103 @@ command_cleanup: +@@ -1491,6 +1491,103 @@ command_cleanup: } /* @@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5402,6 +5499,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5406,6 +5503,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 9d06e3c494..be7ace05e2 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1271,6 +1274,9 @@ +@@ -1272,6 +1275,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm27xx/patches-5.4/950-0313-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch b/target/linux/bcm27xx/patches-5.4/950-0313-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch index d72712eb8b..50d512ba8a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0313-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0313-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch @@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell --- a/Makefile +++ b/Makefile -@@ -1281,6 +1281,9 @@ ifneq ($(dtstree),) +@@ -1285,6 +1285,9 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ diff --git a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch index 7d4b6bb4d9..4026b200d1 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -3490,7 +3490,7 @@ static int bcmgenet_probe(struct platfor +@@ -3491,7 +3491,7 @@ static int bcmgenet_probe(struct platfor priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); priv->irq1 = platform_get_irq(pdev, 1); diff --git a/target/linux/bcm27xx/patches-5.4/950-0389-Initialise-rpi-firmware-before-clk-bcm2835.patch b/target/linux/bcm27xx/patches-5.4/950-0389-Initialise-rpi-firmware-before-clk-bcm2835.patch index ec26bfbb7d..81ed8a96cf 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0389-Initialise-rpi-firmware-before-clk-bcm2835.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0389-Initialise-rpi-firmware-before-clk-bcm2835.patch @@ -36,7 +36,7 @@ Co-authored-by: Phil Elwell MODULE_DESCRIPTION("BCM2835 clock driver"); --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -416,7 +416,7 @@ out2: +@@ -480,7 +480,7 @@ out2: out1: return ret; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch b/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch index 09ea71185c..489ac2034c 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch @@ -139,7 +139,7 @@ Signed-off-by: Mauro Carvalho Chehab +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15145,6 +15145,14 @@ S: Maintained +@@ -15138,6 +15138,14 @@ S: Maintained F: drivers/media/i2c/imx214.c F: Documentation/devicetree/bindings/media/i2c/sony,imx214.txt diff --git a/target/linux/bcm27xx/patches-5.4/950-0454-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch b/target/linux/bcm27xx/patches-5.4/950-0454-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch index e61e6e4e13..3a492cacf6 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0454-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0454-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch @@ -15,7 +15,7 @@ Signed-off-by: Nataliya Korovkina --- a/Makefile +++ b/Makefile -@@ -1281,7 +1281,7 @@ ifneq ($(dtstree),) +@@ -1285,7 +1285,7 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ diff --git a/target/linux/bcm27xx/patches-5.4/950-0532-dt-bindings-display-Convert-VC4-bindings-to-schemas.patch b/target/linux/bcm27xx/patches-5.4/950-0532-dt-bindings-display-Convert-VC4-bindings-to-schemas.patch index d9482649cc..26097dc66f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0532-dt-bindings-display-Convert-VC4-bindings-to-schemas.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0532-dt-bindings-display-Convert-VC4-bindings-to-schemas.patch @@ -695,7 +695,7 @@ Signed-off-by: Maxime Ripard +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -5574,7 +5574,7 @@ T: git git://github.com/anholt/linux +@@ -5567,7 +5567,7 @@ T: git git://github.com/anholt/linux S: Supported F: drivers/gpu/drm/vc4/ F: include/uapi/drm/vc4_drm.h diff --git a/target/linux/bcm27xx/patches-5.4/950-0642-media-uapi-Add-MEDIA_BUS_FMT_SENSOR_DATA-media-bus-f.patch b/target/linux/bcm27xx/patches-5.4/950-0642-media-uapi-Add-MEDIA_BUS_FMT_SENSOR_DATA-media-bus-f.patch index 65162cc5d5..42abcfca1c 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0642-media-uapi-Add-MEDIA_BUS_FMT_SENSOR_DATA-media-bus-f.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0642-media-uapi-Add-MEDIA_BUS_FMT_SENSOR_DATA-media-bus-f.patch @@ -15,11 +15,10 @@ Signed-off-by: Naushir Patuck --- a/Documentation/media/uapi/v4l/subdev-formats.rst +++ b/Documentation/media/uapi/v4l/subdev-formats.rst -@@ -7794,3 +7794,36 @@ formats. - - 0x5001 - - Interleaved raw UYVY and JPEG image format with embedded meta-data - used by Samsung S3C73MX camera sensors. -+ +@@ -7821,3 +7821,35 @@ The following table lists the existing m + both sides of the link and the bus format is a fixed + metadata format that is not configurable from userspace. + Width and height will be set to 0 for this format. + + +.. _v4l2-mbus-sensor-data: @@ -54,11 +53,11 @@ Signed-off-by: Naushir Patuck + --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h -@@ -155,4 +155,7 @@ - /* HSV - next is 0x6002 */ - #define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001 +@@ -163,4 +163,7 @@ + */ + #define MEDIA_BUS_FMT_METADATA_FIXED 0x7001 +/* Sensor ancillary metadata formats - next is 0x7002 */ -+#define MEDIA_BUS_FMT_SENSOR_DATA 0x7001 ++#define MEDIA_BUS_FMT_SENSOR_DATA 0x7002 + #endif /* __LINUX_MEDIA_BUS_FORMAT_H */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0653-Revert-firmware-raspberrypi-register-clk-device.patch b/target/linux/bcm27xx/patches-5.4/950-0653-Revert-firmware-raspberrypi-register-clk-device.patch index 01533d1f3f..2cfeabf004 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0653-Revert-firmware-raspberrypi-register-clk-device.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0653-Revert-firmware-raspberrypi-register-clk-device.patch @@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -21,7 +21,6 @@ +@@ -22,7 +22,6 @@ #define MBOX_CHAN_PROPERTY 8 static struct platform_device *rpi_hwmon; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell struct rpi_firmware { struct mbox_client cl; -@@ -299,12 +298,6 @@ rpi_register_hwmon_driver(struct device +@@ -302,12 +301,6 @@ rpi_register_hwmon_driver(struct device } } @@ -36,10 +36,10 @@ Signed-off-by: Phil Elwell - -1, NULL, 0); -} - - static int rpi_firmware_probe(struct platform_device *pdev) + static void rpi_firmware_delete(struct kref *kref) { - struct device *dev = &pdev->dev; -@@ -334,7 +327,6 @@ static int rpi_firmware_probe(struct pla + struct rpi_firmware *fw = container_of(kref, struct rpi_firmware, +@@ -365,7 +358,6 @@ static int rpi_firmware_probe(struct pla rpi_firmware_print_firmware_revision(fw); rpi_firmware_print_firmware_hash(fw); rpi_register_hwmon_driver(dev, fw); @@ -47,12 +47,12 @@ Signed-off-by: Phil Elwell return 0; } -@@ -355,8 +347,6 @@ static int rpi_firmware_remove(struct pl +@@ -386,8 +378,6 @@ static int rpi_firmware_remove(struct pl platform_device_unregister(rpi_hwmon); rpi_hwmon = NULL; - platform_device_unregister(rpi_clk); - rpi_clk = NULL; - mbox_free_channel(fw->chan); - g_pdev = NULL; + rpi_firmware_put(fw); + g_pdev = NULL; diff --git a/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch b/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch index e90c9656f2..fe18e8ef32 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch @@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15198,6 +15198,14 @@ T: git git://linuxtv.org/media_tree.git +@@ -15191,6 +15191,14 @@ T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/i2c/imx355.c diff --git a/target/linux/bcm27xx/patches-5.4/950-0722-dma-buf-Add-dma-buf-heaps-framework.patch b/target/linux/bcm27xx/patches-5.4/950-0722-dma-buf-Add-dma-buf-heaps-framework.patch index f60d402379..66ba435a69 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0722-dma-buf-Add-dma-buf-heaps-framework.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0722-dma-buf-Add-dma-buf-heaps-framework.patch @@ -54,7 +54,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20191203172641.66642-2-john. --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -4963,6 +4963,24 @@ F: include/linux/*fence.h +@@ -4956,6 +4956,24 @@ F: include/linux/*fence.h F: Documentation/driver-api/dma-buf.rst T: git git://anongit.freedesktop.org/drm/drm-misc diff --git a/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch b/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch index 6852dbf275..92ddff187f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch @@ -81,7 +81,7 @@ Signed-off-by: Mauro Carvalho Chehab + }; --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15202,6 +15202,14 @@ S: Maintained +@@ -15195,6 +15195,14 @@ S: Maintained F: drivers/media/i2c/imx274.c F: Documentation/devicetree/bindings/media/i2c/imx274.txt diff --git a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch index c66ce3c0a2..18b92656ea 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch @@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell /* Reinitialize TDMA and RDMA and SW housekeeping */ ret = bcmgenet_init_dma(priv); -@@ -3682,7 +3690,7 @@ static int bcmgenet_resume(struct device +@@ -3683,7 +3691,7 @@ static int bcmgenet_resume(struct device bcmgenet_power_up(priv, GENET_POWER_WOL_MAGIC); /* Disable RX/TX DMA and flush TX queues */ diff --git a/target/linux/bcm27xx/patches-5.4/950-1009-firmware-raspberrypi-Add-support-for-tryonce-reboot-.patch b/target/linux/bcm27xx/patches-5.4/950-1009-firmware-raspberrypi-Add-support-for-tryonce-reboot-.patch index 4d7a83f02b..6a25337143 100644 --- a/target/linux/bcm27xx/patches-5.4/950-1009-firmware-raspberrypi-Add-support-for-tryonce-reboot-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-1009-firmware-raspberrypi-Add-support-for-tryonce-reboot-.patch @@ -20,7 +20,7 @@ mechanism to be implemented for OS upgrades. --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c -@@ -190,6 +190,7 @@ static int rpi_firmware_notify_reboot(st +@@ -193,6 +193,7 @@ static int rpi_firmware_notify_reboot(st { struct rpi_firmware *fw; struct platform_device *pdev = g_pdev; @@ -28,7 +28,7 @@ mechanism to be implemented for OS upgrades. if (!pdev) return 0; -@@ -198,8 +199,28 @@ static int rpi_firmware_notify_reboot(st +@@ -201,8 +202,28 @@ static int rpi_firmware_notify_reboot(st if (!fw) return 0; diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index dcdf48149a..a988d27753 100644 --- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -40,7 +40,7 @@ it on BCM4708 family. /* called during probe() after chip reset completes */ --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -158,6 +158,49 @@ int xhci_start(struct xhci_hcd *xhci) +@@ -159,6 +159,49 @@ int xhci_start(struct xhci_hcd *xhci) return ret; } @@ -90,7 +90,7 @@ it on BCM4708 family. /* * Reset a halted HC. * -@@ -608,10 +651,20 @@ static int xhci_init(struct usb_hcd *hcd +@@ -612,10 +655,20 @@ static int xhci_init(struct usb_hcd *hcd static int xhci_run_finished(struct xhci_hcd *xhci) { @@ -114,7 +114,7 @@ it on BCM4708 family. xhci->shared_hcd->state = HC_STATE_RUNNING; xhci->cmd_ring_state = CMD_RING_STATE_RUNNING; -@@ -621,6 +674,10 @@ static int xhci_run_finished(struct xhci +@@ -625,6 +678,10 @@ static int xhci_run_finished(struct xhci xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_run for USB3 roothub"); return 0; diff --git a/target/linux/generic/backport-5.4/020-13-BACKPORT-mm-swapcache-support-to-handle-the-shadow-e.patch b/target/linux/generic/backport-5.4/020-13-BACKPORT-mm-swapcache-support-to-handle-the-shadow-e.patch index 8f409c7e36..7fe4962568 100644 --- a/target/linux/generic/backport-5.4/020-13-BACKPORT-mm-swapcache-support-to-handle-the-shadow-e.patch +++ b/target/linux/generic/backport-5.4/020-13-BACKPORT-mm-swapcache-support-to-handle-the-shadow-e.patch @@ -232,7 +232,7 @@ Tested-by: Yu Zhao SetPageWorkingset(new_page); --- a/mm/swapfile.c +++ b/mm/swapfile.c -@@ -715,6 +715,7 @@ static void add_to_avail_list(struct swa +@@ -716,6 +716,7 @@ static void add_to_avail_list(struct swa static void swap_range_free(struct swap_info_struct *si, unsigned long offset, unsigned int nr_entries) { @@ -240,7 +240,7 @@ Tested-by: Yu Zhao unsigned long end = offset + nr_entries - 1; void (*swap_slot_free_notify)(struct block_device *, unsigned long); -@@ -740,6 +741,7 @@ static void swap_range_free(struct swap_ +@@ -741,6 +742,7 @@ static void swap_range_free(struct swap_ swap_slot_free_notify(si->bdev, offset); offset++; } diff --git a/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch b/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch index 29c023714f..316e9b303b 100644 --- a/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch +++ b/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch @@ -570,7 +570,7 @@ Commit-Queue: Yu Zhao #if defined(CONFIG_NUMA_BALANCING) && !defined(LAST_CPUPID_NOT_IN_PAGE_FLAGS) --- a/mm/swapfile.c +++ b/mm/swapfile.c -@@ -2702,6 +2702,8 @@ SYSCALL_DEFINE1(swapoff, const char __us +@@ -2703,6 +2703,8 @@ SYSCALL_DEFINE1(swapoff, const char __us err = 0; atomic_inc(&proc_poll_event); wake_up_interruptible(&proc_poll_wait); @@ -579,7 +579,7 @@ Commit-Queue: Yu Zhao out_dput: filp_close(victim, NULL); -@@ -3328,6 +3330,8 @@ SYSCALL_DEFINE2(swapon, const char __use +@@ -3329,6 +3331,8 @@ SYSCALL_DEFINE2(swapon, const char __use mutex_unlock(&swapon_mutex); atomic_inc(&proc_poll_event); wake_up_interruptible(&proc_poll_wait); diff --git a/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch b/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch index 215e1df3d8..d5d9e522e5 100644 --- a/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch +++ b/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch @@ -260,7 +260,7 @@ Commit-Queue: Yu Zhao /* forking complete and child started to run, tell ptracer */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3468,6 +3468,7 @@ context_switch(struct rq *rq, struct tas +@@ -3471,6 +3471,7 @@ context_switch(struct rq *rq, struct tas * finish_task_switch()'s mmdrop(). */ switch_mm_irqs_off(prev->active_mm, next->mm, next); @@ -268,7 +268,7 @@ Commit-Queue: Yu Zhao if (!prev->mm) { // from kernel /* will mmdrop() in finish_task_switch(). */ -@@ -6283,6 +6284,7 @@ void idle_task_exit(void) +@@ -6286,6 +6287,7 @@ void idle_task_exit(void) if (mm != &init_mm) { switch_mm(mm, &init_mm, current); diff --git a/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch b/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch index ec6d0e5092..753ce85007 100644 --- a/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch +++ b/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch @@ -192,7 +192,7 @@ Signed-off-by: Jason A. Donenfeld --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17586,6 +17586,14 @@ L: linux-gpio@vger.kernel.org +@@ -17579,6 +17579,14 @@ L: linux-gpio@vger.kernel.org S: Maintained F: drivers/gpio/gpio-ws16c48.c diff --git a/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch b/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch index 34686f84a7..ead5a3fcea 100644 --- a/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch +++ b/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6328,15 +6328,10 @@ void netif_napi_del(struct napi_struct * +@@ -6332,15 +6332,10 @@ void netif_napi_del(struct napi_struct * } EXPORT_SYMBOL(netif_napi_del); @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller weight = n->weight; /* This NAPI_STATE_SCHED test is for avoiding a race -@@ -6354,7 +6349,7 @@ static int napi_poll(struct napi_struct +@@ -6358,7 +6353,7 @@ static int napi_poll(struct napi_struct WARN_ON_ONCE(work > weight); if (likely(work < weight)) @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller /* Drivers must not modify the NAPI state if they * consume the entire weight. In such cases this code -@@ -6363,7 +6358,7 @@ static int napi_poll(struct napi_struct +@@ -6367,7 +6362,7 @@ static int napi_poll(struct napi_struct */ if (unlikely(napi_disable_pending(n))) { napi_complete(n); @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller } if (n->gro_bitmask) { -@@ -6381,12 +6376,29 @@ static int napi_poll(struct napi_struct +@@ -6385,12 +6380,29 @@ static int napi_poll(struct napi_struct if (unlikely(!list_empty(&n->poll_list))) { pr_warn_once("%s: Budget exhausted after napi rescheduled\n", n->dev ? n->dev->name : "backlog"); diff --git a/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch index c890240915..782101b75b 100644 --- a/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch +++ b/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch @@ -76,7 +76,7 @@ Signed-off-by: David S. Miller /** * napi_synchronize - wait until NAPI is not running -@@ -1792,6 +1782,8 @@ enum netdev_ml_priv_type { +@@ -1794,6 +1784,8 @@ enum netdev_ml_priv_type { * * @wol_enabled: Wake-on-LAN is enabled * @@ -85,7 +85,7 @@ Signed-off-by: David S. Miller * FIXME: cleanup struct net_device such that network protocol info * moves out. */ -@@ -2084,6 +2076,7 @@ struct net_device { +@@ -2083,6 +2075,7 @@ struct net_device { struct lock_class_key addr_list_lock_key; bool proto_down; unsigned wol_enabled:1; @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller static int __dev_open(struct net_device *dev, struct netlink_ext_ack *extack) { const struct net_device_ops *ops = dev->netdev_ops; -@@ -3891,6 +3913,21 @@ int gro_normal_batch __read_mostly = 8; +@@ -3893,6 +3915,21 @@ int gro_normal_batch __read_mostly = 8; static inline void ____napi_schedule(struct softnet_data *sd, struct napi_struct *napi) { @@ -153,7 +153,7 @@ Signed-off-by: David S. Miller list_add_tail(&napi->poll_list, &sd->poll_list); __raise_softirq_irqoff(NET_RX_SOFTIRQ); } -@@ -6282,6 +6319,12 @@ void netif_napi_add(struct net_device *d +@@ -6286,6 +6323,12 @@ void netif_napi_add(struct net_device *d set_bit(NAPI_STATE_NPSVC, &napi->state); list_add_rcu(&napi->dev_list, &dev->napi_list); napi_hash_add(napi); @@ -166,7 +166,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(netif_napi_add); -@@ -6298,9 +6341,28 @@ void napi_disable(struct napi_struct *n) +@@ -6302,9 +6345,28 @@ void napi_disable(struct napi_struct *n) hrtimer_cancel(&n->timer); clear_bit(NAPI_STATE_DISABLE, &n->state); @@ -195,7 +195,7 @@ Signed-off-by: David S. Miller static void flush_gro_hash(struct napi_struct *napi) { int i; -@@ -6325,6 +6387,11 @@ void netif_napi_del(struct napi_struct * +@@ -6329,6 +6391,11 @@ void netif_napi_del(struct napi_struct * flush_gro_hash(napi); napi->gro_bitmask = 0; @@ -207,7 +207,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(netif_napi_del); -@@ -6404,6 +6471,51 @@ static int napi_poll(struct napi_struct +@@ -6408,6 +6475,51 @@ static int napi_poll(struct napi_struct return work; } diff --git a/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch index 05c40a91d5..9eb502724d 100644 --- a/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch +++ b/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller * @n: NAPI context --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3917,8 +3917,9 @@ static inline void ____napi_schedule(str +@@ -3919,8 +3919,9 @@ static inline void ____napi_schedule(str if (test_bit(NAPI_STATE_THREADED, &napi->state)) { /* Paired with smp_mb__before_atomic() in @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller * wake_up_process() when it's not NULL. */ thread = READ_ONCE(napi->thread); -@@ -6296,6 +6297,49 @@ static void init_gro_hash(struct napi_st +@@ -6300,6 +6301,49 @@ static void init_gro_hash(struct napi_st napi->gro_bitmask = 0; } diff --git a/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch index 103ed5713b..53ec61ad48 100644 --- a/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch +++ b/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch @@ -45,7 +45,7 @@ Cc: Hannes Frederic Sowa enum gro_result { --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3924,6 +3924,8 @@ static inline void ____napi_schedule(str +@@ -3926,6 +3926,8 @@ static inline void ____napi_schedule(str */ thread = READ_ONCE(napi->thread); if (thread) { @@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa wake_up_process(thread); return; } -@@ -6084,7 +6086,8 @@ bool napi_complete_done(struct napi_stru +@@ -6088,7 +6090,8 @@ bool napi_complete_done(struct napi_stru WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED)); @@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa /* If STATE_MISSED was set, leave STATE_SCHED set, * because we will call napi->poll() one more time. -@@ -6517,16 +6520,25 @@ static int napi_poll(struct napi_struct +@@ -6521,16 +6524,25 @@ static int napi_poll(struct napi_struct static int napi_thread_wait(struct napi_struct *napi) { diff --git a/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch index a02597329b..40cf4672ad 100644 --- a/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch +++ b/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch @@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6524,7 +6524,7 @@ static int napi_thread_wait(struct napi_ +@@ -6528,7 +6528,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); @@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski /* Testing SCHED_THREADED bit here to make sure the current * kthread owns this napi and could poll on this napi. * Testing SCHED bit is not enough because SCHED bit might be -@@ -6542,6 +6542,7 @@ static int napi_thread_wait(struct napi_ +@@ -6546,6 +6546,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); } __set_current_state(TASK_RUNNING); diff --git a/target/linux/generic/backport-5.4/612-v5.15-netfilter-conntrack-sanitize-table-size-default-sett.patch b/target/linux/generic/backport-5.4/612-v5.15-netfilter-conntrack-sanitize-table-size-default-sett.patch index 1e7773c193..19d92f2d1d 100644 --- a/target/linux/generic/backport-5.4/612-v5.15-netfilter-conntrack-sanitize-table-size-default-sett.patch +++ b/target/linux/generic/backport-5.4/612-v5.15-netfilter-conntrack-sanitize-table-size-default-sett.patch @@ -58,7 +58,7 @@ Signed-off-by: Pablo Neira Ayuso 0 - disabled (default) --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -2418,26 +2418,24 @@ int nf_conntrack_init_start(void) +@@ -2421,26 +2421,24 @@ int nf_conntrack_init_start(void) spin_lock_init(&nf_conntrack_locks[i]); if (!nf_conntrack_htable_size) { diff --git a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch index b063efb859..4b4a121f6c 100644 --- a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch +++ b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch @@ -66,7 +66,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5478,8 +5478,7 @@ static inline void skb_gro_reset_offset( +@@ -5482,8 +5482,7 @@ static inline void skb_gro_reset_offset( NAPI_GRO_CB(skb)->frag0 = NULL; NAPI_GRO_CB(skb)->frag0_len = 0; diff --git a/target/linux/generic/backport-5.4/704-v5.6-net-dsa-Get-information-about-stacked-DSA-protocol.patch b/target/linux/generic/backport-5.4/704-v5.6-net-dsa-Get-information-about-stacked-DSA-protocol.patch index 0a05721864..4ec12dabb5 100644 --- a/target/linux/generic/backport-5.4/704-v5.6-net-dsa-Get-information-about-stacked-DSA-protocol.patch +++ b/target/linux/generic/backport-5.4/704-v5.6-net-dsa-Get-information-about-stacked-DSA-protocol.patch @@ -202,7 +202,7 @@ Signed-off-by: David S. Miller } --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -4878,7 +4878,8 @@ static struct mv88e6xxx_chip *mv88e6xxx_ +@@ -4884,7 +4884,8 @@ static struct mv88e6xxx_chip *mv88e6xxx_ } static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds, diff --git a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch index 81acdaecd2..7cf5fc5893 100644 --- a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch +++ b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch @@ -25,7 +25,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -4929,6 +4929,80 @@ static int mv88e6xxx_port_mdb_del(struct +@@ -4935,6 +4935,80 @@ static int mv88e6xxx_port_mdb_del(struct return err; } @@ -106,7 +106,7 @@ Signed-off-by: David S. Miller static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port, bool unicast, bool multicast) { -@@ -4983,6 +5057,8 @@ static const struct dsa_switch_ops mv88e +@@ -4989,6 +5063,8 @@ static const struct dsa_switch_ops mv88e .port_mdb_prepare = mv88e6xxx_port_mdb_prepare, .port_mdb_add = mv88e6xxx_port_mdb_add, .port_mdb_del = mv88e6xxx_port_mdb_del, diff --git a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch index 9985e1cf56..bc2a4085c0 100644 --- a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch +++ b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -4996,7 +4996,7 @@ static void mv88e6xxx_port_mirror_del(st +@@ -5002,7 +5002,7 @@ static void mv88e6xxx_port_mirror_del(st if (chip->info->ops->set_egress_port(chip, direction, dsa_upstream_port(ds, diff --git a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch index d963222639..6c31c41c68 100644 --- a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch +++ b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch @@ -18,7 +18,7 @@ Signed-off-by: Martin K. Petersen --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c -@@ -465,10 +465,14 @@ void scsi_attach_vpd(struct scsi_device +@@ -472,10 +472,14 @@ void scsi_attach_vpd(struct scsi_device return; for (i = 4; i < vpd_buf->len; i++) { diff --git a/target/linux/generic/hack-5.4/259-regmap_dynamic.patch b/target/linux/generic/hack-5.4/259-regmap_dynamic.patch index 812e182467..872c2ea01b 100644 --- a/target/linux/generic/hack-5.4/259-regmap_dynamic.patch +++ b/target/linux/generic/hack-5.4/259-regmap_dynamic.patch @@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -3118,3 +3119,5 @@ static int __init regmap_initcall(void) +@@ -3120,3 +3121,5 @@ static int __init regmap_initcall(void) return 0; } postcore_initcall(regmap_initcall); diff --git a/target/linux/generic/hack-5.4/280-rfkill-stubs.patch b/target/linux/generic/hack-5.4/280-rfkill-stubs.patch index 2e48aea1cf..8715a1a5c6 100644 --- a/target/linux/generic/hack-5.4/280-rfkill-stubs.patch +++ b/target/linux/generic/hack-5.4/280-rfkill-stubs.patch @@ -26,7 +26,7 @@ Signed-off-by: John Crispin * @name: name of the struct -- the string is not copied internally --- a/net/Makefile +++ b/net/Makefile -@@ -53,7 +53,7 @@ obj-$(CONFIG_TIPC) += tipc/ +@@ -52,7 +52,7 @@ obj-$(CONFIG_TIPC) += tipc/ obj-$(CONFIG_NETLABEL) += netlabel/ obj-$(CONFIG_IUCV) += iucv/ obj-$(CONFIG_SMC) += smc/ diff --git a/target/linux/generic/hack-5.4/661-kernel-ct-size-the-hashtable-more-adequately.patch b/target/linux/generic/hack-5.4/661-kernel-ct-size-the-hashtable-more-adequately.patch index b1bb1bc2e5..7ee8d37d49 100644 --- a/target/linux/generic/hack-5.4/661-kernel-ct-size-the-hashtable-more-adequately.patch +++ b/target/linux/generic/hack-5.4/661-kernel-ct-size-the-hashtable-more-adequately.patch @@ -14,7 +14,7 @@ Signed-off-by: Rui Salvaterra --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -2419,7 +2419,7 @@ int nf_conntrack_init_start(void) +@@ -2422,7 +2422,7 @@ int nf_conntrack_init_start(void) if (!nf_conntrack_htable_size) { nf_conntrack_htable_size diff --git a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch index 64d7684420..e0d8b3fbb0 100644 --- a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau device, it has to decide which ones to send first, which ones to --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -2283,7 +2283,7 @@ static int __init pktsched_init(void) +@@ -2300,7 +2300,7 @@ static int __init pktsched_init(void) return err; } diff --git a/target/linux/generic/hack-5.4/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-5.4/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch index 1da388c862..2344db3bcb 100644 --- a/target/linux/generic/hack-5.4/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch +++ b/target/linux/generic/hack-5.4/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch @@ -1,6 +1,6 @@ --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2492,6 +2492,9 @@ static int mv88e6xxx_setup_port(struct m +@@ -2497,6 +2497,9 @@ static int mv88e6xxx_setup_port(struct m if (dsa_is_cpu_port(ds, port)) reg = 0; diff --git a/target/linux/generic/hack-5.4/721-phy_packets.patch b/target/linux/generic/hack-5.4/721-phy_packets.patch index 3df66bc4df..8f5965f2d1 100644 --- a/target/linux/generic/hack-5.4/721-phy_packets.patch +++ b/target/linux/generic/hack-5.4/721-phy_packets.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1549,6 +1549,7 @@ enum netdev_priv_flags { +@@ -1552,6 +1552,7 @@ enum netdev_priv_flags { IFF_FAILOVER_SLAVE = 1<<28, IFF_L3MDEV_RX_HANDLER = 1<<29, IFF_LIVE_RENAME_OK = 1<<30, @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau }; #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN -@@ -1581,6 +1582,7 @@ enum netdev_priv_flags { +@@ -1584,6 +1585,7 @@ enum netdev_priv_flags { #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER #define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK @@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau /* Specifies the type of the struct net_device::ml_priv pointer */ enum netdev_ml_priv_type { -@@ -1891,6 +1893,11 @@ struct net_device { +@@ -1893,6 +1895,11 @@ struct net_device { const struct tlsdev_ops *tlsdev_ops; #endif @@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau const struct header_ops *header_ops; unsigned int flags; -@@ -1973,6 +1980,10 @@ struct net_device { +@@ -1972,6 +1979,10 @@ struct net_device { struct mpls_dev __rcu *mpls_ptr; #endif @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2694,6 +2694,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2695,6 +2695,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2825,16 +2829,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2826,16 +2830,6 @@ static inline struct sk_buff *dev_alloc_ } @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3223,10 +3223,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -3225,10 +3225,20 @@ static int xmit_one(struct sk_buff *skb, if (dev_nit_active(dev)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch b/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch index 76032d9b82..5d4f37e070 100644 --- a/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-5.4/904-debloat_dma_buf.patch @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2770,6 +2770,7 @@ int wake_up_state(struct task_struct *p, +@@ -2773,6 +2773,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch index 2c332fa331..218f7840e8 100644 --- a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch @@ -115,7 +115,7 @@ Signed-off-by: Zhi Chen depends on NETFILTER_ADVANCED --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -2570,6 +2570,9 @@ int nf_conntrack_init_net(struct net *ne +@@ -2573,6 +2573,9 @@ int nf_conntrack_init_net(struct net *ne nf_conntrack_helper_pernet_init(net); nf_conntrack_proto_pernet_init(net); @@ -295,7 +295,7 @@ Signed-off-by: Zhi Chen struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3511,9 +3518,15 @@ static int ctnetlink_stat_exp_cpu(struct +@@ -3507,9 +3514,15 @@ static int ctnetlink_stat_exp_cpu(struct } #ifdef CONFIG_NF_CONNTRACK_EVENTS diff --git a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch index cb3198fc6d..bd86387fa2 100644 --- a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -12,7 +12,7 @@ struct list_head *br_ip_list); --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -828,6 +828,10 @@ struct sk_buff { +@@ -829,6 +829,10 @@ struct sk_buff { __u8 scm_io_uring:1; __u8 gro_skip:1; @@ -80,7 +80,7 @@ struct net_bridge_port *p; --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3220,9 +3220,17 @@ static int xmit_one(struct sk_buff *skb, +@@ -3222,9 +3222,17 @@ static int xmit_one(struct sk_buff *skb, unsigned int len; int rc; @@ -99,7 +99,7 @@ #ifdef CONFIG_ETHERNET_PACKET_MANGLE if (!dev->eth_mangle_tx || (skb = dev->eth_mangle_tx(dev, skb)) != NULL) -@@ -4756,6 +4764,11 @@ void netdev_rx_handler_unregister(struct +@@ -4760,6 +4768,11 @@ void netdev_rx_handler_unregister(struct } EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); @@ -111,7 +111,7 @@ /* * Limit the use of PFMEMALLOC reserves to those protocols that implement * the special handling of PFMEMALLOC skbs. -@@ -4806,6 +4819,10 @@ static int __netif_receive_skb_core(stru +@@ -4810,6 +4823,10 @@ static int __netif_receive_skb_core(stru int ret = NET_RX_DROP; __be16 type; @@ -122,7 +122,7 @@ net_timestamp_check(!READ_ONCE(netdev_tstamp_prequeue), skb); trace_netif_receive_skb(skb); -@@ -4845,6 +4862,16 @@ another_round: +@@ -4849,6 +4866,16 @@ another_round: goto out; } @@ -141,7 +141,7 @@ --- a/net/Kconfig +++ b/net/Kconfig -@@ -473,3 +473,6 @@ config HAVE_CBPF_JIT +@@ -471,3 +471,6 @@ config HAVE_CBPF_JIT # Extended BPF JIT (eBPF) config HAVE_EBPF_JIT bool diff --git a/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch b/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch index 698eea8a99..bd1e3e4e48 100644 --- a/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch +++ b/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch @@ -1,6 +1,6 @@ --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1366,6 +1366,7 @@ static const struct usb_device_id produc +@@ -1369,6 +1369,7 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ @@ -10,7 +10,7 @@ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */ --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -400,6 +400,7 @@ static void option_instat_callback(struc +@@ -404,6 +404,7 @@ static void option_instat_callback(struc * Mobidata, etc sell under their own brand names. */ #define LONGCHEER_VENDOR_ID 0x1c9e @@ -18,7 +18,7 @@ /* 4G Systems products */ /* This one was sold as the VW and Skoda "Carstick LTE" */ -@@ -612,6 +613,16 @@ static void option_instat_callback(struc +@@ -621,6 +622,16 @@ static void option_instat_callback(struc /* Device needs ZLP */ #define ZLP BIT(17) @@ -35,7 +35,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, -@@ -646,6 +657,8 @@ static const struct usb_device_id option +@@ -655,6 +666,8 @@ static const struct usb_device_id option { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), .driver_info = RSVD(4) }, diff --git a/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 680ea7e9b8..fcf3aa035a 100644 --- a/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -6931,7 +6931,7 @@ static void __ref alloc_node_mem_map(str +@@ -6947,7 +6947,7 @@ static void __ref alloc_node_mem_map(str mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index b21daea4f0..cc19a5e628 100644 --- a/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1168,6 +1168,73 @@ static struct mtd_info * __init open_mtd +@@ -1177,6 +1177,73 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -82,7 +82,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1251,6 +1318,12 @@ static int __init ubi_init(void) +@@ -1260,6 +1327,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/generic/pending-5.4/630-packet_socket_type.patch b/target/linux/generic/pending-5.4/630-packet_socket_type.patch index 38323ab5f0..a45d505962 100644 --- a/target/linux/generic/pending-5.4/630-packet_socket_type.patch +++ b/target/linux/generic/pending-5.4/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1801,6 +1801,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1802,6 +1802,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1808,6 +1809,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1809,6 +1810,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1820,7 +1822,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1821,7 +1823,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2068,12 +2070,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2067,12 +2069,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2199,12 +2201,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2198,12 +2200,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3310,6 +3312,7 @@ static int packet_create(struct net *net +@@ -3313,6 +3315,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; @@ -3952,6 +3955,16 @@ packet_setsockopt(struct socket *sock, i - po->xmit = val ? packet_direct_xmit : dev_queue_xmit; + WRITE_ONCE(po->xmit, val ? packet_direct_xmit : dev_queue_xmit); return 0; } + case PACKET_RECV_TYPE: @@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau break; --- a/net/packet/internal.h +++ b/net/packet/internal.h -@@ -136,6 +136,7 @@ struct packet_sock { +@@ -135,6 +135,7 @@ struct packet_sock { int (*xmit)(struct sk_buff *skb); struct packet_type prot_hook ____cacheline_aligned_in_smp; atomic_t tp_drops ____cacheline_aligned_in_smp; diff --git a/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch b/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch index 88d2cb10ad..e29c0f941e 100644 --- a/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch +++ b/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch @@ -23,7 +23,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -931,6 +931,13 @@ struct devlink; +@@ -934,6 +934,13 @@ struct devlink; struct tlsdev_ops; @@ -37,7 +37,7 @@ Signed-off-by: Pablo Neira Ayuso /* * This structure defines the management hooks for network devices. * The following hooks can be defined; unless noted otherwise, they are -@@ -1163,6 +1170,10 @@ struct tlsdev_ops; +@@ -1166,6 +1173,10 @@ struct tlsdev_ops; * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, * u16 flags); * @@ -48,7 +48,7 @@ Signed-off-by: Pablo Neira Ayuso * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); * Called to change device carrier. Soft-devices (like dummy, team, etc) * which do not represent real hardware may define this to allow their -@@ -1410,6 +1421,8 @@ struct net_device_ops { +@@ -1413,6 +1424,8 @@ struct net_device_ops { int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, u16 flags); @@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso +MODULE_ALIAS("nf-flow-table-hw"); --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -5758,6 +5758,13 @@ static int nf_tables_flowtable_parse_hoo +@@ -5802,6 +5802,13 @@ static int nf_tables_flowtable_parse_hoo if (err < 0) return err; @@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL); if (!ops) return -ENOMEM; -@@ -5888,10 +5895,19 @@ static int nf_tables_newflowtable(struct +@@ -5932,10 +5939,19 @@ static int nf_tables_newflowtable(struct } flowtable->data.type = type; @@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK], flowtable); if (err < 0) -@@ -6017,7 +6033,8 @@ static int nf_tables_fill_flowtable_info +@@ -6061,7 +6077,8 @@ static int nf_tables_fill_flowtable_info nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) || nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle), diff --git a/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch b/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch index d766ca9140..900f272e57 100644 --- a/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch +++ b/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -932,6 +932,7 @@ struct tlsdev_ops; +@@ -935,6 +935,7 @@ struct tlsdev_ops; struct flow_offload; @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau enum flow_offload_type { FLOW_OFFLOAD_ADD = 0, -@@ -1170,8 +1171,15 @@ enum flow_offload_type { +@@ -1173,8 +1174,15 @@ enum flow_offload_type { * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, * u16 flags); * @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau * Adds/deletes flow entry to/from net device flowtable. * * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); -@@ -1421,8 +1429,11 @@ struct net_device_ops { +@@ -1424,8 +1432,11 @@ struct net_device_ops { int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, u16 flags); diff --git a/target/linux/generic/pending-5.4/655-increase_skb_pad.patch b/target/linux/generic/pending-5.4/655-increase_skb_pad.patch index 16c65ce3f7..3ca190f0aa 100644 --- a/target/linux/generic/pending-5.4/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-5.4/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2660,7 +2660,7 @@ static inline int pskb_network_may_pull( +@@ -2661,7 +2661,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index bec6787dc8..f66415f08b 100644 --- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1936,6 +1936,8 @@ struct net_device { +@@ -1938,6 +1938,8 @@ struct net_device { struct netdev_hw_addr_list mc; struct netdev_hw_addr_list dev_addrs; @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -826,6 +826,7 @@ struct sk_buff { +@@ -827,6 +827,7 @@ struct sk_buff { __u8 decrypted:1; #endif __u8 scm_io_uring:1; @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5544,6 +5544,9 @@ static enum gro_result dev_gro_receive(s +@@ -5548,6 +5548,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -7487,6 +7490,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7491,6 +7494,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7537,6 +7582,7 @@ static int __netdev_upper_dev_link(struc +@@ -7541,6 +7586,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7630,6 +7676,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7634,6 +7680,7 @@ void netdev_upper_dev_unlink(struct net_ __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8360,6 +8407,7 @@ int dev_set_mac_address(struct net_devic +@@ -8364,6 +8411,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch b/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch index a49b48f744..c1ce9f066a 100644 --- a/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch +++ b/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch @@ -17,7 +17,7 @@ Signed-off-by: DENG Qingfang --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2663,6 +2663,7 @@ static int mv88e6xxx_setup(struct dsa_sw +@@ -2668,6 +2668,7 @@ static int mv88e6xxx_setup(struct dsa_sw chip->ds = ds; ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip); diff --git a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index dc9e61eb9d..13267a4002 100644 --- a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -5083,6 +5083,7 @@ static int mv88e6xxx_register_switch(str +@@ -5089,6 +5089,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; diff --git a/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch b/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch index c4cbaaa777..b1cf332763 100644 --- a/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch +++ b/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch @@ -41,7 +41,7 @@ ChangeLog v1->v2: #include "libata.h" #include "libata-transport.h" -@@ -4590,6 +4591,34 @@ int ata_scsi_add_hosts(struct ata_host * +@@ -4608,6 +4609,34 @@ int ata_scsi_add_hosts(struct ata_host * return rc; } @@ -76,7 +76,7 @@ ChangeLog v1->v2: void ata_scsi_scan_host(struct ata_port *ap, int sync) { int tries = 5; -@@ -4615,6 +4644,7 @@ void ata_scsi_scan_host(struct ata_port +@@ -4633,6 +4662,7 @@ void ata_scsi_scan_host(struct ata_port NULL); if (!IS_ERR(sdev)) { dev->sdev = sdev; diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile index 5679c337e1..d71f278ce3 100644 --- a/target/linux/ipq40xx/Makefile +++ b/target/linux/ipq40xx/Makefile @@ -19,7 +19,6 @@ DEFAULT_PACKAGES += \ kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ kmod-ath10k-ct wpad-openssl \ kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019-ct \ - e2fsprogs uboot-envtools \ - autocore-arm luci-app-cpufreq + uboot-envtools automount autocore-arm luci-app-cpufreq $(eval $(call BuildTarget)) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi index 8f971e505c..cb75e86c74 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi @@ -112,6 +112,16 @@ status = "okay"; }; }; + + regulator-usb-vbus { + compatible = "regulator-fixed"; + regulator-name = "USB_VBUS"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + gpio = <&tlmm 68 GPIO_ACTIVE_LOW>; + }; }; @@ -280,7 +290,7 @@ pins = "gpio55", "gpio56", "gpio57", "gpio60", "gpio62", "gpio63", "gpio64", "gpio65", "gpio66", - "gpio67", "gpio68", "gpio69"; + "gpio67", "gpio69"; function = "qpic"; bias-pull-down; }; diff --git a/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch b/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch index 167673bd11..a774f0e1ea 100644 --- a/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch +++ b/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch @@ -24,7 +24,7 @@ Reviewed-by: Grant Grundler --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -776,6 +776,16 @@ struct xps_map { +@@ -779,6 +779,16 @@ struct xps_map { #define XPS_MIN_MAP_ALLOC ((L1_CACHE_ALIGN(offsetof(struct xps_map, queues[1])) \ - sizeof(struct xps_map)) / sizeof(u16)) @@ -41,7 +41,7 @@ Reviewed-by: Grant Grundler /* * This structure holds all XPS maps for device. Maps are indexed by CPU. */ -@@ -1379,6 +1389,9 @@ struct net_device_ops { +@@ -1382,6 +1392,9 @@ struct net_device_ops { const struct sk_buff *skb, u16 rxq_index, u32 flow_id); diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 344a88c045..5b70b5d5a6 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -21,6 +21,6 @@ DEFAULT_PACKAGES += \ kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ kmod-phy-qcom-ipq806x-usb kmod-usb3 kmod-usb-dwc3-qcom \ kmod-ath10k-ct wpad-openssl uboot-envtools \ - autocore-arm luci-app-cpufreq + automount autocore-arm luci-app-cpufreq $(eval $(call BuildTarget)) diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 00fb6390cc..e35bcc7291 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -66,6 +66,13 @@ qcom,ipq8064-db149) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0" ;; +ruijie,rg-mtfi-m520) + hw_mac_addr=$(mtd_get_mac_ascii PRODUCTINFO ethaddr) + ucidef_add_switch "switch0" \ + "1:lan" "6@eth1" "5:wan" "0@eth0" + ucidef_set_interface_macaddr "wan" "$hw_mac_addr" + ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 1)" + ;; tplink,ad7200) ucidef_add_switch "switch0" \ "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0" diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index abfe789ca9..cc4fbb1c7e 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -7,6 +7,22 @@ board=$(board_name) case "$FIRMWARE" in +"ath10k/cal-pci-0000:01:00.0.bin") + case "$board" in + ruijie,rg-mtfi-m520) + caldata_extract "ART" 0x1000 0x844 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii PRODUCTINFO ethaddr) 2) + ;; + esac + ;; +"ath10k/cal-pci-0001:01:00.0.bin") + case "$board" in + ruijie,rg-mtfi-m520) + caldata_extract "ART" 0x5000 0x844 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii PRODUCTINFO ethaddr) 3) + ;; + esac + ;; "ath10k/pre-cal-pci-0000:01:00.0.bin") case $board in askey,rt4230w-rev6 |\ diff --git a/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh b/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh index ca8d0b1555..569a19bac7 100644 --- a/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh @@ -8,6 +8,11 @@ preinit_set_mac_address() { ip link set dev eth0 address "${lan_mac}" ip link set dev eth1 address "${wan_mac}" ;; + ruijie,rg-mtfi-m520) + base_mac=$(mtd_get_mac_ascii PRODUCTINFO ethaddr) + ip link set dev eth0 address $(macaddr_add "$base_mac" 1) + ip link set dev eth1 address $(macaddr_add "$base_mac" 2) + ;; esac } diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 5b6e78a7b3..57c7e627df 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -44,6 +44,9 @@ platform_do_upgrade() { linksys,ea8500) platform_do_upgrade_linksys "$1" ;; + ruijie,rg-mtfi-m520) + ruijie_do_upgrade "$1" + ;; tplink,ad7200 |\ tplink,c2600) PART_NAME="os-image:rootfs" diff --git a/target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh b/target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh new file mode 100644 index 0000000000..6644621715 --- /dev/null +++ b/target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh @@ -0,0 +1,54 @@ +# +# Copyright (C) 2016 lede-project.org +# + +ruijie_do_flash() { + local tar_file=$1 + local kernel=$2 + local rootfs=$3 + + # keep sure its unbound + losetup --detach-all || { + echo Failed to detach all loop devices. Skip this try. + reboot -f + } + + # use the first found directory in the tar archive + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} + + echo "flashing kernel to $kernel" + tar xf $tar_file ${board_dir}/kernel -O > $kernel + + echo "flashing rootfs to $rootfs" + tar xf $tar_file ${board_dir}/root -O > $rootfs + + # Cleanup + losetup -d /dev/loop0 >/dev/null 2>&1 + sync + umount -a + reboot -f +} + +ruijie_do_upgrade() { + local tar_file="$1" + local board=$(board_name) + local kernel= + local rootfs= + + case "$board" in + ruijie,rg-mtfi-m520) + kernel="/dev/mmcblk0p2" + rootfs="/dev/mmcblk0p3" + ;; + *) + return 1 + ;; + esac + + ruijie_do_flash $tar_file $kernel $rootfs + + nand_do_upgrade "$1" + + return 0 +} diff --git a/target/linux/ipq806x/config-5.4 b/target/linux/ipq806x/config-5.4 index 68ed6ec0c7..fcf1570da7 100644 --- a/target/linux/ipq806x/config-5.4 +++ b/target/linux/ipq806x/config-5.4 @@ -188,6 +188,8 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-rg-mtfi-m520.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-rg-mtfi-m520.dts new file mode 100644 index 0000000000..8d2e35ec7d --- /dev/null +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-rg-mtfi-m520.dts @@ -0,0 +1,326 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq8064-v2.0.dtsi" + +#include + +/ { + model = "Ruijie RG-MTFi-M520"; + compatible = "ruijie,rg-mtfi-m520", "qcom,ipq8064"; + + memory@0 { + reg = <0x42000000 0x7e000000>; + device_type = "memory"; + }; + + aliases { + mdio-gpio0 = &mdio0; + sdcc1 = &sdcc1; + + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + }; + + chosen { + bootargs = "root=/dev/mmcblk0p3 rootfstype=squashfs,ext4 rootwait noinitrd"; + }; + + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "green:sys"; + gpios = <&gpio_ext 15 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&qcom_pinmux { + button_pins: button_pins { + mux { + pins = "gpio54"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + mdio0_pins: mdio0_pins { + clk { + pins = "gpio1"; + input-disable; + }; + }; + + rgmii2_pins: rgmii2_pins { + tx { + pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32"; + input-disable; + }; + }; + + sdcc1_pins: sdcc1_pinmux { + mux { + pins = "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47"; + function = "sdc1"; + }; + + cmd { + pins = "gpio45"; + drive-strength = <10>; + bias-pull-up; + }; + + data { + pins = "gpio38", "gpio39", "gpio40", "gpio41", + "gpio43", "gpio44", "gpio46", "gpio47"; + drive-strength = <10>; + bias-pull-up; + }; + + clk { + pins = "gpio42"; + drive-strength = <16>; + bias-disable; + }; + }; + + spi_pins: spi_pins { + cs { + pins = "gpio20"; + drive-strength = <12>; + }; + }; +}; + +&gsbi2 { + qcom,mode = ; + status = "okay"; + + i2c@124a0000 { + status = "okay"; + + lm75@48 { + compatible = "lm75"; + reg = <0x48>; + }; + + pcf8563: rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + + gpio_ext: tca9539@74 { + compatible = "ti,tca9539"; + reg = <0x74>; + + gpio-controller; + #gpio-cells = <2>; + }; + }; +}; + +&gsbi5 { + qcom,mode = ; + status = "okay"; + + spi4: spi@1a280000 { + status = "okay"; + + pinctrl-0 = <&spi_pins>; + pinctrl-names = "default"; + + cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; + + m25p80@0 { + compatible = "s25fl256s1"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <50000000>; + reg = <0>; + + SBL1@0 { + label = "SBL1"; + reg = <0x0 0x10000>; + read-only; + }; + + MIBIB@10000 { + label = "MIBIB"; + reg = <0x10000 0x10000>; + read-only; + }; + + SBL2@20000 { + label = "SBL2"; + reg = <0x20000 0x20000>; + read-only; + }; + + SBL3@40000 { + label = "SBL3"; + reg = <0x40000 0x30000>; + read-only; + }; + + DDRCONFIG@70000 { + label = "DDRCONFIG"; + reg = <0x70000 0x10000>; + read-only; + }; + + PRODUCTINFO@80000 { + label = "PRODUCTINFO"; + reg = <0x80000 0x10000>; + read-only; + }; + + TZ@90000 { + label = "TZ"; + reg = <0x90000 0x30000>; + read-only; + }; + + RPM@c0000 { + label = "RPM"; + reg = <0xc0000 0x20000>; + read-only; + }; + + APPSBL@e0000 { + label = "APPSBL"; + reg = <0xe0000 0x80000>; + read-only; + }; + + APPSBLENV@160000 { + label = "APPSBLENV"; + reg = <0x160000 0x10000>; + read-only; + }; + + BOOTCONFIG@170000 { + label = "BOOTCONFIG"; + reg = <0x170000 0x10000>; + read-only; + }; + + ART@180000 { + label = "ART"; + reg = <0x180000 0x40000>; + read-only; + }; + }; + }; +}; + +&sata_phy { + status = "okay"; +}; + +&sata { + status = "okay"; +}; + +&usb3_0 { + status = "okay"; +}; + +&usb3_1 { + status = "okay"; +}; + +&pcie0 { + status = "okay"; + reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&pcie0_pins>; + pinctrl-names = "default"; +}; + +&pcie1 { + status = "okay"; + reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&pcie1_pins>; + pinctrl-names = "default"; + max-link-speed = <1>; +}; + +&mdio0 { + status = "okay"; + + pinctrl-0 = <&mdio0_pins>; + pinctrl-names = "default"; + + phy0: ethernet-phy@0 { + reg = <0>; + qca,ar8327-initvals = < + 0x00004 0x7600000 /* PAD0_MODE */ + 0x00008 0x1000000 /* PAD5_MODE */ + 0x0000c 0x80 /* PAD6_MODE */ + 0x000e4 0x6a545 /* MAC_POWER_SEL */ + 0x000e0 0xc74164de /* SGMII_CTRL */ + 0x0007c 0x4e /* PORT0_STATUS */ + 0x00094 0x4e /* PORT6_STATUS */ + >; + }; + + phy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +&gmac1 { + status = "okay"; + phy-mode = "rgmii"; + qcom,id = <1>; + + pinctrl-0 = <&rgmii2_pins>; + pinctrl-names = "default"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&gmac2 { + status = "okay"; + phy-mode = "sgmii"; + qcom,id = <2>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&amba { + sdcc1: sdcc@12400000 { + status = "okay"; + pinctrl-0 = <&sdcc1_pins>; + pinctrl-names = "default"; + }; +}; + +&adm_dma { + status = "okay"; +}; + +&CPU_SPC { + status = "disabled"; +}; diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 71d2fcf25b..e9985e1549 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -345,6 +345,23 @@ define Device/qcom_ipq8064-db149 endef TARGET_DEVICES += qcom_ipq8064-db149 +define Device/ruijie_rg-mtfi-m520 + DEVICE_VENDOR := Ruijie + DEVICE_MODEL := RG-MTFi-M520 + SOC := qcom-ipq8064 + BLOCKSIZE := 64k + KERNEL_SIZE := 4096k + KERNEL_SUFFIX := -uImage + KERNEL = kernel-bin | append-dtb | uImage none | pad-to $$(KERNEL_SIZE) + KERNEL_NAME := zImage + IMAGES += factory.bin + IMAGE/factory.bin := qsdk-ipq-factory-mmc + IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata + DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs kmod-hwmon-lm75 \ + kmod-fs-f2fs kmod-rtc-pcf8563 losetup mkf2fs +endef +TARGET_DEVICES += ruijie_rg-mtfi-m520 + define Device/tplink_ad7200 $(call Device/TpSafeImage) DEVICE_VENDOR := TP-Link diff --git a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch index ab355ac62b..b01f8e671f 100644 --- a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -842,7 +842,26 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -842,7 +842,27 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq4019-ap.dk04.1-c3.dtb \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ @@ -26,6 +26,7 @@ Signed-off-by: John Crispin + qcom-ipq8064-mi-router-hd.dtb \ + qcom-ipq8064-r7500.dtb \ + qcom-ipq8064-r7500v2.dtb \ ++ qcom-ipq8064-rg-mtfi-m520.dtb \ + qcom-ipq8064-unifi-ac-hd.dtb \ + qcom-ipq8064-wg2600hp.dtb \ + qcom-ipq8064-wpq864.dtb \ diff --git a/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch b/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch index b7cebd9d39..50848c27a7 100644 --- a/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch +++ b/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch @@ -1,6 +1,6 @@ --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c -@@ -598,6 +598,7 @@ static const struct of_device_id qcom_sc +@@ -597,6 +597,7 @@ static const struct of_device_id qcom_sc SCM_HAS_BUS_CLK) }, { .compatible = "qcom,scm-ipq4019" }, diff --git a/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch b/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch index f77b067f16..b2c992a94c 100644 --- a/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch +++ b/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch @@ -14,7 +14,7 @@ Signed-off-by: Madalin Bucur --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -1031,6 +1031,7 @@ void skb_dump(const char *level, const s +@@ -1032,6 +1032,7 @@ void skb_dump(const char *level, const s void skb_tx_error(struct sk_buff *skb); void consume_skb(struct sk_buff *skb); void __consume_stateless_skb(struct sk_buff *skb); diff --git a/target/linux/layerscape/patches-5.4/701-net-0130-bus-fsl-mc-move-fsl_mc_command-struct-in-a-uapi-head.patch b/target/linux/layerscape/patches-5.4/701-net-0130-bus-fsl-mc-move-fsl_mc_command-struct-in-a-uapi-head.patch index 335ec7108c..3db8a74a3b 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0130-bus-fsl-mc-move-fsl_mc_command-struct-in-a-uapi-head.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0130-bus-fsl-mc-move-fsl_mc_command-struct-in-a-uapi-head.patch @@ -16,7 +16,7 @@ Signed-off-by: Ioana Ciornei --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -13437,6 +13437,8 @@ S: Maintained +@@ -13430,6 +13430,8 @@ S: Maintained F: drivers/bus/fsl-mc/ F: Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt F: Documentation/networking/device_drivers/freescale/dpaa2/overview.rst diff --git a/target/linux/layerscape/patches-5.4/701-net-0132-bus-fsl-mc-add-root-dprc-rescan-attribute.patch b/target/linux/layerscape/patches-5.4/701-net-0132-bus-fsl-mc-add-root-dprc-rescan-attribute.patch index 9062346821..af3ae792ea 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0132-bus-fsl-mc-add-root-dprc-rescan-attribute.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0132-bus-fsl-mc-add-root-dprc-rescan-attribute.patch @@ -31,7 +31,7 @@ Signed-off-by: Ioana Ciornei +Users: Userspace drivers and management tools --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -13439,6 +13439,7 @@ F: Documentation/devicetree/bindings/mis +@@ -13432,6 +13432,7 @@ F: Documentation/devicetree/bindings/mis F: Documentation/networking/device_drivers/freescale/dpaa2/overview.rst F: Documentation/networking/dpaa2/overview.rst F: include/uapi/linux/fsl_mc.h diff --git a/target/linux/layerscape/patches-5.4/701-net-0261-net-mscc-ocelot-publish-ocelot_sys.h-to-include-soc-.patch b/target/linux/layerscape/patches-5.4/701-net-0261-net-mscc-ocelot-publish-ocelot_sys.h-to-include-soc-.patch index 98556523e3..353c4f8cd1 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0261-net-mscc-ocelot-publish-ocelot_sys.h-to-include-soc-.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0261-net-mscc-ocelot-publish-ocelot_sys.h-to-include-soc-.patch @@ -24,7 +24,7 @@ Signed-off-by: David S. Miller --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -10825,6 +10825,7 @@ M: Microchip Linux Driver Support --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17357,6 +17357,13 @@ S: Maintained +@@ -17350,6 +17350,13 @@ S: Maintained F: drivers/input/serio/userio.c F: include/uapi/linux/userio.h diff --git a/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch b/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch index b0831675a7..04d0a092de 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17362,6 +17362,7 @@ M: Vladimir Oltean L: netdev@vger.kernel.org S: Maintained diff --git a/target/linux/layerscape/patches-5.4/701-net-0323-staging-fsl_ppfe-eth-add-pfe-support-to-Kconfig-and-.patch b/target/linux/layerscape/patches-5.4/701-net-0323-staging-fsl_ppfe-eth-add-pfe-support-to-Kconfig-and-.patch index 7d071397f0..c266fd7ec4 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0323-staging-fsl_ppfe-eth-add-pfe-support-to-Kconfig-and-.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0323-staging-fsl_ppfe-eth-add-pfe-support-to-Kconfig-and-.patch @@ -15,7 +15,7 @@ Signed-off-by: Dong Aisheng --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -6575,6 +6575,14 @@ F: drivers/ptp/ptp_qoriq_debugfs.c +@@ -6568,6 +6568,14 @@ F: drivers/ptp/ptp_qoriq_debugfs.c F: include/linux/fsl/ptp_qoriq.h F: Documentation/devicetree/bindings/ptp/ptp-qoriq.txt diff --git a/target/linux/layerscape/patches-5.4/701-net-0334-net-tsn-netlink-interface-for-APP-layer-to-config-TS.patch b/target/linux/layerscape/patches-5.4/701-net-0334-net-tsn-netlink-interface-for-APP-layer-to-config-TS.patch index 33de677930..1cdd45e186 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0334-net-tsn-netlink-interface-for-APP-layer-to-config-TS.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0334-net-tsn-netlink-interface-for-APP-layer-to-config-TS.patch @@ -1370,7 +1370,7 @@ Signed-off-by: Po Liu +#endif /* _UAPI_GENL_TSN_H */ --- a/net/Kconfig +++ b/net/Kconfig -@@ -240,6 +240,7 @@ source "net/ieee802154/Kconfig" +@@ -238,6 +238,7 @@ source "net/ieee802154/Kconfig" source "net/mac802154/Kconfig" source "net/sched/Kconfig" source "net/dcb/Kconfig" @@ -1380,7 +1380,7 @@ Signed-off-by: Po Liu source "net/openvswitch/Kconfig" --- a/net/Makefile +++ b/net/Makefile -@@ -59,6 +59,9 @@ obj-$(CONFIG_CAIF) += caif/ +@@ -58,6 +58,9 @@ obj-$(CONFIG_CAIF) += caif/ ifneq ($(CONFIG_DCB),) obj-y += dcb/ endif diff --git a/target/linux/layerscape/patches-5.4/809-jailhouse-0020-jailhouse-Add-simple-debug-console-via-the-hyperviso.patch b/target/linux/layerscape/patches-5.4/809-jailhouse-0020-jailhouse-Add-simple-debug-console-via-the-hyperviso.patch index 72f3048d8f..d9db5af68d 100644 --- a/target/linux/layerscape/patches-5.4/809-jailhouse-0020-jailhouse-Add-simple-debug-console-via-the-hyperviso.patch +++ b/target/linux/layerscape/patches-5.4/809-jailhouse-0020-jailhouse-Add-simple-debug-console-via-the-hyperviso.patch @@ -21,7 +21,7 @@ From http://git.kiszka.org/?p=linux.git;a=shortlog;h=refs/heads/queues/jailhouse --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -8773,6 +8773,7 @@ L: jailhouse-dev@googlegroups.com +@@ -8766,6 +8766,7 @@ L: jailhouse-dev@googlegroups.com S: Maintained F: arch/x86/kernel/jailhouse.c F: arch/x86/include/asm/jailhouse_para.h diff --git a/target/linux/layerscape/patches-5.4/810-keys-0001-security-keys-secure_key-Adds-the-secure-key-support.patch b/target/linux/layerscape/patches-5.4/810-keys-0001-security-keys-secure_key-Adds-the-secure-key-support.patch index 65b996d879..89b0cd3cc0 100644 --- a/target/linux/layerscape/patches-5.4/810-keys-0001-security-keys-secure_key-Adds-the-secure-key-support.patch +++ b/target/linux/layerscape/patches-5.4/810-keys-0001-security-keys-secure_key-Adds-the-secure-key-support.patch @@ -100,7 +100,7 @@ Reviewed-by: Sahil Malhotra + $ keyctl load secure kmk-master "load 'cat secure_key.blob'" @u --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9074,6 +9074,17 @@ F: include/keys/trusted-type.h +@@ -9067,6 +9067,17 @@ F: include/keys/trusted-type.h F: security/keys/trusted.c F: include/keys/trusted.h diff --git a/target/linux/layerscape/patches-5.4/810-keys-0002-encrypted_keys-Adds-support-for-secure-key-type-as-m.patch b/target/linux/layerscape/patches-5.4/810-keys-0002-encrypted_keys-Adds-support-for-secure-key-type-as-m.patch index ed2eaa8a61..392e884268 100644 --- a/target/linux/layerscape/patches-5.4/810-keys-0002-encrypted_keys-Adds-support-for-secure-key-type-as-m.patch +++ b/target/linux/layerscape/patches-5.4/810-keys-0002-encrypted_keys-Adds-support-for-secure-key-type-as-m.patch @@ -23,7 +23,7 @@ Reviewed-by: Sahil Malhotra --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9084,6 +9084,7 @@ F: include/keys/secure-type.h +@@ -9077,6 +9077,7 @@ F: include/keys/secure-type.h F: security/keys/secure_key.c F: security/keys/securekey_desc.c F: security/keys/securekey_desc.h diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0009-PCI-mobiveil-Refactor-Mobiveil-PCIe-Host-Bridge-IP-d.patch b/target/linux/layerscape/patches-5.4/812-pcie-0009-PCI-mobiveil-Refactor-Mobiveil-PCIe-Host-Bridge-IP-d.patch index acbf2fe35a..81b1634036 100644 --- a/target/linux/layerscape/patches-5.4/812-pcie-0009-PCI-mobiveil-Refactor-Mobiveil-PCIe-Host-Bridge-IP-d.patch +++ b/target/linux/layerscape/patches-5.4/812-pcie-0009-PCI-mobiveil-Refactor-Mobiveil-PCIe-Host-Bridge-IP-d.patch @@ -34,7 +34,7 @@ Reviewed-by: Subrahmanya Lingappa --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -12503,7 +12503,7 @@ M: Hou Zhiqiang +@@ -12496,7 +12496,7 @@ M: Hou Zhiqiang L: linux-pci@vger.kernel.org S: Supported F: Documentation/devicetree/bindings/pci/mobiveil-pcie.txt diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0016-PCI-mobiveil-Add-the-EP-driver-support.patch b/target/linux/layerscape/patches-5.4/812-pcie-0016-PCI-mobiveil-Add-the-EP-driver-support.patch index 5182eed992..f80c9786b5 100644 --- a/target/linux/layerscape/patches-5.4/812-pcie-0016-PCI-mobiveil-Add-the-EP-driver-support.patch +++ b/target/linux/layerscape/patches-5.4/812-pcie-0016-PCI-mobiveil-Add-the-EP-driver-support.patch @@ -20,7 +20,7 @@ Signed-off-by: Hou Zhiqiang --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -12500,6 +12500,7 @@ F: drivers/ntb/hw/mscc/ +@@ -12493,6 +12493,7 @@ F: drivers/ntb/hw/mscc/ PCI DRIVER FOR MOBIVEIL PCIE IP M: Karthikeyan Mitran M: Hou Zhiqiang diff --git a/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch b/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch index babf74329b..7cf961f8d0 100644 --- a/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch +++ b/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch @@ -12,7 +12,7 @@ Signed-off-by: Zhao Qiang --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -6597,6 +6597,12 @@ F: drivers/soc/fsl/qe/ +@@ -6590,6 +6590,12 @@ F: drivers/soc/fsl/qe/ F: include/soc/fsl/*qe*.h F: include/soc/fsl/*ucc*.h diff --git a/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch b/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch index 35f4c1bf84..73441a6c9d 100644 --- a/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch +++ b/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch @@ -14,7 +14,7 @@ Signed-off-by: Yangbo Lu --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -596,6 +596,32 @@ static void esdhc_clock_enable(struct sd +@@ -594,6 +594,32 @@ static void esdhc_clock_enable(struct sd } } @@ -47,7 +47,7 @@ Signed-off-by: Yangbo Lu static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock) { struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); -@@ -688,9 +714,7 @@ static void esdhc_of_set_clock(struct sd +@@ -686,9 +712,7 @@ static void esdhc_of_set_clock(struct sd sdhci_writel(host, temp | ESDHC_HS400_WNDW_ADJUST, ESDHC_TBCTL); esdhc_clock_enable(host, false); @@ -58,7 +58,7 @@ Signed-off-by: Yangbo Lu } /* Wait max 20 ms */ -@@ -893,10 +917,7 @@ static void esdhc_tuning_block_enable(st +@@ -891,10 +915,7 @@ static void esdhc_tuning_block_enable(st u32 val; esdhc_clock_enable(host, false); diff --git a/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch b/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch index 66518ca01e..e9149b8a5e 100644 --- a/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch +++ b/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch @@ -15,7 +15,7 @@ Acked-by: Adrian Hunter --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -929,20 +929,11 @@ static void esdhc_tuning_block_enable(st +@@ -927,20 +927,11 @@ static void esdhc_tuning_block_enable(st esdhc_clock_enable(host, true); } @@ -37,7 +37,7 @@ Acked-by: Adrian Hunter /* Write TBCTL[11:8]=4'h8 */ val = sdhci_readl(host, ESDHC_TBCTL); val &= ~(0xf << 8); -@@ -961,6 +952,25 @@ static void esdhc_prepare_sw_tuning(stru +@@ -959,6 +950,25 @@ static void esdhc_prepare_sw_tuning(stru val = sdhci_readl(host, ESDHC_TBSTAT); val = sdhci_readl(host, ESDHC_TBSTAT); @@ -63,7 +63,7 @@ Acked-by: Adrian Hunter /* Reset data lines by setting ESDHCCTL[RSTD] */ sdhci_reset(host, SDHCI_RESET_DATA); /* Write 32'hFFFF_FFFF to IRQSTAT register */ -@@ -971,10 +981,8 @@ static void esdhc_prepare_sw_tuning(stru +@@ -969,10 +979,8 @@ static void esdhc_prepare_sw_tuning(stru * then program TBPTR[TB_WNDW_END_PTR] = 4 * div_ratio * and program TBPTR[TB_WNDW_START_PTR] = 8 * div_ratio. */ diff --git a/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch b/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch index f9722b3698..c2475244b8 100644 --- a/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch +++ b/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch @@ -20,7 +20,7 @@ Acked-by: Adrian Hunter --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -895,20 +895,20 @@ static int esdhc_signal_voltage_switch(s +@@ -893,20 +893,20 @@ static int esdhc_signal_voltage_switch(s } static struct soc_device_attribute soc_tuning_erratum_type1[] = { @@ -51,7 +51,7 @@ Acked-by: Adrian Hunter { }, }; -@@ -976,13 +976,13 @@ static void esdhc_prepare_sw_tuning(stru +@@ -974,13 +974,13 @@ static void esdhc_prepare_sw_tuning(stru /* Write 32'hFFFF_FFFF to IRQSTAT register */ sdhci_writel(host, 0xFFFFFFFF, SDHCI_INT_STATUS); @@ -68,7 +68,7 @@ Acked-by: Adrian Hunter *window_start = 8 * esdhc->div_ratio; *window_end = 4 * esdhc->div_ratio; } else { -@@ -1066,6 +1066,19 @@ static int esdhc_execute_tuning(struct m +@@ -1064,6 +1064,19 @@ static int esdhc_execute_tuning(struct m if (ret) break; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch index 9050a4df75..b6eb920aa8 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch @@ -27,7 +27,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -2420,6 +2422,54 @@ static struct uart_driver lpuart_reg = { +@@ -2428,6 +2430,54 @@ static struct uart_driver lpuart_reg = { .cons = LPUART_CONSOLE, }; @@ -82,7 +82,7 @@ Signed-off-by: Fugang Duan static int lpuart_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(lpuart_dt_ids, -@@ -2457,6 +2507,10 @@ static int lpuart_probe(struct platform_ +@@ -2465,6 +2515,10 @@ static int lpuart_probe(struct platform_ sport->port.rs485_config = lpuart_config_rs485; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch index 9427ed667c..f9a9b8c4d8 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch @@ -20,7 +20,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -1572,8 +1573,17 @@ static void lpuart32_configure(struct lp +@@ -1580,8 +1581,17 @@ static void lpuart32_configure(struct lp static int lpuart32_startup(struct uart_port *port) { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch index f1d110b69b..d5b06ee949 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch @@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -928,7 +928,12 @@ static void lpuart32_rxint(struct lpuart +@@ -934,7 +934,12 @@ static void lpuart32_rxint(struct lpuart */ sr = lpuart32_read(&sport->port, UARTSTAT); rx = lpuart32_read(&sport->port, UARTDATA); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch index 23c99d19cf..8d0bb53fc6 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch @@ -124,7 +124,7 @@ Signed-off-by: Fugang Duan static inline bool is_layerscape_lpuart(struct lpuart_port *sport) { -@@ -1008,19 +1031,15 @@ static irqreturn_t lpuart32_int(int irq, +@@ -1014,19 +1037,15 @@ static irqreturn_t lpuart32_int(int irq, if ((sts & UARTSTAT_TDRE) && !sport->lpuart_dma_tx_use) lpuart32_txint(sport); @@ -148,7 +148,7 @@ Signed-off-by: Fugang Duan if (lpuart_is_32(sport)) { unsigned long sr = lpuart32_read(&sport->port, UARTSTAT); -@@ -1072,8 +1091,21 @@ static void lpuart_copy_rx_to_tty(struct +@@ -1078,8 +1097,21 @@ static void lpuart_copy_rx_to_tty(struct writeb(cr2, sport->port.membase + UARTCR2); } } @@ -171,7 +171,7 @@ Signed-off-by: Fugang Duan spin_lock_irqsave(&sport->port.lock, flags); -@@ -1136,7 +1168,33 @@ static void lpuart_copy_rx_to_tty(struct +@@ -1142,7 +1174,33 @@ static void lpuart_copy_rx_to_tty(struct spin_unlock_irqrestore(&sport->port.lock, flags); tty_flip_buffer_push(port); @@ -206,7 +206,7 @@ Signed-off-by: Fugang Duan } static void lpuart_dma_rx_complete(void *arg) -@@ -1144,6 +1202,8 @@ static void lpuart_dma_rx_complete(void +@@ -1150,6 +1208,8 @@ static void lpuart_dma_rx_complete(void struct lpuart_port *sport = arg; lpuart_copy_rx_to_tty(sport); @@ -215,7 +215,7 @@ Signed-off-by: Fugang Duan } static void lpuart_timer_func(struct timer_list *t) -@@ -1151,13 +1211,78 @@ static void lpuart_timer_func(struct tim +@@ -1157,13 +1217,78 @@ static void lpuart_timer_func(struct tim struct lpuart_port *sport = from_timer(sport, t, lpuart_timer); lpuart_copy_rx_to_tty(sport); @@ -298,8 +298,8 @@ Signed-off-by: Fugang Duan int bits, baud; struct tty_port *port = &sport->port.state->port; struct tty_struct *tty = port->tty; -@@ -1177,6 +1302,18 @@ static inline int lpuart_start_rx_dma(st - sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1)); +@@ -1183,6 +1308,18 @@ static inline int lpuart_start_rx_dma(st + sport->rx_dma_rng_buf_len = (1 << fls(sport->rx_dma_rng_buf_len)); if (sport->rx_dma_rng_buf_len < 16) sport->rx_dma_rng_buf_len = 16; +} @@ -317,7 +317,7 @@ Signed-off-by: Fugang Duan ring->buf = kzalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC); if (!ring->buf) -@@ -1202,32 +1339,7 @@ static inline int lpuart_start_rx_dma(st +@@ -1208,32 +1345,7 @@ static inline int lpuart_start_rx_dma(st return ret; } @@ -351,7 +351,7 @@ Signed-off-by: Fugang Duan } static void lpuart_dma_rx_free(struct uart_port *port) -@@ -1433,8 +1545,10 @@ static void lpuart_setup_watermark(struc +@@ -1441,8 +1553,10 @@ static void lpuart_setup_watermark(struc writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO); } @@ -363,7 +363,7 @@ Signed-off-by: Fugang Duan /* Restore cr2 */ writeb(cr2_saved, sport->port.membase + UARTCR2); -@@ -1455,6 +1569,7 @@ static void lpuart32_setup_watermark(str +@@ -1463,6 +1577,7 @@ static void lpuart32_setup_watermark(str { unsigned long val, ctrl; unsigned long ctrl_saved; @@ -371,7 +371,7 @@ Signed-off-by: Fugang Duan ctrl = lpuart32_read(&sport->port, UARTCTRL); ctrl_saved = ctrl; -@@ -1466,12 +1581,26 @@ static void lpuart32_setup_watermark(str +@@ -1474,12 +1589,26 @@ static void lpuart32_setup_watermark(str val = lpuart32_read(&sport->port, UARTFIFO); val |= UARTFIFO_TXFE | UARTFIFO_RXFE; val |= UARTFIFO_TXFLUSH | UARTFIFO_RXFLUSH; @@ -399,7 +399,7 @@ Signed-off-by: Fugang Duan /* Restore cr2 */ lpuart32_write(&sport->port, ctrl_saved, UARTCTRL); } -@@ -1483,17 +1612,29 @@ static void lpuart32_setup_watermark_ena +@@ -1491,17 +1620,29 @@ static void lpuart32_setup_watermark_ena lpuart32_setup_watermark(sport); temp = lpuart32_read(&sport->port, UARTCTRL); @@ -430,7 +430,7 @@ Signed-off-by: Fugang Duan static void lpuart_tx_dma_startup(struct lpuart_port *sport) { u32 uartbaud; -@@ -1557,19 +1698,23 @@ static int lpuart_startup(struct uart_po +@@ -1565,19 +1706,23 @@ static int lpuart_startup(struct uart_po return 0; } @@ -461,7 +461,7 @@ Signed-off-by: Fugang Duan if (!sport->lpuart_dma_tx_use) temp |= UARTCTRL_TIE; lpuart32_write(&sport->port, temp, UARTCTRL); -@@ -1613,12 +1758,12 @@ static int lpuart32_startup(struct uart_ +@@ -1621,12 +1766,12 @@ static int lpuart32_startup(struct uart_ spin_lock_irqsave(&sport->port.lock, flags); @@ -476,7 +476,7 @@ Signed-off-by: Fugang Duan lpuart32_configure(sport); spin_unlock_irqrestore(&sport->port.lock, flags); -@@ -1628,7 +1773,7 @@ static int lpuart32_startup(struct uart_ +@@ -1636,7 +1781,7 @@ static int lpuart32_startup(struct uart_ static void lpuart_dma_shutdown(struct lpuart_port *sport) { if (sport->lpuart_dma_rx_use) { @@ -485,7 +485,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); sport->lpuart_dma_rx_use = false; } -@@ -1671,11 +1816,22 @@ static void lpuart32_shutdown(struct uar +@@ -1679,11 +1824,22 @@ static void lpuart32_shutdown(struct uar spin_lock_irqsave(&port->lock, flags); @@ -510,7 +510,7 @@ Signed-off-by: Fugang Duan spin_unlock_irqrestore(&port->lock, flags); -@@ -1772,10 +1928,10 @@ lpuart_set_termios(struct uart_port *por +@@ -1780,10 +1936,10 @@ lpuart_set_termios(struct uart_port *por * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -523,7 +523,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); } -@@ -1987,10 +2143,10 @@ lpuart32_set_termios(struct uart_port *p +@@ -1995,10 +2151,10 @@ lpuart32_set_termios(struct uart_port *p * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -536,7 +536,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); } -@@ -2509,6 +2665,10 @@ static int lpuart_probe(struct platform_ +@@ -2517,6 +2673,10 @@ static int lpuart_probe(struct platform_ sport->port.dev = &pdev->dev; sport->port.type = PORT_LPUART; sport->devtype = sdata->devtype; @@ -547,7 +547,7 @@ Signed-off-by: Fugang Duan ret = platform_get_irq(pdev, 0); if (ret < 0) return ret; -@@ -2659,7 +2819,7 @@ static int lpuart_suspend(struct device +@@ -2667,7 +2827,7 @@ static int lpuart_suspend(struct device * Rx DMA path before suspend and start Rx DMA path on resume. */ if (irq_wake) { diff --git a/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch b/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch index 7fbd1943b4..371527e77a 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch @@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -1474,6 +1474,14 @@ static void lpuart32_set_mctrl(struct ua +@@ -1480,6 +1480,14 @@ static void lpuart32_set_mctrl(struct ua temp |= UARTMODIR_TXCTSE; lpuart32_write(port, temp, UARTMODIR); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch index 3849ac2225..507a1cf697 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch @@ -105,7 +105,7 @@ Signed-off-by: Shrikant Bobade static void lpuart_stop_tx(struct uart_port *port) { unsigned char temp; -@@ -2752,6 +2794,10 @@ static int lpuart_probe(struct platform_ +@@ -2760,6 +2802,10 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_attach_port; @@ -116,7 +116,7 @@ Signed-off-by: Shrikant Bobade uart_get_rs485_mode(&pdev->dev, &sport->port.rs485); if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX) -@@ -2775,6 +2821,8 @@ static int lpuart_probe(struct platform_ +@@ -2783,6 +2829,8 @@ static int lpuart_probe(struct platform_ return 0; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch index 201e792681..6f3cebf087 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch @@ -43,7 +43,7 @@ Reviewed-by: Robin Gong /* return TIOCSER_TEMT when transmitter is not busy */ static unsigned int lpuart_tx_empty(struct uart_port *port) { -@@ -2309,6 +2324,7 @@ static const struct uart_ops lpuart_pops +@@ -2317,6 +2332,7 @@ static const struct uart_ops lpuart_pops .break_ctl = lpuart_break_ctl, .startup = lpuart_startup, .shutdown = lpuart_shutdown, @@ -51,7 +51,7 @@ Reviewed-by: Robin Gong .set_termios = lpuart_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2333,6 +2349,7 @@ static const struct uart_ops lpuart32_po +@@ -2341,6 +2357,7 @@ static const struct uart_ops lpuart32_po .break_ctl = lpuart32_break_ctl, .startup = lpuart32_startup, .shutdown = lpuart32_shutdown, @@ -59,7 +59,7 @@ Reviewed-by: Robin Gong .set_termios = lpuart32_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2790,6 +2807,11 @@ static int lpuart_probe(struct platform_ +@@ -2798,6 +2815,11 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_irq_request; @@ -71,7 +71,7 @@ Reviewed-by: Robin Gong ret = uart_add_one_port(&lpuart_reg, &sport->port); if (ret) goto failed_attach_port; -@@ -2824,6 +2846,9 @@ static int lpuart_probe(struct platform_ +@@ -2832,6 +2854,9 @@ static int lpuart_probe(struct platform_ failed_reset: uart_remove_one_port(&lpuart_reg, &sport->port); failed_attach_port: @@ -81,7 +81,7 @@ Reviewed-by: Robin Gong failed_irq_request: lpuart_disable_clks(sport); return ret; -@@ -2843,15 +2868,41 @@ static int lpuart_remove(struct platform +@@ -2851,15 +2876,41 @@ static int lpuart_remove(struct platform if (sport->dma_rx_chan) dma_release_channel(sport->dma_rx_chan); @@ -123,7 +123,7 @@ Reviewed-by: Robin Gong if (lpuart_is_32(sport)) { /* disable Rx/Tx and interrupts */ -@@ -2865,10 +2916,14 @@ static int lpuart_suspend(struct device +@@ -2873,10 +2924,14 @@ static int lpuart_suspend(struct device writeb(temp, sport->port.membase + UARTCR2); } @@ -138,7 +138,7 @@ Reviewed-by: Robin Gong if (sport->lpuart_dma_rx_use) { /* -@@ -2899,9 +2954,6 @@ static int lpuart_suspend(struct device +@@ -2907,9 +2962,6 @@ static int lpuart_suspend(struct device dmaengine_terminate_all(sport->dma_tx_chan); } @@ -148,7 +148,7 @@ Reviewed-by: Robin Gong return 0; } -@@ -2909,9 +2961,11 @@ static int lpuart_resume(struct device * +@@ -2917,9 +2969,11 @@ static int lpuart_resume(struct device * { struct lpuart_port *sport = dev_get_drvdata(dev); bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); @@ -162,7 +162,7 @@ Reviewed-by: Robin Gong if (lpuart_is_32(sport)) lpuart32_setup_watermark_enable(sport); -@@ -2932,13 +2986,23 @@ static int lpuart_resume(struct device * +@@ -2940,13 +2994,23 @@ static int lpuart_resume(struct device * if (lpuart_is_32(sport)) lpuart32_configure(sport); @@ -188,7 +188,7 @@ Reviewed-by: Robin Gong static struct platform_driver lpuart_driver = { .probe = lpuart_probe, -@@ -2946,7 +3010,7 @@ static struct platform_driver lpuart_dri +@@ -2954,7 +3018,7 @@ static struct platform_driver lpuart_dri .driver = { .name = "fsl-lpuart", .of_match_table = lpuart_dt_ids, diff --git a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch index be1a5675a6..58f61ae24e 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -1739,10 +1740,23 @@ static void lpuart_rx_dma_startup(struct +@@ -1747,10 +1748,23 @@ static void lpuart_rx_dma_startup(struct } } @@ -53,7 +53,7 @@ Signed-off-by: Fugang Duan unsigned char temp; /* determine FIFO size and enable FIFO mode */ -@@ -1755,14 +1769,7 @@ static int lpuart_startup(struct uart_po +@@ -1763,14 +1777,7 @@ static int lpuart_startup(struct uart_po sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) & UARTPFIFO_FIFOSIZE_MASK); @@ -69,7 +69,7 @@ Signed-off-by: Fugang Duan return 0; } -@@ -1789,11 +1796,27 @@ static void lpuart32_configure(struct lp +@@ -1797,11 +1804,27 @@ static void lpuart32_configure(struct lp lpuart32_write(&sport->port, temp, UARTCTRL); } @@ -98,7 +98,7 @@ Signed-off-by: Fugang Duan unsigned long temp; int ret; -@@ -1825,17 +1848,8 @@ static int lpuart32_startup(struct uart_ +@@ -1833,17 +1856,8 @@ static int lpuart32_startup(struct uart_ sport->port.fifosize = sport->txfifo_size; } @@ -108,16 +108,16 @@ Signed-off-by: Fugang Duan - - lpuart_rx_dma_startup(sport); - lpuart_tx_dma_startup(sport); -+ lpuart32_hw_setup(sport); - +- - lpuart32_setup_watermark_enable(sport); - lpuart32_configure(sport); -- ++ lpuart32_hw_setup(sport); + - spin_unlock_irqrestore(&sport->port.lock, flags); return 0; } -@@ -2893,108 +2907,205 @@ static int lpuart_runtime_resume(struct +@@ -2901,108 +2915,205 @@ static int lpuart_runtime_resume(struct return lpuart_enable_clks(sport); }; @@ -197,7 +197,8 @@ Signed-off-by: Fugang Duan - } + return false; +} -+ + +- /* Disable Rx DMA to use UART port as wakeup source */ +static int lpuart_suspend_noirq(struct device *dev) +{ + struct lpuart_port *sport = dev_get_drvdata(dev); @@ -207,8 +208,7 @@ Signed-off-by: Fugang Duan + serial_lpuart_enable_wakeup(sport, !!irq_wake); + + pinctrl_pm_select_sleep_state(dev); - -- /* Disable Rx DMA to use UART port as wakeup source */ ++ + return 0; +} + @@ -302,7 +302,7 @@ Signed-off-by: Fugang Duan + ~UARTCR5_RDMAS, sport->port.membase + UARTCR5); + } + spin_unlock_irqrestore(&sport->port.lock, flags); - } ++ } + + if (sport->lpuart_dma_tx_use) { + spin_lock_irqsave(&sport->port.lock, flags); @@ -318,7 +318,7 @@ Signed-off-by: Fugang Duan + spin_unlock_irqrestore(&sport->port.lock, flags); + sport->dma_tx_in_progress = false; + dmaengine_terminate_all(sport->dma_tx_chan); -+ } + } + } else if (pm_runtime_active(sport->port.dev)) { + lpuart_disable_clks(sport); + pm_runtime_disable(sport->port.dev); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch index b32f946b01..e047a05574 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch @@ -14,7 +14,7 @@ Signed-off-by: Fugang Duan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2154,11 +2154,12 @@ lpuart32_set_termios(struct uart_port *p +@@ -2162,11 +2162,12 @@ lpuart32_set_termios(struct uart_port *p { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); unsigned long flags; @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan modem = lpuart32_read(&sport->port, UARTMODIR); /* * only support CS8 and CS7, and for CS7 must enable PE. -@@ -2195,7 +2196,9 @@ lpuart32_set_termios(struct uart_port *p +@@ -2203,7 +2204,9 @@ lpuart32_set_termios(struct uart_port *p } if (termios->c_cflag & CSTOPB) @@ -39,7 +39,7 @@ Signed-off-by: Fugang Duan /* parity must be enabled when CS7 to match 8-bits format */ if ((termios->c_cflag & CSIZE) == CS7) -@@ -2272,6 +2275,7 @@ lpuart32_set_termios(struct uart_port *p +@@ -2280,6 +2283,7 @@ lpuart32_set_termios(struct uart_port *p lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE), UARTCTRL); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch index cac8eb8d7f..90de7c7c83 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch @@ -24,7 +24,7 @@ Signed-off-by: Peng Fan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2643,7 +2643,9 @@ static int __init lpuart32_early_console +@@ -2651,7 +2651,9 @@ static int __init lpuart32_early_console if (!device->port.membase) return -ENODEV; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index ccb90f4973..9082390788 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3710,6 +3710,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3711,6 +3711,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch index 6429d816ac..c76ac325de 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch @@ -109,7 +109,7 @@ Reviewed-by: Jun Li usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1938,12 +1990,9 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1935,12 +1987,9 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index 5730adcd64..8e7131fe70 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch @@ -174,7 +174,7 @@ Signed-off-by: Peter Chen * bursts that are required to move all packets in this TD. Only SuperSpeed --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5430,6 +5430,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5434,6 +5434,7 @@ static const struct hc_driver xhci_hc_dr .disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout, .find_raw_port_number = xhci_find_raw_port_number, .clear_tt_buffer_complete = xhci_clear_tt_buffer_complete, diff --git a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch index 7ca50bfb32..c9f926f4b4 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch @@ -21,7 +21,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -195,7 +195,7 @@ int xhci_reset(struct xhci_hcd *xhci, u6 +@@ -196,7 +196,7 @@ int xhci_reset(struct xhci_hcd *xhci, u6 * Without this delay, the subsequent HC register access, * may result in a system hang very rarely. */ diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch index 7d82cd64ee..54da44261f 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch @@ -24,7 +24,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5453,6 +5453,8 @@ void xhci_init_driver(struct hc_driver * +@@ -5457,6 +5457,8 @@ void xhci_init_driver(struct hc_driver * drv->reset_bandwidth = over->reset_bandwidth; if (over->update_hub_device) drv->update_hub_device = over->update_hub_device; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch index f486134c7c..93fe0cf795 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch @@ -81,7 +81,7 @@ Signed-off-by: Ran Wang usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1990,9 +1938,12 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1987,9 +1935,12 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { diff --git a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch index 5697ceedbc..31c49ccb4c 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch @@ -108,7 +108,7 @@ Reviewed-by: Jun Li usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1938,12 +1989,16 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1935,12 +1986,16 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { diff --git a/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch b/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch index 7cd172b753..8ffa2dfc1c 100644 --- a/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch +++ b/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch @@ -362,7 +362,7 @@ EIP197_HIA_RDR(priv, ring) + EIP197_HIA_xDR_PROC_COUNT); /* If the number of requests overflowed the counter, try to proceed more -@@ -1171,6 +1216,44 @@ static struct safexcel_alg_template *saf +@@ -1176,6 +1221,44 @@ static struct safexcel_alg_template *saf &safexcel_alg_xts_aes, &safexcel_alg_gcm, &safexcel_alg_ccm, @@ -407,7 +407,7 @@ }; static int safexcel_register_algorithms(struct safexcel_crypto_priv *priv) -@@ -1240,30 +1323,30 @@ static void safexcel_unregister_algorith +@@ -1245,30 +1328,30 @@ static void safexcel_unregister_algorith static void safexcel_configure(struct safexcel_crypto_priv *priv) { @@ -457,7 +457,7 @@ } static void safexcel_init_register_offsets(struct safexcel_crypto_priv *priv) -@@ -1309,7 +1392,7 @@ static int safexcel_probe_generic(void * +@@ -1314,7 +1397,7 @@ static int safexcel_probe_generic(void * int is_pci_dev) { struct device *dev = priv->dev; @@ -466,7 +466,7 @@ int i, ret, hwctg; priv->context_pool = dmam_pool_create("safexcel-context", dev, -@@ -1371,13 +1454,16 @@ static int safexcel_probe_generic(void * +@@ -1376,13 +1459,16 @@ static int safexcel_probe_generic(void * */ version = readl(EIP197_GLOBAL(priv) + EIP197_VERSION); if (((priv->flags & SAFEXCEL_HW_EIP197) && @@ -484,7 +484,7 @@ return -ENODEV; } -@@ -1385,6 +1471,14 @@ static int safexcel_probe_generic(void * +@@ -1390,6 +1476,14 @@ static int safexcel_probe_generic(void * hwctg = version >> 28; peid = version & 255; @@ -499,7 +499,7 @@ /* Detect EIP96 packet engine and version */ version = readl(EIP197_PE(priv) + EIP197_PE_EIP96_VERSION(0)); if (EIP197_REG_LO16(version) != EIP96_VERSION_LE) { -@@ -1393,10 +1487,13 @@ static int safexcel_probe_generic(void * +@@ -1398,10 +1492,13 @@ static int safexcel_probe_generic(void * } priv->hwconfig.pever = EIP197_VERSION_MASK(version); @@ -513,7 +513,7 @@ priv->hwconfig.hwdataw = (hiaopt >> EIP197_HWDATAW_OFFSET) & EIP197_HWDATAW_MASK; priv->hwconfig.hwcfsize = ((hiaopt >> EIP197_CFSIZE_OFFSET) & -@@ -1405,6 +1502,19 @@ static int safexcel_probe_generic(void * +@@ -1410,6 +1507,19 @@ static int safexcel_probe_generic(void * priv->hwconfig.hwrfsize = ((hiaopt >> EIP197_RFSIZE_OFFSET) & EIP197_RFSIZE_MASK) + EIP197_RFSIZE_ADJUST; @@ -533,7 +533,7 @@ } else { /* EIP97 */ priv->hwconfig.hwdataw = (hiaopt >> EIP197_HWDATAW_OFFSET) & -@@ -1413,6 +1523,23 @@ static int safexcel_probe_generic(void * +@@ -1418,6 +1528,23 @@ static int safexcel_probe_generic(void * EIP97_CFSIZE_MASK; priv->hwconfig.hwrfsize = (hiaopt >> EIP97_RFSIZE_OFFSET) & EIP97_RFSIZE_MASK; @@ -557,7 +557,7 @@ } /* Get supported algorithms from EIP96 transform engine */ -@@ -1420,10 +1547,12 @@ static int safexcel_probe_generic(void * +@@ -1425,10 +1552,12 @@ static int safexcel_probe_generic(void * EIP197_PE_EIP96_OPTIONS(0)); /* Print single info line describing what we just detected */ @@ -574,7 +574,7 @@ priv->hwconfig.algo_flags); safexcel_configure(priv); -@@ -1547,7 +1676,6 @@ static void safexcel_hw_reset_rings(stru +@@ -1571,7 +1700,6 @@ static void safexcel_hw_reset_rings(stru } } @@ -582,15 +582,15 @@ /* for Device Tree platform driver */ static int safexcel_probe(struct platform_device *pdev) -@@ -1625,6 +1753,7 @@ static int safexcel_remove(struct platfo +@@ -1649,6 +1777,7 @@ static int safexcel_remove(struct platfo safexcel_unregister_algorithms(priv); safexcel_hw_reset_rings(priv); + clk_disable_unprepare(priv->reg_clk); clk_disable_unprepare(priv->clk); - for (i = 0; i < priv->config.rings; i++) -@@ -1668,9 +1797,7 @@ static struct platform_driver crypto_sa + for (i = 0; i < priv->config.rings; i++) { +@@ -1694,9 +1823,7 @@ static struct platform_driver crypto_sa .of_match_table = safexcel_of_match_table, }, }; @@ -600,7 +600,7 @@ /* PCIE devices - i.e. Inside Secure development boards */ static int safexcel_pci_probe(struct pci_dev *pdev, -@@ -1761,7 +1888,7 @@ static int safexcel_pci_probe(struct pci +@@ -1787,7 +1914,7 @@ static int safexcel_pci_probe(struct pci return rc; } @@ -609,7 +609,7 @@ { struct safexcel_crypto_priv *priv = pci_get_drvdata(pdev); int i; -@@ -1791,54 +1918,32 @@ static struct pci_driver safexcel_pci_dr +@@ -1817,54 +1944,32 @@ static struct pci_driver safexcel_pci_dr .probe = safexcel_pci_probe, .remove = safexcel_pci_remove, }; @@ -3371,7 +3371,7 @@ }; struct safexcel_work_data { -@@ -654,6 +721,12 @@ enum safexcel_eip_version { +@@ -657,6 +724,12 @@ enum safexcel_eip_version { /* Priority we use for advertising our algorithms */ #define SAFEXCEL_CRA_PRIORITY 300 @@ -3384,7 +3384,7 @@ /* EIP algorithm presence flags */ enum safexcel_eip_algorithms { SAFEXCEL_ALG_BC0 = BIT(5), -@@ -697,16 +770,23 @@ struct safexcel_register_offsets { +@@ -700,16 +773,23 @@ struct safexcel_register_offsets { enum safexcel_flags { EIP197_TRC_CACHE = BIT(0), SAFEXCEL_HW_EIP197 = BIT(1), @@ -3408,7 +3408,7 @@ }; struct safexcel_crypto_priv { -@@ -778,7 +858,7 @@ struct safexcel_inv_result { +@@ -781,7 +861,7 @@ struct safexcel_inv_result { void safexcel_dequeue(struct safexcel_crypto_priv *priv, int ring); int safexcel_rdesc_check_errors(struct safexcel_crypto_priv *priv, @@ -3417,7 +3417,7 @@ void safexcel_complete(struct safexcel_crypto_priv *priv, int ring); int safexcel_invalidate_cache(struct crypto_async_request *async, struct safexcel_crypto_priv *priv, -@@ -797,7 +877,8 @@ struct safexcel_command_desc *safexcel_a +@@ -800,7 +880,8 @@ struct safexcel_command_desc *safexcel_a bool first, bool last, dma_addr_t data, u32 len, u32 full_data_len, @@ -3427,7 +3427,7 @@ struct safexcel_result_desc *safexcel_add_rdesc(struct safexcel_crypto_priv *priv, int ring_id, bool first, bool last, -@@ -853,5 +934,43 @@ extern struct safexcel_alg_template safe +@@ -856,5 +937,43 @@ extern struct safexcel_alg_template safe extern struct safexcel_alg_template safexcel_alg_xts_aes; extern struct safexcel_alg_template safexcel_alg_gcm; extern struct safexcel_alg_template safexcel_alg_ccm; diff --git a/target/linux/mediatek/patches-5.4/0503-crypto-fix-eip97-cache-incoherent.patch b/target/linux/mediatek/patches-5.4/0503-crypto-fix-eip97-cache-incoherent.patch index 5bc0fd0b7d..887fa2e38e 100644 --- a/target/linux/mediatek/patches-5.4/0503-crypto-fix-eip97-cache-incoherent.patch +++ b/target/linux/mediatek/patches-5.4/0503-crypto-fix-eip97-cache-incoherent.patch @@ -1,6 +1,6 @@ --- a/drivers/crypto/inside-secure/safexcel.h +++ b/drivers/crypto/inside-secure/safexcel.h -@@ -722,6 +722,9 @@ enum safexcel_eip_version { +@@ -725,6 +725,9 @@ enum safexcel_eip_version { /* Priority we use for advertising our algorithms */ #define SAFEXCEL_CRA_PRIORITY 300 diff --git a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch index 13a9a51e34..f75c6b7d4d 100644 --- a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch +++ b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch @@ -52,7 +52,7 @@ Signed-off-by: David S. Miller when making changes to the MAC configuration. This means the --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3655,9 +3655,11 @@ static void mvneta_mac_link_down(struct +@@ -3675,9 +3675,11 @@ static void mvneta_mac_link_down(struct mvneta_set_eee(pp, false); } diff --git a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch index a25c845ffc..2e9f3a3259 100644 --- a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch +++ b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch @@ -10,7 +10,7 @@ #define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */ --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c -@@ -291,7 +291,7 @@ static const struct serial8250_config ua +@@ -292,7 +292,7 @@ static const struct serial8250_config ua .tx_loadsz = 16, .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT, @@ -19,7 +19,7 @@ }, [PORT_NPCM] = { .name = "Nuvoton 16550", -@@ -2615,6 +2615,11 @@ serial8250_do_set_termios(struct uart_po +@@ -2625,6 +2625,11 @@ serial8250_do_set_termios(struct uart_po unsigned long flags; unsigned int baud, quot, frac = 0; diff --git a/target/linux/mvebu/patches-5.4/003-net-mvneta-introduce-mvneta_update_stats-routine.patch b/target/linux/mvebu/patches-5.4/003-net-mvneta-introduce-mvneta_update_stats-routine.patch index f6ce6163cf..cd34764c63 100644 --- a/target/linux/mvebu/patches-5.4/003-net-mvneta-introduce-mvneta_update_stats-routine.patch +++ b/target/linux/mvebu/patches-5.4/003-net-mvneta-introduce-mvneta_update_stats-routine.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -1913,6 +1913,23 @@ static void mvneta_rxq_drop_pkts(struct +@@ -1925,6 +1925,23 @@ static void mvneta_rxq_drop_pkts(struct } } @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller static inline int mvneta_rx_refill_queue(struct mvneta_port *pp, struct mvneta_rx_queue *rxq) { -@@ -2093,14 +2110,8 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2105,14 +2122,8 @@ static int mvneta_rx_swbm(struct napi_st rxq->left_size = 0; } @@ -56,7 +56,7 @@ Signed-off-by: David S. Miller /* return some buffers to hardware queue, one at a time is too slow */ refill = mvneta_rx_refill_queue(pp, rxq); -@@ -2223,14 +2234,8 @@ err_drop_frame: +@@ -2235,14 +2246,8 @@ err_drop_frame: napi_gro_receive(napi, skb); } @@ -73,7 +73,7 @@ Signed-off-by: David S. Miller /* Update rxq management counters */ mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done); -@@ -2476,7 +2481,6 @@ static netdev_tx_t mvneta_tx(struct sk_b +@@ -2497,7 +2502,6 @@ static netdev_tx_t mvneta_tx(struct sk_b out: if (frags > 0) { @@ -81,7 +81,7 @@ Signed-off-by: David S. Miller struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id); netdev_tx_sent_queue(nq, len); -@@ -2491,10 +2495,7 @@ out: +@@ -2512,10 +2516,7 @@ out: else txq->pending += frags; diff --git a/target/linux/mvebu/patches-5.4/004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch b/target/linux/mvebu/patches-5.4/004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch index fbcae20f74..09050d55fa 100644 --- a/target/linux/mvebu/patches-5.4/004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch +++ b/target/linux/mvebu/patches-5.4/004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller /* Registers */ #define MVNETA_RXQ_CONFIG_REG(q) (0x1400 + ((q) << 2)) -@@ -607,6 +608,10 @@ struct mvneta_rx_queue { +@@ -621,6 +622,10 @@ struct mvneta_rx_queue { u32 pkts_coal; u32 time_coal; @@ -54,7 +54,7 @@ Signed-off-by: David S. Miller /* Virtual address of the RX buffer */ void **buf_virt_addr; -@@ -1825,23 +1830,21 @@ static int mvneta_rx_refill(struct mvnet +@@ -1837,23 +1842,21 @@ static int mvneta_rx_refill(struct mvnet struct mvneta_rx_queue *rxq, gfp_t gfp_mask) { @@ -86,7 +86,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1907,10 +1910,12 @@ static void mvneta_rxq_drop_pkts(struct +@@ -1919,10 +1922,12 @@ static void mvneta_rxq_drop_pkts(struct if (!data || !(rx_desc->buf_phys_addr)) continue; @@ -102,7 +102,7 @@ Signed-off-by: David S. Miller } static void -@@ -2047,8 +2052,7 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2059,8 +2064,7 @@ static int mvneta_rx_swbm(struct napi_st skb_add_rx_frag(rxq->skb, frag_num, page, frag_offset, frag_size, PAGE_SIZE); @@ -112,7 +112,7 @@ Signed-off-by: David S. Miller rxq->left_size -= frag_size; } } else { -@@ -2078,9 +2082,7 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2090,9 +2094,7 @@ static int mvneta_rx_swbm(struct napi_st frag_offset, frag_size, PAGE_SIZE); @@ -123,7 +123,7 @@ Signed-off-by: David S. Miller rxq->left_size -= frag_size; } } /* Middle or Last descriptor */ -@@ -2847,11 +2849,54 @@ static int mvneta_poll(struct napi_struc +@@ -2868,11 +2870,54 @@ static int mvneta_poll(struct napi_struc return rx_done; } diff --git a/target/linux/mvebu/patches-5.4/005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch b/target/linux/mvebu/patches-5.4/005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch index 4d9539adbb..390cbf02e9 100644 --- a/target/linux/mvebu/patches-5.4/005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch +++ b/target/linux/mvebu/patches-5.4/005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller #define IS_TSO_HEADER(txq, addr) \ ((addr >= txq->tso_hdrs_phys) && \ (addr < txq->tso_hdrs_phys + txq->size * TSO_HEADER_SIZE)) -@@ -650,7 +655,6 @@ static int txq_number = 8; +@@ -664,7 +669,6 @@ static int txq_number = 8; static int rxq_def; static int rx_copybreak __read_mostly = 256; @@ -47,7 +47,7 @@ Signed-off-by: David S. Miller /* HW BM need that each port be identify by a unique ID */ static int global_port_id; -@@ -1842,7 +1846,7 @@ static int mvneta_rx_refill(struct mvnet +@@ -1854,7 +1858,7 @@ static int mvneta_rx_refill(struct mvnet phys_addr = page_pool_get_dma_addr(page) + pp->rx_offset_correction; dma_dir = page_pool_get_dma_dir(rxq->page_pool); dma_sync_single_for_device(pp->dev->dev.parent, phys_addr, @@ -56,7 +56,7 @@ Signed-off-by: David S. Miller mvneta_rx_desc_fill(rx_desc, phys_addr, page, rxq); return 0; -@@ -1960,30 +1964,102 @@ int mvneta_rx_refill_queue(struct mvneta +@@ -1972,30 +1976,102 @@ int mvneta_rx_refill_queue(struct mvneta return i; } @@ -169,7 +169,7 @@ Signed-off-by: David S. Miller index = rx_desc - rxq->descs; page = (struct page *)rxq->buf_virt_addr[index]; -@@ -1991,100 +2067,30 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2003,100 +2079,30 @@ static int mvneta_rx_swbm(struct napi_st /* Prefetch header */ prefetch(data); @@ -275,7 +275,7 @@ Signed-off-by: David S. Miller } /* Middle or Last descriptor */ if (!(rx_status & MVNETA_RXD_LAST_DESC)) -@@ -2109,7 +2115,6 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2121,7 +2127,6 @@ static int mvneta_rx_swbm(struct napi_st /* clean uncomplete skb pointer in queue */ rxq->skb = NULL; @@ -283,7 +283,7 @@ Signed-off-by: David S. Miller } if (rcvd_pkts) -@@ -2970,7 +2975,7 @@ static void mvneta_rxq_hw_init(struct mv +@@ -2991,7 +2996,7 @@ static void mvneta_rxq_hw_init(struct mv /* Set Offset */ mvneta_rxq_offset_set(pp, rxq, 0); mvneta_rxq_buf_size_set(pp, rxq, PAGE_SIZE < SZ_64K ? @@ -292,7 +292,7 @@ Signed-off-by: David S. Miller MVNETA_RX_BUF_SIZE(pp->pkt_size)); mvneta_rxq_bm_disable(pp, rxq); mvneta_rxq_fill(pp, rxq, rxq->size); -@@ -4715,7 +4720,7 @@ static int mvneta_probe(struct platform_ +@@ -4735,7 +4740,7 @@ static int mvneta_probe(struct platform_ SET_NETDEV_DEV(dev, &pdev->dev); pp->id = global_port_id++; diff --git a/target/linux/mvebu/patches-5.4/006-net-mvneta-add-basic-XDP-support.patch b/target/linux/mvebu/patches-5.4/006-net-mvneta-add-basic-XDP-support.patch index 4e42bf9307..04b685deef 100644 --- a/target/linux/mvebu/patches-5.4/006-net-mvneta-add-basic-XDP-support.patch +++ b/target/linux/mvebu/patches-5.4/006-net-mvneta-add-basic-XDP-support.patch @@ -75,7 +75,7 @@ Signed-off-by: David S. Miller /* Core clock */ struct clk *clk; /* AXI clock */ -@@ -1965,10 +1975,50 @@ int mvneta_rx_refill_queue(struct mvneta +@@ -1977,10 +1987,50 @@ int mvneta_rx_refill_queue(struct mvneta } static int @@ -127,7 +127,7 @@ Signed-off-by: David S. Miller { unsigned char *data = page_address(page); int data_len = -MVNETA_MH_SIZE, len; -@@ -1988,7 +2038,26 @@ mvneta_swbm_rx_frame(struct mvneta_port +@@ -2000,7 +2050,26 @@ mvneta_swbm_rx_frame(struct mvneta_port rx_desc->buf_phys_addr, len, dma_dir); @@ -155,7 +155,7 @@ Signed-off-by: David S. Miller if (unlikely(!rxq->skb)) { netdev_err(dev, "Can't allocate skb on queue %d\n", -@@ -1999,8 +2068,9 @@ mvneta_swbm_rx_frame(struct mvneta_port +@@ -2011,8 +2080,9 @@ mvneta_swbm_rx_frame(struct mvneta_port } page_pool_release_page(rxq->page_pool, page); @@ -167,7 +167,7 @@ Signed-off-by: David S. Miller mvneta_rx_csum(pp, rx_desc->status, rxq->skb); rxq->left_size = rx_desc->data_size - len; -@@ -2034,7 +2104,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet +@@ -2046,7 +2116,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet /* refill descriptor with new buffer later */ skb_add_rx_frag(rxq->skb, skb_shinfo(rxq->skb)->nr_frags, @@ -176,7 +176,7 @@ Signed-off-by: David S. Miller PAGE_SIZE); } page_pool_release_page(rxq->page_pool, page); -@@ -2049,11 +2119,18 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2061,11 +2131,18 @@ static int mvneta_rx_swbm(struct napi_st { int rcvd_pkts = 0, rcvd_bytes = 0, rx_proc = 0; struct net_device *dev = pp->dev; @@ -195,7 +195,7 @@ Signed-off-by: David S. Miller /* Fairness NAPI loop */ while (rx_proc < budget && rx_proc < rx_todo) { struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq); -@@ -2081,7 +2158,8 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2093,7 +2170,8 @@ static int mvneta_rx_swbm(struct napi_st continue; } @@ -205,7 +205,7 @@ Signed-off-by: David S. Miller if (err) continue; } else { -@@ -2116,6 +2194,10 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2128,6 +2206,10 @@ static int mvneta_rx_swbm(struct napi_st /* clean uncomplete skb pointer in queue */ rxq->skb = NULL; } @@ -216,7 +216,7 @@ Signed-off-by: David S. Miller if (rcvd_pkts) mvneta_update_stats(pp, rcvd_pkts, rcvd_bytes, false); -@@ -2857,13 +2939,14 @@ static int mvneta_poll(struct napi_struc +@@ -2878,13 +2960,14 @@ static int mvneta_poll(struct napi_struc static int mvneta_create_page_pool(struct mvneta_port *pp, struct mvneta_rx_queue *rxq, int size) { @@ -232,7 +232,7 @@ Signed-off-by: David S. Miller }; int err; -@@ -3366,6 +3449,11 @@ static int mvneta_change_mtu(struct net_ +@@ -3386,6 +3469,11 @@ static int mvneta_change_mtu(struct net_ mtu = ALIGN(MVNETA_RX_PKT_SIZE(mtu), 8); } @@ -244,7 +244,7 @@ Signed-off-by: David S. Miller dev->mtu = mtu; if (!netif_running(dev)) { -@@ -4036,6 +4124,47 @@ static int mvneta_ioctl(struct net_devic +@@ -4056,6 +4144,47 @@ static int mvneta_ioctl(struct net_devic return phylink_mii_ioctl(pp->phylink, ifr, cmd); } @@ -292,7 +292,7 @@ Signed-off-by: David S. Miller /* Ethtool methods */ /* Set link ksettings (phy address, speed) for ethtools */ -@@ -4432,6 +4561,7 @@ static const struct net_device_ops mvnet +@@ -4452,6 +4581,7 @@ static const struct net_device_ops mvnet .ndo_fix_features = mvneta_fix_features, .ndo_get_stats64 = mvneta_get_stats64, .ndo_do_ioctl = mvneta_ioctl, @@ -300,7 +300,7 @@ Signed-off-by: David S. Miller }; static const struct ethtool_ops mvneta_eth_tool_ops = { -@@ -4720,7 +4850,7 @@ static int mvneta_probe(struct platform_ +@@ -4740,7 +4870,7 @@ static int mvneta_probe(struct platform_ SET_NETDEV_DEV(dev, &pdev->dev); pp->id = global_port_id++; diff --git a/target/linux/mvebu/patches-5.4/007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch b/target/linux/mvebu/patches-5.4/007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch index e075796e41..3cd7ac771f 100644 --- a/target/linux/mvebu/patches-5.4/007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch +++ b/target/linux/mvebu/patches-5.4/007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -2038,6 +2038,9 @@ mvneta_swbm_rx_frame(struct mvneta_port +@@ -2050,6 +2050,9 @@ mvneta_swbm_rx_frame(struct mvneta_port rx_desc->buf_phys_addr, len, dma_dir); @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller xdp->data_hard_start = data; xdp->data = data + MVNETA_SKB_HEADROOM + MVNETA_MH_SIZE; xdp->data_end = xdp->data + data_len; -@@ -2135,14 +2138,10 @@ static int mvneta_rx_swbm(struct napi_st +@@ -2147,14 +2150,10 @@ static int mvneta_rx_swbm(struct napi_st while (rx_proc < budget && rx_proc < rx_todo) { struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq); u32 rx_status, index; diff --git a/target/linux/mvebu/patches-5.4/008-net-mvneta-make-tx-buffer-array-agnostic.patch b/target/linux/mvebu/patches-5.4/008-net-mvneta-make-tx-buffer-array-agnostic.patch deleted file mode 100644 index 4698c23be4..0000000000 --- a/target/linux/mvebu/patches-5.4/008-net-mvneta-make-tx-buffer-array-agnostic.patch +++ /dev/null @@ -1,210 +0,0 @@ -From 9e58c8b410650b5a6eb5b8fad8474bd8425a4023 Mon Sep 17 00:00:00 2001 -From: Lorenzo Bianconi -Date: Sat, 19 Oct 2019 10:13:26 +0200 -Subject: [PATCH 6/7] net: mvneta: make tx buffer array agnostic - -Allow tx buffer array to contain both skb and xdp buffers in order to -enable xdp frame recycling adding XDP_TX verdict support - -Signed-off-by: Lorenzo Bianconi -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/marvell/mvneta.c | 66 +++++++++++++++++---------- - 1 file changed, 43 insertions(+), 23 deletions(-) - ---- a/drivers/net/ethernet/marvell/mvneta.c -+++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -565,6 +565,20 @@ struct mvneta_rx_desc { - }; - #endif - -+enum mvneta_tx_buf_type { -+ MVNETA_TYPE_SKB, -+ MVNETA_TYPE_XDP_TX, -+ MVNETA_TYPE_XDP_NDO, -+}; -+ -+struct mvneta_tx_buf { -+ enum mvneta_tx_buf_type type; -+ union { -+ struct xdp_frame *xdpf; -+ struct sk_buff *skb; -+ }; -+}; -+ - struct mvneta_tx_queue { - /* Number of this TX queue, in the range 0-7 */ - u8 id; -@@ -580,8 +594,8 @@ struct mvneta_tx_queue { - int tx_stop_threshold; - int tx_wake_threshold; - -- /* Array of transmitted skb */ -- struct sk_buff **tx_skb; -+ /* Array of transmitted buffers */ -+ struct mvneta_tx_buf *buf; - - /* Index of last TX DMA descriptor that was inserted */ - int txq_put_index; -@@ -1793,14 +1807,9 @@ static void mvneta_txq_bufs_free(struct - int i; - - for (i = 0; i < num; i++) { -+ struct mvneta_tx_buf *buf = &txq->buf[txq->txq_get_index]; - struct mvneta_tx_desc *tx_desc = txq->descs + - txq->txq_get_index; -- struct sk_buff *skb = txq->tx_skb[txq->txq_get_index]; -- -- if (skb) { -- bytes_compl += skb->len; -- pkts_compl++; -- } - - mvneta_txq_inc_get(txq); - -@@ -1808,9 +1817,12 @@ static void mvneta_txq_bufs_free(struct - dma_unmap_single(pp->dev->dev.parent, - tx_desc->buf_phys_addr, - tx_desc->data_size, DMA_TO_DEVICE); -- if (!skb) -+ if (!buf->skb) - continue; -- dev_kfree_skb_any(skb); -+ -+ bytes_compl += buf->skb->len; -+ pkts_compl++; -+ dev_kfree_skb_any(buf->skb); - } - - netdev_tx_completed_queue(nq, pkts_compl, bytes_compl); -@@ -2335,16 +2347,19 @@ static inline void - mvneta_tso_put_hdr(struct sk_buff *skb, - struct mvneta_port *pp, struct mvneta_tx_queue *txq) - { -- struct mvneta_tx_desc *tx_desc; - int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); -+ struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index]; -+ struct mvneta_tx_desc *tx_desc; - -- txq->tx_skb[txq->txq_put_index] = NULL; - tx_desc = mvneta_txq_next_desc_get(txq); - tx_desc->data_size = hdr_len; - tx_desc->command = mvneta_skb_tx_csum(pp, skb); - tx_desc->command |= MVNETA_TXD_F_DESC; - tx_desc->buf_phys_addr = txq->tso_hdrs_phys + - txq->txq_put_index * TSO_HEADER_SIZE; -+ buf->type = MVNETA_TYPE_SKB; -+ buf->skb = NULL; -+ - mvneta_txq_inc_put(txq); - } - -@@ -2353,6 +2368,7 @@ mvneta_tso_put_data(struct net_device *d - struct sk_buff *skb, char *data, int size, - bool last_tcp, bool is_last) - { -+ struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index]; - struct mvneta_tx_desc *tx_desc; - - tx_desc = mvneta_txq_next_desc_get(txq); -@@ -2366,7 +2382,8 @@ mvneta_tso_put_data(struct net_device *d - } - - tx_desc->command = 0; -- txq->tx_skb[txq->txq_put_index] = NULL; -+ buf->type = MVNETA_TYPE_SKB; -+ buf->skb = NULL; - - if (last_tcp) { - /* last descriptor in the TCP packet */ -@@ -2374,7 +2391,7 @@ mvneta_tso_put_data(struct net_device *d - - /* last descriptor in SKB */ - if (is_last) -- txq->tx_skb[txq->txq_put_index] = skb; -+ buf->skb = skb; - } - mvneta_txq_inc_put(txq); - return 0; -@@ -2459,6 +2476,7 @@ static int mvneta_tx_frag_process(struct - int i, nr_frags = skb_shinfo(skb)->nr_frags; - - for (i = 0; i < nr_frags; i++) { -+ struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index]; - skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; - void *addr = skb_frag_address(frag); - -@@ -2478,12 +2496,13 @@ static int mvneta_tx_frag_process(struct - if (i == nr_frags - 1) { - /* Last descriptor */ - tx_desc->command = MVNETA_TXD_L_DESC | MVNETA_TXD_Z_PAD; -- txq->tx_skb[txq->txq_put_index] = skb; -+ buf->skb = skb; - } else { - /* Descriptor in the middle: Not First, Not Last */ - tx_desc->command = 0; -- txq->tx_skb[txq->txq_put_index] = NULL; -+ buf->skb = NULL; - } -+ buf->type = MVNETA_TYPE_SKB; - mvneta_txq_inc_put(txq); - } - -@@ -2511,6 +2530,7 @@ static netdev_tx_t mvneta_tx(struct sk_b - struct mvneta_port *pp = netdev_priv(dev); - u16 txq_id = skb_get_queue_mapping(skb); - struct mvneta_tx_queue *txq = &pp->txqs[txq_id]; -+ struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index]; - struct mvneta_tx_desc *tx_desc; - int len = skb->len; - int frags = 0; -@@ -2543,16 +2563,17 @@ static netdev_tx_t mvneta_tx(struct sk_b - goto out; - } - -+ buf->type = MVNETA_TYPE_SKB; - if (frags == 1) { - /* First and Last descriptor */ - tx_cmd |= MVNETA_TXD_FLZ_DESC; - tx_desc->command = tx_cmd; -- txq->tx_skb[txq->txq_put_index] = skb; -+ buf->skb = skb; - mvneta_txq_inc_put(txq); - } else { - /* First but not Last */ - tx_cmd |= MVNETA_TXD_F_DESC; -- txq->tx_skb[txq->txq_put_index] = NULL; -+ buf->skb = NULL; - mvneta_txq_inc_put(txq); - tx_desc->command = tx_cmd; - /* Continue with other skb fragments */ -@@ -3138,9 +3159,8 @@ static int mvneta_txq_sw_init(struct mvn - - txq->last_desc = txq->size - 1; - -- txq->tx_skb = kmalloc_array(txq->size, sizeof(*txq->tx_skb), -- GFP_KERNEL); -- if (!txq->tx_skb) { -+ txq->buf = kmalloc_array(txq->size, sizeof(*txq->buf), GFP_KERNEL); -+ if (!txq->buf) { - dma_free_coherent(pp->dev->dev.parent, - txq->size * MVNETA_DESC_ALIGNED_SIZE, - txq->descs, txq->descs_phys); -@@ -3152,7 +3172,7 @@ static int mvneta_txq_sw_init(struct mvn - txq->size * TSO_HEADER_SIZE, - &txq->tso_hdrs_phys, GFP_KERNEL); - if (!txq->tso_hdrs) { -- kfree(txq->tx_skb); -+ kfree(txq->buf); - dma_free_coherent(pp->dev->dev.parent, - txq->size * MVNETA_DESC_ALIGNED_SIZE, - txq->descs, txq->descs_phys); -@@ -3207,7 +3227,7 @@ static void mvneta_txq_sw_deinit(struct - { - struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id); - -- kfree(txq->tx_skb); -+ kfree(txq->buf); - - if (txq->tso_hdrs) - dma_free_coherent(pp->dev->dev.parent, diff --git a/target/linux/mvebu/patches-5.4/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-5.4/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch index 830cf33ce4..2ba8bac6fd 100644 --- a/target/linux/mvebu/patches-5.4/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch +++ b/target/linux/mvebu/patches-5.4/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch @@ -16,7 +16,7 @@ Cc: Robert Marko --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -7929,6 +7929,22 @@ F: include/net/cfg802154.h +@@ -7922,6 +7922,22 @@ F: include/net/cfg802154.h F: include/net/ieee802154_netdev.h F: Documentation/networking/ieee802154.rst diff --git a/target/linux/ramips/dts/mt7620a_bolt_bl201.dts b/target/linux/ramips/dts/mt7620a_bolt_bl201.dts new file mode 100644 index 0000000000..63fb0acf68 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_bolt_bl201.dts @@ -0,0 +1,199 @@ +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "bolt,bl201", "ralink,mt7620a-soc"; + model = "Bolt BL201"; + + chosen { + bootargs = "console=ttyS0,115200"; + + led-boot = &power_red; + led-failsafe = &power_red; + led-running = &power_blue; + led-upgrade = &power_red; + label-mac-device = ðernet; + }; + + leds { + compatible = "gpio-leds"; + + wan { + label = "blue:wan"; + gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; + }; + + power_red: power_red { + label = "red:power"; + gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + }; + + power_blue: power_blue { + label = "blue:power"; + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + }; + + lte_s1_blue { + label = "blue:lte_s1"; + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + }; + + lte_s2_blue { + label = "blue:lte_s2"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + }; + + lte_s3_blue { + label = "blue:lte_s3"; + gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + }; + + lte_s4_blue { + label = "blue:lte_s4"; + gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; + }; + + wps_blue { + label = "blue:wps"; + gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; + }; + + lte_s1s2_red { + label = "red:lte_s1s2"; + gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; + }; + + lte_s3s4_red { + label = "red:lte_s3s4"; + gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; + }; + + wlan_blue { + label = "blue:wlan"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@fd0000 { + label = "crash"; + reg = <0xfd0000 0x10000>; + }; + + partition@fe0000 { + label = "reserved"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + partition@ff0000 { + label = "Bdata"; + reg = <0xff0000 0x10000>; + }; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + pinctrl-names = "default"; + + mtd-mac-address = <&factory 0x28>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; + pinctrl-names = "default"; + pinctrl-0 = <&pa_pins>; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zte_e8820s.dts b/target/linux/ramips/dts/mt7621_zte_e8820s.dts new file mode 100644 index 0000000000..4f00bb9d09 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_zte_e8820s.dts @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "zte,e8820s", "mediatek,mt7621-soc"; + model = "ZTE E8820S"; + + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_power; + led-upgrade = &led_power; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "white:power"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + led_sys: sys { + label = "white:sys"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "white:wlan2g"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + wlan5g { + label = "white:wlan5g"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + ubi-concat { + compatible = "mtd-concat"; + devices = <&ubipart0 &ubipart1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + ubi@0 { + label = "ubi"; + reg = <0x0 0x79c0000>; + }; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "debug"; + reg = <0x80000 0x80000>; + read-only; + }; + + factory: partition@100000 { + label = "factory"; + reg = <0x100000 0x40000>; + read-only; + }; + + partition@140000 { + label = "kernel"; + reg = <0x140000 0x400000>; + }; + + ubipart0: partition@540000 { + label = "ubipart0"; + reg = <0x540000 0x1c80000>; + }; + + partition@21c0000 { + label = "bdinfo"; + reg = <0x21c0000 0x80000>; + read-only; + }; + + ubipart1: partition@2240000 { + label = "ubipart1"; + reg = <0x2240000 0x5d40000>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "pci14c3,7603"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "pci14c3,7662"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe006>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "uart2", "uart3", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 0fd4da620a..c958764b6a 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -129,6 +129,15 @@ define Device/bdcom_wap2100-sk endef TARGET_DEVICES += bdcom_wap2100-sk +define Device/bolt_bl201 + SOC := mt7620a + IMAGE_SIZE := 15872k + DEVICE_VENDOR := Bolt + DEVICE_MODEL := BL201 + DEVICE_PACKAGES := kmod-mt76x2 +endef +TARGET_DEVICES += bolt_bl201 + define Device/buffalo_whr-1166d SOC := mt7620a IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 26bf091a89..0abdb68f83 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1799,6 +1799,25 @@ define Device/zio_freezio endef TARGET_DEVICES += zio_freezio +define Device/zte_e8820s + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 4096k + UBINIZE_OPTS := -E 5 + IMAGE_SIZE := 32768k + IMAGES += factory.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ + check-size + DEVICE_VENDOR := ZTE + DEVICE_MODEL := E8820S + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ + kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += zte_e8820s + define Device/zyxel_nr7101 $(Device/dsa-migration) BLOCKSIZE := 128k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 4fe7d2d076..0053f31a1e 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -41,6 +41,10 @@ asus,rt-n14u) bdcom,wap2100-sk) ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan2g" "wlan0" ;; +bolt,bl201) + ucidef_set_led_netdev "wlan0" "wlan0-link" "blue:wlan" "wlan0" + ucidef_set_led_netdev "wan" "eth0.2-link" "blue:wan" "eth0.2" "link" + ;; comfast,cf-wr800n) ucidef_set_led_netdev "lan" "lan" "white:ethernet" eth0.1 ucidef_set_led_netdev "wifi_led" "wifi" "white:wifi" "wlan0" diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 07b17a9daf..391dd91489 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -34,6 +34,7 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; alfa-network,r36m-e4g|\ + bolt,bl201|\ zbtlink,zbt-we1026-h-32m) ucidef_add_switch "switch0" \ "3:lan" "4:wan" "6@eth0" diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index c21394547f..d506f24e7a 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -123,6 +123,10 @@ xiaomi,redmi-router-ac2100) youhua,wr1200js) ucidef_set_led_netdev "internet" "INTERNET" "green:wan" "wan" ;; +zte,e8820s) + ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "white:wlan2g" "wlan0" + ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "white:wlan5g" "wlan1" + ;; esac board_config_flush diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 5eafe3dc04..62091b96bb 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -45,6 +45,10 @@ case "$board" in macaddr_setbit_la "$(mtd_get_mac_ascii Config protest_lan_mac)" \ > /sys${DEVPATH}/macaddress ;; + totolink,x5000r) + hw_mac_addr="$(mtd_get_mac_binary factory 0x4)" + [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 4 > /sys${DEVPATH}/macaddress + ;; yuncore,ax820) [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress diff --git a/target/linux/ramips/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch b/target/linux/ramips/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch index eedc7498be..0a43402536 100644 --- a/target/linux/ramips/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch +++ b/target/linux/ramips/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch @@ -46,7 +46,7 @@ Cc: linux-mips@vger.kernel.org --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -538,11 +538,88 @@ static void __init check_kernel_sections +@@ -539,11 +539,88 @@ static void __init check_kernel_sections } } @@ -140,7 +140,7 @@ Cc: linux-mips@vger.kernel.org /* * arch_mem_init - initialize memory management subsystem -@@ -570,48 +647,12 @@ static void __init arch_mem_init(char ** +@@ -571,48 +648,12 @@ static void __init arch_mem_init(char ** { extern void plat_mem_setup(void); diff --git a/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch b/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch index 63429f49b0..6a7545b4b6 100644 --- a/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch +++ b/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch @@ -16,7 +16,7 @@ Signed-off-by: Tobias Wolf --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -287,6 +287,8 @@ static unsigned long __init init_initrd( +@@ -288,6 +288,8 @@ static unsigned long __init init_initrd( * Initialize the bootmem allocator. It also setup initrd related data * if needed. */ @@ -25,7 +25,7 @@ Signed-off-by: Tobias Wolf #if defined(CONFIG_SGI_IP27) || (defined(CONFIG_CPU_LOONGSON3) && defined(CONFIG_NUMA)) static void __init bootmem_init(void) -@@ -325,7 +327,7 @@ static void __init bootmem_init(void) +@@ -326,7 +328,7 @@ static void __init bootmem_init(void) /* * Reserve any memory between the start of RAM and PHYS_OFFSET */ @@ -34,7 +34,7 @@ Signed-off-by: Tobias Wolf memblock_reserve(PHYS_OFFSET, ramstart - PHYS_OFFSET); if (PFN_UP(ramstart) > ARCH_PFN_OFFSET) { -@@ -386,8 +388,6 @@ static void __init bootmem_init(void) +@@ -387,8 +389,6 @@ static void __init bootmem_init(void) #endif /* CONFIG_SGI_IP27 */ diff --git a/target/linux/ramips/patches-5.4/0010-MIPS-add-bootargs-override-property.patch b/target/linux/ramips/patches-5.4/0010-MIPS-add-bootargs-override-property.patch index c19a0fb480..41c057f876 100644 --- a/target/linux/ramips/patches-5.4/0010-MIPS-add-bootargs-override-property.patch +++ b/target/linux/ramips/patches-5.4/0010-MIPS-add-bootargs-override-property.patch @@ -17,7 +17,7 @@ Signed-off-by: David Bauer --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -571,8 +571,28 @@ static int __init bootcmdline_scan_chose +@@ -572,8 +572,28 @@ static int __init bootcmdline_scan_chose return 1; } @@ -46,7 +46,7 @@ Signed-off-by: David Bauer bool dt_bootargs = false; /* -@@ -586,6 +606,14 @@ static void __init bootcmdline_init(char +@@ -587,6 +607,14 @@ static void __init bootcmdline_init(char } /* diff --git a/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch index bedea14506..55a8f7831e 100644 --- a/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch +++ b/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -723,8 +723,6 @@ static void __init arch_mem_init(char ** +@@ -724,8 +724,6 @@ static void __init arch_mem_init(char ** memblock_reserve(crashk_res.start, crashk_res.end - crashk_res.start + 1); #endif @@ -19,7 +19,7 @@ Signed-off-by: John Crispin /* * In order to reduce the possibility of kernel panic when failed to * get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate -@@ -841,6 +839,7 @@ void __init setup_arch(char **cmdline_p) +@@ -842,6 +840,7 @@ void __init setup_arch(char **cmdline_p) cpu_cache_init(); paging_init(); diff --git a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch index 32a4d8e651..a7a16e7144 100644 --- a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch +++ b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch @@ -225,17 +225,15 @@ Signed-off-by: John Crispin for_each_uvc_urb(uvc_urb, stream) { --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h -@@ -200,7 +200,9 @@ +@@ -200,6 +200,8 @@ #define UVC_QUIRK_FORCE_Y8 0x00000800 #define UVC_QUIRK_FORCE_BPP 0x00001000 #define UVC_QUIRK_WAKE_AUTOSUSPEND 0x00002000 -- -+#define UVC_QUIRK_MOTION 0x00001000 -+#define UVC_QUIRK_SINGLE_ISO 0x00002000 -+ ++#define UVC_QUIRK_MOTION 0x00004000 ++#define UVC_QUIRK_SINGLE_ISO 0x00008000 + /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED 0x00000001 - #define UVC_FMT_FLAG_STREAM 0x00000002 @@ -668,6 +670,7 @@ struct uvc_device { u8 *status; struct input_dev *input; diff --git a/target/linux/rockchip/Makefile b/target/linux/rockchip/Makefile index 711d1bc395..3a4ea1ed9a 100644 --- a/target/linux/rockchip/Makefile +++ b/target/linux/rockchip/Makefile @@ -15,8 +15,8 @@ endef include $(INCLUDE_DIR)/target.mk -DEFAULT_PACKAGES += uboot-envtools partx-utils e2fsprogs mkf2fs kmod-gpio-button-hotplug \ - automount autocore-arm fdisk e2fsprogs ethtool luci-app-cpufreq +DEFAULT_PACKAGES += uboot-envtools partx-utils mkf2fs kmod-gpio-button-hotplug \ + automount autocore-arm fdisk ethtool luci-app-cpufreq KERNELNAME:=Image dtbs diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds index 11f32ca2a5..f82e4ffc52 100755 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds @@ -16,7 +16,8 @@ xunlong,orangepi-r1-plus-lts) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth1" ;; -friendlyarm,nanopi-r4s) +friendlyarm,nanopi-r4s|\ +friendlyarm,nanopi-r4se) ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1" ;; diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network index f988b38101..77fa899d1e 100755 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network @@ -11,6 +11,7 @@ rockchip_setup_interfaces() friendlyarm,nanopi-r2c|\ friendlyarm,nanopi-r2s|\ friendlyarm,nanopi-r4s|\ + friendlyarm,nanopi-r4se|\ xunlong,orangepi-r1-plus|\ xunlong,orangepi-r1-plus-lts) ucidef_set_interfaces_lan_wan 'eth1' 'eth0' @@ -68,6 +69,10 @@ rockchip_setup_macs() wan_mac=$(nanopi_r4s_get_mac wan) lan_mac=$(nanopi_r4s_get_mac lan) ;; + friendlyarm,nanopi-r4se) + wan_mac=$(generate_mac_from_mmc_cid mmcblk2) + lan_mac=$(macaddr_add "$wan_mac" 1) + ;; xunlong,orangepi-r1-plus|\ xunlong,orangepi-r1-plus-lts) lan_mac=$(cat /sys/class/net/eth1/address) diff --git a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity index bb119b9185..009355f6bb 100644 --- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity +++ b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity @@ -36,7 +36,8 @@ xunlong,orangepi-r1-plus-lts) set_interface_core 2 "eth0" set_interface_core 4 "eth1" "xhci-hcd:usb3" ;; -friendlyarm,nanopi-r4s) +friendlyarm,nanopi-r4s|\ +friendlyarm,nanopi-r4se) set_interface_core 10 "eth0" set_interface_core 20 "eth1" ;; diff --git a/target/linux/rockchip/armv8/config-5.4 b/target/linux/rockchip/armv8/config-5.4 index 9053164809..c37db74d06 100644 --- a/target/linux/rockchip/armv8/config-5.4 +++ b/target/linux/rockchip/armv8/config-5.4 @@ -75,7 +75,7 @@ CONFIG_CMA_ALIGNMENT=8 CONFIG_CMA_AREAS=7 # CONFIG_CMA_DEBUG is not set # CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_CMA_SIZE_MBYTES=16 # CONFIG_CMA_SIZE_SEL_MAX is not set CONFIG_CMA_SIZE_SEL_MBYTES=y # CONFIG_CMA_SIZE_SEL_MIN is not set @@ -175,6 +175,7 @@ CONFIG_GPIOLIB=y CONFIG_GPIO_DWAPB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_SYSCON=y # CONFIG_HARDENED_USERCOPY is not set CONFIG_HAS_IOPORT_MAP=y CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y @@ -214,7 +215,7 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_INPUT_LEDS=y CONFIG_INPUT_MATRIXKMAP=y # CONFIG_INPUT_MISC is not set -# CONFIG_INPUT_RK805_PWRKEY is not set +CONFIG_INPUT_RK805_PWRKEY=y CONFIG_IOMMU_API=y # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set @@ -242,6 +243,7 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_PWM=y CONFIG_LEDS_SYSCON=y CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LEDS_TRIGGER_PANIC=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=16 @@ -338,7 +340,7 @@ CONFIG_PHY_ROCKCHIP_PCIE=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PHY_ROCKCHIP_USB=y CONFIG_PINCTRL=y -# CONFIG_PINCTRL_RK805 is not set +CONFIG_PINCTRL_RK805=y CONFIG_PINCTRL_ROCKCHIP=y # CONFIG_PINCTRL_SINGLE is not set CONFIG_PL330_DMA=y diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3328-dram-renegade-timing.dtsi b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3328-dram-renegade-timing.dtsi new file mode 100644 index 0000000000..3034281530 --- /dev/null +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3328-dram-renegade-timing.dtsi @@ -0,0 +1,311 @@ +/* + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library 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 of the + * License, or (at your option) any later version. + * + * This library 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. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +#include +#include + +/ { + ddr_timing: ddr_timing { + compatible = "rockchip,ddr-timing"; + ddr3_speed_bin = ; + ddr4_speed_bin = ; + pd_idle = <0>; + sr_idle = <0>; + sr_mc_gate_idle = <0>; + srpd_lite_idle = <0>; + standby_idle = <0>; + + auto_pd_dis_freq = <1066>; + auto_sr_dis_freq = <800>; + ddr3_dll_dis_freq = <300>; + ddr4_dll_dis_freq = <625>; + phy_dll_dis_freq = <400>; + + ddr3_odt_dis_freq = <100>; + phy_ddr3_odt_dis_freq = <100>; + ddr3_drv = ; + ddr3_odt = ; + phy_ddr3_ca_drv = ; + phy_ddr3_ck_drv = ; + phy_ddr3_dq_drv = ; + phy_ddr3_odt = ; + + lpddr3_odt_dis_freq = <666>; + phy_lpddr3_odt_dis_freq = <666>; + lpddr3_drv = ; + lpddr3_odt = ; + phy_lpddr3_ca_drv = ; + phy_lpddr3_ck_drv = ; + phy_lpddr3_dq_drv = ; + phy_lpddr3_odt = ; + + lpddr4_odt_dis_freq = <800>; + phy_lpddr4_odt_dis_freq = <800>; + lpddr4_drv = ; + lpddr4_dq_odt = ; + lpddr4_ca_odt = ; + phy_lpddr4_ca_drv = ; + phy_lpddr4_ck_cs_drv = ; + phy_lpddr4_dq_drv = ; + phy_lpddr4_odt = ; + + ddr4_odt_dis_freq = <666>; + phy_ddr4_odt_dis_freq = <666>; + ddr4_drv = ; + ddr4_odt = ; + phy_ddr4_ca_drv = ; + phy_ddr4_ck_drv = ; + phy_ddr4_dq_drv = ; + phy_ddr4_odt = ; + + /* CA de-skew, one step is 47.8ps, range 0-15 */ + ddr3a1_ddr4a9_de-skew = <0>; + ddr3a0_ddr4a10_de-skew = <0>; + ddr3a3_ddr4a6_de-skew = <1>; + ddr3a2_ddr4a4_de-skew = <1>; + ddr3a5_ddr4a8_de-skew = <0>; + ddr3a4_ddr4a5_de-skew = <2>; + ddr3a7_ddr4a11_de-skew = <0>; + ddr3a6_ddr4a7_de-skew = <2>; + ddr3a9_ddr4a0_de-skew = <1>; + ddr3a8_ddr4a13_de-skew = <0>; + ddr3a11_ddr4a3_de-skew = <2>; + ddr3a10_ddr4cs0_de-skew = <0>; + ddr3a13_ddr4a2_de-skew = <1>; + ddr3a12_ddr4ba1_de-skew = <0>; + ddr3a15_ddr4odt0_de-skew = <0>; + ddr3a14_ddr4a1_de-skew = <1>; + ddr3ba1_ddr4a15_de-skew = <0>; + ddr3ba0_ddr4bg0_de-skew = <0>; + ddr3ras_ddr4cke_de-skew = <0>; + ddr3ba2_ddr4ba0_de-skew = <1>; + ddr3we_ddr4bg1_de-skew = <1>; + ddr3cas_ddr4a12_de-skew = <0>; + ddr3ckn_ddr4ckn_de-skew = <5>; + ddr3ckp_ddr4ckp_de-skew = <5>; + ddr3cke_ddr4a16_de-skew = <1>; + ddr3odt0_ddr4a14_de-skew = <0>; + ddr3cs0_ddr4act_de-skew = <1>; + ddr3reset_ddr4reset_de-skew = <0>; + ddr3cs1_ddr4cs1_de-skew = <0>; + ddr3odt1_ddr4odt1_de-skew = <0>; + + /* DATA de-skew + * RX one step is 25.1ps, range 0-15 + * TX one step is 47.8ps, range 0-15 + */ + cs0_dm0_rx_de-skew = <7>; + cs0_dm0_tx_de-skew = <8>; + cs0_dq0_rx_de-skew = <7>; + cs0_dq0_tx_de-skew = <8>; + cs0_dq1_rx_de-skew = <7>; + cs0_dq1_tx_de-skew = <8>; + cs0_dq2_rx_de-skew = <7>; + cs0_dq2_tx_de-skew = <8>; + cs0_dq3_rx_de-skew = <7>; + cs0_dq3_tx_de-skew = <8>; + cs0_dq4_rx_de-skew = <7>; + cs0_dq4_tx_de-skew = <8>; + cs0_dq5_rx_de-skew = <7>; + cs0_dq5_tx_de-skew = <8>; + cs0_dq6_rx_de-skew = <7>; + cs0_dq6_tx_de-skew = <8>; + cs0_dq7_rx_de-skew = <7>; + cs0_dq7_tx_de-skew = <8>; + cs0_dqs0_rx_de-skew = <6>; + cs0_dqs0p_tx_de-skew = <9>; + cs0_dqs0n_tx_de-skew = <9>; + + cs0_dm1_rx_de-skew = <7>; + cs0_dm1_tx_de-skew = <7>; + cs0_dq8_rx_de-skew = <7>; + cs0_dq8_tx_de-skew = <8>; + cs0_dq9_rx_de-skew = <7>; + cs0_dq9_tx_de-skew = <7>; + cs0_dq10_rx_de-skew = <7>; + cs0_dq10_tx_de-skew = <8>; + cs0_dq11_rx_de-skew = <7>; + cs0_dq11_tx_de-skew = <7>; + cs0_dq12_rx_de-skew = <7>; + cs0_dq12_tx_de-skew = <8>; + cs0_dq13_rx_de-skew = <7>; + cs0_dq13_tx_de-skew = <7>; + cs0_dq14_rx_de-skew = <7>; + cs0_dq14_tx_de-skew = <8>; + cs0_dq15_rx_de-skew = <7>; + cs0_dq15_tx_de-skew = <7>; + cs0_dqs1_rx_de-skew = <7>; + cs0_dqs1p_tx_de-skew = <9>; + cs0_dqs1n_tx_de-skew = <9>; + + cs0_dm2_rx_de-skew = <7>; + cs0_dm2_tx_de-skew = <8>; + cs0_dq16_rx_de-skew = <7>; + cs0_dq16_tx_de-skew = <8>; + cs0_dq17_rx_de-skew = <7>; + cs0_dq17_tx_de-skew = <8>; + cs0_dq18_rx_de-skew = <7>; + cs0_dq18_tx_de-skew = <8>; + cs0_dq19_rx_de-skew = <7>; + cs0_dq19_tx_de-skew = <8>; + cs0_dq20_rx_de-skew = <7>; + cs0_dq20_tx_de-skew = <8>; + cs0_dq21_rx_de-skew = <7>; + cs0_dq21_tx_de-skew = <8>; + cs0_dq22_rx_de-skew = <7>; + cs0_dq22_tx_de-skew = <8>; + cs0_dq23_rx_de-skew = <7>; + cs0_dq23_tx_de-skew = <8>; + cs0_dqs2_rx_de-skew = <6>; + cs0_dqs2p_tx_de-skew = <9>; + cs0_dqs2n_tx_de-skew = <9>; + + cs0_dm3_rx_de-skew = <7>; + cs0_dm3_tx_de-skew = <7>; + cs0_dq24_rx_de-skew = <7>; + cs0_dq24_tx_de-skew = <8>; + cs0_dq25_rx_de-skew = <7>; + cs0_dq25_tx_de-skew = <7>; + cs0_dq26_rx_de-skew = <7>; + cs0_dq26_tx_de-skew = <7>; + cs0_dq27_rx_de-skew = <7>; + cs0_dq27_tx_de-skew = <7>; + cs0_dq28_rx_de-skew = <7>; + cs0_dq28_tx_de-skew = <7>; + cs0_dq29_rx_de-skew = <7>; + cs0_dq29_tx_de-skew = <7>; + cs0_dq30_rx_de-skew = <7>; + cs0_dq30_tx_de-skew = <7>; + cs0_dq31_rx_de-skew = <7>; + cs0_dq31_tx_de-skew = <7>; + cs0_dqs3_rx_de-skew = <7>; + cs0_dqs3p_tx_de-skew = <9>; + cs0_dqs3n_tx_de-skew = <9>; + + cs1_dm0_rx_de-skew = <7>; + cs1_dm0_tx_de-skew = <8>; + cs1_dq0_rx_de-skew = <7>; + cs1_dq0_tx_de-skew = <8>; + cs1_dq1_rx_de-skew = <7>; + cs1_dq1_tx_de-skew = <8>; + cs1_dq2_rx_de-skew = <7>; + cs1_dq2_tx_de-skew = <8>; + cs1_dq3_rx_de-skew = <7>; + cs1_dq3_tx_de-skew = <8>; + cs1_dq4_rx_de-skew = <7>; + cs1_dq4_tx_de-skew = <8>; + cs1_dq5_rx_de-skew = <7>; + cs1_dq5_tx_de-skew = <8>; + cs1_dq6_rx_de-skew = <7>; + cs1_dq6_tx_de-skew = <8>; + cs1_dq7_rx_de-skew = <7>; + cs1_dq7_tx_de-skew = <8>; + cs1_dqs0_rx_de-skew = <6>; + cs1_dqs0p_tx_de-skew = <9>; + cs1_dqs0n_tx_de-skew = <9>; + + cs1_dm1_rx_de-skew = <7>; + cs1_dm1_tx_de-skew = <7>; + cs1_dq8_rx_de-skew = <7>; + cs1_dq8_tx_de-skew = <8>; + cs1_dq9_rx_de-skew = <7>; + cs1_dq9_tx_de-skew = <7>; + cs1_dq10_rx_de-skew = <7>; + cs1_dq10_tx_de-skew = <8>; + cs1_dq11_rx_de-skew = <7>; + cs1_dq11_tx_de-skew = <7>; + cs1_dq12_rx_de-skew = <7>; + cs1_dq12_tx_de-skew = <8>; + cs1_dq13_rx_de-skew = <7>; + cs1_dq13_tx_de-skew = <7>; + cs1_dq14_rx_de-skew = <7>; + cs1_dq14_tx_de-skew = <8>; + cs1_dq15_rx_de-skew = <7>; + cs1_dq15_tx_de-skew = <7>; + cs1_dqs1_rx_de-skew = <7>; + cs1_dqs1p_tx_de-skew = <9>; + cs1_dqs1n_tx_de-skew = <9>; + + cs1_dm2_rx_de-skew = <7>; + cs1_dm2_tx_de-skew = <8>; + cs1_dq16_rx_de-skew = <7>; + cs1_dq16_tx_de-skew = <8>; + cs1_dq17_rx_de-skew = <7>; + cs1_dq17_tx_de-skew = <8>; + cs1_dq18_rx_de-skew = <7>; + cs1_dq18_tx_de-skew = <8>; + cs1_dq19_rx_de-skew = <7>; + cs1_dq19_tx_de-skew = <8>; + cs1_dq20_rx_de-skew = <7>; + cs1_dq20_tx_de-skew = <8>; + cs1_dq21_rx_de-skew = <7>; + cs1_dq21_tx_de-skew = <8>; + cs1_dq22_rx_de-skew = <7>; + cs1_dq22_tx_de-skew = <8>; + cs1_dq23_rx_de-skew = <7>; + cs1_dq23_tx_de-skew = <8>; + cs1_dqs2_rx_de-skew = <6>; + cs1_dqs2p_tx_de-skew = <9>; + cs1_dqs2n_tx_de-skew = <9>; + + cs1_dm3_rx_de-skew = <7>; + cs1_dm3_tx_de-skew = <7>; + cs1_dq24_rx_de-skew = <7>; + cs1_dq24_tx_de-skew = <8>; + cs1_dq25_rx_de-skew = <7>; + cs1_dq25_tx_de-skew = <7>; + cs1_dq26_rx_de-skew = <7>; + cs1_dq26_tx_de-skew = <7>; + cs1_dq27_rx_de-skew = <7>; + cs1_dq27_tx_de-skew = <7>; + cs1_dq28_rx_de-skew = <7>; + cs1_dq28_tx_de-skew = <7>; + cs1_dq29_rx_de-skew = <7>; + cs1_dq29_tx_de-skew = <7>; + cs1_dq30_rx_de-skew = <7>; + cs1_dq30_tx_de-skew = <7>; + cs1_dq31_rx_de-skew = <7>; + cs1_dq31_tx_de-skew = <7>; + cs1_dqs3_rx_de-skew = <7>; + cs1_dqs3p_tx_de-skew = <9>; + cs1_dqs3n_tx_de-skew = <9>; + }; +}; diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 133e41479a..8315b87756 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -2,6 +2,16 @@ # # Copyright (C) 2020 Tobias Maedel +define Device/firefly_roc-rk3328-cc + DEVICE_VENDOR := Firefly + DEVICE_MODEL := ROC-RK3328-CC + SOC := rk3328 + DEVICE_DTS := rockchip/rk3328-roc-cc + UBOOT_DEVICE_NAME := roc-cc-rk3328 + IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-bin | gzip | append-metadata +endef +TARGET_DEVICES += firefly_roc-rk3328-cc + define Device/friendlyarm_nanopi-r2c DEVICE_VENDOR := FriendlyARM DEVICE_MODEL := NanoPi R2C @@ -32,6 +42,16 @@ define Device/friendlyarm_nanopi-r4s endef TARGET_DEVICES += friendlyarm_nanopi-r4s +define Device/friendlyarm_nanopi-r4se + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi R4SE + SOC := rk3399 + UBOOT_DEVICE_NAME := nanopi-r4se-rk3399 + IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r4s | pine64-bin | gzip | append-metadata + DEVICE_PACKAGES := kmod-r8168 -urngd +endef +TARGET_DEVICES += friendlyarm_nanopi-r4se + define Device/pine64_rockpro64 DEVICE_VENDOR := Pine64 DEVICE_MODEL := RockPro64 diff --git a/target/linux/rockchip/patches-5.4/011-v5.5-arm64-dts-rockchip-fix-sdmmc-detection-on-boot-on.patch b/target/linux/rockchip/patches-5.4/011-v5.5-arm64-dts-rockchip-fix-sdmmc-detection-on-boot-on.patch new file mode 100644 index 0000000000..f1c9f640e1 --- /dev/null +++ b/target/linux/rockchip/patches-5.4/011-v5.5-arm64-dts-rockchip-fix-sdmmc-detection-on-boot-on.patch @@ -0,0 +1,28 @@ +From 75aa567803b15e679432655badf95cd30b66b930 Mon Sep 17 00:00:00 2001 +From: Peter Geis +Date: Wed, 16 Oct 2019 18:59:46 +0000 +Subject: [PATCH] arm64: dts: rockchip: fix sdmmc detection on boot on + rk3328-roc-cc + +With working GPIO, during init the GPIO state s reset. +This causes the sdmmc regulator to shut down, preventing detection. +Removing and replacing the card will allow it to be detected, but that should not be necessary. +Fix this by setting the regulator on at boot. + +Signed-off-by: Peter Geis +Link: https://lore.kernel.org/r/20191016185945.1962-1-pgwipeout@gmail.com +Signed-off-by: Heiko Stuebner +--- + arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +@@ -35,6 +35,7 @@ + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_gpio>; ++ regulator-boot-on; + regulator-name = "vcc_sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; diff --git a/target/linux/rockchip/patches-5.4/012-v5.14-arm64-dts-rockchip-Enable-USB3-for-rk3328-ROC-RK3328-CC.patch b/target/linux/rockchip/patches-5.4/012-v5.14-arm64-dts-rockchip-Enable-USB3-for-rk3328-ROC-RK3328-CC.patch new file mode 100644 index 0000000000..65c9cd48ba --- /dev/null +++ b/target/linux/rockchip/patches-5.4/012-v5.14-arm64-dts-rockchip-Enable-USB3-for-rk3328-ROC-RK3328-CC.patch @@ -0,0 +1,36 @@ +From 75f95927334dea863f16f4ecd29cc709edc3c6ad Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Tue, 4 May 2021 16:36:14 +0800 +Subject: [PATCH] arm64: dts: rockchip: Enable USB3 for rk3328 ROC-RK3328-CC + +Enable USB3 nodes for the ROC-RK3328-CC board. + +The separate power regulator is not added as it is controlled by the +same GPIO line as the existing VBUS regulators, so it is already +enabled. Also there is no port representation to tie the regulator to. + +Signed-off-by: Chen-Yu Tsai +Link: https://lore.kernel.org/r/20210504083616.9654-3-wens@kernel.org +Signed-off-by: Heiko Stuebner +--- + arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +@@ -336,6 +336,15 @@ + status = "okay"; + }; + ++&usbdrd3 { ++ status = "okay"; ++}; ++ ++&usbdrd_dwc3 { ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ + &usb_host0_ehci { + status = "okay"; + }; diff --git a/target/linux/rockchip/patches-5.4/100-rockchip-use-system-LED-for-OpenWrt.patch b/target/linux/rockchip/patches-5.4/100-rockchip-use-system-LED-for-OpenWrt.patch index d0860de8c9..1021f1fd9d 100644 --- a/target/linux/rockchip/patches-5.4/100-rockchip-use-system-LED-for-OpenWrt.patch +++ b/target/linux/rockchip/patches-5.4/100-rockchip-use-system-LED-for-OpenWrt.patch @@ -45,3 +45,32 @@ Signed-off-by: David Bauer /delete-node/ display-subsystem; gpio-leds { +--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +@@ -10,6 +10,13 @@ + model = "Firefly roc-rk3328-cc"; + compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328"; + ++ aliases { ++ led-boot = &power_led; ++ led-failsafe = &power_led; ++ led-running = &power_led; ++ led-upgrade = &power_led; ++ }; ++ + chosen { + stdout-path = "serial2:1500000n8"; + }; +@@ -86,11 +93,9 @@ + leds { + compatible = "gpio-leds"; + +- power { ++ power_led: power { + label = "firefly:blue:power"; +- linux,default-trigger = "heartbeat"; + gpios = <&rk805 1 GPIO_ACTIVE_LOW>; +- default-state = "on"; + }; + + user { diff --git a/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch b/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch index 6bebe5f258..76da575450 100644 --- a/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch +++ b/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch @@ -10,6 +10,16 @@ userspace or following a kernel panic is always working. Signed-off-by: David Bauer +--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +@@ -310,7 +310,6 @@ + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; +- sd-uhs-sdr104; + vmmc-supply = <&vcc_sd>; + vqmmc-supply = <&vcc_sdio>; + status = "okay"; --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts @@ -141,6 +141,11 @@ diff --git a/target/linux/rockchip/patches-5.4/205-rockchip-rk3399-Add-support-for-FriendlyARM-NanoPi-R.patch b/target/linux/rockchip/patches-5.4/205-rockchip-rk3399-Add-support-for-FriendlyARM-NanoPi-R.patch new file mode 100644 index 0000000000..e90e3567fe --- /dev/null +++ b/target/linux/rockchip/patches-5.4/205-rockchip-rk3399-Add-support-for-FriendlyARM-NanoPi-R.patch @@ -0,0 +1,30 @@ +--- a/arch/arm64/boot/dts/rockchip/Makefile ++++ b/arch/arm64/boot/dts/rockchip/Makefile +@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-na + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-neo4.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4se.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4se.dts +@@ -0,0 +1,17 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT) ++ ++/dts-v1/; ++#include "rk3399-nanopi-r4s.dts" ++ ++/ { ++ model = "FriendlyElec NanoPi R4SE"; ++ compatible = "friendlyarm,nanopi-r4se", "rockchip,rk3399"; ++}; ++ ++&emmc_phy { ++ status = "okay"; ++}; ++ ++&sdhci { ++ status = "okay"; ++}; diff --git a/target/linux/rockchip/patches-5.4/807-arm64-dts-nanopi-r2s-add-rk3328-dmc-relate-node.patch b/target/linux/rockchip/patches-5.4/807-arm64-dts-nanopi-r2s-add-rk3328-dmc-relate-node.patch index 091e295978..f2079d6513 100644 --- a/target/linux/rockchip/patches-5.4/807-arm64-dts-nanopi-r2s-add-rk3328-dmc-relate-node.patch +++ b/target/linux/rockchip/patches-5.4/807-arm64-dts-nanopi-r2s-add-rk3328-dmc-relate-node.patch @@ -124,3 +124,113 @@ Signed-off-by: hmz007 regulator-min-microvolt = <712500>; regulator-max-microvolt = <1450000>; regulator-ramp-delay = <12500>; +--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +@@ -4,6 +4,7 @@ + */ + + /dts-v1/; ++#include "rk3328-dram-renegade-timing.dtsi" + #include "rk3328.dtsi" + + / { +@@ -105,6 +106,72 @@ + default-state = "off"; + }; + }; ++ ++ dmc: dmc { ++ compatible = "rockchip,rk3328-dmc"; ++ devfreq-events = <&dfi>; ++ center-supply = <&vdd_logic>; ++ clocks = <&cru SCLK_DDRCLK>; ++ clock-names = "dmc_clk"; ++ operating-points-v2 = <&dmc_opp_table>; ++ ddr_timing = <&ddr_timing>; ++ upthreshold = <40>; ++ downdifferential = <20>; ++ auto-min-freq = <786000>; ++ auto-freq-en = <0>; ++ #cooling-cells = <2>; ++ status = "okay"; ++ ++ ddr_power_model: ddr_power_model { ++ compatible = "ddr_power_model"; ++ dynamic-power-coefficient = <120>; ++ static-power-coefficient = <200>; ++ ts = <32000 4700 (-80) 2>; ++ thermal-zone = "soc-thermal"; ++ }; ++ }; ++ ++ dmc_opp_table: dmc-opp-table { ++ compatible = "operating-points-v2"; ++ ++ rockchip,leakage-voltage-sel = < ++ 1 10 0 ++ 11 254 1 ++ >; ++ nvmem-cells = <&logic_leakage>; ++ nvmem-cell-names = "ddr_leakage"; ++ ++ opp-786000000 { ++ opp-hz = /bits/ 64 <786000000>; ++ opp-microvolt = <1075000>; ++ opp-microvolt-L0 = <1075000>; ++ opp-microvolt-L1 = <12000000>; ++ }; ++ opp-798000000 { ++ opp-hz = /bits/ 64 <798000000>; ++ opp-microvolt = <1075000>; ++ opp-microvolt-L0 = <1075000>; ++ opp-microvolt-L1 = <12000000>; ++ }; ++ opp-840000000 { ++ opp-hz = /bits/ 64 <840000000>; ++ opp-microvolt = <1075000>; ++ opp-microvolt-L0 = <1075000>; ++ opp-microvolt-L1 = <12000000>; ++ }; ++ opp-924000000 { ++ opp-hz = /bits/ 64 <924000000>; ++ opp-microvolt = <1100000>; ++ opp-microvolt-L0 = <1100000>; ++ opp-microvolt-L1 = <12000000>; ++ }; ++ opp-1068000000 { ++ opp-hz = /bits/ 64 <1068000000>; ++ opp-microvolt = <1175000>; ++ opp-microvolt-L0 = <1175000>; ++ opp-microvolt-L1 = <12000000>; ++ }; ++ }; + }; + + &cpu0 { +@@ -123,6 +190,10 @@ + cpu-supply = <&vdd_arm>; + }; + ++&dfi { ++ status = "okay"; ++}; ++ + &emmc { + bus-width = <8>; + cap-mmc-highspeed; +@@ -191,6 +262,7 @@ + regulators { + vdd_logic: DCDC_REG1 { + regulator-name = "vdd_logic"; ++ regulator-init-microvolt = <1075000>; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-always-on; +@@ -203,6 +275,7 @@ + + vdd_arm: DCDC_REG2 { + regulator-name = "vdd_arm"; ++ regulator-init-microvolt = <1225000>; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-always-on; diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile index 383239d8b5..c333b96cbc 100644 --- a/target/linux/sunxi/Makefile +++ b/target/linux/sunxi/Makefile @@ -25,7 +25,7 @@ KERNELNAME:=zImage dtbs include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += uboot-envtools -DEFAULT_PACKAGES += partx-utils mkf2fs e2fsprogs +DEFAULT_PACKAGES += partx-utils mkf2fs automount DEFAULT_PACKAGES += autocore-arm luci-app-cpufreq $(eval $(call BuildTarget)) diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index d1485754ca..16d42a85bd 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -17,13 +17,13 @@ KERNELNAME:=bzImage include $(INCLUDE_DIR)/target.mk -DEFAULT_PACKAGES += alsa-utils partx-utils mkf2fs fdisk e2fsprogs kmod-button-hotplug kmod-usb-hid \ - kmod-e1000e kmod-i40e-vendor kmod-igb-vendor kmod-igbvf kmod-igc kmod-ixgbe-vendor \ - kmod-ixgbevf-vendor kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-r8101 kmod-r8125 kmod-r8168 \ - kmod-8139cp kmod-8139too kmod-tg3 kmod-fs-f2fs kmod-ac97 kmod-sound-hda-core \ - kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via kmod-sound-via82xx kmod-sound-hda-intel \ - kmod-sound-hda-codec-hdmi kmod-sound-i8x0 kmod-usb-audio kmod-usb-net kmod-usb-net-asix \ - kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 kmod-usb-net-rtl8152-vendor autocore-x86 automount +DEFAULT_PACKAGES += alsa-utils partx-utils mkf2fs fdisk kmod-button-hotplug kmod-usb-hid kmod-e1000e \ + kmod-i40e-vendor kmod-igb-vendor kmod-igbvf kmod-igc kmod-ixgbe-vendor kmod-ixgbevf-vendor \ + kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-r8101 kmod-r8125 kmod-r8168 kmod-8139cp \ + kmod-8139too kmod-tg3 kmod-fs-f2fs kmod-ac97 kmod-sound-hda-core kmod-sound-hda-codec-realtek \ + kmod-sound-hda-codec-via kmod-sound-via82xx kmod-sound-hda-intel kmod-sound-hda-codec-hdmi \ + kmod-sound-i8x0 kmod-usb-audio kmod-usb-net kmod-usb-net-asix kmod-usb-net-asix-ax88179 \ + kmod-usb-net-rtl8150 kmod-usb-net-rtl8152-vendor autocore-x86 automount $(eval $(call BuildTarget)) diff --git a/target/linux/x86/config-5.4 b/target/linux/x86/config-5.4 index 6676f9501a..2a3936b8d8 100644 --- a/target/linux/x86/config-5.4 +++ b/target/linux/x86/config-5.4 @@ -354,6 +354,7 @@ CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_NEED_SG_DMA_LENGTH=y # CONFIG_NET5501 is not set # CONFIG_NET_NS is not set +CONFIG_NET_SWITCHDEV=y CONFIG_NLS=y # CONFIG_NOHIGHMEM is not set CONFIG_NR_CPUS=1 diff --git a/tools/libressl/Makefile b/tools/libressl/Makefile index 0679961d17..ec6f92d3e9 100644 --- a/tools/libressl/Makefile +++ b/tools/libressl/Makefile @@ -15,7 +15,8 @@ PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:openbsd:libressl PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://mirror.ox.ac.uk/pub/OpenBSD/LibreSSL \ +PKG_SOURCE_URL:=https://mirrors.tencent.com/OpenBSD/LibreSSL/ \ + https://mirror.ox.ac.uk/pub/OpenBSD/LibreSSL \ http://ftp.jaist.ac.jp/pub/OpenBSD/LibreSSL \ https://ftp.openbsd.org/pub/OpenBSD/LibreSSL