From c027dbac5a5222e6be4706a7a6a0effefce8ae76 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Wed, 3 Mar 2021 22:46:50 +0100 Subject: [PATCH 01/61] lantiq: set maximum kernel size for ARV7519RW22 Some users report that current snapshot producies non-bootable images. Stock uboot can boot images if the kernel is smaller than 2MB. Set maximum kernel size and disable image building for this board. Ref: https://forum.openwrt.org/t/astoria-arv7519rw22-bootloops-after-upgrade/89843 Signed-off-by: Aleksander Jan Bajkowski --- target/linux/lantiq/image/vr9.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index d3420bb2b9..1f045ee594 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -17,9 +17,11 @@ define Device/arcadyan_arv7519rw22 DEVICE_ALT0_VARIANT := 2.1 DEVICE_ALT1_VENDOR := Astoria Networks DEVICE_ALT1_MODEL := ARV7519RW22 + KERNEL_SIZE := 2048k IMAGE_SIZE := 31232k DEVICE_PACKAGES := kmod-usb-dwc2 SUPPORTED_DEVICES += ARV7519RW22 + DEFAULT := n endef TARGET_DEVICES += arcadyan_arv7519rw22 From 46cd0765d0c585dc0b48c8c0a3f116ef83cd580f Mon Sep 17 00:00:00 2001 From: Eike Ritter Date: Sun, 14 Mar 2021 18:50:21 +0000 Subject: [PATCH 02/61] ppp: compile fix: unset FILTER variable in Makefile If the environment variable FILTER is set before compilation, compilation of the ppp-package will fail with the error message Package ppp is missing dependencies for the following libraries: libpcap.so.1 The reason is that the OpenWrt-patch for the Makefile only comments out the line FILTER=y. Hence the pcap-library will be dynamically linked if the environment variable FILTER is set elsewhere, which causes compilation to fail. The fix consists on explicitly unsetting the variable FILTER instead. Signed-off-by: Eike Ritter --- .../services/ppp/patches/610-pppd_compile_fix.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 package/network/services/ppp/patches/610-pppd_compile_fix.patch diff --git a/package/network/services/ppp/patches/610-pppd_compile_fix.patch b/package/network/services/ppp/patches/610-pppd_compile_fix.patch new file mode 100644 index 0000000000..4f66e5d71f --- /dev/null +++ b/package/network/services/ppp/patches/610-pppd_compile_fix.patch @@ -0,0 +1,12 @@ +--- a/pppd/Makefile.linux ++++ b/pppd/Makefile.linux +@@ -49,7 +49,8 @@ MPPE=y + # Uncomment the next line to include support for PPP packet filtering. + # This requires that the libpcap library and headers be installed + # and that the kernel driver support PPP packet filtering. +-#FILTER=y ++# libpcap statically linked in OpenWRT, hence disabled here. ++FILTER= + + # Support for precompiled filters + PRECOMPILED_FILTER=y From 12e942b1fdda874542e0a4e6ea892969fedab975 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Fri, 5 Mar 2021 18:41:30 +0100 Subject: [PATCH 03/61] kernel: move some disabled symbols to generic Move some disabled symbols found in armvirt target to generic. Signed-off-by: Aleksander Jan Bajkowski --- target/linux/armvirt/64/config-5.4 | 10 ---------- target/linux/armvirt/config-5.4 | 1 - target/linux/bcm27xx/bcm2709/config-5.4 | 1 - target/linux/bcm27xx/bcm2710/config-5.4 | 4 ---- target/linux/bcm27xx/bcm2711/config-5.4 | 4 ---- target/linux/generic/config-5.10 | 11 +++++++++++ target/linux/generic/config-5.4 | 12 ++++++++++++ target/linux/imx6/config-5.10 | 1 - target/linux/imx6/config-5.4 | 1 - target/linux/ipq40xx/config-5.4 | 1 - target/linux/ipq806x/config-5.4 | 1 - target/linux/ipq807x/config-default | 1 - target/linux/layerscape/armv7/config-5.4 | 4 ---- target/linux/layerscape/armv8_64b/config-5.4 | 6 ------ target/linux/mediatek/mt7622/config-5.10 | 3 --- target/linux/mediatek/mt7623/config-5.4 | 1 - target/linux/mediatek/mt7629/config-5.4 | 1 - target/linux/mvebu/config-5.10 | 1 - target/linux/mvebu/config-5.4 | 1 - target/linux/mvebu/cortexa53/config-5.10 | 3 --- target/linux/mvebu/cortexa53/config-5.4 | 3 --- target/linux/mvebu/cortexa72/config-5.10 | 3 --- target/linux/mvebu/cortexa72/config-5.4 | 3 --- target/linux/octeon/config-5.4 | 1 - target/linux/octeontx/config-5.4 | 10 ---------- target/linux/omap/config-5.4 | 1 - target/linux/oxnas/ox810se/config-default | 1 - target/linux/oxnas/ox820/config-default | 1 - target/linux/rockchip/armv8/config-5.10 | 4 ---- target/linux/rockchip/armv8/config-5.4 | 4 ---- target/linux/tegra/config-5.4 | 1 - target/linux/x86/64/config-5.10 | 2 -- target/linux/x86/64/config-5.4 | 2 -- target/linux/x86/generic/config-5.10 | 2 -- target/linux/x86/generic/config-5.4 | 2 -- target/linux/zynq/config-5.4 | 1 - 36 files changed, 23 insertions(+), 86 deletions(-) diff --git a/target/linux/armvirt/64/config-5.4 b/target/linux/armvirt/64/config-5.4 index 44d792025b..28c62871f9 100644 --- a/target/linux/armvirt/64/config-5.4 +++ b/target/linux/armvirt/64/config-5.4 @@ -92,7 +92,6 @@ CONFIG_ARM64_VHE=y CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ATOMIC64_SELFTEST=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y CONFIG_BACKLIGHT_CLASS_DEVICE=y @@ -104,7 +103,6 @@ CONFIG_CLK_SP810=y CONFIG_CLK_VEXPRESS_OSC=y CONFIG_COMMON_CLK_VERSATILE=y CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_PM=y CONFIG_CRYPTO_AES_ARM64=y @@ -122,12 +120,8 @@ CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1_ARM64_CE=y CONFIG_CRYPTO_SHA256_ARM64=y CONFIG_CRYPTO_SHA2_ARM64_CE=y -# CONFIG_CRYPTO_SHA3_ARM64 is not set CONFIG_CRYPTO_SHA512_ARM64=y -# CONFIG_CRYPTO_SHA512_ARM64_CE is not set CONFIG_CRYPTO_SIMD=y -# CONFIG_CRYPTO_SM3_ARM64_CE is not set -# CONFIG_CRYPTO_SM4_ARM64_CE is not set CONFIG_DMA_DIRECT_REMAP=y CONFIG_DMA_SHARED_BUFFER=y CONFIG_DRM=y @@ -138,7 +132,6 @@ CONFIG_DRM_PANEL=y CONFIG_DRM_PANEL_BRIDGE=y # CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y -# CONFIG_DRM_PANEL_SIMPLE is not set CONFIG_DRM_QXL=y CONFIG_DRM_RCAR_WRITEBACK=y CONFIG_DRM_TTM=y @@ -218,7 +211,6 @@ CONFIG_MFD_SYSCON=y CONFIG_MFD_VEXPRESS_SYSREG=y CONFIG_MMC=y CONFIG_MMC_ARMMMCI=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NO_HZ=y @@ -226,8 +218,6 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=64 # CONFIG_NUMA is not set -# CONFIG_OCTEONTX2_AF is not set -# CONFIG_PCIE_AL is not set CONFIG_PM=y CONFIG_PM_CLK=y # CONFIG_PM_DEBUG is not set diff --git a/target/linux/armvirt/config-5.4 b/target/linux/armvirt/config-5.4 index 806de23964..ca855ec7c8 100644 --- a/target/linux/armvirt/config-5.4 +++ b/target/linux/armvirt/config-5.4 @@ -229,7 +229,6 @@ CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/bcm27xx/bcm2709/config-5.4 b/target/linux/bcm27xx/bcm2709/config-5.4 index a4f6b3c0b4..8a9360aed5 100644 --- a/target/linux/bcm27xx/bcm2709/config-5.4 +++ b/target/linux/bcm27xx/bcm2709/config-5.4 @@ -307,7 +307,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_IPROC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MTD is not set CONFIG_MUTEX_SPIN_ON_OWNER=y diff --git a/target/linux/bcm27xx/bcm2710/config-5.4 b/target/linux/bcm27xx/bcm2710/config-5.4 index 5aaf021de9..81c4cfa62d 100644 --- a/target/linux/bcm27xx/bcm2710/config-5.4 +++ b/target/linux/bcm27xx/bcm2710/config-5.4 @@ -52,7 +52,6 @@ CONFIG_ARM_GIC_V2M=y CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_ARM_RASPBERRYPI_CPUFREQ=y # CONFIG_ARM_SCMI_PROTOCOL is not set @@ -310,7 +309,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_IPROC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MTD is not set CONFIG_MUTEX_SPIN_ON_OWNER=y @@ -324,7 +322,6 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=4 CONFIG_NVMEM=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_CONFIGFS=y @@ -341,7 +338,6 @@ CONFIG_OF_RESOLVE=y CONFIG_PADATA=y CONFIG_PARTITION_PERCPU=y CONFIG_PCI=y -# CONFIG_PCIE_AL is not set # CONFIG_PCIE_BRCMSTB is not set CONFIG_PCI_DOMAINS=y CONFIG_PCI_DOMAINS_GENERIC=y diff --git a/target/linux/bcm27xx/bcm2711/config-5.4 b/target/linux/bcm27xx/bcm2711/config-5.4 index 7efd1c2b07..91f45a97d9 100644 --- a/target/linux/bcm27xx/bcm2711/config-5.4 +++ b/target/linux/bcm27xx/bcm2711/config-5.4 @@ -52,7 +52,6 @@ CONFIG_ARM_GIC_V2M=y CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_ARM_RASPBERRYPI_CPUFREQ=y # CONFIG_ARM_SCMI_PROTOCOL is not set @@ -316,7 +315,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_IPROC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MTD is not set CONFIG_MUTEX_SPIN_ON_OWNER=y @@ -331,7 +329,6 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=4 CONFIG_NVMEM=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_CONFIGFS=y @@ -350,7 +347,6 @@ CONFIG_PARTITION_PERCPU=y CONFIG_PCI=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_BRCMSTB=y CONFIG_PCIE_PME=y CONFIG_PCI_DOMAINS=y diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index ec3e41c990..602fa7ad56 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -393,6 +393,7 @@ CONFIG_ARM_GIC_MAX_NR=1 # CONFIG_ARM_PATCH_PHYS_VIRT is not set # CONFIG_ARM_PSCI is not set # CONFIG_ARM_PSCI_CHECKER is not set +# CONFIG_ARM_PSCI_CPUIDLE is not set # CONFIG_ARM_PTDUMP_DEBUGFS is not set # CONFIG_ARM_SBSA_WATCHDOG is not set # CONFIG_ARM_SCPI_PROTOCOL is not set @@ -971,6 +972,7 @@ CONFIG_CONSTRUCTORS=y # CONFIG_CPU_ICACHE_DISABLE is not set # CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set # CONFIG_CPU_IDLE is not set +# CONFIG_CPU_IDLE_GOV_LADDER is not set # CONFIG_CPU_IDLE_GOV_MENU is not set # CONFIG_CPU_IDLE_GOV_TEO is not set # CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set @@ -1163,14 +1165,18 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_CRYPTO_SHA256_ARM is not set # CONFIG_CRYPTO_SHA2_ARM_CE is not set # CONFIG_CRYPTO_SHA3 is not set +# CONFIG_CRYPTO_SHA3_ARM64 is not set # CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_SHA512_ARM is not set +# CONFIG_CRYPTO_SHA512_ARM64_CE is not set # CONFIG_CRYPTO_SIMD is not set CONFIG_CRYPTO_SKCIPHER=y CONFIG_CRYPTO_SKCIPHER2=y # CONFIG_CRYPTO_SM2 is not set # CONFIG_CRYPTO_SM3 is not set +# CONFIG_CRYPTO_SM3_ARM64_CE is not set # CONFIG_CRYPTO_SM4 is not set +# CONFIG_CRYPTO_SM4_ARM64_CE is not set # CONFIG_CRYPTO_SPECK is not set # CONFIG_CRYPTO_STATS is not set # CONFIG_CRYPTO_STREEBOG is not set @@ -1477,6 +1483,7 @@ CONFIG_DQL=y # CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set # CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set +# CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -3385,6 +3392,7 @@ CONFIG_MMC_BLOCK_MINORS=8 # CONFIG_MMC_SPI is not set # CONFIG_MMC_STM32_SDMMC is not set # CONFIG_MMC_TEST is not set +# CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_TOSHIBA_PCI is not set # CONFIG_MMC_USDHI6ROL0 is not set # CONFIG_MMC_USHC is not set @@ -4143,6 +4151,7 @@ CONFIG_NMI_LOG_BUF_SHIFT=13 # CONFIG_OABI_COMPAT is not set # CONFIG_OBS600 is not set # CONFIG_OCFS2_FS is not set +# CONFIG_OCTEONTX2_AF is not set # CONFIG_OCTEONTX2_PF is not set # CONFIG_OF_OVERLAY is not set CONFIG_OF_RESERVED_MEM=y @@ -4262,6 +4271,7 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_PCIEAER_INJECT is not set # CONFIG_PCIEASPM is not set # CONFIG_PCIEPORTBUS is not set +# CONFIG_PCIE_AL is not set # CONFIG_PCIE_ALTERA is not set # CONFIG_PCIE_ARMADA_8K is not set # CONFIG_PCIE_BUS_DEFAULT is not set @@ -6857,6 +6867,7 @@ CONFIG_VHOST_MENU=y # CONFIG_VIRTIO_INPUT is not set CONFIG_VIRTIO_MENU=y # CONFIG_VIRTIO_MMIO is not set +# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set # CONFIG_VIRTIO_PCI is not set # CONFIG_VIRTUALIZATION is not set # CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 68fe001609..e3e4caad07 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -370,6 +370,7 @@ CONFIG_ARM_GIC_MAX_NR=1 # CONFIG_ARM_PATCH_PHYS_VIRT is not set # CONFIG_ARM_PSCI is not set # CONFIG_ARM_PSCI_CHECKER is not set +# CONFIG_ARM_PSCI_CPUIDLE is not set # CONFIG_ARM_PTDUMP_DEBUGFS is not set # CONFIG_ARM_SBSA_WATCHDOG is not set # CONFIG_ARM_SCPI_PROTOCOL is not set @@ -917,6 +918,7 @@ CONFIG_CONSTRUCTORS=y # CONFIG_CPU_ICACHE_DISABLE is not set # CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set # CONFIG_CPU_IDLE is not set +# CONFIG_CPU_IDLE_GOV_LADDER is not set # CONFIG_CPU_IDLE_GOV_MENU is not set # CONFIG_CPU_IDLE_GOV_TEO is not set # CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set @@ -1084,6 +1086,7 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_CRYPTO_POLY1305 is not set # CONFIG_CRYPTO_POLY1305_ARM is not set # CONFIG_CRYPTO_POLY1305_MIPS is not set +# CONFIG_CRYPTO_POLY1305_NEON is not set # CONFIG_CRYPTO_RMD128 is not set # CONFIG_CRYPTO_RMD160 is not set # CONFIG_CRYPTO_RMD256 is not set @@ -1103,11 +1106,15 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_CRYPTO_SHA256_ARM is not set # CONFIG_CRYPTO_SHA2_ARM_CE is not set # CONFIG_CRYPTO_SHA3 is not set +# CONFIG_CRYPTO_SHA3_ARM64 is not set # CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_SHA512_ARM is not set +# CONFIG_CRYPTO_SHA512_ARM64_CE is not set # CONFIG_CRYPTO_SIMD is not set # CONFIG_CRYPTO_SM3 is not set +# CONFIG_CRYPTO_SM3_ARM64_CE is not set # CONFIG_CRYPTO_SM4 is not set +# CONFIG_CRYPTO_SM4_ARM64_CE is not set # CONFIG_CRYPTO_SPECK is not set # CONFIG_CRYPTO_STATS is not set # CONFIG_CRYPTO_STREEBOG is not set @@ -1385,6 +1392,7 @@ CONFIG_DQL=y # CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set # CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set +# CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -3085,6 +3093,7 @@ CONFIG_MMC_BLOCK_MINORS=8 # CONFIG_MMC_SPI is not set # CONFIG_MMC_STM32_SDMMC is not set # CONFIG_MMC_TEST is not set +# CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_TOSHIBA_PCI is not set # CONFIG_MMC_USDHI6ROL0 is not set # CONFIG_MMC_USHC is not set @@ -3824,6 +3833,7 @@ CONFIG_NMI_LOG_BUF_SHIFT=13 # CONFIG_OABI_COMPAT is not set # CONFIG_OBS600 is not set # CONFIG_OCFS2_FS is not set +# CONFIG_OCTEONTX2_AF is not set # CONFIG_OF_OVERLAY is not set CONFIG_OF_RESERVED_MEM=y # CONFIG_OF_UNITTEST is not set @@ -3941,6 +3951,7 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_PCIEAER_INJECT is not set # CONFIG_PCIEASPM is not set # CONFIG_PCIEPORTBUS is not set +# CONFIG_PCIE_AL is not set # CONFIG_PCIE_ALTERA is not set # CONFIG_PCIE_ARMADA_8K is not set # CONFIG_PCIE_BW is not set @@ -6350,6 +6361,7 @@ CONFIG_VDSO=y # CONFIG_VIRTIO_INPUT is not set CONFIG_VIRTIO_MENU=y # CONFIG_VIRTIO_MMIO is not set +# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set # CONFIG_VIRTIO_PCI is not set # CONFIG_VIRTUALIZATION is not set # CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set diff --git a/target/linux/imx6/config-5.10 b/target/linux/imx6/config-5.10 index 03386a9513..26db2fc50e 100644 --- a/target/linux/imx6/config-5.10 +++ b/target/linux/imx6/config-5.10 @@ -298,7 +298,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_OF_ESDHC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MPILIB=y CONFIG_MTD_NAND_CORE=y diff --git a/target/linux/imx6/config-5.4 b/target/linux/imx6/config-5.4 index 8469376758..1012b0647f 100644 --- a/target/linux/imx6/config-5.4 +++ b/target/linux/imx6/config-5.4 @@ -272,7 +272,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_OF_ESDHC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MPILIB=y CONFIG_MTD_NAND_CORE=y diff --git a/target/linux/ipq40xx/config-5.4 b/target/linux/ipq40xx/config-5.4 index 01c51006d6..0fb49355cb 100644 --- a/target/linux/ipq40xx/config-5.4 +++ b/target/linux/ipq40xx/config-5.4 @@ -249,7 +249,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_MSM=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MSM_GCC_8660 is not set # CONFIG_MSM_GCC_8916 is not set diff --git a/target/linux/ipq806x/config-5.4 b/target/linux/ipq806x/config-5.4 index e6160bd455..68ed6ec0c7 100644 --- a/target/linux/ipq806x/config-5.4 +++ b/target/linux/ipq806x/config-5.4 @@ -298,7 +298,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_MSM=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MSM_GCC_8660=y # CONFIG_MSM_GCC_8916 is not set diff --git a/target/linux/ipq807x/config-default b/target/linux/ipq807x/config-default index 24f99f4219..f44e54d6c4 100644 --- a/target/linux/ipq807x/config-default +++ b/target/linux/ipq807x/config-default @@ -390,7 +390,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_MSM=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_MPILIB=y diff --git a/target/linux/layerscape/armv7/config-5.4 b/target/linux/layerscape/armv7/config-5.4 index ba64e8fdda..1cdbba426d 100644 --- a/target/linux/layerscape/armv7/config-5.4 +++ b/target/linux/layerscape/armv7/config-5.4 @@ -75,7 +75,6 @@ CONFIG_ARM_PATCH_IDIV=y CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_PMU=y CONFIG_ARM_PSCI=y -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y # CONFIG_ARM_SMMU is not set CONFIG_ARM_THUMB=y @@ -165,7 +164,6 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_HAS_ASID=y CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_PABRT_V7=y @@ -456,7 +454,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_OF_ESDHC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_REL=y CONFIG_MSDOS_FS=y @@ -754,7 +751,6 @@ CONFIG_VIRTIO=y CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4 index 75f31e2bc4..172a9d43b1 100644 --- a/target/linux/layerscape/armv8_64b/config-5.4 +++ b/target/linux/layerscape/armv8_64b/config-5.4 @@ -99,7 +99,6 @@ CONFIG_ARM_GIC_V3_ITS_FSL_MC=y CONFIG_ARM_GIC_V3_ITS_PCI=y # CONFIG_ARM_PL172_MPMC is not set CONFIG_ARM_PMU=y -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_ARM_SMMU=y # CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set @@ -184,7 +183,6 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_PM=y @@ -618,7 +616,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_OF_ESDHC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MMU_NOTIFIER=y CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_RELA=y @@ -693,7 +690,6 @@ CONFIG_NUMA_BALANCING=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_NVMEM=y CONFIG_NVMEM_SYSFS=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y @@ -722,7 +718,6 @@ CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_DW=y CONFIG_PCIE_DW_HOST=y CONFIG_PCIE_LAYERSCAPE_GEN4=y @@ -956,7 +951,6 @@ CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y # CONFIG_VIRTIO_IOMMU is not set CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/mediatek/mt7622/config-5.10 b/target/linux/mediatek/mt7622/config-5.10 index b899d9dbbb..7f1c3d169a 100644 --- a/target/linux/mediatek/mt7622/config-5.10 +++ b/target/linux/mediatek/mt7622/config-5.10 @@ -236,7 +236,6 @@ CONFIG_MMC=y CONFIG_MMC_BLOCK=y CONFIG_MMC_CQHCI=y CONFIG_MMC_MTK=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_MTD_NAND_CORE=y @@ -281,7 +280,6 @@ CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=2 CONFIG_NVMEM=y CONFIG_NVMEM_SYSFS=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y @@ -302,7 +300,6 @@ CONFIG_PCIEASPM_PERFORMANCE=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_MEDIATEK=y CONFIG_PCIE_PME=y CONFIG_PCI_DEBUG=y diff --git a/target/linux/mediatek/mt7623/config-5.4 b/target/linux/mediatek/mt7623/config-5.4 index 839eb71008..45ae7a4261 100644 --- a/target/linux/mediatek/mt7623/config-5.4 +++ b/target/linux/mediatek/mt7623/config-5.4 @@ -327,7 +327,6 @@ CONFIG_MMC_MTK=y CONFIG_MMC_SDHCI=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MT753X_GSW is not set CONFIG_MTD_BLOCK2MTD=y diff --git a/target/linux/mediatek/mt7629/config-5.4 b/target/linux/mediatek/mt7629/config-5.4 index 6ecde5ced6..1c7d54cd37 100644 --- a/target/linux/mediatek/mt7629/config-5.4 +++ b/target/linux/mediatek/mt7629/config-5.4 @@ -91,7 +91,6 @@ CONFIG_CPU_CP15=y CONFIG_CPU_CP15_MMU=y CONFIG_CPU_HAS_ASID=y CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y diff --git a/target/linux/mvebu/config-5.10 b/target/linux/mvebu/config-5.10 index 4b0e9b16ab..9196c5c30e 100644 --- a/target/linux/mvebu/config-5.10 +++ b/target/linux/mvebu/config-5.10 @@ -261,7 +261,6 @@ CONFIG_MMC_SDHCI=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_PXAV3=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MTD_CFI_STAA=y CONFIG_MTD_NAND_CORE=y diff --git a/target/linux/mvebu/config-5.4 b/target/linux/mvebu/config-5.4 index 382c150cb3..1453a651da 100644 --- a/target/linux/mvebu/config-5.4 +++ b/target/linux/mvebu/config-5.4 @@ -255,7 +255,6 @@ CONFIG_MMC_SDHCI=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_PXAV3=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MTD_CFI_STAA=y CONFIG_MTD_NAND_CORE=y diff --git a/target/linux/mvebu/cortexa53/config-5.10 b/target/linux/mvebu/cortexa53/config-5.10 index c70bea5ae5..24f26474bc 100644 --- a/target/linux/mvebu/cortexa53/config-5.10 +++ b/target/linux/mvebu/cortexa53/config-5.10 @@ -30,7 +30,6 @@ CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y # CONFIG_ARM_PL172_MPMC is not set -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y # CONFIG_CAVIUM_TX2_ERRATUM_219 is not set @@ -54,9 +53,7 @@ CONFIG_MVEBU_ODMI=y CONFIG_MVEBU_PIC=y CONFIG_MVEBU_SEI=y CONFIG_NEED_SG_DMA_LENGTH=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_PARTITION_PERCPU=y -# CONFIG_PCIE_AL is not set CONFIG_PCI_AARDVARK=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYS_ADDR_T_64BIT=y diff --git a/target/linux/mvebu/cortexa53/config-5.4 b/target/linux/mvebu/cortexa53/config-5.4 index 79d53932d0..b88de78ee4 100644 --- a/target/linux/mvebu/cortexa53/config-5.4 +++ b/target/linux/mvebu/cortexa53/config-5.4 @@ -35,7 +35,6 @@ CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y # CONFIG_ARM_PL172_MPMC is not set -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y # CONFIG_CAVIUM_TX2_ERRATUM_219 is not set @@ -62,9 +61,7 @@ CONFIG_MVEBU_ODMI=y CONFIG_MVEBU_PIC=y CONFIG_MVEBU_SEI=y CONFIG_NEED_SG_DMA_LENGTH=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_PARTITION_PERCPU=y -# CONFIG_PCIE_AL is not set CONFIG_PCI_AARDVARK=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYS_ADDR_T_64BIT=y diff --git a/target/linux/mvebu/cortexa72/config-5.10 b/target/linux/mvebu/cortexa72/config-5.10 index a9b7e20dc1..1d8affc290 100644 --- a/target/linux/mvebu/cortexa72/config-5.10 +++ b/target/linux/mvebu/cortexa72/config-5.10 @@ -29,7 +29,6 @@ CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y # CONFIG_ARM_PL172_MPMC is not set -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y # CONFIG_CAVIUM_TX2_ERRATUM_219 is not set @@ -57,11 +56,9 @@ CONFIG_MVEBU_SEI=y CONFIG_MVPP2=y CONFIG_MV_XOR_V2=y CONFIG_NEED_SG_DMA_LENGTH=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_PARTITION_PERCPU=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_ARMADA_8K=y CONFIG_PCIE_DW=y CONFIG_PCIE_DW_HOST=y diff --git a/target/linux/mvebu/cortexa72/config-5.4 b/target/linux/mvebu/cortexa72/config-5.4 index db50baf1a9..12b2ea399c 100644 --- a/target/linux/mvebu/cortexa72/config-5.4 +++ b/target/linux/mvebu/cortexa72/config-5.4 @@ -34,7 +34,6 @@ CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y # CONFIG_ARM_PL172_MPMC is not set -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y # CONFIG_CAVIUM_TX2_ERRATUM_219 is not set @@ -65,11 +64,9 @@ CONFIG_MVEBU_SEI=y CONFIG_MVPP2=y CONFIG_MV_XOR_V2=y CONFIG_NEED_SG_DMA_LENGTH=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_PARTITION_PERCPU=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_ARMADA_8K=y CONFIG_PCIE_DW=y CONFIG_PCIE_DW_HOST=y diff --git a/target/linux/octeon/config-5.4 b/target/linux/octeon/config-5.4 index b00f89b451..e19dfce7ea 100644 --- a/target/linux/octeon/config-5.4 +++ b/target/linux/octeon/config-5.4 @@ -144,7 +144,6 @@ CONFIG_MIPS_SPRAM=y CONFIG_MMC=y CONFIG_MMC_BLOCK=y CONFIG_MMC_CAVIUM_OCTEON=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MTD_CFI_INTELEXT is not set diff --git a/target/linux/octeontx/config-5.4 b/target/linux/octeontx/config-5.4 index 7c001b808a..db6e64a6a4 100644 --- a/target/linux/octeontx/config-5.4 +++ b/target/linux/octeontx/config-5.4 @@ -118,7 +118,6 @@ CONFIG_ARM_GIC_V2M=y CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y -# CONFIG_ARM_PSCI_CPUIDLE is not set CONFIG_ARM_PSCI_FW=y CONFIG_ARM_SBSA_WATCHDOG=y # CONFIG_ARM_SCMI_PROTOCOL is not set @@ -158,7 +157,6 @@ CONFIG_COMMON_CLK_CS2000_CP=y CONFIG_CONFIGFS_FS=y CONFIG_CONTIG_ALLOC=y CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_PM=y @@ -206,12 +204,8 @@ CONFIG_CRYPTO_SHA1_ARM64_CE=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA256_ARM64=y CONFIG_CRYPTO_SHA2_ARM64_CE=y -# CONFIG_CRYPTO_SHA3_ARM64 is not set # CONFIG_CRYPTO_SHA512_ARM64 is not set -# CONFIG_CRYPTO_SHA512_ARM64_CE is not set CONFIG_CRYPTO_SIMD=y -# CONFIG_CRYPTO_SM3_ARM64_CE is not set -# CONFIG_CRYPTO_SM4_ARM64_CE is not set CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DMADEVICES=y CONFIG_DMA_CMA=y @@ -417,7 +411,6 @@ CONFIG_MIGRATION=y CONFIG_MMC=y CONFIG_MMC_BLOCK=y CONFIG_MMC_CAVIUM_THUNDERX=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_MSDOS_FS=y # CONFIG_MTD is not set @@ -439,7 +432,6 @@ CONFIG_NUMA_BALANCING=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_NVMEM=y CONFIG_NVMEM_SYSFS=y -# CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y @@ -458,7 +450,6 @@ CONFIG_PARTITION_PERCPU=y CONFIG_PCI=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_PME=y CONFIG_PCI_ATS=y CONFIG_PCI_DOMAINS=y @@ -586,7 +577,6 @@ CONFIG_VIRTIO_BALLOON=y # CONFIG_VIRTIO_BLK is not set # CONFIG_VIRTIO_CONSOLE is not set CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set # CONFIG_VIRTIO_NET is not set CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/omap/config-5.4 b/target/linux/omap/config-5.4 index 322ed65d16..aa15fa4ad9 100644 --- a/target/linux/omap/config-5.4 +++ b/target/linux/omap/config-5.4 @@ -224,7 +224,6 @@ CONFIG_DRM_PANEL_LG_LB035Q02=y CONFIG_DRM_PANEL_NEC_NL8048HL11=y CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y CONFIG_DRM_PANEL_SHARP_LS037V7DW01=y -# CONFIG_DRM_PANEL_SIMPLE is not set CONFIG_DRM_PANEL_SONY_ACX565AKM=y CONFIG_DRM_PANEL_TPO_TD028TTEC1=y CONFIG_DRM_PANEL_TPO_TD043MTEA1=y diff --git a/target/linux/oxnas/ox810se/config-default b/target/linux/oxnas/ox810se/config-default index beb2d79e16..137b32a070 100644 --- a/target/linux/oxnas/ox810se/config-default +++ b/target/linux/oxnas/ox810se/config-default @@ -1,6 +1,5 @@ # CONFIG_CACHE_L2X0 is not set CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y # CONFIG_DEBUG_UNCOMPRESS is not set diff --git a/target/linux/oxnas/ox820/config-default b/target/linux/oxnas/ox820/config-default index b94ca29aaf..9ec3a7fdaa 100644 --- a/target/linux/oxnas/ox820/config-default +++ b/target/linux/oxnas/ox820/config-default @@ -18,7 +18,6 @@ CONFIG_CPU_COPY_V6=y CONFIG_CPU_HAS_ASID=y # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_PABRT_V6=y diff --git a/target/linux/rockchip/armv8/config-5.10 b/target/linux/rockchip/armv8/config-5.10 index eaef238c92..3a8b534bd5 100644 --- a/target/linux/rockchip/armv8/config-5.10 +++ b/target/linux/rockchip/armv8/config-5.10 @@ -143,7 +143,6 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y # CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_ISOLATION=y @@ -365,7 +364,6 @@ CONFIG_MMC_SDHCI_OF_ARASAN=y CONFIG_MMC_SDHCI_OF_DWCMSHC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_MQ_IOSCHED_DEADLINE=y # CONFIG_MTD_CFI is not set @@ -390,7 +388,6 @@ CONFIG_NVME_CORE=y # CONFIG_NVME_HWMON is not set # CONFIG_NVME_MULTIPATH is not set # CONFIG_NVME_TCP is not set -# CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_DYNAMIC=y @@ -421,7 +418,6 @@ CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_PME=y CONFIG_PCIE_ROCKCHIP=y CONFIG_PCIE_ROCKCHIP_HOST=y diff --git a/target/linux/rockchip/armv8/config-5.4 b/target/linux/rockchip/armv8/config-5.4 index f6ec79b121..53adaf7760 100644 --- a/target/linux/rockchip/armv8/config-5.4 +++ b/target/linux/rockchip/armv8/config-5.4 @@ -130,7 +130,6 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y # CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_IDLE=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_ISOLATION=y @@ -346,7 +345,6 @@ CONFIG_MMC_SDHCI_OF_ARASAN=y CONFIG_MMC_SDHCI_OF_DWCMSHC=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_MQ_IOSCHED_DEADLINE=y # CONFIG_MTD_CFI is not set @@ -370,7 +368,6 @@ CONFIG_NVMEM_SYSFS=y CONFIG_NVME_CORE=y # CONFIG_NVME_MULTIPATH is not set # CONFIG_NVME_TCP is not set -# CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_DYNAMIC=y @@ -402,7 +399,6 @@ CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_AL is not set CONFIG_PCIE_PME=y CONFIG_PCIE_ROCKCHIP=y CONFIG_PCIE_ROCKCHIP_HOST=y diff --git a/target/linux/tegra/config-5.4 b/target/linux/tegra/config-5.4 index 6bc96d13ce..00fc11a69b 100644 --- a/target/linux/tegra/config-5.4 +++ b/target/linux/tegra/config-5.4 @@ -358,7 +358,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_TEGRA=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MPILIB=y CONFIG_MTD_SPI_NOR=y diff --git a/target/linux/x86/64/config-5.10 b/target/linux/x86/64/config-5.10 index b9dafa06fb..3387c68acb 100644 --- a/target/linux/x86/64/config-5.10 +++ b/target/linux/x86/64/config-5.10 @@ -290,7 +290,6 @@ CONFIG_MMC_SDHCI_ACPI=y CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_PCI=y # CONFIG_MMC_SDHCI_PLTFM is not set -# CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_WBSD is not set CONFIG_MMU_NOTIFIER=y CONFIG_MODULES_USE_ELF_RELA=y @@ -420,7 +419,6 @@ CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_DMA_SHARED_BUFFER=y CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/x86/64/config-5.4 b/target/linux/x86/64/config-5.4 index d08ff00cb2..ef03eaa234 100644 --- a/target/linux/x86/64/config-5.4 +++ b/target/linux/x86/64/config-5.4 @@ -300,7 +300,6 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_ACPI=y CONFIG_MMC_SDHCI_PCI=y # CONFIG_MMC_SDHCI_PLTFM is not set -# CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_WBSD is not set CONFIG_MMU_NOTIFIER=y CONFIG_MODULES_USE_ELF_RELA=y @@ -425,7 +424,6 @@ CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/x86/generic/config-5.10 b/target/linux/x86/generic/config-5.10 index 0ba0079a1b..7a3f051d7f 100644 --- a/target/linux/x86/generic/config-5.10 +++ b/target/linux/x86/generic/config-5.10 @@ -258,7 +258,6 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_PCI=y # CONFIG_MMC_SDHCI_PLTFM is not set -# CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_WBSD is not set CONFIG_MMU_NOTIFIER=y # CONFIG_MOUSE_BCM5974 is not set @@ -400,7 +399,6 @@ CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_DMA_SHARED_BUFFER=y CONFIG_VIRTIO_INPUT=y CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/x86/generic/config-5.4 b/target/linux/x86/generic/config-5.4 index 3b7b32a803..65dc36107b 100644 --- a/target/linux/x86/generic/config-5.4 +++ b/target/linux/x86/generic/config-5.4 @@ -263,7 +263,6 @@ CONFIG_MMC_RICOH_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PCI=y # CONFIG_MMC_SDHCI_PLTFM is not set -# CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_WBSD is not set CONFIG_MMU_NOTIFIER=y # CONFIG_MOUSE_BCM5974 is not set @@ -396,7 +395,6 @@ CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_INPUT=y CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/target/linux/zynq/config-5.4 b/target/linux/zynq/config-5.4 index ee53e2ae0a..130d4b59ea 100644 --- a/target/linux/zynq/config-5.4 +++ b/target/linux/zynq/config-5.4 @@ -406,7 +406,6 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_OF_ARASAN=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_REL=y CONFIG_MODULE_FORCE_UNLOAD=y From cbc37d60cb416d83eae492ef8c38e40c9f739811 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Mon, 15 Mar 2021 16:11:27 -0700 Subject: [PATCH 04/61] tools/sparse: update to version 0.6.3 Update to the latest stable release. This fixes a segfault and build failure seen compiling the 5.10 kernel for x86/64. With this update, builds complete and sparse generates the usual large volume of warnings as on 5.4 kernels. Reported-by: Javier Marcet Signed-off-by: Tony Ambardar --- tools/sparse/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/sparse/Makefile b/tools/sparse/Makefile index 959016b132..7c93b5446c 100644 --- a/tools/sparse/Makefile +++ b/tools/sparse/Makefile @@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sparse -PKG_VERSION:=0.5.2 -PKG_HASH:=4632b7b74af72214247f982f976ba44206933bab3a2717e09df166fb5b8abe7a +PKG_VERSION:=0.6.3 +PKG_HASH:=d4f6dbad8409e8e20a19f164b2c16f1edf76438ff77cf291935fde081b61a899 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz From a94a20373ba0c817ddb03da0bf15af6c8d6a09ff Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 1 Mar 2021 14:35:12 +0800 Subject: [PATCH 05/61] ramips: improve GPIO pin control for HC5x61 HC5661 does not have USB port, remove usb power control pin. HC5x61 do not have LAN LEDs, remove ethernet LED control pin. Only HC5861 has PA in 2.4G channel. Signed-off-by: Shiji Yang --- .../ramips/dts/mt7620a_hiwifi_hc5761.dts | 11 ++++++++++ .../ramips/dts/mt7620a_hiwifi_hc5861.dts | 5 +++++ .../ramips/dts/mt7620a_hiwifi_hc5x61.dtsi | 22 ------------------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts index 5b67779984..d1a7f69e17 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts @@ -36,6 +36,17 @@ linux,default-trigger = "phy0tpt"; }; }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usbpower { + gpio-export,name = "usbpower"; + gpio-export,output = <1>; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + }; + }; }; &ehci { diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts index 08163e56ba..d77df2158c 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts @@ -104,3 +104,8 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&wmac { + pinctrl-names = "default"; + pinctrl-0 = <&pa_pins>; +}; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 8d5d8e95ee..369e407319 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -19,23 +19,6 @@ linux,code = ; }; }; - - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; - - usbpower { - gpio-export,name = "usbpower"; - gpio-export,output = <1>; - gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&sysc { - ralink,gpiomux = "i2c", "jtag"; - ralink,uartmux = "gpio"; - ralink,wdtmux = <1>; }; &gpio3 { @@ -101,9 +84,6 @@ }; ðernet { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; mediatek,portmap = "wllll"; @@ -115,8 +95,6 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; - pinctrl-names = "default"; - pinctrl-0 = <&pa_pins>; }; &state_default { From 410fb05b445c89a147029d1471e184a5594602db Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Sun, 28 Feb 2021 03:24:19 +0100 Subject: [PATCH 06/61] rampis: use lzma-loader for ZTE MF283+ Without that, after merging support to master, the device fails to boot due to LZMA decompression error: 3: System Boot system code via Flash. ## Booting image at bc080000 ... raspi_read: from:80000 len:40 . Image Name: MIPS OpenWrt Linux-5.4.99 Created: 2021-02-25 23:35:00 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1786664 Bytes = 1.7 MB Load Address: 80000000 Entry Point: 80000000 raspi_read: from:80040 len:1b4328 ............................ Verifying Checksum ... OK Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover Use lzma-loader to fix it. Fixes: 59d065c9f81c ("ramips: add support for ZTE MF283+") Signed-off-by: Lech Perczak --- target/linux/ramips/image/rt305x.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 30c9b0154a..a3ce013fa2 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -1184,6 +1184,7 @@ endef TARGET_DEVICES += zorlik_zl5900v2 define Device/zte_mf283plus + $(Device/uimage-lzma-loader) SOC := rt3352 IMAGE_SIZE := 15872k DEVICE_VENDOR := ZTE From 1c0436507156dc136d9e2668507817395434109e Mon Sep 17 00:00:00 2001 From: Russell Senior Date: Tue, 16 Mar 2021 01:24:18 -0700 Subject: [PATCH 07/61] busybox: udhcpc, allow zero length dhcp options This patch skips zero length DHCP options instead of failing. Signed-off-by: Russell Senior --- ...205-udhcpc_allow_zero_length_options.patch | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 package/utils/busybox/patches/205-udhcpc_allow_zero_length_options.patch diff --git a/package/utils/busybox/patches/205-udhcpc_allow_zero_length_options.patch b/package/utils/busybox/patches/205-udhcpc_allow_zero_length_options.patch new file mode 100644 index 0000000000..abe8baf54f --- /dev/null +++ b/package/utils/busybox/patches/205-udhcpc_allow_zero_length_options.patch @@ -0,0 +1,49 @@ +From 7eed119b84b0f7efb7ef351940dd895dc2379eb3 Mon Sep 17 00:00:00 2001 +From: Russell Senior +Date: Mon, 15 Mar 2021 23:27:58 -0700 +Subject: [PATCH v2] udhcpc: ignore zero-length DHCP options + +Discovered that the DHCP server on a TrendNet router (unknown model) +provides a zero-length option 12 (Host Name) in the DHCP ACK message. This +has the effect of causing udhcpc to drop the rest of the options, including +option 51 (IP Address Lease Time), 3 (Router), and 6 (Domain Name Server), +most importantly leaving the OpenWrt device with no default gateway. + +The TrendNet behavior violates RFC 2132, which in Section 3.14 declares that +option 12 has a miniumum length of 1 octet. It is perhaps not a cosmic coincidence +that I found this behavior on Pi Day. + +This patch allows zero length options without bailing out, by simply skipping them. + +v2 changelog: +* advance the optionptr by two bytes, not one; +* add a message to warn about the rfc violation; + +Signed-off-by: Russell Senior +--- + networking/udhcp/common.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c +index 4bc719001..a16fd85d0 100644 +--- a/networking/udhcp/common.c ++++ b/networking/udhcp/common.c +@@ -277,8 +277,13 @@ uint8_t* FAST_FUNC udhcp_scan_options(struct dhcp_packet *packet, struct dhcp_sc + goto complain; /* complain and return NULL */ + len = 2 + scan_state->optionptr[OPT_LEN]; + scan_state->rem -= len; +- /* So far no valid option with length 0 known. */ +- if (scan_state->rem < 0 || scan_state->optionptr[OPT_LEN] == 0) ++ /* skip any options with zero length */ ++ if (scan_state->optionptr[OPT_LEN] == 0) { ++ scan_state->optionptr += 2; ++ bb_simple_error_msg("warning: zero length DHCP option violates rfc2132, skipping"); ++ continue; ++ } ++ if (scan_state->rem < 0) + goto complain; /* complain and return NULL */ + + if (scan_state->optionptr[OPT_CODE] == DHCP_OPTION_OVERLOAD) { +-- +2.30.1 + From eccb45627ec62311d1c9cb18f02abef638a5291f Mon Sep 17 00:00:00 2001 From: Supriya Mane Date: Tue, 9 Mar 2021 14:28:52 +0530 Subject: [PATCH 08/61] x86/64: Iptables seems to lack support for cgroup v2 FS#3574 Adding cgroup support enables adding rules on processes to limit resources in terms of iptable policies Signed-off-by: Supriya Mane --- include/netfilter.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/netfilter.mk b/include/netfilter.mk index 60f031e9a7..45e9dadf85 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -94,6 +94,7 @@ $(eval $(call nf_add,IPT_EXTRA,CONFIG_NETFILTER_XT_MATCH_ADDRTYPE, $(if $(NF_KMO $(eval $(call nf_add,IPT_EXTRA,CONFIG_NETFILTER_XT_MATCH_OWNER, $(P_XT)xt_owner)) $(eval $(call nf_add,IPT_EXTRA,CONFIG_NETFILTER_XT_MATCH_PKTTYPE, $(P_XT)xt_pkttype)) $(eval $(call nf_add,IPT_EXTRA,CONFIG_NETFILTER_XT_MATCH_QUOTA, $(P_XT)xt_quota)) +$(eval $(call nf_add,IPT_EXTRA,CONFIG_NETFILTER_XT_MATCH_CGROUP, $(P_XT)xt_cgroup)) #$(eval $(call nf_add,IPT_EXTRA,CONFIG_IP_NF_TARGET_ROUTE, $(P_V4)ipt_ROUTE)) From b1d0f66388e67ecf0c8b0fdfee8e2bfda947d319 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 8 Mar 2021 15:28:51 +0000 Subject: [PATCH 09/61] mac80211: rtl: update RTL8821AE PHY/RF parameters Create a new directory for Realtek patches and backport the updated PHY and RF parameters patch. Improves the connectivity in the 5 GHz band [1]. [1] https://patchwork.kernel.org/project/linux-wireless/patch/20210219052607.7323-1-pkshih@realtek.com/#23988567 Signed-off-by: Rui Salvaterra --- package/kernel/mac80211/Makefile | 2 + ...8821ae-upgrade-PHY-and-RF-parameters.patch | 817 ++++++++++++++++++ 2 files changed, 819 insertions(+) create mode 100644 package/kernel/mac80211/patches/rtl/001-v5.12-rtlwifi-8821ae-upgrade-PHY-and-RF-parameters.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index f6ad06452f..b92df681cb 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -504,6 +504,7 @@ define Build/Patch $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/) + $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rtl,rtl/) $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used) endef @@ -514,6 +515,7 @@ define Quilt/Refresh/Package $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/) $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/) $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/) + $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rtl,rtl/) endef define Build/Compile diff --git a/package/kernel/mac80211/patches/rtl/001-v5.12-rtlwifi-8821ae-upgrade-PHY-and-RF-parameters.patch b/package/kernel/mac80211/patches/rtl/001-v5.12-rtlwifi-8821ae-upgrade-PHY-and-RF-parameters.patch new file mode 100644 index 0000000000..7b6cd99d82 --- /dev/null +++ b/package/kernel/mac80211/patches/rtl/001-v5.12-rtlwifi-8821ae-upgrade-PHY-and-RF-parameters.patch @@ -0,0 +1,817 @@ +From 8f392a72419c4b10e84e635e51bee24670975364 Mon Sep 17 00:00:00 2001 +From: Ping-Ke Shih +Date: Fri, 19 Feb 2021 13:26:07 +0800 +Subject: [PATCH] rtlwifi: 8821ae: upgrade PHY and RF parameters + +New parameters with new format and its parser are updated by the +commit 84d26fda52e2 ("rtlwifi: Update 8821ae new phy parameters and its parser."), +but some parameters are missing. Use this commit to update to the novel +parameters that use new format. + +Fixes: 84d26fda52e2 ("rtlwifi: Update 8821ae new phy parameters and its parser") +Signed-off-by: Ping-Ke Shih +Tested-by: Kai-Heng Feng +--- + .../realtek/rtlwifi/rtl8821ae/table.c | 500 +++++++++++++----- + 1 file changed, 370 insertions(+), 130 deletions(-) + +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c +@@ -249,7 +249,7 @@ u32 RTL8821AE_PHY_REG_ARRAY[] = { + 0x824, 0x00030FE0, + 0x828, 0x00000000, + 0x82C, 0x002081DD, +- 0x830, 0x2AAA8E24, ++ 0x830, 0x2AAAEEC8, + 0x834, 0x0037A706, + 0x838, 0x06489B44, + 0x83C, 0x0000095B, +@@ -324,10 +324,10 @@ u32 RTL8821AE_PHY_REG_ARRAY[] = { + 0x9D8, 0x00000000, + 0x9DC, 0x00000000, + 0x9E0, 0x00005D00, +- 0x9E4, 0x00000002, ++ 0x9E4, 0x00000003, + 0x9E8, 0x00000001, + 0xA00, 0x00D047C8, +- 0xA04, 0x01FF000C, ++ 0xA04, 0x01FF800C, + 0xA08, 0x8C8A8300, + 0xA0C, 0x2E68000F, + 0xA10, 0x9500BB78, +@@ -1320,7 +1320,11 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x083, 0x00021800, + 0x084, 0x00028000, + 0x085, 0x00048000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, ++ 0x086, 0x0009483A, ++ 0xA0000000, 0x00000000, + 0x086, 0x00094838, ++ 0xB0000000, 0x00000000, + 0x087, 0x00044980, + 0x088, 0x00048000, + 0x089, 0x0000D480, +@@ -1409,36 +1413,32 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x03C, 0x000CA000, + 0x0EF, 0x00000000, + 0x0EF, 0x00001100, +- 0xFF0F0104, 0xABCD, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0004ADF3, + 0x034, 0x00049DF0, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0004ADF3, + 0x034, 0x00049DF0, +- 0xFF0F0404, 0xCDEF, +- 0x034, 0x0004ADF3, +- 0x034, 0x00049DF0, +- 0xFF0F0200, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0004ADF5, + 0x034, 0x00049DF2, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x0004A0F3, ++ 0x034, 0x000490B1, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0004A0F3, + 0x034, 0x000490B1, +- 0xCDCDCDCD, 0xCDCD, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x0004ADF5, ++ 0x034, 0x00049DF2, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x0004ADF3, ++ 0x034, 0x00049DF0, ++ 0xA0000000, 0x00000000, + 0x034, 0x0004ADF7, + 0x034, 0x00049DF3, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0104, 0xABCD, +- 0x034, 0x00048DED, +- 0x034, 0x00047DEA, +- 0x034, 0x00046DE7, +- 0x034, 0x00045CE9, +- 0x034, 0x00044CE6, +- 0x034, 0x000438C6, +- 0x034, 0x00042886, +- 0x034, 0x00041486, +- 0x034, 0x00040447, +- 0xFF0F0204, 0xCDEF, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00048DED, + 0x034, 0x00047DEA, + 0x034, 0x00046DE7, +@@ -1448,7 +1448,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00042886, + 0x034, 0x00041486, + 0x034, 0x00040447, +- 0xFF0F0404, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00048DED, + 0x034, 0x00047DEA, + 0x034, 0x00046DE7, +@@ -1458,7 +1458,17 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00042886, + 0x034, 0x00041486, + 0x034, 0x00040447, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x000480AE, ++ 0x034, 0x000470AB, ++ 0x034, 0x0004608B, ++ 0x034, 0x00045069, ++ 0x034, 0x00044048, ++ 0x034, 0x00043045, ++ 0x034, 0x00042026, ++ 0x034, 0x00041023, ++ 0x034, 0x00040002, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x000480AE, + 0x034, 0x000470AB, + 0x034, 0x0004608B, +@@ -1468,7 +1478,17 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00042026, + 0x034, 0x00041023, + 0x034, 0x00040002, +- 0xCDCDCDCD, 0xCDCD, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x00048DED, ++ 0x034, 0x00047DEA, ++ 0x034, 0x00046DE7, ++ 0x034, 0x00045CE9, ++ 0x034, 0x00044CE6, ++ 0x034, 0x000438C6, ++ 0x034, 0x00042886, ++ 0x034, 0x00041486, ++ 0x034, 0x00040447, ++ 0xA0000000, 0x00000000, + 0x034, 0x00048DEF, + 0x034, 0x00047DEC, + 0x034, 0x00046DE9, +@@ -1478,38 +1498,36 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x0004248A, + 0x034, 0x0004108D, + 0x034, 0x0004008A, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0200, 0xABCD, ++ 0xB0000000, 0x00000000, ++ 0x80000210, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0002ADF4, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x0002A0F3, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0002A0F3, +- 0xCDCDCDCD, 0xCDCD, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x0002ADF4, ++ 0xA0000000, 0x00000000, + 0x034, 0x0002ADF7, +- 0xFF0F0200, 0xDEAD, +- 0xFF0F0104, 0xABCD, +- 0x034, 0x00029DF4, +- 0xFF0F0204, 0xCDEF, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00029DF4, +- 0xFF0F0404, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00029DF4, +- 0xFF0F0200, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00029DF1, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x000290F0, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x000290F0, +- 0xCDCDCDCD, 0xCDCD, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x00029DF1, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x00029DF4, ++ 0xA0000000, 0x00000000, + 0x034, 0x00029DF2, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0104, 0xABCD, +- 0x034, 0x00028DF1, +- 0x034, 0x00027DEE, +- 0x034, 0x00026DEB, +- 0x034, 0x00025CEC, +- 0x034, 0x00024CE9, +- 0x034, 0x000238CA, +- 0x034, 0x00022889, +- 0x034, 0x00021489, +- 0x034, 0x0002044A, +- 0xFF0F0204, 0xCDEF, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00028DF1, + 0x034, 0x00027DEE, + 0x034, 0x00026DEB, +@@ -1519,7 +1537,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00022889, + 0x034, 0x00021489, + 0x034, 0x0002044A, +- 0xFF0F0404, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00028DF1, + 0x034, 0x00027DEE, + 0x034, 0x00026DEB, +@@ -1529,7 +1547,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00022889, + 0x034, 0x00021489, + 0x034, 0x0002044A, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x000280AF, + 0x034, 0x000270AC, + 0x034, 0x0002608B, +@@ -1539,7 +1557,27 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00022026, + 0x034, 0x00021023, + 0x034, 0x00020002, +- 0xCDCDCDCD, 0xCDCD, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x000280AF, ++ 0x034, 0x000270AC, ++ 0x034, 0x0002608B, ++ 0x034, 0x00025069, ++ 0x034, 0x00024048, ++ 0x034, 0x00023045, ++ 0x034, 0x00022026, ++ 0x034, 0x00021023, ++ 0x034, 0x00020002, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x00028DF1, ++ 0x034, 0x00027DEE, ++ 0x034, 0x00026DEB, ++ 0x034, 0x00025CEC, ++ 0x034, 0x00024CE9, ++ 0x034, 0x000238CA, ++ 0x034, 0x00022889, ++ 0x034, 0x00021489, ++ 0x034, 0x0002044A, ++ 0xA0000000, 0x00000000, + 0x034, 0x00028DEE, + 0x034, 0x00027DEB, + 0x034, 0x00026CCD, +@@ -1549,27 +1587,24 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00022849, + 0x034, 0x00021449, + 0x034, 0x0002004D, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F02C0, 0xABCD, ++ 0xB0000000, 0x00000000, ++ 0x8000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x0000A0D7, ++ 0x034, 0x000090D3, ++ 0x034, 0x000080B1, ++ 0x034, 0x000070AE, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0000A0D7, + 0x034, 0x000090D3, + 0x034, 0x000080B1, + 0x034, 0x000070AE, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x034, 0x0000ADF7, + 0x034, 0x00009DF4, + 0x034, 0x00008DF1, + 0x034, 0x00007DEE, +- 0xFF0F02C0, 0xDEAD, +- 0xFF0F0104, 0xABCD, +- 0x034, 0x00006DEB, +- 0x034, 0x00005CEC, +- 0x034, 0x00004CE9, +- 0x034, 0x000038CA, +- 0x034, 0x00002889, +- 0x034, 0x00001489, +- 0x034, 0x0000044A, +- 0xFF0F0204, 0xCDEF, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00006DEB, + 0x034, 0x00005CEC, + 0x034, 0x00004CE9, +@@ -1577,7 +1612,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00002889, + 0x034, 0x00001489, + 0x034, 0x0000044A, +- 0xFF0F0404, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x00006DEB, + 0x034, 0x00005CEC, + 0x034, 0x00004CE9, +@@ -1585,7 +1620,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00002889, + 0x034, 0x00001489, + 0x034, 0x0000044A, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, + 0x034, 0x0000608D, + 0x034, 0x0000506B, + 0x034, 0x0000404A, +@@ -1593,7 +1628,23 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00002044, + 0x034, 0x00001025, + 0x034, 0x00000004, +- 0xCDCDCDCD, 0xCDCD, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x0000608D, ++ 0x034, 0x0000506B, ++ 0x034, 0x0000404A, ++ 0x034, 0x00003047, ++ 0x034, 0x00002044, ++ 0x034, 0x00001025, ++ 0x034, 0x00000004, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, ++ 0x034, 0x00006DEB, ++ 0x034, 0x00005CEC, ++ 0x034, 0x00004CE9, ++ 0x034, 0x000038CA, ++ 0x034, 0x00002889, ++ 0x034, 0x00001489, ++ 0x034, 0x0000044A, ++ 0xA0000000, 0x00000000, + 0x034, 0x00006DCD, + 0x034, 0x00005CCD, + 0x034, 0x00004CCA, +@@ -1601,11 +1652,11 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x034, 0x00002888, + 0x034, 0x00001488, + 0x034, 0x00000486, +- 0xFF0F0104, 0xDEAD, ++ 0xB0000000, 0x00000000, + 0x0EF, 0x00000000, + 0x018, 0x0001712A, + 0x0EF, 0x00000040, +- 0xFF0F0104, 0xABCD, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x035, 0x00000187, + 0x035, 0x00008187, + 0x035, 0x00010187, +@@ -1615,7 +1666,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x035, 0x00040188, + 0x035, 0x00048188, + 0x035, 0x00050188, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x035, 0x00000187, + 0x035, 0x00008187, + 0x035, 0x00010187, +@@ -1625,7 +1676,37 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x035, 0x00040188, + 0x035, 0x00048188, + 0x035, 0x00050188, +- 0xFF0F0404, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, ++ 0x035, 0x00000128, ++ 0x035, 0x00008128, ++ 0x035, 0x00010128, ++ 0x035, 0x000201C8, ++ 0x035, 0x000281C8, ++ 0x035, 0x000301C8, ++ 0x035, 0x000401C8, ++ 0x035, 0x000481C8, ++ 0x035, 0x000501C8, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x035, 0x00000145, ++ 0x035, 0x00008145, ++ 0x035, 0x00010145, ++ 0x035, 0x00020196, ++ 0x035, 0x00028196, ++ 0x035, 0x00030196, ++ 0x035, 0x000401C7, ++ 0x035, 0x000481C7, ++ 0x035, 0x000501C7, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x035, 0x00000128, ++ 0x035, 0x00008128, ++ 0x035, 0x00010128, ++ 0x035, 0x000201C8, ++ 0x035, 0x000281C8, ++ 0x035, 0x000301C8, ++ 0x035, 0x000401C8, ++ 0x035, 0x000481C8, ++ 0x035, 0x000501C8, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, + 0x035, 0x00000187, + 0x035, 0x00008187, + 0x035, 0x00010187, +@@ -1635,7 +1716,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x035, 0x00040188, + 0x035, 0x00048188, + 0x035, 0x00050188, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x035, 0x00000145, + 0x035, 0x00008145, + 0x035, 0x00010145, +@@ -1645,11 +1726,11 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x035, 0x000401C7, + 0x035, 0x000481C7, + 0x035, 0x000501C7, +- 0xFF0F0104, 0xDEAD, ++ 0xB0000000, 0x00000000, + 0x0EF, 0x00000000, + 0x018, 0x0001712A, + 0x0EF, 0x00000010, +- 0xFF0F0104, 0xABCD, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x036, 0x00085733, + 0x036, 0x0008D733, + 0x036, 0x00095733, +@@ -1662,7 +1743,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x036, 0x000CE4B4, + 0x036, 0x000D64B4, + 0x036, 0x000DE4B4, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x036, 0x00085733, + 0x036, 0x0008D733, + 0x036, 0x00095733, +@@ -1675,7 +1756,46 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x036, 0x000CE4B4, + 0x036, 0x000D64B4, + 0x036, 0x000DE4B4, +- 0xFF0F0404, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, ++ 0x036, 0x000063B5, ++ 0x036, 0x0000E3B5, ++ 0x036, 0x000163B5, ++ 0x036, 0x0001E3B5, ++ 0x036, 0x000263B5, ++ 0x036, 0x0002E3B5, ++ 0x036, 0x000363B5, ++ 0x036, 0x0003E3B5, ++ 0x036, 0x000463B5, ++ 0x036, 0x0004E3B5, ++ 0x036, 0x000563B5, ++ 0x036, 0x0005E3B5, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x036, 0x000056B3, ++ 0x036, 0x0000D6B3, ++ 0x036, 0x000156B3, ++ 0x036, 0x0001D6B3, ++ 0x036, 0x00026634, ++ 0x036, 0x0002E634, ++ 0x036, 0x00036634, ++ 0x036, 0x0003E634, ++ 0x036, 0x000467B4, ++ 0x036, 0x0004E7B4, ++ 0x036, 0x000567B4, ++ 0x036, 0x0005E7B4, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x036, 0x000063B5, ++ 0x036, 0x0000E3B5, ++ 0x036, 0x000163B5, ++ 0x036, 0x0001E3B5, ++ 0x036, 0x000263B5, ++ 0x036, 0x0002E3B5, ++ 0x036, 0x000363B5, ++ 0x036, 0x0003E3B5, ++ 0x036, 0x000463B5, ++ 0x036, 0x0004E3B5, ++ 0x036, 0x000563B5, ++ 0x036, 0x0005E3B5, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, + 0x036, 0x00085733, + 0x036, 0x0008D733, + 0x036, 0x00095733, +@@ -1688,7 +1808,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x036, 0x000CE4B4, + 0x036, 0x000D64B4, + 0x036, 0x000DE4B4, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x036, 0x000056B3, + 0x036, 0x0000D6B3, + 0x036, 0x000156B3, +@@ -1701,103 +1821,162 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x036, 0x0004E7B4, + 0x036, 0x000567B4, + 0x036, 0x0005E7B4, +- 0xFF0F0104, 0xDEAD, ++ 0xB0000000, 0x00000000, + 0x0EF, 0x00000000, + 0x0EF, 0x00000008, +- 0xFF0F0104, 0xABCD, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x03C, 0x000001C8, + 0x03C, 0x00000492, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x03C, 0x000001C8, + 0x03C, 0x00000492, +- 0xFF0F0404, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, ++ 0x03C, 0x000001B6, ++ 0x03C, 0x00000492, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x03C, 0x0000022A, ++ 0x03C, 0x00000594, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x03C, 0x000001B6, ++ 0x03C, 0x00000492, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, + 0x03C, 0x000001C8, + 0x03C, 0x00000492, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x03C, 0x0000022A, + 0x03C, 0x00000594, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0104, 0xABCD, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x03C, 0x00000800, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x03C, 0x00000800, +- 0xFF0F0404, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, + 0x03C, 0x00000800, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, + 0x03C, 0x00000820, +- 0xCDCDCDCD, 0xCDCD, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x03C, 0x00000820, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x03C, 0x00000800, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, ++ 0x03C, 0x00000800, ++ 0xA0000000, 0x00000000, + 0x03C, 0x00000900, +- 0xFF0F0104, 0xDEAD, ++ 0xB0000000, 0x00000000, + 0x0EF, 0x00000000, + 0x018, 0x0001712A, + 0x0EF, 0x00000002, +- 0xFF0F0104, 0xABCD, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x008, 0x0004E400, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x008, 0x0004E400, +- 0xFF0F0404, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, ++ 0x008, 0x00002000, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x008, 0x00002000, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x008, 0x00002000, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x008, 0x00002000, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, + 0x008, 0x0004E400, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x008, 0x00002000, +- 0xFF0F0104, 0xDEAD, ++ 0xB0000000, 0x00000000, + 0x0EF, 0x00000000, + 0x0DF, 0x000000C0, +- 0x01F, 0x00040064, +- 0xFF0F0104, 0xABCD, ++ 0x01F, 0x00000064, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x058, 0x000A7284, + 0x059, 0x000600EC, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x058, 0x000A7284, + 0x059, 0x000600EC, +- 0xFF0F0404, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x058, 0x00081184, ++ 0x059, 0x0006016C, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x058, 0x00081184, ++ 0x059, 0x0006016C, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x058, 0x00081184, ++ 0x059, 0x0006016C, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, + 0x058, 0x000A7284, + 0x059, 0x000600EC, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x058, 0x00081184, + 0x059, 0x0006016C, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0104, 0xABCD, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x061, 0x000E8D73, + 0x062, 0x00093FC5, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x061, 0x000E8D73, + 0x062, 0x00093FC5, +- 0xFF0F0404, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, ++ 0x061, 0x000EFD83, ++ 0x062, 0x00093FCC, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x061, 0x000EAD53, ++ 0x062, 0x00093BC4, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x061, 0x000EFD83, ++ 0x062, 0x00093FCC, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, + 0x061, 0x000E8D73, + 0x062, 0x00093FC5, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x061, 0x000EAD53, + 0x062, 0x00093BC4, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0104, 0xABCD, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, + 0x063, 0x000110E9, +- 0xFF0F0204, 0xCDEF, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, + 0x063, 0x000110E9, +- 0xFF0F0404, 0xCDEF, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, ++ 0x063, 0x000110EB, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, + 0x063, 0x000110E9, +- 0xFF0F0200, 0xCDEF, +- 0x063, 0x000710E9, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, + 0x063, 0x000110E9, +- 0xCDCDCDCD, 0xCDCD, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x063, 0x000110EB, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, ++ 0x063, 0x000110E9, ++ 0xA0000000, 0x00000000, + 0x063, 0x000714E9, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0104, 0xABCD, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, ++ 0x064, 0x0001C27C, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, ++ 0x064, 0x0001C27C, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, + 0x064, 0x0001C27C, +- 0xFF0F0204, 0xCDEF, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x064, 0x0001C67C, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, + 0x064, 0x0001C27C, +- 0xFF0F0404, 0xCDEF, ++ 0x90000410, 0x00000000, 0x40000000, 0x00000000, + 0x064, 0x0001C27C, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x064, 0x0001C67C, +- 0xFF0F0104, 0xDEAD, +- 0xFF0F0200, 0xABCD, ++ 0xB0000000, 0x00000000, ++ 0x80000111, 0x00000000, 0x40000000, 0x00000000, ++ 0x065, 0x00091016, ++ 0x90000110, 0x00000000, 0x40000000, 0x00000000, ++ 0x065, 0x00091016, ++ 0x90000210, 0x00000000, 0x40000000, 0x00000000, + 0x065, 0x00093016, +- 0xFF0F02C0, 0xCDEF, ++ 0x9000020c, 0x00000000, 0x40000000, 0x00000000, + 0x065, 0x00093015, +- 0xCDCDCDCD, 0xCDCD, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, ++ 0x065, 0x00093015, ++ 0x90000200, 0x00000000, 0x40000000, 0x00000000, ++ 0x065, 0x00093016, ++ 0xA0000000, 0x00000000, + 0x065, 0x00091016, +- 0xFF0F0200, 0xDEAD, ++ 0xB0000000, 0x00000000, + 0x018, 0x00000006, + 0x0EF, 0x00002000, + 0x03B, 0x0003824B, +@@ -1895,9 +2074,10 @@ u32 RTL8821AE_RADIOA_ARRAY[] = { + 0x0B4, 0x0001214C, + 0x0B7, 0x0003000C, + 0x01C, 0x000539D2, ++ 0x0C4, 0x000AFE00, + 0x018, 0x0001F12A, +- 0x0FE, 0x00000000, +- 0x0FE, 0x00000000, ++ 0xFFE, 0x00000000, ++ 0xFFE, 0x00000000, + 0x018, 0x0001712A, + + }; +@@ -2017,6 +2197,7 @@ u32 RTL8812AE_MAC_REG_ARRAY[] = { + u32 RTL8812AE_MAC_1T_ARRAYLEN = ARRAY_SIZE(RTL8812AE_MAC_REG_ARRAY); + + u32 RTL8821AE_MAC_REG_ARRAY[] = { ++ 0x421, 0x0000000F, + 0x428, 0x0000000A, + 0x429, 0x00000010, + 0x430, 0x00000000, +@@ -2485,7 +2666,7 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = { + 0x81C, 0xA6360001, + 0x81C, 0xA5380001, + 0x81C, 0xA43A0001, +- 0x81C, 0xA33C0001, ++ 0x81C, 0x683C0001, + 0x81C, 0x673E0001, + 0x81C, 0x66400001, + 0x81C, 0x65420001, +@@ -2519,7 +2700,66 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = { + 0x81C, 0x017A0001, + 0x81C, 0x017C0001, + 0x81C, 0x017E0001, +- 0xFF0F02C0, 0xABCD, ++ 0x8000020c, 0x00000000, 0x40000000, 0x00000000, ++ 0x81C, 0xFB000101, ++ 0x81C, 0xFA020101, ++ 0x81C, 0xF9040101, ++ 0x81C, 0xF8060101, ++ 0x81C, 0xF7080101, ++ 0x81C, 0xF60A0101, ++ 0x81C, 0xF50C0101, ++ 0x81C, 0xF40E0101, ++ 0x81C, 0xF3100101, ++ 0x81C, 0xF2120101, ++ 0x81C, 0xF1140101, ++ 0x81C, 0xF0160101, ++ 0x81C, 0xEF180101, ++ 0x81C, 0xEE1A0101, ++ 0x81C, 0xED1C0101, ++ 0x81C, 0xEC1E0101, ++ 0x81C, 0xEB200101, ++ 0x81C, 0xEA220101, ++ 0x81C, 0xE9240101, ++ 0x81C, 0xE8260101, ++ 0x81C, 0xE7280101, ++ 0x81C, 0xE62A0101, ++ 0x81C, 0xE52C0101, ++ 0x81C, 0xE42E0101, ++ 0x81C, 0xE3300101, ++ 0x81C, 0xA5320101, ++ 0x81C, 0xA4340101, ++ 0x81C, 0xA3360101, ++ 0x81C, 0x87380101, ++ 0x81C, 0x863A0101, ++ 0x81C, 0x853C0101, ++ 0x81C, 0x843E0101, ++ 0x81C, 0x69400101, ++ 0x81C, 0x68420101, ++ 0x81C, 0x67440101, ++ 0x81C, 0x66460101, ++ 0x81C, 0x49480101, ++ 0x81C, 0x484A0101, ++ 0x81C, 0x474C0101, ++ 0x81C, 0x2A4E0101, ++ 0x81C, 0x29500101, ++ 0x81C, 0x28520101, ++ 0x81C, 0x27540101, ++ 0x81C, 0x26560101, ++ 0x81C, 0x25580101, ++ 0x81C, 0x245A0101, ++ 0x81C, 0x235C0101, ++ 0x81C, 0x055E0101, ++ 0x81C, 0x04600101, ++ 0x81C, 0x03620101, ++ 0x81C, 0x02640101, ++ 0x81C, 0x01660101, ++ 0x81C, 0x01680101, ++ 0x81C, 0x016A0101, ++ 0x81C, 0x016C0101, ++ 0x81C, 0x016E0101, ++ 0x81C, 0x01700101, ++ 0x81C, 0x01720101, ++ 0x9000040c, 0x00000000, 0x40000000, 0x00000000, + 0x81C, 0xFB000101, + 0x81C, 0xFA020101, + 0x81C, 0xF9040101, +@@ -2578,7 +2818,7 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = { + 0x81C, 0x016E0101, + 0x81C, 0x01700101, + 0x81C, 0x01720101, +- 0xCDCDCDCD, 0xCDCD, ++ 0xA0000000, 0x00000000, + 0x81C, 0xFF000101, + 0x81C, 0xFF020101, + 0x81C, 0xFE040101, +@@ -2637,7 +2877,7 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = { + 0x81C, 0x046E0101, + 0x81C, 0x03700101, + 0x81C, 0x02720101, +- 0xFF0F02C0, 0xDEAD, ++ 0xB0000000, 0x00000000, + 0x81C, 0x01740101, + 0x81C, 0x01760101, + 0x81C, 0x01780101, From f65b0afadb5398d1c1957c9b6a1c3bc735ff7a60 Mon Sep 17 00:00:00 2001 From: Ilya Lipnitskiy Date: Sun, 7 Mar 2021 19:31:50 -0800 Subject: [PATCH 10/61] ramips: move spi-nor-add-gd25q512 patch to generic A SPI NOR flash should not be target-specific, so move it to generic in case another platform needs to use it. Signed-off-by: Ilya Lipnitskiy --- .../pending-5.10/483-mtd-spi-nor-add-gd25q512.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename target/linux/{ramips/patches-5.10/420-spi-nor-add-gd25q512.patch => generic/pending-5.10/483-mtd-spi-nor-add-gd25q512.patch} (100%) diff --git a/target/linux/ramips/patches-5.10/420-spi-nor-add-gd25q512.patch b/target/linux/generic/pending-5.10/483-mtd-spi-nor-add-gd25q512.patch similarity index 100% rename from target/linux/ramips/patches-5.10/420-spi-nor-add-gd25q512.patch rename to target/linux/generic/pending-5.10/483-mtd-spi-nor-add-gd25q512.patch From 6e23813c1ed7494a9da3b5e59cfcafd71097c420 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 6 Mar 2021 14:17:45 -0800 Subject: [PATCH 11/61] binutils: fix compilation with ccache For some reason, one of the configure checks results in some infinite loop and ends up spawning endless gcc processes, causing OOM. Just pass a configure var to avoid it. Signed-off-by: Rosen Penev --- toolchain/binutils/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index da86794480..65d9925f9a 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -63,6 +63,9 @@ ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) endif +HOST_CONFIGURE_VARS += \ + acx_cv_cc_gcc_supports_ada=false + define Host/Prepare $(call Host/Prepare/Default) ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) From 85fa8ad8af6f483a181ed944cc5cfcf9402a3a11 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 29 Dec 2020 16:05:40 -0800 Subject: [PATCH 12/61] kexec-tools: update to 2.0.21 kdump was removed in 7acd257ae67b4ca94f8c23cb8bda0ee0709b9216 gdb can be used as an alternative. Remove autoreconf. It's not needed as the configure files are already generated. Remove upstreamed patch. Signed-off-by: Rosen Penev --- package/boot/kexec-tools/Makefile | 42 ++----------------- ...rela-relocation-R_X86_64_PLT32-error.patch | 14 ------- 2 files changed, 3 insertions(+), 53 deletions(-) delete mode 100644 package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 269345aa9d..36fe53671a 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package/boot/kexec-tools/Makefile @@ -8,14 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kexec-tools -PKG_VERSION:=2.0.16 -PKG_RELEASE:=2 +PKG_VERSION:=2.0.21 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec -PKG_HASH:=5b103351ad752c9badd1d65b00eb6de4bce579f944f4df4e3ef3a755ba567010 - -PKG_FIXUP:=autoreconf +PKG_HASH:=e113142dee891638ad96e0f72cf9277b244477619470b30c41999d312e8e8702 PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA @@ -51,17 +49,6 @@ define Package/kexec/description The kexec utility allows to load and boot another kernel. endef -define Package/kdump - $(call Package/kexec-tools/Default) - TITLE:=Kernel crash analysis - DEPENDS:=+kexec @(i386||x86_64||arm) @KERNEL_CRASH_DUMP -endef - -define Package/kdump/description - The kdump package allows to automatically boot into a - special kernel for analyzing kernel crashes using kdump. -endef - define Package/kexec/config source "$(SOURCE)/Config.in" endef @@ -108,28 +95,5 @@ define Package/kexec/install $(LN) ../usr/sbin/kexec $(1)/sbin/kexec endef -define Package/kdump/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdump $(PKG_INSTALL_DIR)/usr/sbin/vmcore-dmesg $(1)/usr/sbin - $(INSTALL_BIN) ./files/kdump.init $(1)/etc/init.d/kdump - $(INSTALL_BIN) ./files/kdump.defaults $(1)/etc/uci-defaults/kdump - $(INSTALL_CONF) ./files/kdump.config $(1)/etc/config/kdump -endef - -define Package/kdump/prerm -#!/bin/sh - -case $$(uname -m) in - i?86|x86_64) - if grep -q " crashkernel=" /boot/grub/grub.cfg; then - mount /boot -o remount,rw - sed -i 's/ crashkernel=[^ ]*//' /boot/grub/grub.cfg - mount /boot -o remount,ro - fi - ;; -esac -endef - $(eval $(call BuildPackage,kexec-tools)) $(eval $(call BuildPackage,kexec)) -$(eval $(call BuildPackage,kdump)) diff --git a/package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch b/package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch deleted file mode 100644 index dfad21992b..0000000000 --- a/package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -index 7fdde73..af33689 100644 ---- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -+++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -@@ -78,7 +78,8 @@ void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), - if ((int64_t)value != *(int32_t *)location) - goto overflow; - break; -- case R_X86_64_PC32: -+ case R_X86_64_PC32: -+ case R_X86_64_PLT32: - *(uint32_t *)location = value - address; - break; - default: From d6c5698a71e958460b32dd8113da02d2346ed536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Mar 2021 17:49:52 +0100 Subject: [PATCH 13/61] bmips: backport upstream dsa b53 is63xx patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch has been accepted for linux v5.13. Signed-off-by: Álvaro Fernández Rojas --- ...=> 048-v5.13-net-dsa-b53-relax-is63xx-condition.patch} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename target/linux/bmips/patches-5.10/{500-net-dsa-b53-relax-is63xx-condition.patch => 048-v5.13-net-dsa-b53-relax-is63xx-condition.patch} (73%) diff --git a/target/linux/bmips/patches-5.10/500-net-dsa-b53-relax-is63xx-condition.patch b/target/linux/bmips/patches-5.10/048-v5.13-net-dsa-b53-relax-is63xx-condition.patch similarity index 73% rename from target/linux/bmips/patches-5.10/500-net-dsa-b53-relax-is63xx-condition.patch rename to target/linux/bmips/patches-5.10/048-v5.13-net-dsa-b53-relax-is63xx-condition.patch index f5dd4e2c59..ef5522ad33 100644 --- a/target/linux/bmips/patches-5.10/500-net-dsa-b53-relax-is63xx-condition.patch +++ b/target/linux/bmips/patches-5.10/048-v5.13-net-dsa-b53-relax-is63xx-condition.patch @@ -1,7 +1,7 @@ -From cd6906754bbe3e0665ecaeca2cfb26d927fe9277 Mon Sep 17 00:00:00 2001 +From ad426d7d966b525b73ed5a1842dd830312bbba71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Mon, 1 Mar 2021 07:29:29 +0100 -Subject: [PATCH 1/3] net: dsa: b53: relax is63xx() condition +Date: Wed, 17 Mar 2021 09:42:01 +0100 +Subject: [PATCH] net: dsa: b53: relax is63xx() condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -9,6 +9,8 @@ Content-Transfer-Encoding: 8bit BCM63xx switches are present on bcm63xx and bmips devices. Signed-off-by: Álvaro Fernández Rojas +Acked-by: Florian Fainelli +Signed-off-by: David S. Miller --- drivers/net/dsa/b53/b53_priv.h | 4 ---- 1 file changed, 4 deletions(-) From a139ab1b82f8f597570e5b623a16d43ea174c517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Fri, 19 Mar 2021 10:53:51 +0100 Subject: [PATCH 14/61] bmips: backport b53 legacy tags support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These patches have been accepted upstream for linux 5.13. Signed-off-by: Álvaro Fernández Rojas --- ...t-a-central-TX-reallocation-procedur.patch | 104 +++++++++++++ ...ag_brcm-add-support-for-legacy-tags.patch} | 145 +++++++----------- ...5.13-net-dsa-b53-support-legacy-tags.patch | 53 +++++++ 3 files changed, 215 insertions(+), 87 deletions(-) create mode 100644 target/linux/bmips/patches-5.10/010-v5.11-net-dsa-implement-a-central-TX-reallocation-procedur.patch rename target/linux/bmips/patches-5.10/{502-net-dsa-b53-support-tags-for-legacy-switches.patch => 049-v5.13-net-dsa-tag_brcm-add-support-for-legacy-tags.patch} (55%) create mode 100644 target/linux/bmips/patches-5.10/050-v5.13-net-dsa-b53-support-legacy-tags.patch diff --git a/target/linux/bmips/patches-5.10/010-v5.11-net-dsa-implement-a-central-TX-reallocation-procedur.patch b/target/linux/bmips/patches-5.10/010-v5.11-net-dsa-implement-a-central-TX-reallocation-procedur.patch new file mode 100644 index 0000000000..4171a69d1d --- /dev/null +++ b/target/linux/bmips/patches-5.10/010-v5.11-net-dsa-implement-a-central-TX-reallocation-procedur.patch @@ -0,0 +1,104 @@ +From a3b0b6479700a5b0af2c631cb2ec0fb7a0d978f2 Mon Sep 17 00:00:00 2001 +From: Vladimir Oltean +Date: Sun, 1 Nov 2020 21:16:09 +0200 +Subject: [PATCH] net: dsa: implement a central TX reallocation procedure + +At the moment, taggers are left with the task of ensuring that the skb +headers are writable (which they aren't, if the frames were cloned for +TX timestamping, for flooding by the bridge, etc), and that there is +enough space in the skb data area for the DSA tag to be pushed. + +Moreover, the life of tail taggers is even harder, because they need to +ensure that short frames have enough padding, a problem that normal +taggers don't have. + +The principle of the DSA framework is that everything except for the +most intimate hardware specifics (like in this case, the actual packing +of the DSA tag bits) should be done inside the core, to avoid having +code paths that are very rarely tested. + +So provide a TX reallocation procedure that should cover the known needs +of DSA today. + +Note that this patch also gives the network stack a good hint about the +headroom/tailroom it's going to need. Up till now it wasn't doing that. +So the reallocation procedure should really be there only for the +exceptional cases, and for cloned packets which need to be unshared. + +Signed-off-by: Vladimir Oltean +Tested-by: Christian Eggers # For tail taggers only +Tested-by: Kurt Kanzenbach +Reviewed-by: Florian Fainelli +Signed-off-by: Jakub Kicinski +--- + net/dsa/slave.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +--- a/net/dsa/slave.c ++++ b/net/dsa/slave.c +@@ -548,6 +548,30 @@ netdev_tx_t dsa_enqueue_skb(struct sk_bu + } + EXPORT_SYMBOL_GPL(dsa_enqueue_skb); + ++static int dsa_realloc_skb(struct sk_buff *skb, struct net_device *dev) ++{ ++ int needed_headroom = dev->needed_headroom; ++ int needed_tailroom = dev->needed_tailroom; ++ ++ /* For tail taggers, we need to pad short frames ourselves, to ensure ++ * that the tail tag does not fail at its role of being at the end of ++ * the packet, once the master interface pads the frame. Account for ++ * that pad length here, and pad later. ++ */ ++ if (unlikely(needed_tailroom && skb->len < ETH_ZLEN)) ++ needed_tailroom += ETH_ZLEN - skb->len; ++ /* skb_headroom() returns unsigned int... */ ++ needed_headroom = max_t(int, needed_headroom - skb_headroom(skb), 0); ++ needed_tailroom = max_t(int, needed_tailroom - skb_tailroom(skb), 0); ++ ++ if (likely(!needed_headroom && !needed_tailroom && !skb_cloned(skb))) ++ /* No reallocation needed, yay! */ ++ return 0; ++ ++ return pskb_expand_head(skb, needed_headroom, needed_tailroom, ++ GFP_ATOMIC); ++} ++ + static netdev_tx_t dsa_slave_xmit(struct sk_buff *skb, struct net_device *dev) + { + struct dsa_slave_priv *p = netdev_priv(dev); +@@ -567,6 +591,17 @@ static netdev_tx_t dsa_slave_xmit(struct + */ + dsa_skb_tx_timestamp(p, skb); + ++ if (dsa_realloc_skb(skb, dev)) { ++ dev_kfree_skb_any(skb); ++ return NETDEV_TX_OK; ++ } ++ ++ /* needed_tailroom should still be 'warm' in the cache line from ++ * dsa_realloc_skb(), which has also ensured that padding is safe. ++ */ ++ if (dev->needed_tailroom) ++ eth_skb_pad(skb); ++ + /* Transmit function may have to reallocate the original SKB, + * in which case it must have freed it. Only free it here on error. + */ +@@ -1825,6 +1860,16 @@ int dsa_slave_create(struct dsa_port *po + slave_dev->netdev_ops = &dsa_slave_netdev_ops; + if (ds->ops->port_max_mtu) + slave_dev->max_mtu = ds->ops->port_max_mtu(ds, port->index); ++ if (cpu_dp->tag_ops->tail_tag) ++ slave_dev->needed_tailroom = cpu_dp->tag_ops->overhead; ++ else ++ slave_dev->needed_headroom = cpu_dp->tag_ops->overhead; ++ /* Try to save one extra realloc later in the TX path (in the master) ++ * by also inheriting the master's needed headroom and tailroom. ++ * The 8021q driver also does this. ++ */ ++ slave_dev->needed_headroom += master->needed_headroom; ++ slave_dev->needed_tailroom += master->needed_tailroom; + SET_NETDEV_DEVTYPE(slave_dev, &dsa_type); + + netdev_for_each_tx_queue(slave_dev, dsa_slave_set_lockdep_class_one, diff --git a/target/linux/bmips/patches-5.10/502-net-dsa-b53-support-tags-for-legacy-switches.patch b/target/linux/bmips/patches-5.10/049-v5.13-net-dsa-tag_brcm-add-support-for-legacy-tags.patch similarity index 55% rename from target/linux/bmips/patches-5.10/502-net-dsa-b53-support-tags-for-legacy-switches.patch rename to target/linux/bmips/patches-5.10/049-v5.13-net-dsa-tag_brcm-add-support-for-legacy-tags.patch index b8aa8b844d..a9b689ca9c 100644 --- a/target/linux/bmips/patches-5.10/502-net-dsa-b53-support-tags-for-legacy-switches.patch +++ b/target/linux/bmips/patches-5.10/049-v5.13-net-dsa-tag_brcm-add-support-for-legacy-tags.patch @@ -1,59 +1,22 @@ -From 3bc3d79efdff6e29b80bf35f7a56baaa36e4d8fe Mon Sep 17 00:00:00 2001 +From 964dbf186eaa84d409c359ddf09c827a3fbe8228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Fri, 12 Mar 2021 12:35:39 +0100 -Subject: [PATCH] net: dsa: b53: support tags for legacy switches +Date: Wed, 17 Mar 2021 11:29:26 +0100 +Subject: [PATCH 1/2] net: dsa: tag_brcm: add support for legacy tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Signed-off-by: Álvaro Fernández Rojas ---- - drivers/net/dsa/b53/Kconfig | 1 + - drivers/net/dsa/b53/b53_common.c | 6 +++ - include/net/dsa.h | 2 + - net/dsa/Kconfig | 7 +++ - net/dsa/tag_brcm.c | 93 ++++++++++++++++++++++++++++++++ - 5 files changed, 109 insertions(+) +Add support for legacy Broadcom tags, which are similar to DSA_TAG_PROTO_BRCM. +These tags are used on BCM5325, BCM5365 and BCM63xx switches. + +Signed-off-by: Álvaro Fernández Rojas +Signed-off-by: David S. Miller +--- + include/net/dsa.h | 2 + + net/dsa/Kconfig | 7 +++ + net/dsa/tag_brcm.c | 107 +++++++++++++++++++++++++++++++++++++++++++-- + 3 files changed, 113 insertions(+), 3 deletions(-) ---- a/drivers/net/dsa/b53/Kconfig -+++ b/drivers/net/dsa/b53/Kconfig -@@ -3,6 +3,7 @@ menuconfig B53 - tristate "Broadcom BCM53xx managed switch support" - depends on NET_DSA - select NET_DSA_TAG_BRCM -+ select NET_DSA_TAG_BRCM_LEGACY - select NET_DSA_TAG_BRCM_PREPEND - help - This driver adds support for Broadcom managed switch chips. It supports ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -1992,6 +1992,7 @@ static bool b53_can_enable_brcm_tags(str - - switch (tag_protocol) { - case DSA_TAG_PROTO_BRCM: -+ case DSA_TAG_PROTO_BRCM_LEGACY: - case DSA_TAG_PROTO_BRCM_PREPEND: - dev_warn(ds->dev, - "Port %d is stacked to Broadcom tag switch\n", port); -@@ -2013,12 +2014,16 @@ enum dsa_tag_protocol b53_get_tag_protoc - /* Older models (5325, 5365) support a different tag format that we do - * not support in net/dsa/tag_brcm.c yet. - */ -- if (is5325(dev) || is5365(dev) || -- !b53_can_enable_brcm_tags(ds, port, mprot)) { -+ if (!b53_can_enable_brcm_tags(ds, port, mprot)) { - dev->tag_protocol = DSA_TAG_PROTO_NONE; - goto out; - } - -+ if (is5325(dev) || is5365(dev) || is63xx(dev)) { -+ dev->tag_protocol = DSA_TAG_PROTO_BRCM_LEGACY; -+ goto out; -+ } -+ - /* Broadcom BCM58xx chips have a flow accelerator on Port 8 - * which requires us to use the prepended Broadcom tag type - */ --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -45,10 +45,12 @@ struct phylink_link_state; @@ -87,31 +50,37 @@ Signed-off-by: Álvaro Fernández Rojas tristate "Tag driver for Broadcom switches using prepended headers" --- a/net/dsa/tag_brcm.c +++ b/net/dsa/tag_brcm.c -@@ -8,9 +8,23 @@ - #include - #include - #include -+#include +@@ -11,9 +11,26 @@ #include "dsa_priv.h" -+struct bcm_legacy_tag { -+ uint16_t type; -+#define BRCM_LEG_TYPE 0x8874 +-/* This tag length is 4 bytes, older ones were 6 bytes, we do not +- * handle them +- */ ++/* Legacy Broadcom tag (6 bytes) */ ++#define BRCM_LEG_TAG_LEN 6 + -+ uint32_t tag; -+#define BRCM_LEG_TAG_PORT_ID (0xf) -+#define BRCM_LEG_TAG_MULTICAST (1 << 29) -+#define BRCM_LEG_TAG_EGRESS (2 << 29) -+#define BRCM_LEG_TAG_INGRESS (3 << 29) -+} __attribute__((packed)); ++/* Type fields */ ++/* 1st byte in the tag */ ++#define BRCM_LEG_TYPE_HI 0x88 ++/* 2nd byte in the tag */ ++#define BRCM_LEG_TYPE_LO 0x74 + -+#define BRCM_LEG_TAG_LEN sizeof(struct bcm_legacy_tag) ++/* Tag fields */ ++/* 3rd byte in the tag */ ++#define BRCM_LEG_UNICAST (0 << 5) ++#define BRCM_LEG_MULTICAST (1 << 5) ++#define BRCM_LEG_EGRESS (2 << 5) ++#define BRCM_LEG_INGRESS (3 << 5) + - /* This tag length is 4 bytes, older ones were 6 bytes, we do not - * handle them - */ -@@ -197,6 +211,85 @@ DSA_TAG_DRIVER(brcm_netdev_ops); ++/* 6th byte in the tag */ ++#define BRCM_LEG_PORT_ID (0xf) ++ ++/* Newer Broadcom tag (4 bytes) */ + #define BRCM_TAG_LEN 4 + + /* Tag is constructed and desconstructed using byte by byte access +@@ -197,6 +214,87 @@ DSA_TAG_DRIVER(brcm_netdev_ops); MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_BRCM); #endif @@ -120,10 +89,7 @@ Signed-off-by: Álvaro Fernández Rojas + struct net_device *dev) +{ + struct dsa_port *dp = dsa_slave_to_port(dev); -+ struct bcm_legacy_tag *brcm_tag; -+ -+ if (skb_cow_head(skb, BRCM_LEG_TAG_LEN) < 0) -+ return NULL; ++ u8 *brcm_tag; + + /* The Ethernet switch we are interfaced with needs packets to be at + * least 64 bytes (including FCS) otherwise they will be discarded when @@ -141,29 +107,34 @@ Signed-off-by: Álvaro Fernández Rojas + + memmove(skb->data, skb->data + BRCM_LEG_TAG_LEN, 2 * ETH_ALEN); + -+ brcm_tag = (struct bcm_legacy_tag *) (skb->data + 2 * ETH_ALEN); ++ brcm_tag = skb->data + 2 * ETH_ALEN; + -+ brcm_tag->type = BRCM_LEG_TYPE; -+ brcm_tag->tag = BRCM_LEG_TAG_EGRESS; -+ brcm_tag->tag |= dp->index & BRCM_LEG_TAG_PORT_ID; ++ /* Broadcom tag type */ ++ brcm_tag[0] = BRCM_LEG_TYPE_HI; ++ brcm_tag[1] = BRCM_LEG_TYPE_LO; ++ ++ /* Broadcom tag value */ ++ brcm_tag[2] = BRCM_LEG_EGRESS; ++ brcm_tag[3] = 0; ++ brcm_tag[4] = 0; ++ brcm_tag[5] = dp->index & BRCM_LEG_PORT_ID; + + return skb; +} + -+ +static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb, + struct net_device *dev, + struct packet_type *pt) +{ + int source_port; -+ struct bcm_legacy_tag *brcm_tag; ++ u8 *brcm_tag; + -+ if (unlikely(!pskb_may_pull(skb, BRCM_LEG_TAG_LEN))) ++ if (unlikely(!pskb_may_pull(skb, BRCM_LEG_PORT_ID))) + return NULL; + -+ brcm_tag = (struct bcm_legacy_tag *) (skb->data - 2); ++ brcm_tag = skb->data - 2; + -+ source_port = brcm_tag->tag & BRCM_LEG_TAG_PORT_ID; ++ source_port = brcm_tag[5] & BRCM_LEG_PORT_ID; + + skb->dev = dsa_master_find_slave(dev, 0, source_port); + if (!skb->dev) @@ -183,10 +154,10 @@ Signed-off-by: Álvaro Fernández Rojas +} + +static const struct dsa_device_ops brcm_legacy_netdev_ops = { -+ .name = "brcm-legacy", -+ .proto = DSA_TAG_PROTO_BRCM_LEGACY, -+ .xmit = brcm_leg_tag_xmit, -+ .rcv = brcm_leg_tag_rcv, ++ .name = "brcm-legacy", ++ .proto = DSA_TAG_PROTO_BRCM_LEGACY, ++ .xmit = brcm_leg_tag_xmit, ++ .rcv = brcm_leg_tag_rcv, + .overhead = BRCM_LEG_TAG_LEN, +}; + @@ -197,7 +168,7 @@ Signed-off-by: Álvaro Fernández Rojas #if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_PREPEND) static struct sk_buff *brcm_tag_xmit_prepend(struct sk_buff *skb, struct net_device *dev) -@@ -229,6 +322,9 @@ static struct dsa_tag_driver *dsa_tag_dr +@@ -229,6 +327,9 @@ static struct dsa_tag_driver *dsa_tag_dr #if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM) &DSA_TAG_DRIVER_NAME(brcm_netdev_ops), #endif diff --git a/target/linux/bmips/patches-5.10/050-v5.13-net-dsa-b53-support-legacy-tags.patch b/target/linux/bmips/patches-5.10/050-v5.13-net-dsa-b53-support-legacy-tags.patch new file mode 100644 index 0000000000..59a7217663 --- /dev/null +++ b/target/linux/bmips/patches-5.10/050-v5.13-net-dsa-b53-support-legacy-tags.patch @@ -0,0 +1,53 @@ +From 46c5176c586c81306bf9e7024c13b95da775490f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= +Date: Wed, 17 Mar 2021 11:29:27 +0100 +Subject: [PATCH 2/2] net: dsa: b53: support legacy tags +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These tags are used on BCM5325, BCM5365 and BCM63xx switches. + +Signed-off-by: Álvaro Fernández Rojas +Acked-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/dsa/b53/Kconfig | 1 + + drivers/net/dsa/b53/b53_common.c | 12 +++++++----- + 2 files changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/net/dsa/b53/Kconfig ++++ b/drivers/net/dsa/b53/Kconfig +@@ -3,6 +3,7 @@ menuconfig B53 + tristate "Broadcom BCM53xx managed switch support" + depends on NET_DSA + select NET_DSA_TAG_BRCM ++ select NET_DSA_TAG_BRCM_LEGACY + select NET_DSA_TAG_BRCM_PREPEND + help + This driver adds support for Broadcom managed switch chips. It supports +--- a/drivers/net/dsa/b53/b53_common.c ++++ b/drivers/net/dsa/b53/b53_common.c +@@ -2010,15 +2010,17 @@ enum dsa_tag_protocol b53_get_tag_protoc + { + struct b53_device *dev = ds->priv; + +- /* Older models (5325, 5365) support a different tag format that we do +- * not support in net/dsa/tag_brcm.c yet. +- */ +- if (is5325(dev) || is5365(dev) || +- !b53_can_enable_brcm_tags(ds, port, mprot)) { ++ if (!b53_can_enable_brcm_tags(ds, port, mprot)) { + dev->tag_protocol = DSA_TAG_PROTO_NONE; + goto out; + } + ++ /* Older models require a different 6 byte tag */ ++ if (is5325(dev) || is5365(dev) || is63xx(dev)) { ++ dev->tag_protocol = DSA_TAG_PROTO_BRCM_LEGACY; ++ goto out; ++ } ++ + /* Broadcom BCM58xx chips have a flow accelerator on Port 8 + * which requires us to use the prepended Broadcom tag type + */ From df26c29629e42e61cab7adb36f91e207d2ad969e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Fri, 19 Mar 2021 10:59:07 +0100 Subject: [PATCH 15/61] bmips: backport b53 mmap device tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch has been accepted upstream for linux v5.13. Signed-off-by: Álvaro Fernández Rojas --- ...sa-b53-mmap-Add-device-tree-support.patch} | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) rename target/linux/bmips/patches-5.10/{501-net-dsa-b53-mmap-Add-device-tree-support.patch => 051-v5.13-net-dsa-b53-mmap-Add-device-tree-support.patch} (70%) diff --git a/target/linux/bmips/patches-5.10/501-net-dsa-b53-mmap-Add-device-tree-support.patch b/target/linux/bmips/patches-5.10/051-v5.13-net-dsa-b53-mmap-Add-device-tree-support.patch similarity index 70% rename from target/linux/bmips/patches-5.10/501-net-dsa-b53-mmap-Add-device-tree-support.patch rename to target/linux/bmips/patches-5.10/051-v5.13-net-dsa-b53-mmap-Add-device-tree-support.patch index e9eb87cb5c..c1014b20bc 100644 --- a/target/linux/bmips/patches-5.10/501-net-dsa-b53-mmap-Add-device-tree-support.patch +++ b/target/linux/bmips/patches-5.10/051-v5.13-net-dsa-b53-mmap-Add-device-tree-support.patch @@ -1,7 +1,7 @@ -From f5419e7f362ae1c462baf28a2da7360267f8e4f9 Mon Sep 17 00:00:00 2001 +From a5538a777b73b35750ed1ffff8c1ef539e861624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Mon, 1 Mar 2021 07:32:32 +0100 -Subject: [PATCH 2/3] net: dsa: b53: mmap: Add device tree support +Date: Wed, 17 Mar 2021 10:23:17 +0100 +Subject: [PATCH] net: dsa: b53: mmap: Add device tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -9,22 +9,31 @@ Content-Transfer-Encoding: 8bit Add device tree support to b53_mmap.c while keeping platform devices support. Signed-off-by: Álvaro Fernández Rojas +Signed-off-by: David S. Miller --- - drivers/net/dsa/b53/b53_mmap.c | 36 ++++++++++++++++++++++++++++++++++ - 1 file changed, 36 insertions(+) + drivers/net/dsa/b53/b53_mmap.c | 55 ++++++++++++++++++++++++++++++++++ + 1 file changed, 55 insertions(+) --- a/drivers/net/dsa/b53/b53_mmap.c +++ b/drivers/net/dsa/b53/b53_mmap.c -@@ -228,12 +228,64 @@ static const struct b53_io_ops b53_mmap_ +@@ -16,6 +16,7 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#include + #include + #include + #include +@@ -228,11 +229,65 @@ static const struct b53_io_ops b53_mmap_ .write64 = b53_mmap_write64, }; +static int b53_mmap_probe_of(struct platform_device *pdev, + struct b53_platform_data **ppdata) +{ -+ struct device *dev = &pdev->dev; -+ struct device_node *np = dev->of_node; ++ struct device_node *np = pdev->dev.of_node; + struct device_node *of_ports, *of_port; ++ struct device *dev = &pdev->dev; + struct b53_platform_data *pdata; + void __iomem *mem; + @@ -57,6 +66,7 @@ Signed-off-by: Álvaro Fernández Rojas + pdata->enabled_ports |= BIT(reg); + } + ++ of_node_put(of_ports); + *ppdata = pdata; + + return 0; @@ -68,15 +78,15 @@ Signed-off-by: Álvaro Fernández Rojas struct b53_platform_data *pdata = pdev->dev.platform_data; struct b53_mmap_priv *priv; struct b53_device *dev; - -+ if (np) { -+ int ret = b53_mmap_probe_of(pdev, &pdata); ++ int ret; ++ ++ if (!pdata && np) { ++ ret = b53_mmap_probe_of(pdev, &pdata); + if (ret) { + dev_err(&pdev->dev, "OF probe error\n"); + return ret; + } + } -+ + if (!pdata) return -EINVAL; - From 2b1aebc0b6e9089ec8e38c2135be76b6af1884b7 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 19 Mar 2021 13:30:16 +0000 Subject: [PATCH 16/61] fstools: update to git HEAD 964d1e3 partname: allow skipping existing 'rootfs_data' partition Signed-off-by: Daniel Golle --- package/system/fstools/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index bf23084572..5331f0ba28 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=5e55b446e3e171cd609d94fe00cf528fc5b784e9a4cb911730ba3ee9622e2e0b -PKG_SOURCE_DATE:=2021-03-05 -PKG_SOURCE_VERSION:=3c38f0c889177dfac51fa7213c567a110709be71 +PKG_MIRROR_HASH:=c9a5647f69dd17ce9d7cd535c9e58055171f7f4af73d2985567ccfc18a2be97f +PKG_SOURCE_DATE:=2021-03-19 +PKG_SOURCE_VERSION:=964d1e3af0e111bad6d393f8a3be702e334c2398 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From d0d63162b6fab566c0e2eced26773b935c637e46 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 19 Mar 2021 13:32:22 +0000 Subject: [PATCH 17/61] ipq806x: work-around vendor 'rootfs_data' GPT partition ZyXEL NBG6817 comes with an eMMC which contains a GPT partition named 'rootfs_data'. This currently confuses fstools and makes it pick that (not suitable) partition. Use the newly introduced fstools_ignore_partname=1 kernel cmdline parameter to have fstools ignore that partition. Signed-off-by: Daniel Golle --- .../ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index 2573349f55..119598d074 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -22,7 +22,7 @@ }; chosen { - bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd"; + bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1"; append-rootblock = "root=/dev/mmcblk0p"; }; From 2a8ae3bf0a199b08f6a760d1d3b164356473facf Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Wed, 17 Mar 2021 00:32:32 -0700 Subject: [PATCH 18/61] kernel: 5.10: update kmod-usb-net-smsc95xx Add kmod-libphy dependency. Signed-off-by: Javier Marcet Signed-off-by: Tony Ambardar --- package/kernel/linux/modules/usb.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 69d3376609..9e8752cc64 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1216,6 +1216,7 @@ $(eval $(call KernelPackage,usb-net-mcs7830)) define KernelPackage/usb-net-smsc95xx TITLE:=SMSC LAN95XX based USB 2.0 10/100 ethernet devices + DEPENDS:=+LINUX_5_10:kmod-libphy KCONFIG:=CONFIG_USB_NET_SMSC95XX FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc95xx.ko AUTOLOAD:=$(call AutoProbe,smsc95xx) From 66fd9acf5036bb721d0e33b1bc31a43dac0cdc2a Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Wed, 17 Mar 2021 00:48:24 -0700 Subject: [PATCH 19/61] kernel: 5.10: add missing dependency in kmod-mdio-devres Add conditional dependency on kmod-of-mdio due to mdio_devres.c code: #if IS_ENABLED(CONFIG_OF_MDIO) ... EXPORT_SYMBOL(devm_of_mdiobus_register); #endif /* CONFIG_OF_MDIO */ Fixes: 95a3741d17 ("kernel: support new mdio_devres.ko module in 5.10") Reported-by: Rosen Penev Signed-off-by: Tony Ambardar --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 7d8bb34131..c9bdeb5a57 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -141,7 +141,7 @@ $(eval $(call KernelPackage,mii)) define KernelPackage/mdio-devres SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Supports MDIO device registration - DEPENDS:=@LINUX_5_10 +kmod-libphy + DEPENDS:=@LINUX_5_10 +kmod-libphy PACKAGE_kmod-of-mdio:kmod-of-mdio KCONFIG:=CONFIG_MDIO_DEVRES HIDDEN:=1 FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko From ad11fc8c236fca5283ed500d87504543f2768312 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Wed, 17 Mar 2021 04:56:23 -0700 Subject: [PATCH 20/61] kernel: add kmod-ledtrig-audio This allows LEDs to be controlled by audio drivers. Signed-off-by: Tony Ambardar --- package/kernel/linux/modules/leds.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index 2e5a56df1a..4dde833664 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -38,6 +38,21 @@ endef $(eval $(call KernelPackage,ledtrig-activity)) +define KernelPackage/ledtrig-audio + SUBMENU:=$(LEDS_MENU) + TITLE:=LED Audio Mute Trigger + KCONFIG:=CONFIG_LEDS_TRIGGER_AUDIO + FILES:=$(LED_TRIGGER_DIR)/ledtrig-audio.ko + AUTOLOAD:=$(call AutoLoad,50,ledtrig-audio) +endef + +define KernelPackage/ledtrig-audio/description + Kernel module that allows LEDs to be controlled by audio drivers + to follow audio mute and mic-mute changes. +endef + +$(eval $(call KernelPackage,ledtrig-audio)) + define KernelPackage/ledtrig-gpio SUBMENU:=$(LEDS_MENU) TITLE:=LED GPIO Trigger From a374b8f190518a74dcc99d6bf3cf53adb7511963 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Wed, 17 Mar 2021 03:12:33 -0700 Subject: [PATCH 21/61] kernel: 5.10: update sound modules Update file paths for kmod-sound-hda-intel and reflect new dependency of kmod-sound-hda-core on kmod-ledtrig-audio. Reported-by: Javier Marcet Signed-off-by: Tony Ambardar --- package/kernel/linux/modules/sound.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index 66194a5a73..2c11d078e1 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -304,6 +304,10 @@ $(eval $(call KernelPackage,sound-dummy)) define KernelPackage/sound-hda-core SUBMENU:=$(SOUND_MENU) TITLE:=HD Audio Sound Core Support + DEPENDS:= \ + +LINUX_5_10&&PACKAGE_kmod-sound-hda-codec-realtek:kmod-ledtrig-audio \ + +LINUX_5_10&&PACKAGE_kmod-sound-hda-codec-conexant:kmod-ledtrig-audio \ + +LINUX_5_10&&PACKAGE_kmod-sound-hda-codec-idt:kmod-ledtrig-audio KCONFIG:= \ CONFIG_SND_HDA_CORE \ CONFIG_SND_HDA_HWDEP=y \ @@ -522,7 +526,8 @@ define KernelPackage/sound-hda-intel CONFIG_SND_HDA_INTEL FILES:= \ $(LINUX_DIR)/sound/pci/hda/snd-hda-intel.ko \ - $(LINUX_DIR)/sound/hda/snd-intel-nhlt.ko + $(LINUX_DIR)/sound/hda/snd-intel-nhlt.ko@lt5.5 \ + $(LINUX_DIR)/sound/hda/snd-intel-dspcfg.ko@ge5.5 AUTOLOAD:=$(call AutoProbe,snd-hda-intel) $(call AddDepends/sound,kmod-sound-hda-core) endef From 9662da770e9e1daa4c2ba78b4526c4b36a1358be Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Thu, 18 Mar 2021 00:06:47 -0700 Subject: [PATCH 22/61] kernel: add missing config symbols, fix typos Update 5.10 generic config to add missing options prompting during builds, when setting CONFIG_ALL_KMODS. Refresh the x86 subtargets to drop symbols added to the generic config. Also fix a typo in 5.4/5.10 generic configs: "CONFIG_CONFIG_KVM_AMD_SEV". Signed-off-by: Tony Ambardar --- target/linux/generic/config-5.10 | 15 ++++++++++++++- target/linux/generic/config-5.4 | 2 +- target/linux/x86/64/config-5.10 | 2 -- target/linux/x86/generic/config-5.10 | 2 -- target/linux/x86/geode/config-5.10 | 2 -- target/linux/x86/legacy/config-5.10 | 1 - 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 602fa7ad56..3d270d8c35 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -942,7 +942,7 @@ CONFIG_COMPACTION=y # CONFIG_COMPAT_BRK is not set # CONFIG_COMPILE_TEST is not set # CONFIG_CONFIGFS_FS is not set -# CONFIG_CONFIG_KVM_AMD_SEV is not set +# CONFIG_KVM_AMD_SEV is not set # CONFIG_CONNECTOR is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 @@ -1400,6 +1400,9 @@ CONFIG_DQL=y # CONFIG_DRM_AMDGPU_USERPTR is not set # CONFIG_DRM_AMD_ACP is not set # CONFIG_DRM_AMD_DC_DCN2_0 is not set +# CONFIG_DRM_AMD_DC_DCN3_0 is not set +# CONFIG_DRM_AMD_DC_HDCP is not set +# CONFIG_DRM_AMD_DC_SI is not set # CONFIG_DRM_ANALOGIX_ANX6345 is not set # CONFIG_DRM_ANALOGIX_ANX78XX is not set # CONFIG_DRM_ARCPGU is not set @@ -2562,11 +2565,13 @@ CONFIG_INPUT_MISC=y # CONFIG_INTEGRITY is not set # CONFIG_INTEGRITY_AUDIT is not set # CONFIG_INTEGRITY_SIGNATURE is not set +# CONFIG_INTEL_ATOMISP2_LED is not set # CONFIG_INTEL_ATOMISP2_PM is not set # CONFIG_INTEL_CHT_INT33FE is not set # CONFIG_INTEL_HID_EVENT is not set # CONFIG_INTEL_IDLE is not set # CONFIG_INTEL_IDMA64 is not set +# CONFIG_INTEL_INT0002_VGPIO is not set # CONFIG_INTEL_IOATDMA is not set # CONFIG_INTEL_ISH_HID is not set # CONFIG_INTEL_MEI is not set @@ -2859,6 +2864,7 @@ CONFIG_KUSER_HELPERS=y # CONFIG_KVM_AMD is not set # CONFIG_KVM_GUEST is not set # CONFIG_KVM_INTEL is not set +# CONFIG_KVM_WERROR is not set # CONFIG_KXCJK1013 is not set # CONFIG_KXSD9 is not set # CONFIG_L2TP is not set @@ -5420,6 +5426,7 @@ CONFIG_SND_DRIVERS=y # CONFIG_SND_GUSMAX is not set # CONFIG_SND_HDA_INTEL is not set # CONFIG_SND_HDA_INTEL_DETECT_DMIC is not set +# CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 CONFIG_SND_HDA_PREALLOC_SIZE=64 # CONFIG_SND_HDSP is not set @@ -5517,6 +5524,7 @@ CONFIG_SND_PROC_FS=y # CONFIG_SND_SOC_ALC5623 is not set # CONFIG_SND_SOC_AMD_ACP is not set # CONFIG_SND_SOC_AMD_ACP3x is not set +# CONFIG_SND_SOC_AMD_RENOIR is not set # CONFIG_SND_SOC_AU1XAUDIO is not set # CONFIG_SND_SOC_AU1XPSC is not set # CONFIG_SND_SOC_BD28623 is not set @@ -5582,6 +5590,7 @@ CONFIG_SND_PROC_FS=y # CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH is not set # CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH is not set # CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH is not set +# CONFIG_SND_SOC_INTEL_CATPT is not set # CONFIG_SND_SOC_INTEL_CFL is not set # CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH is not set # CONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH is not set @@ -5603,6 +5612,7 @@ CONFIG_SND_PROC_FS=y # CONFIG_SND_SOC_INTEL_SKYLAKE is not set # CONFIG_SND_SOC_INTEL_SST is not set CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y +# CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES is not set # CONFIG_SND_SOC_JZ4725B_CODEC is not set # CONFIG_SND_SOC_JZ4740_CODEC is not set # CONFIG_SND_SOC_JZ4770_CODEC is not set @@ -5795,6 +5805,7 @@ CONFIG_SND_X86=y # CONFIG_SPI_GPIO is not set # CONFIG_SPI_GPIO_OLD is not set # CONFIG_SPI_IMG_SPFI is not set +# CONFIG_SPI_LANTIQ_SSC is not set # CONFIG_SPI_LM70_LLP is not set # CONFIG_SPI_LOOPBACK_TEST is not set # CONFIG_SPI_MASTER is not set @@ -6556,6 +6567,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y # CONFIG_USB_RCAR_PHY is not set # CONFIG_USB_RENESAS_USBHS is not set # CONFIG_USB_RIO500 is not set +# CONFIG_USB_ROLES_INTEL_XHCI is not set # CONFIG_USB_ROLE_SWITCH is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_RTL8152 is not set @@ -6791,6 +6803,7 @@ CONFIG_VHOST_MENU=y # CONFIG_VIDEO_OV2659 is not set # CONFIG_VIDEO_OV2680 is not set # CONFIG_VIDEO_OV2685 is not set +# CONFIG_VIDEO_OV2740 is not set # CONFIG_VIDEO_OV5640 is not set # CONFIG_VIDEO_OV5645 is not set # CONFIG_VIDEO_OV5647 is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index e3e4caad07..768f904e9c 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -889,7 +889,7 @@ CONFIG_COMPACTION=y # CONFIG_COMPAT_BRK is not set # CONFIG_COMPILE_TEST is not set # CONFIG_CONFIGFS_FS is not set -# CONFIG_CONFIG_KVM_AMD_SEV is not set +# CONFIG_KVM_AMD_SEV is not set # CONFIG_CONNECTOR is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 diff --git a/target/linux/x86/64/config-5.10 b/target/linux/x86/64/config-5.10 index 3387c68acb..7c5a698c97 100644 --- a/target/linux/x86/64/config-5.10 +++ b/target/linux/x86/64/config-5.10 @@ -241,11 +241,9 @@ CONFIG_I2C_BOARDINFO=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y -# CONFIG_INTEL_ATOMISP2_LED is not set CONFIG_INTEL_GTT=y CONFIG_INTEL_IDLE=y # CONFIG_INTEL_IDXD is not set -# CONFIG_INTEL_INT0002_VGPIO is not set # CONFIG_INTEL_IPS is not set # CONFIG_INTEL_MEI_HDCP is not set # CONFIG_INTEL_MENLOW is not set diff --git a/target/linux/x86/generic/config-5.10 b/target/linux/x86/generic/config-5.10 index 7a3f051d7f..7d9faad491 100644 --- a/target/linux/x86/generic/config-5.10 +++ b/target/linux/x86/generic/config-5.10 @@ -209,7 +209,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y CONFIG_INTEL_GTT=y CONFIG_INTEL_IDLE=y -# CONFIG_INTEL_INT0002_VGPIO is not set # CONFIG_INTEL_IPS is not set # CONFIG_INTEL_MEI_HDCP is not set # CONFIG_INTEL_MENLOW is not set @@ -236,7 +235,6 @@ CONFIG_KVM_GUEST=y CONFIG_KVM_INTEL=y CONFIG_KVM_MMIO=y CONFIG_KVM_VFIO=y -# CONFIG_KVM_WERROR is not set CONFIG_KVM_XFER_TO_GUEST_WORK=y # CONFIG_LANCE is not set CONFIG_LIBNVDIMM=y diff --git a/target/linux/x86/geode/config-5.10 b/target/linux/x86/geode/config-5.10 index c54a2eb610..70c44ddd01 100644 --- a/target/linux/x86/geode/config-5.10 +++ b/target/linux/x86/geode/config-5.10 @@ -55,8 +55,6 @@ CONFIG_I2C_ALGOPCF=y # CONFIG_I2C_AMD_MP2 is not set CONFIG_I2C_BOARDINFO=y # CONFIG_I2C_MULTI_INSTANTIATE is not set -# CONFIG_INTEL_ATOMISP2_LED is not set -# CONFIG_INTEL_INT0002_VGPIO is not set # CONFIG_INTEL_IPS is not set # CONFIG_INTEL_MENLOW is not set # CONFIG_INTEL_SCU_PLATFORM is not set diff --git a/target/linux/x86/legacy/config-5.10 b/target/linux/x86/legacy/config-5.10 index 1accd7c199..29d61139b1 100644 --- a/target/linux/x86/legacy/config-5.10 +++ b/target/linux/x86/legacy/config-5.10 @@ -48,7 +48,6 @@ CONFIG_DMA_SHARED_BUFFER=y CONFIG_DRM=y CONFIG_DRM_AMDGPU=y # CONFIG_DRM_AMD_DC is not set -# CONFIG_DRM_AMD_DC_SI is not set CONFIG_DRM_BOCHS=y CONFIG_DRM_BRIDGE=y CONFIG_DRM_FBDEV_EMULATION=y From 10ffefe60299637bc592ec4ef0dde93e0e2e8344 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Fri, 12 Mar 2021 20:58:28 -0800 Subject: [PATCH 23/61] iproute2: add missing limits.h includes This patch has been submitted upstream to fix an error reported by a few users. One instance seen using gcc 10.2.0, binutils 2.35.1 and musl 1.1.24: bpf_glue.c: In function 'get_libbpf_version': bpf_glue.c:46:11: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? 46 | char buf[PATH_MAX], *s; | ^~~~~~~~ | AF_MAX Reported-by: Rui Salvaterra Signed-off-by: Tony Ambardar --- .../patches/185-libbpf-add-limits-h.patch | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/network/utils/iproute2/patches/185-libbpf-add-limits-h.patch diff --git a/package/network/utils/iproute2/patches/185-libbpf-add-limits-h.patch b/package/network/utils/iproute2/patches/185-libbpf-add-limits-h.patch new file mode 100644 index 0000000000..07dbbc65b9 --- /dev/null +++ b/package/network/utils/iproute2/patches/185-libbpf-add-limits-h.patch @@ -0,0 +1,45 @@ +From c77310119f9a5f99221dd967c5eb0c7a26094b41 Mon Sep 17 00:00:00 2001 +From: Tony Ambardar +Date: Wed, 3 Mar 2021 10:29:24 -0800 +Subject: [PATCH] lib/bpf: add missing limits.h includes + +Several functions in bpf_glue.c and bpf_libbpf.c rely on PATH_MAX, which is +normally included from in other iproute2 source files. + +It fixes errors seen using gcc 10.2.0, binutils 2.35.1 and musl 1.1.24: + +bpf_glue.c: In function 'get_libbpf_version': +bpf_glue.c:46:11: error: 'PATH_MAX' undeclared (first use in this function); +did you mean 'AF_MAX'? + 46 | char buf[PATH_MAX], *s; + | ^~~~~~~~ + | AF_MAX + +Reported-by: Rui Salvaterra +Signed-off-by: Tony Ambardar +--- + lib/bpf_glue.c | 2 ++ + lib/bpf_libbpf.c | 1 + + 2 files changed, 3 insertions(+) + +--- a/lib/bpf_glue.c ++++ b/lib/bpf_glue.c +@@ -4,6 +4,8 @@ + * Authors: Hangbin Liu + * + */ ++#include ++ + #include "bpf_util.h" + #ifdef HAVE_LIBBPF + #include +--- a/lib/bpf_libbpf.c ++++ b/lib/bpf_libbpf.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include + #include From 863ce4f15f74a674f01ab47f445b362c113b113b Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Mon, 1 Mar 2021 20:59:04 -0800 Subject: [PATCH 24/61] kernel/modules: relocate teql hotplug from iproute2 to kmod-sched The link equalizer sch_teql.ko of package kmod-sched relies on a hotplug script historically included in iproute2's tc package. In previous discussion [1], consensus was the hotplug script is best located together with the module in kmod-sched, but this change was deferred at the time. Relocate the hotplug script now. This change also simplifies adding a tc variant for minimal size with reduced functionality. [1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447923636 Signed-off-by: Tony Ambardar --- .../15-teql => kernel/linux/files/hotplug-sched-teql.sh} | 0 package/kernel/linux/modules/netsupport.mk | 7 +++++++ package/network/utils/iproute2/Makefile | 2 -- 3 files changed, 7 insertions(+), 2 deletions(-) rename package/{network/utils/iproute2/files/15-teql => kernel/linux/files/hotplug-sched-teql.sh} (100%) diff --git a/package/network/utils/iproute2/files/15-teql b/package/kernel/linux/files/hotplug-sched-teql.sh similarity index 100% rename from package/network/utils/iproute2/files/15-teql rename to package/kernel/linux/files/hotplug-sched-teql.sh diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 6bc8ba664a..f14928e18e 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -916,6 +916,13 @@ define KernelPackage/sched/description Extra kernel schedulers modules for IP traffic endef +SCHED_TEQL_HOTPLUG:=hotplug-sched-teql.sh + +define KernelPackage/sched/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/$(SCHED_TEQL_HOTPLUG) $(1)/etc/hotplug.d/iface/15-teql +endef + $(eval $(call KernelPackage,sched)) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 440e33069b..a20e81c75a 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -166,8 +166,6 @@ endef define Package/tc/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/15-teql $(1)/etc/hotplug.d/iface/ ifeq ($(SHARED_LIBS),y) $(INSTALL_DIR) $(1)/usr/lib/tc $(CP) $(PKG_BUILD_DIR)/tc/*.so $(1)/usr/lib/tc From 72885e9608d9c0fa06abce6bdb6dd054c2116eb7 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Mon, 1 Mar 2021 17:14:50 -0800 Subject: [PATCH 25/61] iproute2: separate tc into tiny and full variants This change was investigated previously [1] but not deemed necessary. With the recent addition [2] of modern BPF loader support, however, tc gained dependencies on libelf and libbpf, with a larger installation footprint. Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants, where the latter excludes the eBPF loader, uses a smaller executable, and avoids libelf and libbpf package dependencies. Both variants provide the 'tc' virtual package, with tc-tiny as the default. The previous tc package included a loadable module for iptables actions. Separate this out into a common package, tc-mod-iptables, which both variants depend on. Some package sizes on mips_24kc: Before: 148343 tc_5.11.0-1_mips_24kc.ipk After: 144833 tc-full_5.11.0-2_mips_24kc.ipk 138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf) 4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk Also fix up some Makefile indentation. [1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962 [2] b048a305a3d3 ("iproute2: update to 5.11.0") Signed-off-by: Tony Ambardar --- package/network/utils/iproute2/Makefile | 83 +++++++++++++++++-------- 1 file changed, 56 insertions(+), 27 deletions(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index a20e81c75a..b1a137c18f 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 PKG_VERSION:=5.11.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 @@ -33,29 +33,46 @@ endef define Package/ip-tiny $(call Package/iproute2/Default) - TITLE:=Routing control utility (Minimal) - VARIANT:=tiny - DEFAULT_VARIANT:=1 - PROVIDES:=ip - ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl + TITLE:=Routing control utility (minimal) + VARIANT:=iptiny + DEFAULT_VARIANT:=1 + PROVIDES:=ip + ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/ip-full $(call Package/iproute2/Default) - TITLE:=Routing control utility (Full) - VARIANT:=full - PROVIDES:=ip - ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full - DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl + TITLE:=Routing control utility (full) + VARIANT:=ipfull + PROVIDES:=ip + ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full + DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef -define Package/tc +define Package/tc-tiny $(call Package/iproute2/Default) - TITLE:=Traffic control utility - VARIANT:=tc + TITLE:=Traffic control utility (minimal) + VARIANT:=tctiny + DEFAULT_VARIANT:=1 PROVIDES:=tc - DEPENDS:=+kmod-sched-core +libxtables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl + ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny + DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-full +$(call Package/iproute2/Default) + TITLE:=Traffic control utility (full) + VARIANT:=tcfull + PROVIDES:=tc + ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-full + DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-mod-iptables +$(call Package/iproute2/Default) + TITLE:=Traffic control module - iptables action + DEPENDS:=+libxtables endef define Package/genl @@ -94,18 +111,22 @@ $(call Package/iproute2/Default) DEPENDS:=+libmnl endef -ifeq ($(BUILD_VARIANT),tiny) +ifeq ($(BUILD_VARIANT),iptiny) IP_CONFIG_TINY:=y LIBBPF_FORCE:=off endif -ifeq ($(BUILD_VARIANT),full) +ifeq ($(BUILD_VARIANT),ipfull) HAVE_ELF:=y LIBBPF_FORCE:=on - HAVE_CAP:=n endif -ifeq ($(BUILD_VARIANT),tc) +ifeq ($(BUILD_VARIANT),tctiny) + LIBBPF_FORCE:=off + SHARED_LIBS:=y +endif + +ifeq ($(BUILD_VARIANT),tcfull) HAVE_ELF:=y LIBBPF_FORCE:=on SHARED_LIBS:=y @@ -163,13 +184,19 @@ define Package/ip-full/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-full endef -define Package/tc/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/ -ifeq ($(SHARED_LIBS),y) +define Package/tc-tiny/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny +endef + +define Package/tc-full/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full +endef + +define Package/tc-mod-iptables/install $(INSTALL_DIR) $(1)/usr/lib/tc - $(CP) $(PKG_BUILD_DIR)/tc/*.so $(1)/usr/lib/tc -endif + $(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc endef define Package/genl/install @@ -204,7 +231,9 @@ endef $(eval $(call BuildPackage,ip-tiny)) $(eval $(call BuildPackage,ip-full)) -$(eval $(call BuildPackage,tc)) +$(eval $(call BuildPackage,tc-tiny)) +$(eval $(call BuildPackage,tc-full)) +$(eval $(call BuildPackage,tc-mod-iptables)) $(eval $(call BuildPackage,genl)) $(eval $(call BuildPackage,ip-bridge)) $(eval $(call BuildPackage,ss)) From 10415d5e7016b69dc71c5f1b03e8e17b586f8edd Mon Sep 17 00:00:00 2001 From: Tad Davanzo Date: Fri, 5 Feb 2021 22:38:03 -0500 Subject: [PATCH 26/61] mvebu: mamba resize kernel to 4MB mamba has a 3MB kernel partition as specified by the DTS. 3MB is not sufficient for building with many kernel modules or newer kernel versions. mamba uboot however as set from factory will load up to 4MB. This can be observed by looking a uboot log: NAND read: device 0 offset 0xa00000, size 0x400000 4194304 bytes read: OK and from uboot environment variables: $ fw_printenv | grep "pri_kern_size"; pri_kern_size=0x400000 Resize the root partitions from 37MB to 36MB to let kernel expand into it another 1MB. And set kernel target size to 4MB. Lastly add a compatibility version message: kernel-size-migration. And set it on mamba to prevent sysupgrading without first reinstalling from a factory image. Signed-off-by: Tad Davanzo --- .../etc/uci-defaults/05_fix-compat-version | 10 +++++ target/linux/mvebu/image/cortexa9.mk | 10 ++++- ...rmada-xp-linksys-mamba-resize-kernel.patch | 37 +++++++++++++++++++ ...rmada-xp-linksys-mamba-resize-kernel.patch | 37 +++++++++++++++++++ 4 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version create mode 100644 target/linux/mvebu/patches-5.10/316-armada-xp-linksys-mamba-resize-kernel.patch create mode 100644 target/linux/mvebu/patches-5.4/318-armada-xp-linksys-mamba-resize-kernel.patch diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..70e0e9ef95 --- /dev/null +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,10 @@ +. /lib/functions.sh + +case "$(board_name)" in + linksys,wrt1900ac-v1) + uci set system.@system[0].compat_version="2.0" + uci commit system + ;; +esac + +exit 0 diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index a7ebc30a71..90c0dfa827 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -8,6 +8,12 @@ define Device/dsa-migration DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA endef +define Device/kernel-size-migration + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (up to 19.07) due to kernel size restrictions. \ + Upgrade via sysupgrade mechanism is not possible, so new installation via factory style image is required. +endef + define Device/buffalo_ls421de $(Device/NAND-128K) DEVICE_VENDOR := Buffalo @@ -108,14 +114,14 @@ TARGET_DEVICES += linksys_wrt1900acs define Device/linksys_wrt1900ac-v1 $(call Device/linksys) - $(Device/dsa-migration) + $(Device/kernel-size-migration) DEVICE_MODEL := WRT1900AC DEVICE_VARIANT := v1 DEVICE_ALT0_VENDOR := Linksys DEVICE_ALT0_MODEL := Mamba DEVICE_DTS := armada-xp-linksys-mamba DEVICE_PACKAGES += mwlwifi-firmware-88w8864 - KERNEL_SIZE := 3072k + KERNEL_SIZE := 4096k SUPPORTED_DEVICES += armada-xp-linksys-mamba linksys,mamba DEFAULT := n endef diff --git a/target/linux/mvebu/patches-5.10/316-armada-xp-linksys-mamba-resize-kernel.patch b/target/linux/mvebu/patches-5.10/316-armada-xp-linksys-mamba-resize-kernel.patch new file mode 100644 index 0000000000..f1fddceff4 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/316-armada-xp-linksys-mamba-resize-kernel.patch @@ -0,0 +1,37 @@ +From 258233f00bcd013050efee00c5d9128ef8cd62dd Mon Sep 17 00:00:00 2001 +From: Tad +Date: Fri, 5 Feb 2021 22:32:11 -0500 +Subject: [PATCH] ARM: dts: armada-xp-linksys-mamba: Increase kernel + partition to 4MB + +Signed-off-by: Tad Davanzo +--- + arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -456,9 +456,9 @@ + reg = <0xa00000 0x2800000>; /* 40MB */ + }; + +- partition@d00000 { ++ partition@e00000 { + label = "rootfs1"; +- reg = <0xd00000 0x2500000>; /* 37MB */ ++ reg = <0xe00000 0x2400000>; /* 36MB */ + }; + + /* kernel2 overlaps with rootfs2 by design */ +@@ -467,9 +467,9 @@ + reg = <0x3200000 0x2800000>; /* 40MB */ + }; + +- partition@3500000 { ++ partition@3600000 { + label = "rootfs2"; +- reg = <0x3500000 0x2500000>; /* 37MB */ ++ reg = <0x3600000 0x2400000>; /* 36MB */ + }; + + /* diff --git a/target/linux/mvebu/patches-5.4/318-armada-xp-linksys-mamba-resize-kernel.patch b/target/linux/mvebu/patches-5.4/318-armada-xp-linksys-mamba-resize-kernel.patch new file mode 100644 index 0000000000..f1fddceff4 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/318-armada-xp-linksys-mamba-resize-kernel.patch @@ -0,0 +1,37 @@ +From 258233f00bcd013050efee00c5d9128ef8cd62dd Mon Sep 17 00:00:00 2001 +From: Tad +Date: Fri, 5 Feb 2021 22:32:11 -0500 +Subject: [PATCH] ARM: dts: armada-xp-linksys-mamba: Increase kernel + partition to 4MB + +Signed-off-by: Tad Davanzo +--- + arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -456,9 +456,9 @@ + reg = <0xa00000 0x2800000>; /* 40MB */ + }; + +- partition@d00000 { ++ partition@e00000 { + label = "rootfs1"; +- reg = <0xd00000 0x2500000>; /* 37MB */ ++ reg = <0xe00000 0x2400000>; /* 36MB */ + }; + + /* kernel2 overlaps with rootfs2 by design */ +@@ -467,9 +467,9 @@ + reg = <0x3200000 0x2800000>; /* 40MB */ + }; + +- partition@3500000 { ++ partition@3600000 { + label = "rootfs2"; +- reg = <0x3500000 0x2500000>; /* 37MB */ ++ reg = <0x3600000 0x2400000>; /* 36MB */ + }; + + /* From 15309f5133d55e92bec3ed91dfb3ac9d124f6a96 Mon Sep 17 00:00:00 2001 From: Tad Davanzo Date: Fri, 5 Feb 2021 22:42:47 -0500 Subject: [PATCH 27/61] mvebu: venom resize kernel to 6MB venom has a 3MB kernel partition as specified by the DTS. 3MB is not sufficient for building with many kernel modules or newer kernel versions. venom uboot however as set from factory will load up to 6MB. This can be observed by looking a uboot log: NAND read: device 0 offset 0x900000, size 0x600000 6291456 bytes read: OK and from uboot environment variables: $ fw_printenv | grep "priKernSize"; priKernSize=0x0600000 Resize the root partitions from 120MB to 117MB to let kernel expand into it another 3MB. And set kernel target size to 6MB. Lastly set the kernel-size-migration compatibility version on venom to prevent sysupgrading without first reinstalling from a factory image. Signed-off-by: Tad Davanzo --- .../base-files/etc/uci-defaults/05_fix-compat-version | 3 ++- .../files/arch/arm/boot/dts/armada-385-linksys-venom.dts | 8 ++++---- target/linux/mvebu/image/cortexa9.mk | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version index 70e0e9ef95..8856bf23a4 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version @@ -1,7 +1,8 @@ . /lib/functions.sh case "$(board_name)" in - linksys,wrt1900ac-v1) + linksys,wrt1900ac-v1|\ + linksys,wrt32x) uci set system.@system[0].compat_version="2.0" uci commit system ;; diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-venom.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-venom.dts index de81600a80..a2ca3158cf 100644 --- a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-venom.dts +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-venom.dts @@ -157,9 +157,9 @@ reg = <0x900000 0x7b00000>; /* 123MB */ }; - partition@c00000 { + partition@f00000 { label = "rootfs1"; - reg = <0xc00000 0x7800000>; /* 120MB */ + reg = <0xf00000 0x7500000>; /* 117MB */ }; /* kernel2 overlaps with rootfs2 by design */ @@ -168,9 +168,9 @@ reg = <0x8400000 0x7b00000>; /* 123MB */ }; - partition@8700000 { + partition@8a00000 { label = "rootfs2"; - reg = <0x8700000 0x7800000>; /* 120MB */ + reg = <0x8a00000 0x7500000>; /* 117MB */ }; /* last MB is for the BBT, not writable */ diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 90c0dfa827..203a04d6bc 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -154,13 +154,13 @@ TARGET_DEVICES += linksys_wrt3200acm define Device/linksys_wrt32x $(call Device/linksys) - $(Device/dsa-migration) + $(Device/kernel-size-migration) DEVICE_MODEL := WRT32X DEVICE_ALT0_VENDOR := Linksys DEVICE_ALT0_MODEL := Venom DEVICE_DTS := armada-385-linksys-venom DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 - KERNEL_SIZE := 3072k + KERNEL_SIZE := 6144k KERNEL := kernel-bin | append-dtb SUPPORTED_DEVICES += armada-385-linksys-venom linksys,venom DEFAULT := n From b4f76d9f0d61779b5e04228d1eb3f2ba412ffd26 Mon Sep 17 00:00:00 2001 From: Tad Davanzo Date: Tue, 9 Feb 2021 17:42:54 -0500 Subject: [PATCH 28/61] mvebu: enable WRT1900AC v1 and WRT32X for buildbots Kernel size limits have been dealt with. Effective revert of a1eb2c46 and ac9730c4. Signed-off-by: Tad Davanzo --- target/linux/mvebu/image/cortexa9.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 203a04d6bc..3f227259ee 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -123,7 +123,6 @@ define Device/linksys_wrt1900ac-v1 DEVICE_PACKAGES += mwlwifi-firmware-88w8864 KERNEL_SIZE := 4096k SUPPORTED_DEVICES += armada-xp-linksys-mamba linksys,mamba - DEFAULT := n endef TARGET_DEVICES += linksys_wrt1900ac-v1 @@ -163,7 +162,6 @@ define Device/linksys_wrt32x KERNEL_SIZE := 6144k KERNEL := kernel-bin | append-dtb SUPPORTED_DEVICES += armada-385-linksys-venom linksys,venom - DEFAULT := n endef TARGET_DEVICES += linksys_wrt32x From 5c469e089e291eb1b7494cfaabec5f67d7c32689 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 16 Mar 2021 15:46:02 -0700 Subject: [PATCH 29/61] package/exfat: remove Now that kernel 5.10 is in tree, this can be removed. Signed-off-by: Rosen Penev --- package/kernel/exfat/Makefile | 46 ----------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 package/kernel/exfat/Makefile diff --git a/package/kernel/exfat/Makefile b/package/kernel/exfat/Makefile deleted file mode 100644 index 3f873a71ee..0000000000 --- a/package/kernel/exfat/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=exfat -PKG_VERSION:=5.10.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/namjaejeon/linux-exfat-oot/tar.gz/$(PKG_VERSION)? -PKG_HASH:=0ff77dd7d39eb231d00c3c4909b9fad31ebeeb618bd6fa18fce142becc9c1f98 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-exfat-oot-$(PKG_VERSION) - -PKG_MAINTAINER:= -PKG_LICENSE:=GPL-2.0-only - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/fs-exfat - SECTION:=kernel - CATEGORY:=Kernel modules - SUBMENU:=Filesystems - TITLE:=exFAT kernel module - URL:=https://github.com/namjaejeon/linux-exfat-oot - FILES:=$(PKG_BUILD_DIR)/exfat.ko - AUTOLOAD:=$(call AutoProbe,exfat) - DEPENDS:= +kmod-nls-base -endef - -define KernelPackage/exfat/description - This package provides the kernel module for exfat. -endef - -define Build/Compile - $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ - $(PKG_EXTRA_KCONFIG) \ - CONFIG_EXFAT_FS=m \ - modules -endef - -$(eval $(call KernelPackage,fs-exfat)) From a50441b6e9e1a93deedf207817275cba335f9615 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 16 Mar 2021 15:46:03 -0700 Subject: [PATCH 30/61] kernel: add exfat again With kernel 5.10, exfat is out of staging and in tree. Added small hack to make it work with kernel 5.4 as well. Added removed config options for 5.4 to generic config. Signed-off-by: Rosen Penev [Set CONFIG_EXFAT_ config options to default values] Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/fs.mk | 20 ++++++++++++++++++++ target/linux/generic/config-5.4 | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 91ef535821..7de1a0673c 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -164,6 +164,26 @@ endef $(eval $(call KernelPackage,fs-efivarfs)) +define KernelPackage/fs-exfat + SUBMENU:=$(FS_MENU) + TITLE:=exFAT filesystem support + KCONFIG:= \ + CONFIG_EXFAT_FS \ + CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8" + FILES:= \ + $(LINUX_DIR)/drivers/staging/exfat/exfat.ko@lt5.7 \ + $(LINUX_DIR)/fs/exfat/exfat.ko@ge5.7 + AUTOLOAD:=$(call AutoLoad,30,exfat,1) + DEPENDS:=+kmod-nls-base +endef + +define KernelPackage/fs-exfat/description + Kernel module for exFAT filesystem support +endef + +$(eval $(call KernelPackage,fs-exfat)) + + define KernelPackage/fs-exportfs SUBMENU:=$(FS_MENU) TITLE:=exportfs kernel server support diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 768f904e9c..71f75ba76f 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -1506,7 +1506,13 @@ CONFIG_ETHERNET=y # CONFIG_ETHOC is not set CONFIG_EVENTFD=y # CONFIG_EVM is not set +# CONFIG_EXFAT_DEBUG_MSG is not set +CONFIG_EXFAT_DEFAULT_CODEPAGE=437 +# CONFIG_EXFAT_DELAYED_SYNC is not set +CONFIG_EXFAT_DISCARD=y +CONFIG_EXFAT_DONT_MOUNT_VFAT=y # CONFIG_EXFAT_FS is not set +# CONFIG_EXFAT_KERNEL_DEBUG is not set CONFIG_EXPERT=y CONFIG_EXPORTFS=y # CONFIG_EXPORTFS_BLOCK_OPS is not set From 047b7621bb3ac266d193cf110a468e42f844be4f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 19 Mar 2021 17:59:12 +0100 Subject: [PATCH 31/61] archs38: Add CONFIG_HZ=100 This kernel config option was missing and resulted in a question when building. Signed-off-by: Hauke Mehrtens --- target/linux/archs38/config-5.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/archs38/config-5.4 b/target/linux/archs38/config-5.4 index 57d708e77a..29246265ad 100644 --- a/target/linux/archs38/config-5.4 +++ b/target/linux/archs38/config-5.4 @@ -140,6 +140,7 @@ CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PCI=y CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HZ=100 CONFIG_HZ_PERIODIC=y CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y From 0b5a67aa03f04c8f6b3bfd94a78bd31a266716df Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 19 Mar 2021 18:35:23 +0100 Subject: [PATCH 32/61] kernel: Reorder kernel configuration options Reorder the options and remove double entries. This was generated by running this: $ ./scripts/kconfig.pl '+' target/linux/generic/config-5.10 /dev/null > target/linux/generic/config-5.10.new $ mv target/linux/generic/config-5.10.new target/linux/generic/config-5.10 $ ./scripts/kconfig.pl '+' target/linux/generic/config-5.4 /dev/null > target/linux/generic/config-5.4.new $ mv target/linux/generic/config-5.4.new target/linux/generic/config-5.4 Signed-off-by: Hauke Mehrtens --- target/linux/generic/config-5.10 | 19 ++++++++----------- target/linux/generic/config-5.4 | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 3d270d8c35..cd096b2934 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -679,10 +679,10 @@ CONFIG_BLOCK=y # CONFIG_BONDING is not set # CONFIG_BOOKE_WDT is not set CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT=3 +# CONFIG_BOOTTIME_TRACING is not set # CONFIG_BOOT_CONFIG is not set # CONFIG_BOOT_PRINTK_DELAY is not set CONFIG_BOOT_RAW=y -# CONFIG_BOOTTIME_TRACING is not set # CONFIG_BOUNCE is not set CONFIG_BPF=y # CONFIG_BPFILTER is not set @@ -942,7 +942,6 @@ CONFIG_COMPACTION=y # CONFIG_COMPAT_BRK is not set # CONFIG_COMPILE_TEST is not set # CONFIG_CONFIGFS_FS is not set -# CONFIG_KVM_AMD_SEV is not set # CONFIG_CONNECTOR is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 @@ -1480,8 +1479,8 @@ CONFIG_DQL=y # CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set -# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set +# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set # CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set # CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set # CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set @@ -1909,13 +1908,13 @@ CONFIG_FIB_RULES=y # CONFIG_FIELDBUS_DEV is not set CONFIG_FILE_LOCKING=y # CONFIG_FIND_BIT_BENCHMARK is not set -# CONFIG_FIT_PARTITION is not set # CONFIG_FIREWIRE is not set # CONFIG_FIREWIRE_NOSY is not set # CONFIG_FIREWIRE_SERIAL is not set # CONFIG_FIRMWARE_EDID is not set # CONFIG_FIRMWARE_IN_KERNEL is not set # CONFIG_FIRMWARE_MEMMAP is not set +# CONFIG_FIT_PARTITION is not set # CONFIG_FIXED_PHY is not set CONFIG_FLATMEM=y CONFIG_FLATMEM_MANUAL=y @@ -2780,8 +2779,6 @@ CONFIG_JFFS2_SUMMARY=y # CONFIG_JME is not set CONFIG_JOLIET=y # CONFIG_JSA1212 is not set -# CONFIG_JZ4740_WDT is not set -# CONFIG_JZ4770_PHY is not set # CONFIG_JUMP_LABEL is not set # CONFIG_JZ4740_WDT is not set # CONFIG_JZ4770_PHY is not set @@ -2801,9 +2798,9 @@ CONFIG_KASAN_STACK=1 # CONFIG_KERNEL_LZ4 is not set # CONFIG_KERNEL_LZMA is not set # CONFIG_KERNEL_LZO is not set -# CONFIG_KERNEL_ZSTD is not set CONFIG_KERNEL_MODE_NEON=y CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_ZSTD is not set CONFIG_KERNFS=y # CONFIG_KEXEC is not set # CONFIG_KEXEC_FILE is not set @@ -2849,10 +2846,10 @@ CONFIG_KERNFS=y # CONFIG_KGDB is not set # CONFIG_KMEMCHECK is not set # CONFIG_KMX61 is not set -# CONFIG_KPROBE_EVENT_GEN_TEST is not set -# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set # CONFIG_KPROBES is not set # CONFIG_KPROBES_SANITY_TEST is not set +# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set +# CONFIG_KPROBE_EVENT_GEN_TEST is not set # CONFIG_KS7010 is not set # CONFIG_KS8842 is not set # CONFIG_KS8851 is not set @@ -2862,6 +2859,7 @@ CONFIG_KERNFS=y # CONFIG_KUNIT is not set CONFIG_KUSER_HELPERS=y # CONFIG_KVM_AMD is not set +# CONFIG_KVM_AMD_SEV is not set # CONFIG_KVM_GUEST is not set # CONFIG_KVM_INTEL is not set # CONFIG_KVM_WERROR is not set @@ -3047,7 +3045,6 @@ CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 # CONFIG_MACH_JZ4740 is not set # CONFIG_MACH_LOONGSON2EF is not set # CONFIG_MACH_LOONGSON32 is not set -# CONFIG_MACH_LOONGSON2EF is not set # CONFIG_MACH_LOONGSON64 is not set # CONFIG_MACH_PIC32 is not set # CONFIG_MACH_PISTACHIO is not set @@ -5932,8 +5929,8 @@ CONFIG_SYMBOLIC_ERRNAME=y # CONFIG_SYNCLINK_CS is not set # CONFIG_SYNC_FILE is not set # CONFIG_SYNOPSYS_DWC_ETH_QOS is not set -CONFIG_SYN_COOKIES=y # CONFIG_SYNTH_EVENTS is not set +CONFIG_SYN_COOKIES=y # CONFIG_SYSCON_REBOOT_MODE is not set CONFIG_SYSCTL=y # CONFIG_SYSCTL_SYSCALL is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 71f75ba76f..522a99300d 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -889,7 +889,6 @@ CONFIG_COMPACTION=y # CONFIG_COMPAT_BRK is not set # CONFIG_COMPILE_TEST is not set # CONFIG_CONFIGFS_FS is not set -# CONFIG_KVM_AMD_SEV is not set # CONFIG_CONNECTOR is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 @@ -2634,6 +2633,7 @@ CONFIG_KERNFS=y # CONFIG_KSZ884X_PCI is not set CONFIG_KUSER_HELPERS=y # CONFIG_KVM_AMD is not set +# CONFIG_KVM_AMD_SEV is not set # CONFIG_KVM_GUEST is not set # CONFIG_KVM_INTEL is not set # CONFIG_KXCJK1013 is not set From 0c0cb97da7f5cc06919449131dd57ed805f8f78d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 19 Mar 2021 18:48:32 +0100 Subject: [PATCH 33/61] kernel: Add missing kernel config options These two options are missing when building the x86 target. Signed-off-by: Hauke Mehrtens --- target/linux/generic/config-5.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 522a99300d..0f6d3d7791 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -969,6 +969,7 @@ CONFIG_CRYPTO_ALGAPI2=y # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_BLAKE2S is not set +# CONFIG_CRYPTO_BLAKE2S_X86 is not set CONFIG_CRYPTO_BLKCIPHER=y CONFIG_CRYPTO_BLKCIPHER2=y # CONFIG_CRYPTO_BLOWFISH is not set @@ -993,6 +994,7 @@ CONFIG_CRYPTO_BLKCIPHER2=y # CONFIG_CRYPTO_CTS is not set # CONFIG_CRYPTO_CURVE25519 is not set # CONFIG_CRYPTO_CURVE25519_NEON is not set +# CONFIG_CRYPTO_CURVE25519_X86 is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_DEV_ATMEL_AES is not set From 56f4e54127ff14c0fff22940dfa10e237b291989 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 22 Oct 2020 16:09:56 +0200 Subject: [PATCH 34/61] ucode: introduce package This commit introduces ucode, a tiny template processor utilizing a syntax closely resembling ECMA Script for embedded script blocks. Signed-off-by: Jo-Philipp Wich --- package/utils/ucode/Makefile | 116 +++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 package/utils/ucode/Makefile diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile new file mode 100644 index 0000000000..64b6c7bcda --- /dev/null +++ b/package/utils/ucode/Makefile @@ -0,0 +1,116 @@ +# +# Copyright (C) 2020-2021 Jo-Philipp Wich +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ucode +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/jow-/ucode.git +PKG_SOURCE_DATE:=2021-03-19 +PKG_SOURCE_VERSION:=4a5b9010ccc56fdf288fe758023af445feb93fad +PKG_MIRROR_HASH:=145a2ce69e14cae9b448de85b94c7a817ba3aea04b1611399186ad36fb88958e +PKG_MAINTAINER:=Jo-Philipp Wich +PKG_LICENSE:=ISC + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/ucode/default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=ucode - Tiny scripting and templating language +endef + +define Package/ucode + $(Package/ucode/default) + DEPENDS:=+libjson-c +endef + +define Package/ucode/description + ucode is a tiny script interpreter featuring an ECMAScript oriented + script language and Jinja-inspired templating. +endef + + +define Package/ucode-mod-fs + $(Package/ucode/default) + TITLE+= (filesystem module) + DEPENDS:=ucode +endef + +define Package/ucode-mod-fs/description + The filesystem plugin module allows interaction with the local file system. +endef + + +define Package/ucode-mod-math + $(Package/ucode/default) + TITLE+= (math module) + DEPENDS:=ucode +endef + +define Package/ucode-mod-math/description + The math plugin provides access to various procedures. +endef + + +define Package/ucode-mod-ubus + $(Package/ucode/default) + TITLE+= (ubus module) + DEPENDS:=ucode +libubus +libblobmsg-json +endef + +define Package/ucode-mod-ubus/description + The ubus module allows ucode template scripts to enumerate and invoke ubus + procedures. +endef + + +define Package/ucode-mod-uci + $(Package/ucode/default) + TITLE+= (uci module) + DEPENDS:=ucode +libuci +endef + +define Package/ucode-mod-uci/description + The uci module allows templates to read and modify uci configuration. +endef + + +define Package/ucode/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ucode $(1)/usr/bin/ucode +endef + +define Package/ucode-mod-fs/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/fs.so $(1)/usr/lib/ucode/ +endef + +define Package/ucode-mod-math/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/math.so $(1)/usr/lib/ucode/ +endef + +define Package/ucode-mod-ubus/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/ubus.so $(1)/usr/lib/ucode/ +endef + +define Package/ucode-mod-uci/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/uci.so $(1)/usr/lib/ucode/ +endef + + +$(eval $(call BuildPackage,ucode)) +$(eval $(call BuildPackage,ucode-mod-fs)) +$(eval $(call BuildPackage,ucode-mod-math)) +$(eval $(call BuildPackage,ucode-mod-ubus)) +$(eval $(call BuildPackage,ucode-mod-uci)) From f807db006fe5e86b43eb15d2e570556e8ba0071f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 22 Oct 2020 16:28:51 +0200 Subject: [PATCH 35/61] firewall4: introduce package This commit introduces firewall4, an nftables based reimplementation of the UCI iptables firewall. Signed-off-by: Jo-Philipp Wich --- package/network/config/firewall4/Makefile | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/network/config/firewall4/Makefile diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile new file mode 100644 index 0000000000..cdc3ab9c56 --- /dev/null +++ b/package/network/config/firewall4/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2021 Jo-Philipp Wich +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=firewall4 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git +PKG_SOURCE_DATE:=2021-03-19 +PKG_SOURCE_VERSION:=59dbb982b7fefa480196dec03ba51c4f8c4dd7ae +PKG_MIRROR_HASH:=3f37bea16fa553539d820cc49be92e23d3e1fd9b52db57dcbd06e78070044930 +PKG_MAINTAINER:=Jo-Philipp Wich +PKG_LICENSE:=ISC + +include $(INCLUDE_DIR)/package.mk + +define Package/firewall4 + SECTION:=net + CATEGORY:=Base system + TITLE:=OpenWrt 4th gen firewall + DEPENDS:=+ucode +ucode-mod-fs +ucode-mod-uci +ucode-mod-ubus +kmod-nft-core +kmod-nft-fib +kmod-nft-nat +kmod-nft-nat6 +nftables-json + CONFLICTS:=firewall kmod-ipt-nat +endef + +define Package/firewall4/description + This package provides an nftables-based implementation of the UCI firewall + sharing the same configuration format. +endef + +define Package/firewall4/conffiles +/etc/config/firewall +/etc/nftables.d/ +endef + +define Package/firewall4/install + $(CP) -a $(PKG_BUILD_DIR)/root/* $(1)/ +endef + +define Build/Compile +endef + +$(eval $(call BuildPackage,firewall4)) From 6801ecd91b44ee1cd0dc0158657b427bdbb5f3cf Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 19 Mar 2021 22:30:42 +0000 Subject: [PATCH 36/61] procd: update to git HEAD Enable seccomp features on Aarch64. 3e88c6f jail/seccomp: add support for aarch64 c23d8bf trace: fix build on aarch64 Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 861dd0da57..0fb45acf64 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2021-03-08 -PKG_SOURCE_VERSION:=2cfc26f8456a4d5ba3836c914a742f3d00bad781 -PKG_MIRROR_HASH:=4b514143949b6ea5799a7b0b2f2f4ad5f084f88929eb0ac5a01ffc7852a71d22 +PKG_SOURCE_DATE:=2021-03-19 +PKG_SOURCE_VERSION:=c23d8bf81624469ed97449af7bf9497ee2c351c2 +PKG_MIRROR_HASH:=5856295e5ffb6954081d07ba02d134e7a85bd52d731c404ccd4b150740241b84 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -82,7 +82,7 @@ endef define Package/procd-seccomp SECTION:=base CATEGORY:=Base system - DEPENDS:=@(arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \ + DEPENDS:=@(aarch64||arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \ @KERNEL_SECCOMP +libubox +libblobmsg-json TITLE:=OpenWrt process seccomp helper + utrace endef From d28880cdd86e10142fd86936f5da188eaeeaf9eb Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 19 Mar 2021 22:32:12 +0000 Subject: [PATCH 37/61] umdns: add syscalls needed on Aarch64 Now that ujail supports seccomp also on Aarch64, add missing syscall 'fstat' to the list of allowed syscalls. Signed-off-by: Daniel Golle --- package/network/services/umdns/files/umdns.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/umdns/files/umdns.json b/package/network/services/umdns/files/umdns.json index 14affd776c..4d5ed886d0 100644 --- a/package/network/services/umdns/files/umdns.json +++ b/package/network/services/umdns/files/umdns.json @@ -24,6 +24,7 @@ "pipe", "poll", "fcntl64", + "fstat", "epoll_create", "epoll_create1", "epoll_ctl", From 7fae64cc065738b73a1dddc2fc28adde36c1ae3d Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Fri, 19 Mar 2021 17:09:26 -0600 Subject: [PATCH 38/61] libnfnetlink: quote $(FPIC) on command line When $(FPIC) gets expanded on the command line (for instance when setting environment variables for libtool, configure, or make) we can't count on it not needing quoting (i.e. it could contain multiple flags separated with spaces). Signed-off-by: Philip Prindeville --- package/libs/libnfnetlink/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libs/libnfnetlink/Makefile b/package/libs/libnfnetlink/Makefile index 7d65d63857..bc64ff111d 100644 --- a/package/libs/libnfnetlink/Makefile +++ b/package/libs/libnfnetlink/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnfnetlink PKG_VERSION:=1.0.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ @@ -45,7 +45,7 @@ CONFIGURE_ARGS += \ --enable-shared CONFIGURE_VARS += \ - lt_prog_compiler_pic=$(FPIC) + lt_prog_compiler_pic="$(FPIC)" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/libnfnetlink From 956490ad6abead94c8b06e55b687074fa2fd5c62 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sat, 20 Mar 2021 21:00:05 +0100 Subject: [PATCH 39/61] glibc: update to latest 2.33 commit db32fc27e7 test-container: Always copy test-specific support files [BZ #27537] 79c6be6a0a nptl: Remove private futex optimization [BZ #27304] f90d6b0484 pthread_once hangs when init routine throws an exception [BZ #18435] dd8023c2ac elf: ld.so --help calls _dl_init_paths without a main map [BZ #27577] ea5a537e87 elf: Always set l in _dl_init_paths (bug 23462) 64f6c287ad x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444] 32b9280f1d io: Return EBAFD for negative file descriptor on fstat (BZ #27559) Signed-off-by: Hans Dedecker --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index ea521490f5..01b15a5cd2 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=a151f2e05a64727c552a297d129b8ef242ffb3b6 -PKG_MIRROR_HASH:=63802bbcbb851d08ea8e609edd2d3fc0828102c07da9cdd3639e16d07883ebae +PKG_SOURCE_VERSION:=db32fc27e7bdfb5468200a94e9152bcc1c971d25 +PKG_MIRROR_HASH:=e02f8b7df03d675db6279b99212c8a645aa50f1ae7789fafd7bc1987145a4c92 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From 2ba0ab1930bd0f28404835b4393a6c99bcd0196c Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Sat, 20 Mar 2021 23:30:44 -0700 Subject: [PATCH 40/61] kernel: robustify dependencies in kmod-sound-hda-core Dependency tracking for kmod-sound-hda-core is fragile. Enabling some sound codecs (Realtek, Conexant, Sigmatel) implicitly adds a kmod-ledtrig-audio dependency, while an enabled kmod-ledtrig-audio can be picked up through enabling others (e.g. kmod-sound-hda-intel), and the behaviour can change across kernel versions. As kmod-ledtrig-audio is under 2KB, make it an unconditional dependency. Fixes: a374b8f19051 ("kernel: 5.10: update sound modules") Signed-off-by: Tony Ambardar --- package/kernel/linux/modules/sound.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index 2c11d078e1..e43be25bc6 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -304,10 +304,7 @@ $(eval $(call KernelPackage,sound-dummy)) define KernelPackage/sound-hda-core SUBMENU:=$(SOUND_MENU) TITLE:=HD Audio Sound Core Support - DEPENDS:= \ - +LINUX_5_10&&PACKAGE_kmod-sound-hda-codec-realtek:kmod-ledtrig-audio \ - +LINUX_5_10&&PACKAGE_kmod-sound-hda-codec-conexant:kmod-ledtrig-audio \ - +LINUX_5_10&&PACKAGE_kmod-sound-hda-codec-idt:kmod-ledtrig-audio + DEPENDS:=+kmod-ledtrig-audio KCONFIG:= \ CONFIG_SND_HDA_CORE \ CONFIG_SND_HDA_HWDEP=y \ From 7f4c2b1a4f9216218dced64794318f2197565c85 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 20 Mar 2021 23:23:34 -1000 Subject: [PATCH 41/61] build,json: fix duplicates in default_packages Calling without the DUMP=1 argument causes the target specific Makefile to be "included" again which adds the target specific packages twice, once on the actual run and once included from `include/target.mk`. This led to duplicate package entries, causing confusion in downstream projects using the generated JSON files. While at it, apply `black` style to Python script. Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index ca6fbbc962..23d8dcb857 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -38,9 +38,10 @@ if output: "make", "--no-print-directory", "-C", - "target/linux/{}".format(output['target'].split('/')[0]), + "target/linux/{}".format(output["target"].split("/")[0]), "val.DEFAULT_PACKAGES", "val.ARCH_PACKAGES", + "DUMP=1", ], stdout=PIPE, stderr=PIPE, From f93b544f012e958884fefb24448a66867e55d63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sun, 21 Mar 2021 12:39:47 +0100 Subject: [PATCH 42/61] bcm27xx: bcm2711: correctly disable HW_RANDOM_BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was removed in bac74aff5e36, but it should have been disabled. More info: https://forum.openwrt.org/t/make-image-stops-at-random-number-generator-bcm27xx/91429/7 Fixes: bac74aff5e36 ("bcm27xx: bcm2711: disable HW_RANDOM_BCM2835") Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm27xx/bcm2711/config-5.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/bcm27xx/bcm2711/config-5.4 b/target/linux/bcm27xx/bcm2711/config-5.4 index 91f45a97d9..46fbbcf497 100644 --- a/target/linux/bcm27xx/bcm2711/config-5.4 +++ b/target/linux/bcm27xx/bcm2711/config-5.4 @@ -256,6 +256,7 @@ CONFIG_HOLES_IN_ZONE=y CONFIG_HOTPLUG_CPU=y CONFIG_HW_CONSOLE=y CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_BCM2835 is not set CONFIG_HW_RANDOM_IPROC_RNG200=y CONFIG_HZ=250 CONFIG_HZ_250=y From 241ce95d639d194e2318d5094f986661c3dc422a Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 21 Mar 2021 13:31:51 +0000 Subject: [PATCH 43/61] procd: update to git HEAD 7ee4563 procd: Adding support to detect Pantavisor Container Platform Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 0fb45acf64..a2c1cf9798 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2021-03-19 -PKG_SOURCE_VERSION:=c23d8bf81624469ed97449af7bf9497ee2c351c2 -PKG_MIRROR_HASH:=5856295e5ffb6954081d07ba02d134e7a85bd52d731c404ccd4b150740241b84 +PKG_SOURCE_DATE:=2021-03-21 +PKG_SOURCE_VERSION:=7ee456346baca29af40a6d1a5071e57f32ebf762 +PKG_MIRROR_HASH:=aad23bc8f0548a46e60e4967b3f6645f03bad61c395269244c3509cc41f2c3d0 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 310b7f76e8dad4255efa7510c589b2c3f36af3f5 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 21 Mar 2021 13:32:46 +0000 Subject: [PATCH 44/61] mediatek: linksys-e8450: remove left-overs from dtsi There is an ASMedia ASM1480 PCIe switch found on mt7622-rfb1 and the BPi-R64, allowing the user to switch between SATA and PCIe1 which share the same pins on the SoC. This chip is not present on the Linksys E8450, it doesn't have SATA. Remove definitions for GPIO90 from DTSI to prevent it from being copy&pasted or otherwise causing confusion. Signed-off-by: Daniel Golle --- target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi | 9 --------- 1 file changed, 9 deletions(-) diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi index 23c1d183c8..1e367d408f 100644 --- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi +++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi @@ -210,15 +210,6 @@ }; &pio { - /* Attention: GPIO 90 is used to switch between PCIe@1,0 and - * SATA functions. i.e. output-high: PCIe, output-low: SATA - */ -// asm_sel { -// gpio-hog; -// gpios = <90 GPIO_ACTIVE_HIGH>; -// output-high; -// }; - eth_pins: eth-pins { mux { function = "eth"; From d25d281fd6686bda67636f6c1df918145b6cb738 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 20 Mar 2021 13:19:22 +0100 Subject: [PATCH 45/61] uhttpd: Reload config after uhttpd-mod-ubus was added Without this change the config is only committed, but the uhttpd daemon is not reloaded. This reload is needed to apply the config. Without the reload of uhttpd, the ubus server is not available over http and returns a Error 404. This caused problems when installing luci on the snapshots and accessing it without reloading uhttpd. Signed-off-by: Hauke Mehrtens --- package/network/services/uhttpd/Makefile | 2 +- package/network/services/uhttpd/files/ubus.default | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 796eb61298..28a817d2e0 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git diff --git a/package/network/services/uhttpd/files/ubus.default b/package/network/services/uhttpd/files/ubus.default index ca9e72a315..b218d3f85d 100644 --- a/package/network/services/uhttpd/files/ubus.default +++ b/package/network/services/uhttpd/files/ubus.default @@ -3,11 +3,13 @@ if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then uci set uhttpd.main.ubus_prefix=/ubus uci commit uhttpd + /etc/init.d/uhttpd reload fi [ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && { uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock' uci commit uhttpd + /etc/init.d/uhttpd reload } exit 0 From 501221af542b5154fbf8788f8426bc7f5443764a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 20 Mar 2021 13:26:20 +0100 Subject: [PATCH 46/61] uhttpd: Execute uci commit and reload_config once Instead of doing uci commit and reload_config for each setting do it only once when one of these options was changed. This should make it a little faster when both conditions are taken. Signed-off-by: Hauke Mehrtens --- package/network/services/uhttpd/files/ubus.default | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/network/services/uhttpd/files/ubus.default b/package/network/services/uhttpd/files/ubus.default index b218d3f85d..474016c1c5 100644 --- a/package/network/services/uhttpd/files/ubus.default +++ b/package/network/services/uhttpd/files/ubus.default @@ -1,15 +1,17 @@ #!/bin/sh +commit=0 + if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then uci set uhttpd.main.ubus_prefix=/ubus - uci commit uhttpd - /etc/init.d/uhttpd reload + commit=1 fi [ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && { uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock' - uci commit uhttpd - /etc/init.d/uhttpd reload + commit=1 } +[ "$commit" = 1 ] && uci commit uhttpd && /etc/init.d/uhttpd reload + exit 0 From 1170655f8b792b34f899350cb0272ad94bb2d3e2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 21 Mar 2021 22:34:13 +0100 Subject: [PATCH 47/61] uhttpd: update to git HEAD 15346de client: Always close connection with request body in case of error Signed-off-by: Hauke Mehrtens --- package/network/services/uhttpd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 28a817d2e0..87b3690515 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2020-11-23 -PKG_SOURCE_VERSION:=f53a63999784bcb7dc513e221f3f25dd3de2f35e -PKG_MIRROR_HASH:=b2b71f91a3affd1518b2887d2786be30ae0ac5204bbf65c9a84595603847995c +PKG_SOURCE_DATE:=2021-03-21 +PKG_SOURCE_VERSION:=15346de8d3ba422002496526ee24c62a3601ab8c +PKG_MIRROR_HASH:=819424d071ed7c8888f9ca66f679907831becc59a67dd4a5ec521d5fba0a3171 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC From d160b2c824ea08c476e9ae4eebd1dee23671a9a0 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sun, 21 Mar 2021 22:31:44 +0800 Subject: [PATCH 48/61] ramips: increase SPI frequency for HIWIFI HC5x61 devices HIWIFI HC5x61 devices support high speed spi clock up to 100+ MHz. So set spi frequency to 80 MHz here (Due to frequency division the real clock is 48 MHz). I have tested HC5661 and it can run well in OpenWrt v19.07. Signed-off-by: Shiji Yang [adjust commit title and wrap message] Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 369e407319..42a59f285b 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -31,7 +31,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <80000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; From c36e47c5dad038cdfa0ded1608638ddeb8ce1f32 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sun, 21 Mar 2021 17:51:00 +0800 Subject: [PATCH 49/61] ramips: increase SPI frequency for Phicomm series devices From many teardown image in the internet, I find Phicomm K1/k2 series use Winbond W25Q64/W25Q128 or GigaDevice GD25Q64/GD25Q128 Flash chips. both of them support 100+ MHz clock spi operate and fast-read instruction. PSG1218 with W25x or GD25x has been tested and it can run well in OpenWrt v19.07. Signed-off-by: Shiji Yang [improve commit title] Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7620a_phicomm_k2g.dts | 3 ++- target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts | 3 ++- target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi | 3 ++- target/linux/ramips/dts/mt7621_phicomm_k2p.dts | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts index 85d43468aa..2684da6ac3 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts @@ -50,7 +50,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <24000000>; + spi-max-frequency = <80000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index ea87d64ecc..27c4ec31dc 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -53,7 +53,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <80000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi index c3ec73b681..4d518bf206 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi @@ -50,7 +50,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <80000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index 83169cd1e9..ec24c713ea 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -50,7 +50,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <80000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; From df6154848a1486c6dcbf2566ea9fd9bf2e094a40 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sun, 21 Mar 2021 16:45:24 +0800 Subject: [PATCH 50/61] ramips: create shared DTSI for MT7620 Phicomm K2x series devices Improve compatibility of the device tree include file. Now a new .dtsi file will support both PSG1218A, PSG1218B and K2G. Signed-off-by: Shiji Yang [improve commit title, rebase] Signed-off-by: Adrian Schmutzler --- .../linux/ramips/dts/mt7620a_phicomm_k2g.dts | 112 ++---------------- ..._psg1218.dtsi => mt7620a_phicomm_k2x.dtsi} | 14 +-- .../ramips/dts/mt7620a_phicomm_psg1218a.dts | 10 +- .../ramips/dts/mt7620a_phicomm_psg1218b.dts | 10 +- 4 files changed, 31 insertions(+), 115 deletions(-) rename target/linux/ramips/dts/{mt7620a_phicomm_psg1218.dtsi => mt7620a_phicomm_k2x.dtsi} (86%) diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts index 2684da6ac3..a153520e2f 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts @@ -1,100 +1,21 @@ -#include "mt7620a.dtsi" - -#include -#include +#include "mt7620a_phicomm_k2x.dtsi" / { compatible = "phicomm,k2g", "ralink,mt7620a-soc"; model = "Phicomm K2G"; - - aliases { - led-boot = &led_blue; - led-failsafe = &led_blue; - led-running = &led_blue; - led-upgrade = &led_blue; - }; - - leds { - compatible = "gpio-leds"; - - led_blue: blue { - label = "blue:status"; - gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - yellow { - label = "yellow:status"; - gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - }; - - red { - label = "red:status"; - gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; }; -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <80000000>; - m25p,fast-read; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - reg = <0x0 0x30000>; - label = "u-boot"; - read-only; - }; - - partition@30000 { - reg = <0x30000 0x10000>; - label = "u-boot-env"; - read-only; - }; - - factory: partition@40000 { - reg = <0x40000 0x10000>; - label = "factory"; - read-only; - }; - - partition@50000 { - reg = <0x50000 0x50000>; - label = "permanent_config"; - read-only; - }; - - partition@a0000 { - compatible = "denx,uimage"; - reg = <0xa0000 0x760000>; - label = "firmware"; - }; - }; +&partitions { + partition@50000 { + reg = <0x50000 0x50000>; + label = "permanent_config"; + read-only; }; -}; -&state_default { - gpio { - groups = "i2c", "uartf"; - function = "gpio"; + partition@a0000 { + compatible = "denx,uimage"; + reg = <0xa0000 0x760000>; + label = "firmware"; }; }; @@ -122,20 +43,7 @@ }; }; -&pcie { - status = "okay"; -}; - -&pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - &wmac { - ralink,mtd-eeprom = <&factory 0x0>; pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi similarity index 86% rename from target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi rename to target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi index 4d518bf206..c7728e0442 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi @@ -4,8 +4,6 @@ #include / { - compatible = "phicomm,psg1218", "ralink,mt7620a-soc"; - aliases { led-boot = &led_blue; led-failsafe = &led_blue; @@ -53,7 +51,7 @@ spi-max-frequency = <80000000>; m25p,fast-read; - partitions { + partitions: partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; @@ -64,23 +62,17 @@ read-only; }; - partition@20000 { + partition@30000 { label = "u-boot-env"; reg = <0x30000 0x10000>; read-only; }; - factory: partition@30000 { + factory: partition@40000 { label = "factory"; reg = <0x40000 0x10000>; read-only; }; - - partition@40000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; }; }; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts index d17f2fce59..d5aa159498 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts @@ -1,10 +1,18 @@ -#include "mt7620a_phicomm_psg1218.dtsi" +#include "mt7620a_phicomm_k2x.dtsi" / { compatible = "phicomm,psg1218a", "phicomm,psg1218", "ralink,mt7620a-soc"; model = "Phicomm PSG1218 rev.A"; }; +&partitions { + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; +}; + ðernet { mtd-mac-address = <&factory 0x28>; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts index 822fb13b6f..4143d5e4d6 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts @@ -1,10 +1,18 @@ -#include "mt7620a_phicomm_psg1218.dtsi" +#include "mt7620a_phicomm_k2x.dtsi" / { compatible = "phicomm,psg1218b", "phicomm,psg1218", "ralink,mt7620a-soc"; model = "Phicomm PSG1218 rev.B"; }; +&partitions { + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; +}; + ðernet { mtd-mac-address = <&factory 0x28>; }; From fdbdbe8eaaa6aa3acacdcb3ae1308b2a2055fc39 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 1 Feb 2021 10:58:09 +0100 Subject: [PATCH 51/61] base-files: add logging for configuration import Make sysupgrade backup import more verbose. Signed-off-by: Florian Eckert --- package/base-files/files/sbin/sysupgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 7977b06ef1..7e0a00e13b 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -287,6 +287,7 @@ if [ -n "$CONF_RESTORE" ]; then fi [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" + v "Restoring config files..." tar -C / -x${TAR_V}zf "$CONF_RESTORE" exit $? fi From b3ca1f30efd7bb96a22f72b766d302e552265276 Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Wed, 17 Mar 2021 18:35:34 +0900 Subject: [PATCH 52/61] ramips: add support for ELECOM WRC-1750GST2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ELECOM WRC-1750GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 256 MiB (NT5CC128M16JR-EK) - Flash : SPI-NOR 32 MiB (MX25L25645GMI-08G) - WLAN : 2.4/5 GHz 3T3R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LEDs/Keys : 4x/6x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX, from ethernet port side - 57600n8 - Power : 12 VDC, 1.5 A Flash instruction using factory image: 1. Boot WRC-1750GST2 normally with "Router" mode 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button 4. Wait ~120 seconds to complete flashing MAC addresses: LAN : 04:AB:18:xx:xx:23 (Factory, 0xE000 (hex)) WAN : 04:AB:18:xx:xx:24 (Factory, 0xE006 (hex)) 2.4GHz : 04:AB:18:xx:xx:25 (Factory, 0x4 (hex)) 5GHz : 04:AB:18:xx:xx:26 (Factory, 0x8004 (hex)) Signed-off-by: INAGAKI Hiroshi --- .../ramips/dts/mt7621_elecom_wrc-1750gst2.dts | 40 +++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 8 ++++ 2 files changed, 48 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts new file mode 100644 index 0000000000..4b8888cd91 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_elecom_wrc-gs-2pci.dtsi" + +/ { + compatible = "elecom,wrc-1750gst2", "mediatek,mt7621-soc"; + model = "ELECOM WRC-1750GST2"; +}; + +&partitions { + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1800000>; + }; + + partition@1850000 { + label = "tm_pattern"; + reg = <0x1850000 0x400000>; + read-only; + }; + + partition@1c50000 { + label = "tm_key"; + reg = <0x1c50000 0x100000>; + read-only; + }; + + partition@1d50000 { + label = "nvram"; + reg = <0x1d50000 0xb0000>; + read-only; + }; + + partition@1e00000 { + label = "user_data"; + reg = <0x1e00000 0x200000>; + read-only; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 21d192fc0b..7efec68118 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -460,6 +460,14 @@ define Device/elecom_wrc-1750gs endef TARGET_DEVICES += elecom_wrc-1750gs +define Device/elecom_wrc-1750gst2 + $(Device/elecom_wrc-gs) + IMAGE_SIZE := 24576k + DEVICE_MODEL := WRC-1750GST2 + ELECOM_HWNAME := WRC-1750GST2 +endef +TARGET_DEVICES += elecom_wrc-1750gst2 + define Device/elecom_wrc-1750gsv $(Device/elecom_wrc-gs) IMAGE_SIZE := 11264k From abbaf696f6658bbf92895fd8285353c5644fe845 Mon Sep 17 00:00:00 2001 From: Jan Pavlinec Date: Mon, 8 Mar 2021 17:33:46 +0100 Subject: [PATCH 53/61] igmpproxy: remove package Moved to packages repo because it was considered non-essential for most router configurations. Signed-off-by: Jan Pavlinec [shorten commit title] Signed-off-by: Adrian Schmutzler --- package/network/services/igmpproxy/Makefile | 51 ------ .../services/igmpproxy/files/igmpproxy.config | 14 -- .../services/igmpproxy/files/igmpproxy.init | 156 ------------------ 3 files changed, 221 deletions(-) delete mode 100644 package/network/services/igmpproxy/Makefile delete mode 100644 package/network/services/igmpproxy/files/igmpproxy.config delete mode 100644 package/network/services/igmpproxy/files/igmpproxy.init diff --git a/package/network/services/igmpproxy/Makefile b/package/network/services/igmpproxy/Makefile deleted file mode 100644 index 4f3785cfa4..0000000000 --- a/package/network/services/igmpproxy/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=igmpproxy -PKG_VERSION:=0.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/pali/igmpproxy/releases/download/${PKG_VERSION}/ -PKG_HASH:=d1fc244cb2fbbf99f720bda3e841fe59ece9b6919073790b4b892739b1b844eb -PKG_MAINTAINER:=Felix Fietkau - -include $(INCLUDE_DIR)/package.mk - -PKG_FIXUP:=autoreconf -PKG_LICENSE:=GPL-2.0+ - -define Package/igmpproxy - SECTION:=net - CATEGORY:=Network - SUBMENU:=Routing and Redirection - DEPENDS:=+USE_GLIBC:librt - TITLE:=Multicast Routing Daemon - URL:=http://sourceforge.net/projects/igmpproxy -endef - -define Package/igmpproxy/description - IGMPproxy is a simple dynamic Multicast Routing Daemon using - only IGMP signalling (Internet Group Management Protocol). -endef - -define Package/igmpproxy/conffiles -/etc/config/igmpproxy -endef - -define Package/igmpproxy/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/igmpproxy.config $(1)/etc/config/igmpproxy - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/igmpproxy.init $(1)/etc/init.d/igmpproxy - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/igmpproxy $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,igmpproxy)) diff --git a/package/network/services/igmpproxy/files/igmpproxy.config b/package/network/services/igmpproxy/files/igmpproxy.config deleted file mode 100644 index c85ffa3f52..0000000000 --- a/package/network/services/igmpproxy/files/igmpproxy.config +++ /dev/null @@ -1,14 +0,0 @@ -config igmpproxy - option quickleave 1 -# option verbose [0-3](none, minimal[default], more, maximum) - -config phyint - option network wan - option zone wan - option direction upstream - list altnet 192.168.1.0/24 - -config phyint - option network lan - option zone lan - option direction downstream diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init deleted file mode 100644 index 14d7133e57..0000000000 --- a/package/network/services/igmpproxy/files/igmpproxy.init +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010-2014 OpenWrt.org - -START=99 -USE_PROCD=1 -PROG=/usr/sbin/igmpproxy -CONFIGFILE=/var/etc/igmpproxy.conf - -igmp_header() { - local quickleave verbose - config_get_bool quickleave "$1" quickleave 0 - config_get verbose "$1" verbose 1 - - [ $verbose = "0" ] && logopts="-d" - [ $verbose = "2" ] && logopts="-v" - [ $verbose = "3" ] && logopts="-v -v" - - mkdir -p /var/etc - rm -f /var/etc/igmpproxy.conf - [ $quickleave -gt 0 ] && echo "quickleave" >> /var/etc/igmpproxy.conf - - [ -L /etc/igmpproxy.conf ] || ln -nsf /var/etc/igmpproxy.conf /etc/igmpproxy.conf -} - -igmp_add_phyint() { - local network direction altnets device up - - config_get network $1 network - config_get direction $1 direction - config_get altnets $1 altnet - - local status="$(ubus -S call "network.interface.$network" status)" - [ -n "$status" ] || return - - json_load "$status" - json_get_var device l3_device - json_get_var up up - - [ -n "$device" -a "$up" = "1" ] || { - procd_append_param error "$network is not up" - return; - } - - append netdevs "$device" - - [ "$direction" = "upstream" ] && has_upstream=1 - - echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf - - if [ -n "$altnets" ]; then - local altnet - for altnet in $altnets; do - echo -e "\taltnet $altnet" >> /var/etc/igmpproxy.conf - done - fi -} - -igmp_add_network() { - local network - - config_get network $1 network - procd_add_interface_trigger "interface.*" $network /etc/init.d/igmpproxy reload -} - -igmp_add_firewall_routing() { - config_get direction $1 direction - config_get zone $1 zone - - if [ "$direction" != "downstream" ] || [ -z "$zone" ]; then - return 0 - fi - -# First drop SSDP packets then accept all other multicast - - json_add_object "" - json_add_string type rule - json_add_string src "$upstream" - json_add_string dest "$zone" - json_add_string family ipv4 - json_add_string proto udp - json_add_string dest_ip "239.255.255.250" - json_add_string target DROP - json_close_object - - json_add_object "" - json_add_string type rule - json_add_string src "$upstream" - json_add_string dest "$zone" - json_add_string family ipv4 - json_add_string proto udp - json_add_string dest_ip "224.0.0.0/4" - json_add_string target ACCEPT - json_close_object -} - -igmp_add_firewall_network() { - config_get direction $1 direction - config_get zone $1 zone - - [ ! -z "$zone" ] || return - - json_add_object "" - json_add_string type rule - json_add_string src "$zone" - json_add_string family ipv4 - json_add_string proto igmp - json_add_string target ACCEPT - json_close_object - - [ "$direction" = "upstream" ] && { - upstream="$zone" - config_foreach igmp_add_firewall_routing phyint - } -} - -service_triggers() { - procd_add_reload_trigger "igmpproxy" - config_foreach igmp_add_network phyint -} - -start_service() { - has_upstream= - netdevs= - logopts= - config_load igmpproxy - - config_foreach igmp_header igmpproxy - config_foreach igmp_add_phyint phyint - [ -n "$has_upstream" ] || return - - procd_open_instance - procd_set_param command $PROG '-n' - [ -n "$logopts" ] && procd_append_param command $logopts - procd_append_param command $CONFIGFILE - procd_set_param file $CONFIGFILE - procd_set_param netdev $netdevs - procd_set_param respawn - - procd_open_data - - json_add_array firewall - config_foreach igmp_add_firewall_network phyint - json_close_array - - procd_close_data - - procd_close_instance -} - -service_started() { - procd_set_config_changed firewall -} - -stop_service() { - procd_set_config_changed firewall -} From 2c81b1696400c60fdb4316ae447f789087781359 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 17 Mar 2021 14:22:56 -0400 Subject: [PATCH 54/61] kernel: bump 5.4 to 5.4.106 Ran update_kernel.sh in a fresh clone without any existing toolchains. Manually rebased: bcm27xx/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch layerscape/701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia [remove accidental whitespace edit] Signed-off-by: Adrian Schmutzler --- include/kernel-version.mk | 4 +- ...mware-loader-for-uPD720201-and-uPD72.patch | 12 ++--- .../802-usb-xhci-force-msi-renesas-xhci.patch | 4 +- ...Show-that-the-VIA-VL805-supports-LPM.patch | 2 +- ...hci_fixup_endpoint-for-interval-adju.patch | 4 +- ...or-host-controllers-that-don-t-updat.patch | 4 +- ....dtbo-overlays-to-be-built-piecemeal.patch | 2 +- ...iables-used-to-calculate-ZONE_DMA32-.patch | 6 +-- ...m64-use-both-ZONE_DMA-and-ZONE_DMA32.patch | 6 +-- ...n-ARCH_ZONE_DMA_BITS-into-a-variable.patch | 2 +- ...ow-.dtbo-overlays-to-be-built-adjust.patch | 2 +- ...ve-CMA-and-crashkernel-in-ZONE_DMA32.patch | 2 +- ...-quirks-add-link-TRB-quirk-for-VL805.patch | 4 +- ...support-for-performing-fake-doorbell.patch | 2 +- ...-net-phy-add-core-phylib-sfp-support.patch | 4 +- ...rehdr-reservation-early-for-crash-du.patch | 4 +- ...the-Time-Aware-Scheduler-via-tc-tapr.patch | 8 ++-- ...-Qbv-PSPEED-set-according-to-adjust-.patch | 4 +- ...-SerDes-for-SGMII-and-SXGMII-protoco.patch | 6 +-- ...tocol-information-to-set-up-the-port.patch | 16 +++---- ...t-0232-enetc-Handle-USXGMII-protocol.patch | 4 +- ...tc-WA-for-MDIO-register-access-issue.patch | 2 +- ...etc_gregs-with-a-readers-writer-lock.patch | 2 +- ...move-mdio-bus-on-PF-probe-error-path.patch | 4 +- ...t-Credit-Based-Shaper-CBS-for-hardwa.patch | 4 +- ...ort-tsn-capabilities-qbv-qci-qbu-cbs.patch | 6 +-- ...enetc-disable-EEE-autoneg-by-default.patch | 4 +- ...accessors-more-generic-and-export-to.patch | 2 +- ...dd-ioctl-support-for-PHY-related-ops.patch | 2 +- ...devm_platform_ioremap_resource-to-si.patch | 4 +- ...me-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch | 2 +- ...me-struct-flexcan_priv-reg_imask-1-2.patch | 6 +-- ...ve-TX-mailbox-bit-from-struct-flexca.patch | 6 +-- ...ert-struct-flexcan_priv-rx_mask-1-2-.patch | 4 +- ...oduce-struct-flexcan_priv-tx_mask-an.patch | 4 +- ...-can-flexcan-add-CAN-FD-mode-support.patch | 8 ++-- ...excan-add-ISO-CAN-FD-feature-support.patch | 6 +-- ...Transceiver-Delay-Compensation-suopp.patch | 2 +- ...-0023-can-flexcan-add-imx8qm-support.patch | 2 +- ...24-can-flexcan-add-lx2160ar1-support.patch | 2 +- ...can-add-LPSR-mode-support-for-i.MX7D.patch | 4 +- ...an-add-CAN-wakeup-function-for-i.MX8.patch | 6 +-- ...dd-S32V234-support-to-FlexCAN-driver.patch | 2 +- ...low-specifying-s2-prot-bits-when-map.patch | 2 +- ...rop-qman-mmio-cacheable-mapping-hack.patch | 4 +- ...host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch | 6 +-- ...735-usb-host-add-XHCI_CDNS_HOST-flag.patch | 2 +- ...-host-xhci-add-.bus_suspend-override.patch | 4 +- ...e-resolved-link-config-via-mac_link_.patch | 2 +- ...se-resolved-link-config-in-mac_link_.patch | 14 +++--- ...xtend-device-data-ready-for-adding-a.patch | 12 ++--- ...530-Add-the-support-of-MT7531-switch.patch | 48 +++++++++---------- .../990-NET-no-auto-carrier-off-support.patch | 4 +- 53 files changed, 142 insertions(+), 142 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 72c2fdc9a3..b5762dd831 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .105 +LINUX_VERSION-5.4 = .106 LINUX_VERSION-5.10 = .23 -LINUX_KERNEL_HASH-5.4.105 = 244e4cd16184285df55ec5a9501daba011aa8b85c5527ee05eab4592e70fb8b6 +LINUX_KERNEL_HASH-5.4.106 = cc873b2c39c1823d4bc4f6cde527943c8cfd28ae94cb517804b0f9679359c8db LINUX_KERNEL_HASH-5.10.23 = f6e21c03ec6ff85b26d77c59fdab81e64707792a57593643307df192749edb6a remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index cba8062f55..dbed597973 100644 --- a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -48,9 +48,9 @@ Signed-off-by: Vinod Koul #include "xhci.h" #include "xhci-trace.h" -@@ -63,6 +65,44 @@ - #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242 +@@ -64,6 +66,44 @@ #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 + #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242 +#define RENESAS_FW_VERSION 0x6C +#define RENESAS_ROM_CONFIG 0xF0 @@ -93,7 +93,7 @@ Signed-off-by: Vinod Koul static const char hcd_name[] = "xhci_hcd"; static struct hc_driver __read_mostly xhci_pci_hc_driver; -@@ -298,6 +338,873 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -307,6 +347,873 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -967,7 +967,7 @@ Signed-off-by: Vinod Koul /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -339,6 +1246,27 @@ static int xhci_pci_probe(struct pci_dev +@@ -348,6 +1255,27 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -995,7 +995,7 @@ Signed-off-by: Vinod Koul driver = (struct hc_driver *)id->driver_data; /* Prevent runtime suspending between USB-2 and USB-3 initialization */ -@@ -400,6 +1328,16 @@ static void xhci_pci_remove(struct pci_d +@@ -409,6 +1337,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; @@ -1012,7 +1012,7 @@ Signed-off-by: Vinod Koul xhci = hcd_to_xhci(pci_get_drvdata(dev)); xhci->xhc_state |= XHCI_STATE_REMOVING; -@@ -539,6 +1477,11 @@ static int xhci_pci_resume(struct usb_hc +@@ -548,6 +1486,11 @@ static int xhci_pci_resume(struct usb_hc if (pdev->vendor == PCI_VENDOR_ID_INTEL) usb_enable_intel_xhci_ports(pdev); 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 40d731b8e6..9d474f2d62 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 @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -285,6 +285,7 @@ static void xhci_pci_quirks(struct devic +@@ -286,6 +286,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; @@ -43,7 +43,7 @@ produce a noisy warning. hcd->msi_enabled = 1; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1882,6 +1882,7 @@ struct xhci_hcd { +@@ -1883,6 +1883,7 @@ struct xhci_hcd { struct xhci_hub usb2_rhub; struct xhci_hub usb3_rhub; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch index b2a8279da2..83a2341e1b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch @@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -254,6 +254,10 @@ static void xhci_pci_quirks(struct devic +@@ -255,6 +255,10 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; 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 5c241536dd..f6eac15a53 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 -@@ -1456,6 +1456,103 @@ command_cleanup: +@@ -1464,6 +1464,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 */ -@@ -5337,6 +5434,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5345,6 +5442,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-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index a125fdcb47..db69423d33 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -255,8 +255,10 @@ static void xhci_pci_quirks(struct devic +@@ -256,8 +256,10 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_VIA && @@ -87,4 +87,4 @@ Signed-off-by: Jonathan Bell +#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) - + #define XHCI_NO_SOFT_RETRY BIT_ULL(40) 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 d36f3eb802..0fb5c12ac3 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 -@@ -1261,6 +1261,9 @@ ifneq ($(dtstree),) +@@ -1267,6 +1267,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-0435-arm64-rename-variables-used-to-calculate-ZONE_DMA32-.patch b/target/linux/bcm27xx/patches-5.4/950-0435-arm64-rename-variables-used-to-calculate-ZONE_DMA32-.patch index df184f53ee..18ed0f50ec 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0435-arm64-rename-variables-used-to-calculate-ZONE_DMA32-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0435-arm64-rename-variables-used-to-calculate-ZONE_DMA32-.patch @@ -85,7 +85,7 @@ Signed-off-by: Catalin Marinas zhole_size[ZONE_NORMAL] -= normal_end - normal_start; } } -@@ -410,9 +410,9 @@ void __init arm64_memblock_init(void) +@@ -422,9 +422,9 @@ void __init arm64_memblock_init(void) /* 4GB maximum for 32-bit only capable devices */ if (IS_ENABLED(CONFIG_ZONE_DMA32)) @@ -97,7 +97,7 @@ Signed-off-by: Catalin Marinas reserve_crashkernel(); -@@ -420,7 +420,7 @@ void __init arm64_memblock_init(void) +@@ -432,7 +432,7 @@ void __init arm64_memblock_init(void) high_memory = __va(memblock_end_of_DRAM() - 1) + 1; @@ -106,7 +106,7 @@ Signed-off-by: Catalin Marinas } void __init bootmem_init(void) -@@ -524,7 +524,7 @@ static void __init free_unused_memmap(vo +@@ -536,7 +536,7 @@ static void __init free_unused_memmap(vo void __init mem_init(void) { if (swiotlb_force == SWIOTLB_FORCE || diff --git a/target/linux/bcm27xx/patches-5.4/950-0436-arm64-use-both-ZONE_DMA-and-ZONE_DMA32.patch b/target/linux/bcm27xx/patches-5.4/950-0436-arm64-use-both-ZONE_DMA-and-ZONE_DMA32.patch index ccb2071f17..92123ceb32 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0436-arm64-use-both-ZONE_DMA-and-ZONE_DMA32.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0436-arm64-use-both-ZONE_DMA-and-ZONE_DMA32.patch @@ -140,7 +140,7 @@ Signed-off-by: Catalin Marinas } #endif if (end > max_dma32) { -@@ -408,9 +430,11 @@ void __init arm64_memblock_init(void) +@@ -420,9 +442,11 @@ void __init arm64_memblock_init(void) early_init_fdt_scan_reserved_mem(); @@ -154,7 +154,7 @@ Signed-off-by: Catalin Marinas else arm64_dma32_phys_limit = PHYS_MASK + 1; -@@ -420,7 +444,7 @@ void __init arm64_memblock_init(void) +@@ -432,7 +456,7 @@ void __init arm64_memblock_init(void) high_memory = __va(memblock_end_of_DRAM() - 1) + 1; @@ -163,7 +163,7 @@ Signed-off-by: Catalin Marinas } void __init bootmem_init(void) -@@ -524,7 +548,7 @@ static void __init free_unused_memmap(vo +@@ -536,7 +560,7 @@ static void __init free_unused_memmap(vo void __init mem_init(void) { if (swiotlb_force == SWIOTLB_FORCE || diff --git a/target/linux/bcm27xx/patches-5.4/950-0439-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch b/target/linux/bcm27xx/patches-5.4/950-0439-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch index ab04d64b72..127d4c51d9 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0439-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0439-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch @@ -50,7 +50,7 @@ Signed-off-by: Catalin Marinas /* * We need to be able to catch inadvertent references to memstart_addr * that occur (potentially in generic code) before arm64_memblock_init() -@@ -430,8 +433,10 @@ void __init arm64_memblock_init(void) +@@ -442,8 +445,10 @@ void __init arm64_memblock_init(void) early_init_fdt_scan_reserved_mem(); 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 b1cd7bffbe..a33cfe7142 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 -@@ -1261,7 +1261,7 @@ ifneq ($(dtstree),) +@@ -1267,7 +1267,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-0625-arm64-mm-reserve-CMA-and-crashkernel-in-ZONE_DMA32.patch b/target/linux/bcm27xx/patches-5.4/950-0625-arm64-mm-reserve-CMA-and-crashkernel-in-ZONE_DMA32.patch index e1a340ec91..ad42f11e53 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0625-arm64-mm-reserve-CMA-and-crashkernel-in-ZONE_DMA32.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0625-arm64-mm-reserve-CMA-and-crashkernel-in-ZONE_DMA32.patch @@ -33,7 +33,7 @@ Signed-off-by: Catalin Marinas crash_size, SZ_2M); if (crash_base == 0) { pr_warn("cannot allocate crashkernel (size:0x%llx)\n", -@@ -449,7 +449,7 @@ void __init arm64_memblock_init(void) +@@ -461,7 +461,7 @@ void __init arm64_memblock_init(void) high_memory = __va(memblock_end_of_DRAM() - 1) + 1; diff --git a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 3c89f1348f..12804bae75 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -258,6 +258,7 @@ static void xhci_pci_quirks(struct devic +@@ -259,6 +259,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3483) { xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; @@ -56,6 +56,6 @@ Signed-off-by: Jonathan Bell #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) +#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(39) + #define XHCI_NO_SOFT_RETRY BIT_ULL(40) unsigned int num_active_eps; - unsigned int limit_active_eps; 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 c160c6bf17..483a9c0c75 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 @@ -134,4 +134,4 @@ it on BCM4708 family. +#define XHCI_FAKE_DOORBELL BIT_ULL(36) #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) - + #define XHCI_NO_SOFT_RETRY BIT_ULL(40) diff --git a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch index ecb70a9904..b9755e8943 100644 --- a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch +++ b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch @@ -24,7 +24,7 @@ Signed-off-by: Russell King #include #include #include -@@ -842,6 +843,9 @@ void phy_stop(struct phy_device *phydev) +@@ -843,6 +844,9 @@ void phy_stop(struct phy_device *phydev) mutex_lock(&phydev->lock); @@ -34,7 +34,7 @@ Signed-off-by: Russell King phydev->state = PHY_HALTED; mutex_unlock(&phydev->lock); -@@ -904,6 +908,9 @@ void phy_state_machine(struct work_struc +@@ -905,6 +909,9 @@ void phy_state_machine(struct work_struc old_state = phydev->state; diff --git a/target/linux/layerscape/patches-5.4/303-core-0009-arm64-move-elfcorehdr-reservation-early-for-crash-du.patch b/target/linux/layerscape/patches-5.4/303-core-0009-arm64-move-elfcorehdr-reservation-early-for-crash-du.patch index d41b160369..d7149712ad 100644 --- a/target/linux/layerscape/patches-5.4/303-core-0009-arm64-move-elfcorehdr-reservation-early-for-crash-du.patch +++ b/target/linux/layerscape/patches-5.4/303-core-0009-arm64-move-elfcorehdr-reservation-early-for-crash-du.patch @@ -14,7 +14,7 @@ Signed-off-by: Poonam Aggrwal --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c -@@ -406,6 +406,8 @@ void __init arm64_memblock_init(void) +@@ -418,6 +418,8 @@ void __init arm64_memblock_init(void) initrd_end = initrd_start + phys_initrd_size; } @@ -23,7 +23,7 @@ Signed-off-by: Poonam Aggrwal early_init_fdt_scan_reserved_mem(); /* 4GB maximum for 32-bit only capable devices */ -@@ -416,8 +418,6 @@ void __init arm64_memblock_init(void) +@@ -428,8 +430,6 @@ void __init arm64_memblock_init(void) reserve_crashkernel(); diff --git a/target/linux/layerscape/patches-5.4/701-net-0225-enetc-Configure-the-Time-Aware-Scheduler-via-tc-tapr.patch b/target/linux/layerscape/patches-5.4/701-net-0225-enetc-Configure-the-Time-Aware-Scheduler-via-tc-tapr.patch index cba297efc1..596309f706 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0225-enetc-Configure-the-Time-Aware-Scheduler-via-tc-tapr.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0225-enetc-Configure-the-Time-Aware-Scheduler-via-tc-tapr.patch @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller fsl-enetc-mdio-y := enetc_pci_mdio.o enetc_mdio.o --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c -@@ -1427,8 +1427,7 @@ int enetc_close(struct net_device *ndev) +@@ -1422,8 +1422,7 @@ int enetc_close(struct net_device *ndev) return 0; } @@ -67,7 +67,7 @@ Signed-off-by: David S. Miller { struct enetc_ndev_priv *priv = netdev_priv(ndev); struct tc_mqprio_qopt *mqprio = type_data; -@@ -1436,9 +1435,6 @@ int enetc_setup_tc(struct net_device *nd +@@ -1431,9 +1430,6 @@ int enetc_setup_tc(struct net_device *nd u8 num_tc; int i; @@ -77,7 +77,7 @@ Signed-off-by: David S. Miller mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS; num_tc = mqprio->num_tc; -@@ -1483,6 +1479,19 @@ int enetc_setup_tc(struct net_device *nd +@@ -1478,6 +1474,19 @@ int enetc_setup_tc(struct net_device *nd return 0; } @@ -99,7 +99,7 @@ Signed-off-by: David S. Miller struct enetc_ndev_priv *priv = netdev_priv(ndev); --- a/drivers/net/ethernet/freescale/enetc/enetc.h +++ b/drivers/net/ethernet/freescale/enetc/enetc.h -@@ -244,3 +244,10 @@ int enetc_set_fs_entry(struct enetc_si * +@@ -249,3 +249,10 @@ int enetc_set_fs_entry(struct enetc_si * void enetc_set_rss_key(struct enetc_hw *hw, const u8 *bytes); int enetc_get_rss_table(struct enetc_si *si, u32 *table, int count); int enetc_set_rss_table(struct enetc_si *si, const u32 *table, int count); diff --git a/target/linux/layerscape/patches-5.4/701-net-0226-enetc-update-TSN-Qbv-PSPEED-set-according-to-adjust-.patch b/target/linux/layerscape/patches-5.4/701-net-0226-enetc-update-TSN-Qbv-PSPEED-set-according-to-adjust-.patch index 4e19ed3bcf..e8224328f1 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0226-enetc-update-TSN-Qbv-PSPEED-set-according-to-adjust-.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0226-enetc-update-TSN-Qbv-PSPEED-set-according-to-adjust-.patch @@ -42,7 +42,7 @@ Signed-off-by: David S. Miller } static int enetc_dma_alloc_bdr(struct enetc_bdr *r, size_t bd_size) -@@ -1314,8 +1319,12 @@ static void enetc_disable_interrupts(str +@@ -1309,8 +1314,12 @@ static void enetc_disable_interrupts(str static void adjust_link(struct net_device *ndev) { @@ -91,7 +91,7 @@ Signed-off-by: David S. Miller struct enetc_bdr *tx_ring[16]; struct enetc_bdr *rx_ring[16]; -@@ -248,6 +254,8 @@ int enetc_send_cmd(struct enetc_si *si, +@@ -253,6 +259,8 @@ int enetc_send_cmd(struct enetc_si *si, #ifdef CONFIG_FSL_ENETC_QOS int enetc_setup_tc_taprio(struct net_device *ndev, void *type_data); diff --git a/target/linux/layerscape/patches-5.4/701-net-0229-enetc-Initialize-SerDes-for-SGMII-and-SXGMII-protoco.patch b/target/linux/layerscape/patches-5.4/701-net-0229-enetc-Initialize-SerDes-for-SGMII-and-SXGMII-protoco.patch index 5458141e9f..a7e8c6860e 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0229-enetc-Initialize-SerDes-for-SGMII-and-SXGMII-protoco.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0229-enetc-Initialize-SerDes-for-SGMII-and-SXGMII-protoco.patch @@ -79,8 +79,8 @@ Signed-off-by: Claudiu Manoil +} --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c -@@ -852,6 +852,61 @@ static int enetc_init_port_rss_memory(st - return err; +@@ -872,6 +872,61 @@ static void enetc_init_unused_port(struc + enetc_free_cbdr(dev, &si->cbd_ring); } +static void enetc_configure_sgmii(struct mii_bus *imdio) @@ -141,7 +141,7 @@ Signed-off-by: Claudiu Manoil static int enetc_pf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { -@@ -928,6 +983,10 @@ static int enetc_pf_probe(struct pci_dev +@@ -956,6 +1011,10 @@ static int enetc_pf_probe(struct pci_dev if (err) dev_warn(&pdev->dev, "Fallback to PHY-less operation\n"); diff --git a/target/linux/layerscape/patches-5.4/701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch b/target/linux/layerscape/patches-5.4/701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch index 0e9a659f09..8c3ea7fbbe 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch @@ -125,7 +125,7 @@ Signed-off-by: Claudiu Manoil } /* Initialize the entire shared memory for the flow steering entries -@@ -933,6 +936,10 @@ static int enetc_pf_probe(struct pci_dev +@@ -955,6 +958,10 @@ static int enetc_pf_probe(struct pci_dev pf->si = si; pf->total_vfs = pci_sriov_get_totalvfs(pdev); @@ -136,7 +136,7 @@ Signed-off-by: Claudiu Manoil enetc_configure_port(pf); enetc_get_si_caps(si); -@@ -947,6 +954,8 @@ static int enetc_pf_probe(struct pci_dev +@@ -969,6 +976,8 @@ static int enetc_pf_probe(struct pci_dev enetc_pf_netdev_setup(si, ndev, &enetc_ndev_ops); priv = netdev_priv(ndev); @@ -145,7 +145,7 @@ Signed-off-by: Claudiu Manoil enetc_init_si_rings_params(priv); -@@ -974,10 +983,6 @@ static int enetc_pf_probe(struct pci_dev +@@ -1002,10 +1011,6 @@ static int enetc_pf_probe(struct pci_dev goto err_alloc_msix; } @@ -156,23 +156,23 @@ Signed-off-by: Claudiu Manoil err = enetc_configure_serdes(priv); if (err) dev_warn(&pdev->dev, "Attempted serdes config but failed\n"); -@@ -995,7 +1000,6 @@ static int enetc_pf_probe(struct pci_dev +@@ -1023,7 +1028,6 @@ static int enetc_pf_probe(struct pci_dev err_reg_netdev: enetc_mdio_remove(pf); - enetc_of_put_phy(priv); enetc_free_msix(priv); + err_config_si: err_init_port_rss: - err_init_port_rfs: -@@ -1005,6 +1009,7 @@ err_alloc_si_res: +@@ -1034,6 +1038,7 @@ err_alloc_si_res: si->ndev = NULL; free_netdev(ndev); err_alloc_netdev: + enetc_of_put_phy(pf); + err_device_disabled: err_map_pf_space: enetc_pci_remove(pdev); - -@@ -1027,7 +1032,7 @@ static void enetc_pf_remove(struct pci_d +@@ -1057,7 +1062,7 @@ static void enetc_pf_remove(struct pci_d unregister_netdev(si->ndev); enetc_mdio_remove(pf); diff --git a/target/linux/layerscape/patches-5.4/701-net-0232-enetc-Handle-USXGMII-protocol.patch b/target/linux/layerscape/patches-5.4/701-net-0232-enetc-Handle-USXGMII-protocol.patch index 214d088113..8d4db97a26 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0232-enetc-Handle-USXGMII-protocol.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0232-enetc-Handle-USXGMII-protocol.patch @@ -23,7 +23,7 @@ Signed-off-by: Alex Marginean enetc_port_wr(hw, ENETC_PM0_IF_MODE, ENETC_PM0_IFM_XGMII); } -@@ -889,7 +890,8 @@ static int enetc_configure_serdes(struct +@@ -909,7 +910,8 @@ static int enetc_configure_serdes(struct int err; if (priv->if_mode != PHY_INTERFACE_MODE_SGMII && @@ -33,7 +33,7 @@ Signed-off-by: Alex Marginean return 0; err = enetc_imdio_init(pf); -@@ -899,7 +901,8 @@ static int enetc_configure_serdes(struct +@@ -919,7 +921,8 @@ static int enetc_configure_serdes(struct if (priv->if_mode == PHY_INTERFACE_MODE_SGMII) enetc_configure_sgmii(pf->imdio); diff --git a/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch b/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch index 6c3c525d5f..73dbdc752a 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch @@ -397,7 +397,7 @@ Signed-off-by: Alex Marginean #define enetc_mdio_rd(mdio_priv, off) \ --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c -@@ -1046,6 +1046,9 @@ static void enetc_pf_remove(struct pci_d +@@ -1076,6 +1076,9 @@ static void enetc_pf_remove(struct pci_d enetc_pci_remove(pdev); } diff --git a/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch b/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch index 262e87306a..cb164d4ffb 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch @@ -371,7 +371,7 @@ Signed-off-by: Claudiu Manoil #define enetc_rd(hw, off) enetc_rd_reg((hw)->reg + (off)) --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c -@@ -1046,8 +1046,9 @@ static void enetc_pf_remove(struct pci_d +@@ -1076,8 +1076,9 @@ static void enetc_pf_remove(struct pci_d enetc_pci_remove(pdev); } diff --git a/target/linux/layerscape/patches-5.4/701-net-0237-enetc-Remove-mdio-bus-on-PF-probe-error-path.patch b/target/linux/layerscape/patches-5.4/701-net-0237-enetc-Remove-mdio-bus-on-PF-probe-error-path.patch index 0fa2d0e6e9..064621eaea 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0237-enetc-Remove-mdio-bus-on-PF-probe-error-path.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0237-enetc-Remove-mdio-bus-on-PF-probe-error-path.patch @@ -48,11 +48,11 @@ Signed-off-by: Claudiu Manoil --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c -@@ -1012,6 +1012,7 @@ err_alloc_si_res: +@@ -1041,6 +1041,7 @@ err_alloc_si_res: si->ndev = NULL; free_netdev(ndev); err_alloc_netdev: + enetc_mdio_remove(pf); enetc_of_put_phy(pf); + err_device_disabled: err_map_pf_space: - enetc_pci_remove(pdev); diff --git a/target/linux/layerscape/patches-5.4/701-net-0336-enetc-add-support-Credit-Based-Shaper-CBS-for-hardwa.patch b/target/linux/layerscape/patches-5.4/701-net-0336-enetc-add-support-Credit-Based-Shaper-CBS-for-hardwa.patch index 2a85f5c8c3..5acfeb9f97 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0336-enetc-add-support-Credit-Based-Shaper-CBS-for-hardwa.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0336-enetc-add-support-Credit-Based-Shaper-CBS-for-hardwa.patch @@ -47,7 +47,7 @@ Signed-off-by: David S. Miller + taprio(802.1Qbv) and Credit Based Shaper(802.1Qbu). --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c -@@ -1524,6 +1524,8 @@ int enetc_setup_tc(struct net_device *nd +@@ -1519,6 +1519,8 @@ int enetc_setup_tc(struct net_device *nd return enetc_setup_tc_mqprio(ndev, type_data); case TC_SETUP_QDISC_TAPRIO: return enetc_setup_tc_taprio(ndev, type_data); @@ -58,7 +58,7 @@ Signed-off-by: David S. Miller } --- a/drivers/net/ethernet/freescale/enetc/enetc.h +++ b/drivers/net/ethernet/freescale/enetc/enetc.h -@@ -255,7 +255,9 @@ int enetc_send_cmd(struct enetc_si *si, +@@ -260,7 +260,9 @@ int enetc_send_cmd(struct enetc_si *si, #ifdef CONFIG_FSL_ENETC_QOS int enetc_setup_tc_taprio(struct net_device *ndev, void *type_data); void enetc_sched_speed_set(struct net_device *ndev); diff --git a/target/linux/layerscape/patches-5.4/701-net-0337-enetc-add-support-tsn-capabilities-qbv-qci-qbu-cbs.patch b/target/linux/layerscape/patches-5.4/701-net-0337-enetc-add-support-tsn-capabilities-qbv-qci-qbu-cbs.patch index 2e264aba08..dddb32a55c 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0337-enetc-add-support-tsn-capabilities-qbv-qci-qbu-cbs.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0337-enetc-add-support-tsn-capabilities-qbv-qci-qbu-cbs.patch @@ -179,7 +179,7 @@ Signed-off-by: Po Liu }; struct enetc_ndev_priv { -@@ -261,3 +292,10 @@ int enetc_setup_tc_cbs(struct net_device +@@ -266,3 +297,10 @@ int enetc_setup_tc_cbs(struct net_device #define enetc_sched_speed_set(ndev) (void)0 #define enetc_setup_tc_cbs(ndev, type_data) -EOPNOTSUPP #endif @@ -839,7 +839,7 @@ Signed-off-by: Po Liu /* pick up primary MAC address from SI */ enetc_get_primary_mac_addr(&si->hw, ndev->dev_addr); } -@@ -999,6 +1006,8 @@ static int enetc_pf_probe(struct pci_dev +@@ -1027,6 +1034,8 @@ static int enetc_pf_probe(struct pci_dev netif_info(priv, probe, ndev, "%s v%s\n", enetc_drv_name, enetc_drv_ver); @@ -848,7 +848,7 @@ Signed-off-by: Po Liu return 0; err_reg_netdev: -@@ -1033,6 +1042,8 @@ static void enetc_pf_remove(struct pci_d +@@ -1063,6 +1072,8 @@ static void enetc_pf_remove(struct pci_d netif_info(priv, drv, si->ndev, "%s v%s remove\n", enetc_drv_name, enetc_drv_ver); diff --git a/target/linux/layerscape/patches-5.4/701-net-0342-LF-376-enetc-disable-EEE-autoneg-by-default.patch b/target/linux/layerscape/patches-5.4/701-net-0342-LF-376-enetc-disable-EEE-autoneg-by-default.patch index 18b4d77dc9..8593363fb3 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0342-LF-376-enetc-disable-EEE-autoneg-by-default.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0342-LF-376-enetc-disable-EEE-autoneg-by-default.patch @@ -17,7 +17,7 @@ Signed-off-by: Yangbo Lu --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c -@@ -1369,6 +1369,7 @@ static int enetc_phy_connect(struct net_ +@@ -1364,6 +1364,7 @@ static int enetc_phy_connect(struct net_ { struct enetc_ndev_priv *priv = netdev_priv(ndev); struct phy_device *phydev; @@ -25,7 +25,7 @@ Signed-off-by: Yangbo Lu if (!priv->phy_node) return 0; /* phy-less mode */ -@@ -1382,6 +1383,10 @@ static int enetc_phy_connect(struct net_ +@@ -1377,6 +1378,10 @@ static int enetc_phy_connect(struct net_ phy_attached_info(phydev); diff --git a/target/linux/layerscape/patches-5.4/701-net-0382-enetc-Make-MDIO-accessors-more-generic-and-export-to.patch b/target/linux/layerscape/patches-5.4/701-net-0382-enetc-Make-MDIO-accessors-more-generic-and-export-to.patch index 77dbc06e25..c11f1a72ed 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0382-enetc-Make-MDIO-accessors-more-generic-and-export-to.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0382-enetc-Make-MDIO-accessors-more-generic-and-export-to.patch @@ -344,7 +344,7 @@ MDIO erratum. static int enetc_of_get_phy(struct enetc_pf *pf) { struct device *dev = &pf->si->pdev->dev; -@@ -891,6 +938,30 @@ static void enetc_configure_sxgmii(struc +@@ -911,6 +958,30 @@ static void enetc_configure_sxgmii(struc ENETC_PCS_CR_LANE_RESET | ENETC_PCS_CR_RESET_AN); } diff --git a/target/linux/layerscape/patches-5.4/701-net-0398-enetc-add-ioctl-support-for-PHY-related-ops.patch b/target/linux/layerscape/patches-5.4/701-net-0398-enetc-add-ioctl-support-for-PHY-related-ops.patch index bb3f926201..c9660e3d3c 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0398-enetc-add-ioctl-support-for-PHY-related-ops.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0398-enetc-add-ioctl-support-for-PHY-related-ops.patch @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c -@@ -1661,7 +1661,10 @@ int enetc_ioctl(struct net_device *ndev, +@@ -1656,7 +1656,10 @@ int enetc_ioctl(struct net_device *ndev, if (cmd == SIOCGHWTSTAMP) return enetc_hwtstamp_get(ndev, rq); #endif diff --git a/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch b/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch index e1089fd41d..cb0526c62c 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch @@ -17,7 +17,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -1573,7 +1573,6 @@ static int flexcan_probe(struct platform +@@ -1579,7 +1579,6 @@ static int flexcan_probe(struct platform struct net_device *dev; struct flexcan_priv *priv; struct regulator *reg_xceiver; @@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde struct clk *clk_ipg = NULL, *clk_per = NULL; struct flexcan_regs __iomem *regs; int err, irq; -@@ -1608,12 +1607,11 @@ static int flexcan_probe(struct platform +@@ -1614,12 +1613,11 @@ static int flexcan_probe(struct platform clock_freq = clk_get_rate(clk_per); } diff --git a/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch b/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch index d867ef561e..bd8db81f36 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch @@ -50,7 +50,7 @@ Signed-off-by: Marc Kleine-Budde netif_wake_queue(dev); } -@@ -1321,7 +1321,7 @@ static int flexcan_open(struct net_devic +@@ -1323,7 +1323,7 @@ static int flexcan_open(struct net_devic priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); priv->reg_imask1_default = 0; diff --git a/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch b/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch index fcecbbd7a5..dc676ba918 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch @@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde return (u64)iflag2 << 32 | iflag1; } -@@ -1225,8 +1225,8 @@ static int flexcan_chip_start(struct net +@@ -1227,8 +1227,8 @@ static int flexcan_chip_start(struct net /* enable interrupts atomically */ disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); @@ -72,7 +72,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1320,8 +1320,8 @@ static int flexcan_open(struct net_devic +@@ -1322,8 +1322,8 @@ static int flexcan_open(struct net_devic priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); @@ -83,7 +83,7 @@ Signed-off-by: Marc Kleine-Budde priv->offload.mailbox_read = flexcan_mailbox_read; -@@ -1333,12 +1333,12 @@ static int flexcan_open(struct net_devic +@@ -1335,12 +1335,12 @@ static int flexcan_open(struct net_devic imask = GENMASK_ULL(priv->offload.mb_last, priv->offload.mb_first); diff --git a/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch b/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch index a9bef56ea0..84a0b73bb6 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch @@ -34,7 +34,7 @@ Signed-off-by: Marc Kleine-Budde iflag1 = priv->read(®s->iflag1) & priv->rx_mask1; return (u64)iflag2 << 32 | iflag1; -@@ -1226,7 +1225,7 @@ static int flexcan_chip_start(struct net +@@ -1228,7 +1227,7 @@ static int flexcan_chip_start(struct net disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); priv->write(priv->rx_mask1, ®s->imask1); @@ -43,7 +43,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1320,9 +1319,6 @@ static int flexcan_open(struct net_devic +@@ -1322,9 +1321,6 @@ static int flexcan_open(struct net_devic priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); @@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde priv->offload.mailbox_read = flexcan_mailbox_read; if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { -@@ -1333,12 +1329,12 @@ static int flexcan_open(struct net_devic +@@ -1335,12 +1331,12 @@ static int flexcan_open(struct net_devic imask = GENMASK_ULL(priv->offload.mb_last, priv->offload.mb_first); diff --git a/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch b/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch index 348d564de5..4822f95607 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch @@ -70,7 +70,7 @@ Signed-off-by: Marc Kleine-Budde int err, i; struct flexcan_mb __iomem *mb; -@@ -1224,8 +1224,9 @@ static int flexcan_chip_start(struct net +@@ -1226,8 +1226,9 @@ static int flexcan_chip_start(struct net /* enable interrupts atomically */ disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); @@ -82,7 +82,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1322,19 +1323,14 @@ static int flexcan_open(struct net_devic +@@ -1324,19 +1325,14 @@ static int flexcan_open(struct net_devic priv->offload.mailbox_read = flexcan_mailbox_read; if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch b/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch index 49314e3506..0b1bbf880e 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch @@ -71,7 +71,7 @@ Signed-off-by: Marc Kleine-Budde netif_wake_queue(dev); } -@@ -1224,7 +1225,7 @@ static int flexcan_chip_start(struct net +@@ -1226,7 +1227,7 @@ static int flexcan_chip_start(struct net /* enable interrupts atomically */ disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); @@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde priv->write(upper_32_bits(reg_imask), ®s->imask2); priv->write(lower_32_bits(reg_imask), ®s->imask1); enable_irq(dev->irq); -@@ -1319,6 +1320,7 @@ static int flexcan_open(struct net_devic +@@ -1321,6 +1322,7 @@ static int flexcan_open(struct net_devic flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO); priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); diff --git a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch index 1b0c2115cc..d8b9b1e5d6 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch @@ -324,7 +324,7 @@ Signed-off-by: Marc Kleine-Budde u64 reg_imask; int err, i; struct flexcan_mb __iomem *mb; -@@ -1164,6 +1312,26 @@ static int flexcan_chip_start(struct net +@@ -1166,6 +1314,26 @@ static int flexcan_chip_start(struct net netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl); priv->write(reg_ctrl, ®s->ctrl); @@ -351,7 +351,7 @@ Signed-off-by: Marc Kleine-Budde if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) { reg_ctrl2 = priv->read(®s->ctrl2); reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS; -@@ -1304,6 +1472,12 @@ static int flexcan_open(struct net_devic +@@ -1306,6 +1474,12 @@ static int flexcan_open(struct net_devic struct flexcan_priv *priv = netdev_priv(dev); int err; @@ -364,7 +364,7 @@ Signed-off-by: Marc Kleine-Budde err = pm_runtime_get_sync(priv->dev); if (err < 0) { pm_runtime_put_noidle(priv->dev); -@@ -1322,7 +1496,10 @@ static int flexcan_open(struct net_devic +@@ -1324,7 +1498,10 @@ static int flexcan_open(struct net_devic if (err) goto out_transceiver_disable; @@ -376,7 +376,7 @@ Signed-off-by: Marc Kleine-Budde priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) + (sizeof(priv->regs->mb[1]) / priv->mb_size); -@@ -1670,6 +1847,18 @@ static int flexcan_probe(struct platform +@@ -1676,6 +1853,18 @@ static int flexcan_probe(struct platform priv->devtype_data = devtype_data; priv->reg_xceiver = reg_xceiver; diff --git a/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch b/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch index 5357b57893..3ff0d65d11 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch @@ -31,7 +31,7 @@ Signed-off-by: Marc Kleine-Budde /* FLEXCAN memory error control register (MECR) bits */ #define FLEXCAN_MECR_ECRWRDIS BIT(31) -@@ -1324,6 +1325,7 @@ static int flexcan_chip_start(struct net +@@ -1326,6 +1327,7 @@ static int flexcan_chip_start(struct net reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE; reg_fdctrl &= ~(FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3)); reg_mcr = priv->read(®s->mcr) & ~FLEXCAN_MCR_FDEN; @@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde /* support BRS when set CAN FD mode * 64 bytes payload per MB and 7 MBs per RAM block by default -@@ -1333,10 +1335,14 @@ static int flexcan_chip_start(struct net +@@ -1335,10 +1337,14 @@ static int flexcan_chip_start(struct net reg_fdctrl |= FLEXCAN_FDCTRL_FDRATE; reg_fdctrl |= FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3); reg_mcr |= FLEXCAN_MCR_FDEN; @@ -54,7 +54,7 @@ Signed-off-by: Marc Kleine-Budde } if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) { -@@ -1856,7 +1862,7 @@ static int flexcan_probe(struct platform +@@ -1862,7 +1868,7 @@ static int flexcan_probe(struct platform if (priv->devtype_data->quirks & FLEXCAN_QUIRK_TIMESTAMP_SUPPORT_FD) { if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch b/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch index 0b3a1bc9b6..7efa29e1d0 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch @@ -60,7 +60,7 @@ Signed-off-by: Marc Kleine-Budde if (bt->brp != dbt->brp) netdev_warn(dev, "Warning!! data brp = %d and brp = %d don't match.\n" "flexcan may not work. consider using different bitrate or data bitrate\n", -@@ -1323,6 +1339,7 @@ static int flexcan_chip_start(struct net +@@ -1325,6 +1341,7 @@ static int flexcan_chip_start(struct net /* FDCTRL */ if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD) { reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE; diff --git a/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch b/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch index a82162f5c4..aacf2782e0 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch @@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde static const struct flexcan_devtype_data fsl_vf610_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | -@@ -1763,6 +1770,7 @@ out_put_node: +@@ -1769,6 +1776,7 @@ out_put_node: } static const struct of_device_id flexcan_of_match[] = { diff --git a/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch b/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch index 3cccea3c94..1fc212d1b7 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch @@ -35,7 +35,7 @@ Signed-off-by: Marc Kleine-Budde static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, -@@ -1779,6 +1786,7 @@ static const struct of_device_id flexcan +@@ -1785,6 +1792,7 @@ static const struct of_device_id flexcan { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, }, { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, }, diff --git a/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch b/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch index bc0d8b3aef..85164096f3 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch @@ -28,7 +28,7 @@ Signed-off-by: Joakim Zhang #include #define DRV_NAME "flexcan" -@@ -1959,9 +1960,7 @@ static int __maybe_unused flexcan_suspen +@@ -1965,9 +1966,7 @@ static int __maybe_unused flexcan_suspen if (err) return err; } else { @@ -39,7 +39,7 @@ Signed-off-by: Joakim Zhang } netif_stop_queue(dev); netif_device_detach(dev); -@@ -1987,7 +1986,9 @@ static int __maybe_unused flexcan_resume +@@ -1993,7 +1992,9 @@ static int __maybe_unused flexcan_resume if (err) return err; } else { diff --git a/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch b/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch index 185ea9f21b..c3c43394ff 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch @@ -126,7 +126,7 @@ Signed-off-by: Joakim Zhang reg_mcr = priv->read(®s->mcr); -@@ -1770,11 +1814,6 @@ static int flexcan_setup_stop_mode(struc +@@ -1776,11 +1820,6 @@ static int flexcan_setup_stop_mode(struc gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit, priv->stm.ack_gpr, priv->stm.ack_bit); @@ -138,7 +138,7 @@ Signed-off-by: Joakim Zhang return 0; out_put_node: -@@ -1782,6 +1821,30 @@ out_put_node: +@@ -1788,6 +1827,30 @@ out_put_node: return ret; } @@ -169,7 +169,7 @@ Signed-off-by: Joakim Zhang static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, }, { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, -@@ -1924,9 +1987,19 @@ static int flexcan_probe(struct platform +@@ -1930,9 +1993,19 @@ static int flexcan_probe(struct platform devm_can_led_init(dev); if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch b/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch index e43b5365a6..657082caec 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch @@ -36,7 +36,7 @@ Reviewed-by: Leonard Crestez static const struct can_bittiming_const flexcan_bittiming_const = { .name = DRV_NAME, .tseg1_min = 4, -@@ -1856,6 +1861,8 @@ static const struct of_device_id flexcan +@@ -1862,6 +1867,8 @@ static const struct of_device_id flexcan { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, }, { .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, }, diff --git a/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch b/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch index 0a2ca6465a..bdc8725399 100644 --- a/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch +++ b/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch @@ -64,7 +64,7 @@ Signed-off-by: Laurentiu Tudor if (writable) pte = kvm_s2pte_mkwrite(pte); -@@ -2362,7 +2364,7 @@ int kvm_arch_prepare_memory_region(struc +@@ -2361,7 +2363,7 @@ int kvm_arch_prepare_memory_region(struc ret = kvm_phys_addr_ioremap(kvm, gpa, pa, vm_end - vm_start, diff --git a/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch b/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch index 91f48a78bc..1b36b61e62 100644 --- a/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch +++ b/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch @@ -105,7 +105,7 @@ Signed-off-by: Diana Craciun if (kvm_is_device_pfn(pfn)) { mem_type = PAGE_S2_DEVICE; flags |= KVM_S2PTE_FLAG_IS_IOMAP; -@@ -2352,6 +2396,9 @@ int kvm_arch_prepare_memory_region(struc +@@ -2351,6 +2395,9 @@ int kvm_arch_prepare_memory_region(struc gpa_t gpa = mem->guest_phys_addr + (vm_start - mem->userspace_addr); phys_addr_t pa; @@ -115,7 +115,7 @@ Signed-off-by: Diana Craciun pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; pa += vm_start - vma->vm_start; -@@ -2362,9 +2409,13 @@ int kvm_arch_prepare_memory_region(struc +@@ -2361,9 +2408,13 @@ int kvm_arch_prepare_memory_region(struc goto out; } 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 8ec95a9855..0334e72d9e 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 @@ -42,7 +42,7 @@ Signed-off-by: Peter Chen retval = xhci_enter_test_mode(xhci, test_mode, wIndex, --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3591,6 +3591,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3592,6 +3592,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * return 0; } @@ -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 -@@ -5364,6 +5364,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5372,6 +5372,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, @@ -184,7 +184,7 @@ Signed-off-by: Peter Chen void xhci_init_driver(struct hc_driver *drv, --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -2149,6 +2149,16 @@ int xhci_find_raw_port_number(struct usb +@@ -2150,6 +2150,16 @@ int xhci_find_raw_port_number(struct usb struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd); void xhci_hc_died(struct xhci_hcd *xhci); 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 6eb43e961e..40d6399439 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 @@ -39,4 +39,4 @@ Signed-off-by: Peter Chen +#define XHCI_CDNS_HOST BIT_ULL(36) #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) - + #define XHCI_NO_SOFT_RETRY BIT_ULL(40) 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 daef61c4d6..2f1d183853 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 -@@ -5385,6 +5385,8 @@ void xhci_init_driver(struct hc_driver * +@@ -5393,6 +5393,8 @@ void xhci_init_driver(struct hc_driver * drv->check_bandwidth = over->check_bandwidth; if (over->reset_bandwidth) drv->reset_bandwidth = over->reset_bandwidth; @@ -35,7 +35,7 @@ Signed-off-by: Peter Chen EXPORT_SYMBOL_GPL(xhci_init_driver); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1915,6 +1915,7 @@ struct xhci_driver_overrides { +@@ -1916,6 +1916,7 @@ struct xhci_driver_overrides { int (*start)(struct usb_hcd *hcd); int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); diff --git a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch index d203c75460..87459ea6a2 100644 --- a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch +++ b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch @@ -64,7 +64,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1452,7 +1452,9 @@ static void mt7530_phylink_mac_link_down +@@ -1450,7 +1450,9 @@ static void mt7530_phylink_mac_link_down static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, diff --git a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch index ae153847dc..de5b260778 100644 --- a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch +++ b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -490,17 +490,6 @@ mt7530_mib_reset(struct dsa_switch *ds) +@@ -488,17 +488,6 @@ mt7530_mib_reset(struct dsa_switch *ds) mt7530_write(priv, MT7530_MIB_CCR, CCR_MIB_ACTIVATE); } @@ -33,7 +33,7 @@ Signed-off-by: David S. Miller static int mt7530_phy_read(struct dsa_switch *ds, int port, int regnum) { struct mt7530_priv *priv = ds->priv; -@@ -674,7 +663,7 @@ mt7530_port_enable(struct dsa_switch *ds +@@ -672,7 +661,7 @@ mt7530_port_enable(struct dsa_switch *ds priv->ports[port].enable = true; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, priv->ports[port].pm); @@ -42,7 +42,7 @@ Signed-off-by: David S. Miller mutex_unlock(&priv->reg_mutex); -@@ -697,7 +686,7 @@ mt7530_port_disable(struct dsa_switch *d +@@ -695,7 +684,7 @@ mt7530_port_disable(struct dsa_switch *d priv->ports[port].enable = false; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, PCR_MATRIX_CLR); @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller mutex_unlock(&priv->reg_mutex); } -@@ -1407,8 +1396,7 @@ static void mt7530_phylink_mac_config(st +@@ -1405,8 +1394,7 @@ static void mt7530_phylink_mac_config(st mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN | PMCR_BACKPR_EN | PMCR_FORCE_MODE; -@@ -1416,26 +1404,6 @@ static void mt7530_phylink_mac_config(st +@@ -1414,26 +1402,6 @@ static void mt7530_phylink_mac_config(st if (port == 5 && dsa_is_user_port(ds, 5)) mcr_new |= PMCR_EXT_PHY; @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller if (mcr_new != mcr_cur) mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } -@@ -1446,7 +1414,7 @@ static void mt7530_phylink_mac_link_down +@@ -1444,7 +1412,7 @@ static void mt7530_phylink_mac_link_down { struct mt7530_priv *priv = ds->priv; @@ -97,7 +97,7 @@ Signed-off-by: David S. Miller } static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port, -@@ -1457,8 +1425,31 @@ static void mt7530_phylink_mac_link_up(s +@@ -1455,8 +1423,31 @@ static void mt7530_phylink_mac_link_up(s bool tx_pause, bool rx_pause) { struct mt7530_priv *priv = ds->priv; diff --git a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch index b86c5b8283..04189e8e31 100644 --- a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch +++ b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch @@ -47,7 +47,7 @@ Signed-off-by: Sean Wang return -EINVAL; } -@@ -1344,12 +1346,11 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1342,12 +1344,11 @@ mt7530_setup(struct dsa_switch *ds) return 0; } @@ -63,7 +63,7 @@ Signed-off-by: Sean Wang switch (port) { case 0: /* Internal phy */ -@@ -1358,33 +1359,114 @@ static void mt7530_phylink_mac_config(st +@@ -1356,33 +1357,114 @@ static void mt7530_phylink_mac_config(st case 3: case 4: if (state->interface != PHY_INTERFACE_MODE_GMII) @@ -189,7 +189,7 @@ Signed-off-by: Sean Wang return; } -@@ -1452,61 +1534,44 @@ static void mt7530_phylink_mac_link_up(s +@@ -1450,61 +1532,44 @@ static void mt7530_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -274,7 +274,7 @@ Signed-off-by: Sean Wang phylink_set(mask, Pause); phylink_set(mask, Asym_Pause); -@@ -1602,12 +1667,45 @@ static int mt7530_set_mac_eee(struct dsa +@@ -1600,12 +1665,45 @@ static int mt7530_set_mac_eee(struct dsa return 0; } @@ -323,7 +323,7 @@ Signed-off-by: Sean Wang .get_ethtool_stats = mt7530_get_ethtool_stats, .get_sset_count = mt7530_get_sset_count, .port_enable = mt7530_port_enable, -@@ -1624,18 +1722,43 @@ static const struct dsa_switch_ops mt753 +@@ -1622,18 +1720,43 @@ static const struct dsa_switch_ops mt753 .port_vlan_del = mt7530_port_vlan_del, .port_mirror_add = mt7530_port_mirror_add, .port_mirror_del = mt7530_port_mirror_del, @@ -372,7 +372,7 @@ Signed-off-by: Sean Wang { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mt7530_of_match); -@@ -1673,8 +1796,21 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -1671,8 +1794,21 @@ mt7530_probe(struct mdio_device *mdiodev /* Get the hardware identifier from the devicetree node. * We will need it for some of the clock and regulator setup. */ diff --git a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch index 1e6126eb7f..9333f03aaf 100644 --- a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch +++ b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch @@ -41,7 +41,7 @@ Signed-off-by: Sean Wang _mt7530_read(struct mt7530_dummy_poll *p) { struct mii_bus *bus = p->priv->bus; -@@ -483,6 +489,108 @@ mt7530_pad_clk_setup(struct dsa_switch * +@@ -481,6 +487,108 @@ mt7530_pad_clk_setup(struct dsa_switch * return 0; } @@ -150,7 +150,7 @@ Signed-off-by: Sean Wang static void mt7530_mib_reset(struct dsa_switch *ds) { -@@ -507,6 +615,217 @@ static int mt7530_phy_write(struct dsa_s +@@ -505,6 +613,217 @@ static int mt7530_phy_write(struct dsa_s return mdiobus_write_nested(priv->bus, port, regnum, val); } @@ -368,7 +368,7 @@ Signed-off-by: Sean Wang static void mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data) -@@ -623,9 +942,14 @@ unlock_exit: +@@ -621,9 +940,14 @@ unlock_exit: } static int @@ -385,7 +385,7 @@ Signed-off-by: Sean Wang /* Enable Mediatek header mode on the cpu port */ mt7530_write(priv, MT7530_PVC_P(port), PORT_SPEC_TAG); -@@ -638,7 +962,7 @@ mt7530_cpu_port_enable(struct mt7530_pri +@@ -636,7 +960,7 @@ mt7530_cpu_port_enable(struct mt7530_pri mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port)); /* CPU port gets connected to all user ports of @@ -394,7 +394,7 @@ Signed-off-by: Sean Wang */ mt7530_write(priv, MT7530_PCR_P(port), PCR_MATRIX(dsa_user_ports(priv->ds))); -@@ -1132,27 +1456,42 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1130,27 +1454,42 @@ mt7530_port_vlan_del(struct dsa_switch * return 0; } @@ -444,7 +444,7 @@ Signed-off-by: Sean Wang val = mt7530_read(priv, MT7530_PCR_P(port)); if (ingress) { -@@ -1167,7 +1506,7 @@ static int mt7530_port_mirror_add(struct +@@ -1165,7 +1504,7 @@ static int mt7530_port_mirror_add(struct return 0; } @@ -453,7 +453,7 @@ Signed-off-by: Sean Wang struct dsa_mall_mirror_tc_entry *mirror) { struct mt7530_priv *priv = ds->priv; -@@ -1184,9 +1523,9 @@ static void mt7530_port_mirror_del(struc +@@ -1182,9 +1521,9 @@ static void mt7530_port_mirror_del(struc mt7530_write(priv, MT7530_PCR_P(port), val); if (!priv->mirror_rx && !priv->mirror_tx) { @@ -466,7 +466,7 @@ Signed-off-by: Sean Wang } } -@@ -1292,7 +1631,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1290,7 +1629,7 @@ mt7530_setup(struct dsa_switch *ds) PCR_MATRIX_CLR); if (dsa_is_cpu_port(ds, i)) @@ -475,7 +475,7 @@ Signed-off-by: Sean Wang else mt7530_port_disable(ds, i); -@@ -1346,6 +1685,118 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1344,6 +1683,118 @@ mt7530_setup(struct dsa_switch *ds) return 0; } @@ -594,7 +594,7 @@ Signed-off-by: Sean Wang static bool mt7530_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -1384,6 +1835,47 @@ unsupported: +@@ -1382,6 +1833,47 @@ unsupported: return false; } @@ -642,7 +642,7 @@ Signed-off-by: Sean Wang static bool mt753x_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -1416,6 +1908,227 @@ mt7530_mac_config(struct dsa_switch *ds, +@@ -1414,6 +1906,227 @@ mt7530_mac_config(struct dsa_switch *ds, return 0; } @@ -870,7 +870,7 @@ Signed-off-by: Sean Wang static int mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) -@@ -1451,6 +2164,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -1449,6 +2162,8 @@ mt753x_phylink_mac_config(struct dsa_swi if (mt753x_mac_config(ds, port, mode, state) < 0) goto unsupported; @@ -879,7 +879,7 @@ Signed-off-by: Sean Wang break; case 6: /* 1st cpu port */ if (priv->p6_interface == state->interface) -@@ -1470,7 +2185,8 @@ unsupported: +@@ -1468,7 +2183,8 @@ unsupported: return; } @@ -889,7 +889,7 @@ Signed-off-by: Sean Wang dev_err(ds->dev, "%s: in-band negotiation unsupported\n", __func__); return; -@@ -1480,7 +2196,7 @@ unsupported: +@@ -1478,7 +2194,7 @@ unsupported: mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN | @@ -898,7 +898,7 @@ Signed-off-by: Sean Wang /* Are we connected to external phy */ if (port == 5 && dsa_is_user_port(ds, 5)) -@@ -1490,7 +2206,18 @@ unsupported: +@@ -1488,7 +2204,18 @@ unsupported: mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } @@ -918,7 +918,7 @@ Signed-off-by: Sean Wang unsigned int mode, phy_interface_t interface) { -@@ -1499,7 +2226,19 @@ static void mt7530_phylink_mac_link_down +@@ -1497,7 +2224,19 @@ static void mt7530_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -939,7 +939,7 @@ Signed-off-by: Sean Wang unsigned int mode, phy_interface_t interface, struct phy_device *phydev, -@@ -1509,18 +2248,29 @@ static void mt7530_phylink_mac_link_up(s +@@ -1507,18 +2246,29 @@ static void mt7530_phylink_mac_link_up(s struct mt7530_priv *priv = ds->priv; u32 mcr; @@ -971,7 +971,7 @@ Signed-off-by: Sean Wang break; } if (duplex == DUPLEX_FULL) { -@@ -1534,6 +2284,45 @@ static void mt7530_phylink_mac_link_up(s +@@ -1532,6 +2282,45 @@ static void mt7530_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -1017,7 +1017,7 @@ Signed-off-by: Sean Wang static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, unsigned long *supported) -@@ -1542,6 +2331,14 @@ mt7530_mac_port_validate(struct dsa_swit +@@ -1540,6 +2329,14 @@ mt7530_mac_port_validate(struct dsa_swit phylink_set(supported, 1000baseX_Full); } @@ -1032,7 +1032,7 @@ Signed-off-by: Sean Wang static void mt753x_phylink_validate(struct dsa_switch *ds, int port, unsigned long *supported, -@@ -1558,7 +2355,8 @@ mt753x_phylink_validate(struct dsa_switc +@@ -1556,7 +2353,8 @@ mt753x_phylink_validate(struct dsa_switc phylink_set_port_modes(mask); @@ -1042,7 +1042,7 @@ Signed-off-by: Sean Wang phylink_set(mask, 10baseT_Half); phylink_set(mask, 10baseT_Full); phylink_set(mask, 100baseT_Half); -@@ -1577,6 +2375,11 @@ mt753x_phylink_validate(struct dsa_switc +@@ -1575,6 +2373,11 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); @@ -1054,7 +1054,7 @@ Signed-off-by: Sean Wang } static int -@@ -1667,6 +2470,63 @@ static int mt7530_set_mac_eee(struct dsa +@@ -1665,6 +2468,63 @@ static int mt7530_set_mac_eee(struct dsa return 0; } @@ -1118,7 +1118,7 @@ Signed-off-by: Sean Wang static int mt753x_phylink_mac_link_state(struct dsa_switch *ds, int port, struct phylink_link_state *state) -@@ -1720,13 +2580,14 @@ static const struct dsa_switch_ops mt753 +@@ -1718,13 +2578,14 @@ static const struct dsa_switch_ops mt753 .port_vlan_prepare = mt7530_port_vlan_prepare, .port_vlan_add = mt7530_port_vlan_add, .port_vlan_del = mt7530_port_vlan_del, @@ -1137,7 +1137,7 @@ Signed-off-by: Sean Wang .get_mac_eee = mt7530_get_mac_eee, .set_mac_eee = mt7530_set_mac_eee, }; -@@ -1754,11 +2615,26 @@ static const struct mt753x_info mt753x_t +@@ -1752,11 +2613,26 @@ static const struct mt753x_info mt753x_t .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, diff --git a/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch index a31d1ac3a6..c19cfd322d 100644 --- a/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch +++ b/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -546,7 +546,10 @@ static int phy_check_link_status(struct +@@ -547,7 +547,10 @@ static int phy_check_link_status(struct phy_link_up(phydev); } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev->state = PHY_NOLINK; @@ -23,7 +23,7 @@ Signed-off-by: John Crispin } return 0; -@@ -926,7 +929,10 @@ void phy_state_machine(struct work_struc +@@ -927,7 +930,10 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; From 46c0634b508f731df487a7909c439b2794445e26 Mon Sep 17 00:00:00 2001 From: Walter Sonius Date: Sun, 21 Mar 2021 20:06:33 +0100 Subject: [PATCH 55/61] ath79: fix lan port display order for sitecom wlr-7100 Physical port order watched from the back of the device is: 4 / 3 / 2 / 1 / WAN which also matches corresponding leds. This patch corrects LuCI switch webpage LAN port order. Signed-off-by: Walter Sonius [improve commit title, fix sorting in 02_network] Signed-off-by: Adrian Schmutzler --- target/linux/ath79/generic/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 86be2b12d7..aa5a336c57 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -223,6 +223,7 @@ ath79_setup_interfaces() dlink,dir-842-c3|\ dlink,dir-859-a1|\ engenius,epg5000|\ + sitecom,wlr-7100|\ tplink,archer-c2-v3|\ tplink,tl-wr1043nd-v4|\ tplink,tl-wr1043n-v5) @@ -262,7 +263,6 @@ ath79_setup_interfaces() iodata,wn-ac1600dgr2|\ iodata,wn-ag300dgr|\ pcs,cr5000|\ - sitecom,wlr-7100|\ wd,mynet-n750) ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" From 2b4986b9424872ec8962a34ca38c399aae4a53b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 22 Mar 2021 07:38:06 +0100 Subject: [PATCH 56/61] bcm4908: add MTD support for repartitioning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's required for sysupgrade which requires: 1. Flashing new firmware 2. Finding updated bootfs partition 3. Updating bootfs content Signed-off-by: Rafał Miłecki --- .../401-mtd-support-BLKRRPART.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 target/linux/bcm4908/patches-5.4/401-mtd-support-BLKRRPART.patch diff --git a/target/linux/bcm4908/patches-5.4/401-mtd-support-BLKRRPART.patch b/target/linux/bcm4908/patches-5.4/401-mtd-support-BLKRRPART.patch new file mode 100644 index 0000000000..70a1896328 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/401-mtd-support-BLKRRPART.patch @@ -0,0 +1,28 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 22 Mar 2021 07:15:17 +0100 +Subject: [PATCH] mtd: support BLKRRPART +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Rescan MTD subpartitions on request. + +Signed-off-by: Rafał Miłecki +--- + +--- a/drivers/mtd/mtdchar.c ++++ b/drivers/mtd/mtdchar.c +@@ -1015,8 +1015,11 @@ static int mtdchar_ioctl(struct file *fi + + case BLKRRPART: + { +- /* No reread partition feature. Just return ok */ +- ret = 0; ++ int nr_parts; ++ ++ del_mtd_partitions(mtd); ++ nr_parts = parse_mtd_partitions(mtd, NULL, NULL); ++ ret = nr_parts < 0 ? nr_parts : 0; + break; + } + } From 13d9904acdd24e002aab3d6c3dd7879826b54008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 22 Mar 2021 07:40:38 +0100 Subject: [PATCH 57/61] bcm4908: backport DTS patch with Ethernet TX IRQ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It allows bcm4908_enet Linux driver to work more efficiently. Signed-off-by: Rafał Miłecki --- ...broadcom-bcm4908-add-Ethernet-TX-irq.patch | 30 +++++++++++++++++++ ...oadcom-bcm4908-limit-amount-of-GPIOs.patch | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 target/linux/bcm4908/patches-5.4/032-v5.13-0010-arm64-dts-broadcom-bcm4908-add-Ethernet-TX-irq.patch diff --git a/target/linux/bcm4908/patches-5.4/032-v5.13-0010-arm64-dts-broadcom-bcm4908-add-Ethernet-TX-irq.patch b/target/linux/bcm4908/patches-5.4/032-v5.13-0010-arm64-dts-broadcom-bcm4908-add-Ethernet-TX-irq.patch new file mode 100644 index 0000000000..9ba30b3a14 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/032-v5.13-0010-arm64-dts-broadcom-bcm4908-add-Ethernet-TX-irq.patch @@ -0,0 +1,30 @@ +From 5337af7918bedde9713cd223ce5df74b3d6c7d7a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 17 Mar 2021 09:16:31 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add Ethernet TX irq +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This hardware supports two interrupts, one per DMA channel (RX and TX). + +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +@@ -116,8 +116,9 @@ + compatible = "brcm,bcm4908-enet"; + reg = <0x2000 0x1000>; + +- interrupts = ; +- interrupt-names = "rx"; ++ interrupts = , ++ ; ++ interrupt-names = "rx", "tx"; + }; + + usb_phy: usb-phy@c200 { diff --git a/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch b/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch index a3494fd2e5..c28c69c6f8 100644 --- a/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch +++ b/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch @@ -12,7 +12,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi -@@ -280,7 +280,7 @@ +@@ -281,7 +281,7 @@ gpio0: gpio-controller@500 { compatible = "brcm,bcm6345-gpio"; reg-names = "dirout", "dat"; From a49fd9db0a2bfad8ea9a09f32fadbd3cc7e46205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 22 Mar 2021 08:09:53 +0100 Subject: [PATCH 58/61] bcm4908: backport the latest bcm_sf2 commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. CFP support for BCM4908 2. Upstream RGMII regs fix Signed-off-by: Rafał Miłecki --- ...-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch | 25 ++++ ...-add-function-finding-RGMII-register.patch | 127 ++++++++++++++++++ ...-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch | 56 ++++++++ ...m_sf2-enable-GPHY-for-switch-probing.patch | 2 +- ...sf2-keep-GPHY-enabled-on-the-BCM4908.patch | 2 +- ...quick-fix-for-RGMII-reg-access-on-BC.patch | 109 --------------- 6 files changed, 210 insertions(+), 111 deletions(-) create mode 100644 target/linux/bcm4908/patches-5.4/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch create mode 100644 target/linux/bcm4908/patches-5.4/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch create mode 100644 target/linux/bcm4908/patches-5.4/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch delete mode 100644 target/linux/bcm4908/patches-5.4/702-net-dsa-bcm_sf2-quick-fix-for-RGMII-reg-access-on-BC.patch diff --git a/target/linux/bcm4908/patches-5.4/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch b/target/linux/bcm4908/patches-5.4/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch new file mode 100644 index 0000000000..0e0802b491 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch @@ -0,0 +1,25 @@ +From f4e6d7cdbfae502788bc468295b232dec76ee57e Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Fri, 12 Mar 2021 13:11:01 -0800 +Subject: [PATCH] net: dsa: bcm_sf2: Fill in BCM4908 CFP entries + +The BCM4908 switch has 256 CFP entrie, update that setting so CFP can be +used. + +Signed-off-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/dsa/bcm_sf2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/dsa/bcm_sf2.c ++++ b/drivers/net/dsa/bcm_sf2.c +@@ -1063,7 +1063,7 @@ static const struct bcm_sf2_of_data bcm_ + .type = BCM4908_DEVICE_ID, + .core_reg_align = 0, + .reg_offsets = bcm_sf2_4908_reg_offsets, +- .num_cfp_rules = 0, /* FIXME */ ++ .num_cfp_rules = 256, + .num_crossbar_int_ports = 2, + }; + diff --git a/target/linux/bcm4908/patches-5.4/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch b/target/linux/bcm4908/patches-5.4/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch new file mode 100644 index 0000000000..c7003f640b --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch @@ -0,0 +1,127 @@ +From 55cfeb396965c3906a84d09a9c487d065e37773b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 18 Mar 2021 09:01:42 +0100 +Subject: [PATCH 1/2] net: dsa: bcm_sf2: add function finding RGMII register +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Simple macro like REG_RGMII_CNTRL_P() is insufficient as: +1. It doesn't validate port argument +2. It doesn't support chipsets with non-lineral RGMII regs layout + +Missing port validation could result in getting register offset from out +of array. Random memory -> random offset -> random reads/writes. It +affected e.g. BCM4908 for REG_RGMII_CNTRL_P(7). + +Fixes: a78e86ed586d ("net: dsa: bcm_sf2: Prepare for different register layouts") +Signed-off-by: Rafał Miłecki +Acked-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/dsa/bcm_sf2.c | 49 +++++++++++++++++++++++++++++----- + drivers/net/dsa/bcm_sf2_regs.h | 2 -- + 2 files changed, 42 insertions(+), 9 deletions(-) + +--- a/drivers/net/dsa/bcm_sf2.c ++++ b/drivers/net/dsa/bcm_sf2.c +@@ -31,6 +31,31 @@ + #include "b53/b53_priv.h" + #include "b53/b53_regs.h" + ++static u16 bcm_sf2_reg_rgmii_cntrl(struct bcm_sf2_priv *priv, int port) ++{ ++ switch (priv->type) { ++ case BCM4908_DEVICE_ID: ++ /* TODO */ ++ break; ++ default: ++ switch (port) { ++ case 0: ++ return REG_RGMII_0_CNTRL; ++ case 1: ++ return REG_RGMII_1_CNTRL; ++ case 2: ++ return REG_RGMII_2_CNTRL; ++ default: ++ break; ++ } ++ } ++ ++ WARN_ONCE(1, "Unsupported port %d\n", port); ++ ++ /* RO fallback reg */ ++ return REG_SWITCH_STATUS; ++} ++ + static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port) + { + struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); +@@ -591,6 +616,7 @@ static void bcm_sf2_sw_mac_config(struct + { + struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); + u32 id_mode_dis = 0, port_mode; ++ u32 reg_rgmii_ctrl; + u32 reg, offset; + + if (port == core_readl(priv, CORE_IMP0_PRT_ID)) +@@ -620,10 +646,12 @@ static void bcm_sf2_sw_mac_config(struct + goto force_link; + } + ++ reg_rgmii_ctrl = bcm_sf2_reg_rgmii_cntrl(priv, port); ++ + /* Clear id_mode_dis bit, and the existing port mode, let + * RGMII_MODE_EN bet set by mac_link_{up,down} + */ +- reg = reg_readl(priv, REG_RGMII_CNTRL_P(port)); ++ reg = reg_readl(priv, reg_rgmii_ctrl); + reg &= ~ID_MODE_DIS; + reg &= ~(PORT_MODE_MASK << PORT_MODE_SHIFT); + reg &= ~(RX_PAUSE_EN | TX_PAUSE_EN); +@@ -638,7 +666,7 @@ static void bcm_sf2_sw_mac_config(struct + reg |= RX_PAUSE_EN; + } + +- reg_writel(priv, reg, REG_RGMII_CNTRL_P(port)); ++ reg_writel(priv, reg, reg_rgmii_ctrl); + + force_link: + /* Force link settings detected from the PHY */ +@@ -664,6 +692,7 @@ static void bcm_sf2_sw_mac_link_set(stru + phy_interface_t interface, bool link) + { + struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); ++ u32 reg_rgmii_ctrl; + u32 reg; + + if (!phy_interface_mode_is_rgmii(interface) && +@@ -671,13 +700,15 @@ static void bcm_sf2_sw_mac_link_set(stru + interface != PHY_INTERFACE_MODE_REVMII) + return; + ++ reg_rgmii_ctrl = bcm_sf2_reg_rgmii_cntrl(priv, port); ++ + /* If the link is down, just disable the interface to conserve power */ +- reg = reg_readl(priv, REG_RGMII_CNTRL_P(port)); ++ reg = reg_readl(priv, reg_rgmii_ctrl); + if (link) + reg |= RGMII_MODE_EN; + else + reg &= ~RGMII_MODE_EN; +- reg_writel(priv, reg, REG_RGMII_CNTRL_P(port)); ++ reg_writel(priv, reg, reg_rgmii_ctrl); + } + + static void bcm_sf2_sw_mac_link_down(struct dsa_switch *ds, int port, +--- a/drivers/net/dsa/bcm_sf2_regs.h ++++ b/drivers/net/dsa/bcm_sf2_regs.h +@@ -55,8 +55,6 @@ enum bcm_sf2_reg_offs { + #define CROSSBAR_BCM4908_EXT_GPHY4 1 + #define CROSSBAR_BCM4908_EXT_RGMII 2 + +-#define REG_RGMII_CNTRL_P(x) (REG_RGMII_0_CNTRL + (x)) +- + /* Relative to REG_RGMII_CNTRL */ + #define RGMII_MODE_EN (1 << 0) + #define ID_MODE_DIS (1 << 1) diff --git a/target/linux/bcm4908/patches-5.4/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch b/target/linux/bcm4908/patches-5.4/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch new file mode 100644 index 0000000000..8749eef691 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch @@ -0,0 +1,56 @@ +From 6859d91549341c2ad769d482de58129f080c0f04 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 18 Mar 2021 09:01:43 +0100 +Subject: [PATCH 2/2] net: dsa: bcm_sf2: fix BCM4908 RGMII reg(s) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 has only 1 RGMII reg for controlling port 7. + +Fixes: 73b7a6047971 ("net: dsa: bcm_sf2: support BCM4908's integrated switch") +Signed-off-by: Rafał Miłecki +Acked-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/dsa/bcm_sf2.c | 11 +++++++---- + drivers/net/dsa/bcm_sf2_regs.h | 1 + + 2 files changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/net/dsa/bcm_sf2.c ++++ b/drivers/net/dsa/bcm_sf2.c +@@ -35,7 +35,12 @@ static u16 bcm_sf2_reg_rgmii_cntrl(struc + { + switch (priv->type) { + case BCM4908_DEVICE_ID: +- /* TODO */ ++ switch (port) { ++ case 7: ++ return REG_RGMII_11_CNTRL; ++ default: ++ break; ++ } + break; + default: + switch (port) { +@@ -1082,9 +1087,7 @@ static const u16 bcm_sf2_4908_reg_offset + [REG_PHY_REVISION] = 0x14, + [REG_SPHY_CNTRL] = 0x24, + [REG_CROSSBAR] = 0xc8, +- [REG_RGMII_0_CNTRL] = 0xe0, +- [REG_RGMII_1_CNTRL] = 0xec, +- [REG_RGMII_2_CNTRL] = 0xf8, ++ [REG_RGMII_11_CNTRL] = 0x014c, + [REG_LED_0_CNTRL] = 0x40, + [REG_LED_1_CNTRL] = 0x4c, + [REG_LED_2_CNTRL] = 0x58, +--- a/drivers/net/dsa/bcm_sf2_regs.h ++++ b/drivers/net/dsa/bcm_sf2_regs.h +@@ -21,6 +21,7 @@ enum bcm_sf2_reg_offs { + REG_RGMII_0_CNTRL, + REG_RGMII_1_CNTRL, + REG_RGMII_2_CNTRL, ++ REG_RGMII_11_CNTRL, + REG_LED_0_CNTRL, + REG_LED_1_CNTRL, + REG_LED_2_CNTRL, diff --git a/target/linux/bcm4908/patches-5.4/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch b/target/linux/bcm4908/patches-5.4/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch index 7ba7f73f15..8890c00c09 100644 --- a/target/linux/bcm4908/patches-5.4/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch +++ b/target/linux/bcm4908/patches-5.4/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch @@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1290,10 +1290,14 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1324,10 +1324,14 @@ static int bcm_sf2_sw_probe(struct platf rev = reg_readl(priv, REG_PHY_REVISION); priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK; diff --git a/target/linux/bcm4908/patches-5.4/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch b/target/linux/bcm4908/patches-5.4/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch index da5fec8022..11cbc23455 100644 --- a/target/linux/bcm4908/patches-5.4/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch +++ b/target/linux/bcm4908/patches-5.4/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch @@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1304,6 +1304,12 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1338,6 +1338,12 @@ static int bcm_sf2_sw_probe(struct platf priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff, priv->irq0, priv->irq1); diff --git a/target/linux/bcm4908/patches-5.4/702-net-dsa-bcm_sf2-quick-fix-for-RGMII-reg-access-on-BC.patch b/target/linux/bcm4908/patches-5.4/702-net-dsa-bcm_sf2-quick-fix-for-RGMII-reg-access-on-BC.patch deleted file mode 100644 index 49b1ef68a3..0000000000 --- a/target/linux/bcm4908/patches-5.4/702-net-dsa-bcm_sf2-quick-fix-for-RGMII-reg-access-on-BC.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 7e2dc41c745f6d9c571919d98abed2d783fce8fb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sun, 14 Mar 2021 22:43:32 +0100 -Subject: [PATCH] net: dsa: bcm_sf2: quick fix for RGMII reg access on BCM4908 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -BCM4908 has only 1 RGMII register and it's used for port 7. - -Signed-off-by: Rafał Miłecki ---- - drivers/net/dsa/bcm_sf2.c | 30 +++++++++++++++++++++++------- - drivers/net/dsa/bcm_sf2_regs.h | 1 + - 2 files changed, 24 insertions(+), 7 deletions(-) - ---- a/drivers/net/dsa/bcm_sf2.c -+++ b/drivers/net/dsa/bcm_sf2.c -@@ -592,10 +592,19 @@ static void bcm_sf2_sw_mac_config(struct - struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); - u32 id_mode_dis = 0, port_mode; - u32 reg, offset; -+ u32 rgmii_ctrl; - - if (port == core_readl(priv, CORE_IMP0_PRT_ID)) - return; - -+ if (priv->type == BCM4908_DEVICE_ID) { -+ if (port != 7) -+ return; -+ rgmii_ctrl = REG_RGMII_11_CNTRL; -+ } else { -+ rgmii_ctrl = REG_RGMII_CNTRL_P(port); -+ } -+ - if (priv->type == BCM4908_DEVICE_ID || - priv->type == BCM7445_DEVICE_ID) - offset = CORE_STS_OVERRIDE_GMIIP_PORT(port); -@@ -623,7 +632,7 @@ static void bcm_sf2_sw_mac_config(struct - /* Clear id_mode_dis bit, and the existing port mode, let - * RGMII_MODE_EN bet set by mac_link_{up,down} - */ -- reg = reg_readl(priv, REG_RGMII_CNTRL_P(port)); -+ reg = reg_readl(priv, rgmii_ctrl); - reg &= ~ID_MODE_DIS; - reg &= ~(PORT_MODE_MASK << PORT_MODE_SHIFT); - reg &= ~(RX_PAUSE_EN | TX_PAUSE_EN); -@@ -638,7 +647,7 @@ static void bcm_sf2_sw_mac_config(struct - reg |= RX_PAUSE_EN; - } - -- reg_writel(priv, reg, REG_RGMII_CNTRL_P(port)); -+ reg_writel(priv, reg, rgmii_ctrl); - - force_link: - /* Force link settings detected from the PHY */ -@@ -664,6 +673,7 @@ static void bcm_sf2_sw_mac_link_set(stru - phy_interface_t interface, bool link) - { - struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); -+ u32 rgmii_ctrl; - u32 reg; - - if (!phy_interface_mode_is_rgmii(interface) && -@@ -671,13 +681,21 @@ static void bcm_sf2_sw_mac_link_set(stru - interface != PHY_INTERFACE_MODE_REVMII) - return; - -+ if (priv->type == BCM4908_DEVICE_ID) { -+ if (port != 7) -+ return; -+ rgmii_ctrl = REG_RGMII_11_CNTRL; -+ } else { -+ rgmii_ctrl = REG_RGMII_CNTRL_P(port); -+ } -+ - /* If the link is down, just disable the interface to conserve power */ -- reg = reg_readl(priv, REG_RGMII_CNTRL_P(port)); -+ reg = reg_readl(priv, rgmii_ctrl); - if (link) - reg |= RGMII_MODE_EN; - else - reg &= ~RGMII_MODE_EN; -- reg_writel(priv, reg, REG_RGMII_CNTRL_P(port)); -+ reg_writel(priv, reg, rgmii_ctrl); - } - - static void bcm_sf2_sw_mac_link_down(struct dsa_switch *ds, int port, -@@ -1051,9 +1069,7 @@ static const u16 bcm_sf2_4908_reg_offset - [REG_PHY_REVISION] = 0x14, - [REG_SPHY_CNTRL] = 0x24, - [REG_CROSSBAR] = 0xc8, -- [REG_RGMII_0_CNTRL] = 0xe0, -- [REG_RGMII_1_CNTRL] = 0xec, -- [REG_RGMII_2_CNTRL] = 0xf8, -+ [REG_RGMII_11_CNTRL] = 0x014c, - [REG_LED_0_CNTRL] = 0x40, - [REG_LED_1_CNTRL] = 0x4c, - [REG_LED_2_CNTRL] = 0x58, ---- a/drivers/net/dsa/bcm_sf2_regs.h -+++ b/drivers/net/dsa/bcm_sf2_regs.h -@@ -21,6 +21,7 @@ enum bcm_sf2_reg_offs { - REG_RGMII_0_CNTRL, - REG_RGMII_1_CNTRL, - REG_RGMII_2_CNTRL, -+ REG_RGMII_11_CNTRL, - REG_LED_0_CNTRL, - REG_LED_1_CNTRL, - REG_LED_2_CNTRL, From 6a6f9e73dd65f9201bee911d2fae8595f86c093b Mon Sep 17 00:00:00 2001 From: Mauri Sandberg Date: Thu, 21 May 2020 09:59:52 +0300 Subject: [PATCH 59/61] packages: kernel: add gpio-nxp-74hc153 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NXP 74HC153 is a GPIO expander. Its original source cide sits in ar71xx architecture tree. It has been slightly modified to get GPIO pin configuration from the device tree rather than a MACH file. Changes to the source file: - Remove struct nxp_74hc153_config - in nxp_74hc153_probe(), fetch GPIO configuration from device tree - allow GPIO framework decide the base number by passing -1 to it - remove support for kernel versions below 4.5.0 - add OF device compatibility string Create a package for inclusion in image. References: https://lore.kernel.org/linux-gpio/545111184.50061.1615922388276@ichabod.co-bxl/ Signed-off-by: Mauri Sandberg [added link to driver usptreaming work in progress] Signed-off-by: Petr Štetiar --- package/kernel/gpio-nxp-74hc153/Makefile | 35 +++ package/kernel/gpio-nxp-74hc153/src/Makefile | 1 + .../gpio-nxp-74hc153/src/gpio-nxp-74hc153.c | 291 ++++++++++++++++++ 3 files changed, 327 insertions(+) create mode 100644 package/kernel/gpio-nxp-74hc153/Makefile create mode 100644 package/kernel/gpio-nxp-74hc153/src/Makefile create mode 100644 package/kernel/gpio-nxp-74hc153/src/gpio-nxp-74hc153.c diff --git a/package/kernel/gpio-nxp-74hc153/Makefile b/package/kernel/gpio-nxp-74hc153/Makefile new file mode 100644 index 0000000000..e275a9a856 --- /dev/null +++ b/package/kernel/gpio-nxp-74hc153/Makefile @@ -0,0 +1,35 @@ +# +# Copyright (C) 2020 Mauri Sandberg +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=gpio-nxp-74hc153 +PKG_RELEASE:=1 +PKG_LICENSE:=GPL-2.0 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/gpio-nxp-74hc153 + SUBMENU:=Other modules + TITLE:= NXP 74HC153 GPIO expander + FILES:=$(PKG_BUILD_DIR)/gpio-nxp-74hc153.ko + AUTOLOAD:=$(call AutoLoad,30,gpio-nxp-74hc153,1) + KCONFIG:= + DEPENDS:= @GPIO_SUPPORT @TARGET_ath79 +endef + +define KernelPackage/gpio-nxp-74hc153/description + Platform driver for NXP 74HC153 Dual 4-input Multiplexer. + This provides a GPIO interface supporting input mode only. +endef + +define Build/Compile + $(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules +endef + +$(eval $(call KernelPackage,gpio-nxp-74hc153)) diff --git a/package/kernel/gpio-nxp-74hc153/src/Makefile b/package/kernel/gpio-nxp-74hc153/src/Makefile new file mode 100644 index 0000000000..0a5cc2fdda --- /dev/null +++ b/package/kernel/gpio-nxp-74hc153/src/Makefile @@ -0,0 +1 @@ +obj-m += gpio-nxp-74hc153.o diff --git a/package/kernel/gpio-nxp-74hc153/src/gpio-nxp-74hc153.c b/package/kernel/gpio-nxp-74hc153/src/gpio-nxp-74hc153.c new file mode 100644 index 0000000000..f683547cfd --- /dev/null +++ b/package/kernel/gpio-nxp-74hc153/src/gpio-nxp-74hc153.c @@ -0,0 +1,291 @@ +/* + * NXP 74HC153 - Dual 4-input multiplexer GPIO driver + * + * Copyright (C) 2010 Gabor Juhos + * Copyright (C) 2020 Mauri Sandberg + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Example device tree definition: + * + * gpio-extender { + * compatible = "nxp,74hc153-gpio"; + * gpio-controller; + * #gpio-cells = <2>; + * + * // GPIOs used by this node + * gpio-s0 = <&gpio 9 GPIO_ACTIVE_HIGH>; + * gpio-s1 = <&gpio 11 GPIO_ACTIVE_HIGH>; + * gpio-1y = <&gpio 12 GPIO_ACTIVE_HIGH>; + * gpio-2y = <&gpio 14 GPIO_ACTIVE_HIGH>; + * }; + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#define NXP_74HC153_NUM_GPIOS 8 +#define NXP_74HC153_S0_MASK 0x1 +#define NXP_74HC153_S1_MASK 0x2 +#define NXP_74HC153_BANK_MASK 0x4 + +#define NXP_74HC153_DRIVER_NAME "nxp-74hc153" + +struct nxp_74hc153_config { + unsigned gpio_pin_s0; + unsigned gpio_pin_s1; + unsigned gpio_pin_1y; + unsigned gpio_pin_2y; +}; + +struct nxp_74hc153_chip { + struct device *parent; + struct gpio_chip gpio_chip; + struct mutex lock; + struct nxp_74hc153_config config; +}; + +static struct nxp_74hc153_chip *gpio_to_nxp(struct gpio_chip *gc) +{ + return container_of(gc, struct nxp_74hc153_chip, gpio_chip); +} + +static int nxp_74hc153_direction_input(struct gpio_chip *gc, unsigned offset) +{ + return 0; +} + +static int nxp_74hc153_direction_output(struct gpio_chip *gc, + unsigned offset, int val) +{ + return -EINVAL; +} + +static int nxp_74hc153_get_value(struct gpio_chip *gc, unsigned offset) +{ + struct nxp_74hc153_chip *nxp; + struct nxp_74hc153_platform_data *pdata; + unsigned s0; + unsigned s1; + unsigned pin; + int ret; + + nxp = gpio_to_nxp(gc); + pdata = nxp->parent->platform_data; + + s0 = !!(offset & NXP_74HC153_S0_MASK); + s1 = !!(offset & NXP_74HC153_S1_MASK); + pin = (offset & NXP_74HC153_BANK_MASK) ? nxp->config.gpio_pin_2y + : nxp->config.gpio_pin_1y; + + mutex_lock(&nxp->lock); + gpio_set_value(nxp->config.gpio_pin_s0, s0); + gpio_set_value(nxp->config.gpio_pin_s1, s1); + ret = gpio_get_value(pin); + mutex_unlock(&nxp->lock); + + return ret; +} + +static void nxp_74hc153_set_value(struct gpio_chip *gc, + unsigned offset, int val) +{ + /* not supported */ +} + +static int nxp_74hc153_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + struct nxp_74hc153_chip *nxp; + struct gpio_chip *gc; + int err; + unsigned gpio_s0; + unsigned gpio_s1; + unsigned gpio_1y; + unsigned gpio_2y; + + nxp = kzalloc(sizeof(struct nxp_74hc153_chip), GFP_KERNEL); + if (nxp == NULL) { + dev_err(&pdev->dev, "no memory for private data\n"); + return -ENOMEM; + } + + gpio_s0 = of_get_named_gpio(np, "gpio-s0", 0); + gpio_s1 = of_get_named_gpio(np, "gpio-s1", 0); + gpio_1y = of_get_named_gpio(np, "gpio-1y", 0); + gpio_2y = of_get_named_gpio(np, "gpio-2y", 0); + + if (!gpio_is_valid(gpio_s0) || !gpio_is_valid(gpio_s1) || + !gpio_is_valid(gpio_1y) || !gpio_is_valid(gpio_2y)) { + + dev_err(&pdev->dev, "control GPIO(s) are missing\n"); + err = -EINVAL; + goto err_free_nxp; + } else { + nxp->config.gpio_pin_s0 = gpio_s0; + nxp->config.gpio_pin_s1 = gpio_s1; + nxp->config.gpio_pin_1y = gpio_1y; + nxp->config.gpio_pin_2y = gpio_2y; + } + + // apply pin configuration + err = gpio_request(nxp->config.gpio_pin_s0, dev_name(&pdev->dev)); + if (err) { + dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n", + nxp->config.gpio_pin_s0, err); + goto err_free_nxp; + } + + err = gpio_request(nxp->config.gpio_pin_s1, dev_name(&pdev->dev)); + if (err) { + dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n", + nxp->config.gpio_pin_s1, err); + goto err_free_s0; + } + + err = gpio_request(nxp->config.gpio_pin_1y, dev_name(&pdev->dev)); + if (err) { + dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n", + nxp->config.gpio_pin_1y, err); + goto err_free_s1; + } + + err = gpio_request(nxp->config.gpio_pin_2y, dev_name(&pdev->dev)); + if (err) { + dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n", + nxp->config.gpio_pin_2y, err); + goto err_free_1y; + } + + err = gpio_direction_output(nxp->config.gpio_pin_s0, 0); + if (err) { + dev_err(&pdev->dev, + "unable to set direction of gpio %u, err=%d\n", + nxp->config.gpio_pin_s0, err); + goto err_free_2y; + } + + err = gpio_direction_output(nxp->config.gpio_pin_s1, 0); + if (err) { + dev_err(&pdev->dev, + "unable to set direction of gpio %u, err=%d\n", + nxp->config.gpio_pin_s1, err); + goto err_free_2y; + } + + err = gpio_direction_input(nxp->config.gpio_pin_1y); + if (err) { + dev_err(&pdev->dev, + "unable to set direction of gpio %u, err=%d\n", + nxp->config.gpio_pin_1y, err); + goto err_free_2y; + } + + err = gpio_direction_input(nxp->config.gpio_pin_2y); + if (err) { + dev_err(&pdev->dev, + "unable to set direction of gpio %u, err=%d\n", + nxp->config.gpio_pin_2y, err); + goto err_free_2y; + } + + nxp->parent = &pdev->dev; + mutex_init(&nxp->lock); + + gc = &nxp->gpio_chip; + + gc->direction_input = nxp_74hc153_direction_input; + gc->direction_output = nxp_74hc153_direction_output; + gc->get = nxp_74hc153_get_value; + gc->set = nxp_74hc153_set_value; + gc->can_sleep = 1; + + gc->base = -1; + gc->ngpio = NXP_74HC153_NUM_GPIOS; + gc->label = dev_name(nxp->parent); + gc->parent = nxp->parent; + gc->owner = THIS_MODULE; + gc->of_node = np; + + err = gpiochip_add(&nxp->gpio_chip); + if (err) { + dev_err(&pdev->dev, "unable to add gpio chip, err=%d\n", err); + goto err_free_2y; + } + + platform_set_drvdata(pdev, nxp); + return 0; + +err_free_2y: + gpio_free(nxp->config.gpio_pin_2y); +err_free_1y: + gpio_free(nxp->config.gpio_pin_1y); +err_free_s1: + gpio_free(nxp->config.gpio_pin_s1); +err_free_s0: + gpio_free(nxp->config.gpio_pin_s0); +err_free_nxp: + kfree(nxp); + return err; +} + +static int nxp_74hc153_remove(struct platform_device *pdev) +{ + struct nxp_74hc153_chip *nxp = platform_get_drvdata(pdev); + + if (nxp) { + gpiochip_remove(&nxp->gpio_chip); + gpio_free(nxp->config.gpio_pin_2y); + gpio_free(nxp->config.gpio_pin_1y); + gpio_free(nxp->config.gpio_pin_s1); + gpio_free(nxp->config.gpio_pin_s0); + + kfree(nxp); + platform_set_drvdata(pdev, NULL); + } + + return 0; +} + +static struct of_device_id nxp_74hc153_id[] = { + { + .compatible = "nxp,74hc153-gpio", + .data = NULL, + }, { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, nxp_74hc153_id); + +static struct platform_driver nxp_74hc153_driver = { + .probe = nxp_74hc153_probe, + .remove = nxp_74hc153_remove, + .driver = { + .name = NXP_74HC153_DRIVER_NAME, + .owner = THIS_MODULE, + .of_match_table = nxp_74hc153_id, + }, +}; + +static int __init nxp_74hc153_init(void) +{ + return platform_driver_register(&nxp_74hc153_driver); +} +subsys_initcall(nxp_74hc153_init); + +static void __exit nxp_74hc153_exit(void) +{ + platform_driver_unregister(&nxp_74hc153_driver); +} +module_exit(nxp_74hc153_exit); + +MODULE_AUTHOR("Gabor Juhos "); +MODULE_DESCRIPTION("GPIO expander driver for NXP 74HC153"); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" NXP_74HC153_DRIVER_NAME); From 8cc0fa8faceadac85353bb1a96e074518ef124e2 Mon Sep 17 00:00:00 2001 From: Mauri Sandberg Date: Mon, 14 Sep 2020 22:45:15 +0300 Subject: [PATCH 60/61] ath79: cfi: cmdset_0002: amd chip 0x2201 - write words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generally, in upstream CFI flash memory driver uses buffers for write operations. That does not work with AMD chip with id 0x2201 and we must resort to writing word sized chunks only. That is, to not apply general buffer write functionality for this given chip. Without the patch kernel logs will be flooded with entries like below: MTD do_erase_oneblock(): ERASE 0x01fa0000 MTD do_write_buffer(): WRITE 0x01fa0000(0x00001985) MTD do_erase_oneblock(): ERASE 0x01f80000 MTD do_write_buffer(): WRITE 0x01f80000(0x00001985) MTD do_write_buffer_wait(): software timeout, address:0x01f8000a. jffs2: Write clean marker to block at 0x01a60000 failed: -5 MTD do_erase_oneblock(): ERASE 0x01f60000 MTD do_write_buffer(): WRITE 0x01f60000(0x00001985) MTD do_write_buffer_wait(): software timeout, address:0x01f6000a. jffs2: Write clean marker to block at 0x01a40000 failed: -5 References: http://patchwork.ozlabs.org/project/linux-mtd/patch/20210309174859.362060-1-sandberg@mailfence.com/ Signed-off-by: Mauri Sandberg [added link to usptream fix submission] Signed-off-by: Petr Štetiar --- ...set_0002-AMD-chip-0x2201-write-words.patch | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 target/linux/ath79/patches-5.4/471-mtd-cfi_cmdset_0002-AMD-chip-0x2201-write-words.patch diff --git a/target/linux/ath79/patches-5.4/471-mtd-cfi_cmdset_0002-AMD-chip-0x2201-write-words.patch b/target/linux/ath79/patches-5.4/471-mtd-cfi_cmdset_0002-AMD-chip-0x2201-write-words.patch new file mode 100644 index 0000000000..3c80872ef4 --- /dev/null +++ b/target/linux/ath79/patches-5.4/471-mtd-cfi_cmdset_0002-AMD-chip-0x2201-write-words.patch @@ -0,0 +1,58 @@ +From f1f811410af297c848e9ec17eaa280d190fdce10 Mon Sep 17 00:00:00 2001 +From: Mauri Sandberg +Date: Tue, 23 Feb 2021 18:09:31 +0200 +Subject: [PATCH] mtd: cfi_cmdset_0002: AMD chip 0x2201 - write words + +Buffer writes do not work with AMD chip 0x2201. The chip in question +is a AMD/Spansion/Cypress Semiconductor S29GL256N and datasheet [1] +talks about writing buffers being possible. While waiting for a neater +solution resort to writing word-sized chunks only. + +Without the patch kernel logs will be flooded with entries like below: + +jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 +jffs2_build_filesystem(): unlocking the mtd device... +done. +jffs2_build_filesystem(): erasing all blocks after the end marker... +MTD do_write_buffer_wait(): software timeout, address:0x01ec000a. +jffs2: Write clean marker to block at 0x01920000 failed: -5 +MTD do_write_buffer_wait(): software timeout, address:0x01e2000a. +jffs2: Write clean marker to block at 0x01880000 failed: -5 +MTD do_write_buffer_wait(): software timeout, address:0x01e0000a. +jffs2: Write clean marker to block at 0x01860000 failed: -5 +MTD do_write_buffer_wait(): software timeout, address:0x01dc000a. +jffs2: Write clean marker to block at 0x01820000 failed: -5 +MTD do_write_buffer_wait(): software timeout, address:0x01da000a. +jffs2: Write clean marker to block at 0x01800000 failed: -5 +... + +Tested on a Buffalo wzr-hp-g300nh running kernel 5.10.16. + +[1] https://www.cypress.com/file/219941/download +or https://datasheetspdf.com/pdf-file/565708/SPANSION/S29GL256N/1 + +Signed-off-by: Mauri Sandberg +--- + drivers/mtd/chips/cfi_cmdset_0002.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c +index a1f3e1031c3d..28b6f3583f8a 100644 +--- a/drivers/mtd/chips/cfi_cmdset_0002.c ++++ b/drivers/mtd/chips/cfi_cmdset_0002.c +@@ -272,6 +272,10 @@ static void fixup_use_write_buffers(struct mtd_info *mtd) + { + struct map_info *map = mtd->priv; + struct cfi_private *cfi = map->fldrv_priv; ++ ++ if ((cfi->mfr == CFI_MFR_AMD) && (cfi->id == 0x2201)) ++ return; ++ + if (cfi->cfiq->BufWriteTimeoutTyp) { + pr_debug("Using buffer write method\n"); + mtd->_write = cfi_amdstd_write_buffers; + +base-commit: 5de15b610f785f0e188fefb707f0b19de156968a +-- +2.25.1 + From bc356de2850f14629cb1301be719772fa1212e72 Mon Sep 17 00:00:00 2001 From: Mauri Sandberg Date: Mon, 7 Sep 2020 22:04:26 +0300 Subject: [PATCH 61/61] ath79: Add support for Buffalo WZR-HP-G300NH This device is a wireless router working on 2.4GHz band based on Qualcom/Atheros AR9132 rev 2 SoC and is accompanied by Atheros AR9103 wireless chip and Realtek RTL8366RB/S switches. Due to two different switches being used also two different devices are provided. Specification: - 400 MHz CPU - 64 MB of RAM - 32 MB of FLASH (NOR) - 3x3:2 2.4 GHz 802.11bgn - 5x 10/100/1000 Mbps Ethernet - 4x LED, 3x button, On/Off slider, Auto/On/Off slider - 1x USB 2.0 - bare UART header place on PCB Flash instruction: - NOTE: Pay attention to the switch variant and choose the image to flash accordingly. (dmesg / kernel logs can tell it) - Methods for flashing - Apply factory image in OEM firmware web-gui. - Sysupgrade on top of existing OpenWRT image - U-Boot TFPT recovery for both stock or OpenWRT images: The device U-boot contains a TFTP server that by default has an address 192.168.11.1 (MAC 02:AA:BB:CC:DD:1A). During the boot there is a time window, during which the device allows an image to be uploaded from a client with address 192.168.11.2. The image will be written on flash automatically. 1) Have a computer with static IP address 192.168.11.2 and the router device switched off. 2) Connect the LAN port next to the WAN port in the device and the computer using a network switch. 3) Assign IP 192.168.11.1 the MAC address 02:AA:BB:CC:DD:1A arp -s 192.168.11.1 02:AA:BB:CC:DD:1A 4) Initiate an upload using TFTP image variant curl -T tftp://192.168.11.1 5) Switch on the device. The image will be uploaded subsequently. You can keep an eye on the diag light on the device, it should keep on blinking for a while indicating the writing of the image. General notes: - In the stock firmware the MAC address is the same among all interfaces so it is left here that way too. Recovery: - TFTP method - U-boot serial console Differences to ar71xx platform - This device is split in two different targets now due to hardware being a bit different under the hood. Dynamic solution within the same image is left for later time. - GPIOs for a sliding On/Off switch, marked 'Movie engine' on the device cover, were the wrong way around and were renamed qos_on -> movie_off, qos_off -> movie_on. Associated key codes remained the same they were. The device tree source code is mostly based on musashino's work Signed-off-by: Mauri Sandberg --- .../dts/ar9132_buffalo_wzr-hp-g300nh-rb.dts | 26 ++ .../dts/ar9132_buffalo_wzr-hp-g300nh-s.dts | 26 ++ .../dts/ar9132_buffalo_wzr-hp-g300nh.dtsi | 249 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 4 + .../generic/base-files/etc/board.d/02_network | 12 +- target/linux/ath79/image/generic.mk | 23 ++ 6 files changed, 335 insertions(+), 5 deletions(-) create mode 100644 target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-rb.dts create mode 100644 target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-s.dts create mode 100644 target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-rb.dts b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-rb.dts new file mode 100644 index 0000000000..52b0c86d65 --- /dev/null +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-rb.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9132_buffalo_wzr-hp-g300nh.dtsi" + +/ { + compatible = "buffalo,wzr-hp-g300nh-rb", "qca,ar9132"; + model = "Buffalo WZR-HP-G300NH (rtl8366rb)"; +}; + +&switch { + status = "okay"; + + compatible = "realtek,rtl8366rb"; +}; + +ð0 { + status = "okay"; + + pll-data = <0x1f000000 0x13000a44 0x00441099>; +}; + +ð1 { + status = "okay"; + + pll-data = <0x100 0x13000a44 0x00441099>; +}; diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-s.dts b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-s.dts new file mode 100644 index 0000000000..1c4da1ed67 --- /dev/null +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh-s.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9132_buffalo_wzr-hp-g300nh.dtsi" + +/ { + compatible = "buffalo,wzr-hp-g300nh-s", "qca,ar9132"; + model = "Buffalo WZR-HP-G300NH (rtl8366s)"; +}; + +&switch { + status = "okay"; + + compatible = "realtek,rtl8366s"; +}; + +ð0 { + status = "okay"; + + pll-data = <0x1e000100 0x13000a44 0x00441099>; +}; + +ð1 { + status = "okay"; + + pll-data = <0x1e000100 0x13000a44 0x00441099>; +}; diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi new file mode 100644 index 0000000000..9bd4656d85 --- /dev/null +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9132.dtsi" +#include +#include + +/ { + aliases { + led-boot = &led_diag; + led-failsafe = &led_security; + led-upgrade = &led_diag; + }; + + clock40mhz: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + + gpio2: gpio-extender { + compatible = "nxp,74hc153-gpio"; + gpio-controller; + #gpio-cells = <2>; + + // GPIOs used by this node + gpio-s0 = <&gpio 9 GPIO_ACTIVE_HIGH>; + gpio-s1 = <&gpio 11 GPIO_ACTIVE_HIGH>; + gpio-1y = <&gpio 12 GPIO_ACTIVE_HIGH>; + gpio-2y = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + aoss { + label = "aoss"; + linux,code = ; + gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + router_on { + label = "router_on"; + linux,code = ; + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + movie_off { + label = "movie_off"; + linux,code = ; + gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + usb { + label = "usb"; + linux,code = ; + gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + router_auto { + label = "router_auto"; + linux,code = ; + gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + movie_on { + label = "movie_on"; + linux,code = ; + gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + }; + + flash@1e000000 { + compatible = "cfi-flash"; + reg = <0x1e000000 0x2000000>; + bank-width = <2>; + device-width = <2>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x0040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x0040000 0x0020000>; + read-only; + }; + + partition@60000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x0060000 0x1f60000>; + }; + + partition@1fc0000 { + label = "user_property"; + reg = <0x1fc0000 0x0020000>; + read-only; + }; + + art: partition@1fe0000 { + label = "art"; + reg = <0x1fe0000 0x020000>; + read-only; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + + usb { + label = "blue:usb"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + + led_diag: diag { + label = "red:diag"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + wireless { + label = "green:wireless"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led_security: security { + label = "amber:security"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + router { + label = "green:router"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + }; + + switch: switch { + status = "disabled"; + + gpio-sda = <&gpio 19 GPIO_ACTIVE_HIGH>; + gpio-sck = <&gpio 20 GPIO_ACTIVE_HIGH>; + mii-bus = <&mdio0>; + + mdio-bus { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + phy-mask = <0x10>; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; +}; + +ð0 { + status = "disabled"; + + phy-mode = "rgmii"; + mtd-mac-address = <&art 0x1120c>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&mdio1 { + status = "okay"; +}; + +ð1 { + status = "disabled"; + + compatible = "qca,ar9130-eth", "syscon"; + reg = <0x1a000000 0x200 + 0x18070004 0x4>; + + pll-reg = <0x4 0x18 22>; + pll-handle = <&pll>; + + phy-mode = "rgmii"; + phy-handle = <&phy4>; + resets = <&rst 13>; + reset-names = "mac"; + qca,mac-idx = <1>; + mtd-mac-address = <&art 0x1120c>; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x11000>; +}; + +&uart { + status = "okay"; +}; + +&pll { + clocks = <&clock40mhz>; +}; + +&usb { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 31bc8f70df..783b55ec32 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -83,6 +83,10 @@ avm,fritzdvbc) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan1" "60" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan1" "80" "100" ;; +buffalo,wzr-hp-g300nh-rb|\ +buffalo,wzr-hp-g300nh-s) + ucidef_set_led_netdev "router" "Router" "green:router" "eth1" + ;; comfast,cf-e110n-v2) ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1" ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index aa5a336c57..e0c4f31e9d 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -155,6 +155,13 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; + buffalo,wzr-hp-g300nh-rb|\ + buffalo,wzr-hp-g300nh-s|\ + dlink,dir-825-b1) + ucidef_set_interface_wan "eth1" + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "5@eth0" + ;; buffalo,wzr-hp-g302h-a1a0) ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan" @@ -211,11 +218,6 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:2" "2:lan:1" ;; - dlink,dir-825-b1) - ucidef_set_interface_wan "eth1" - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "5@eth0" - ;; dlink,dir-825-c1|\ dlink,dir-835-a1|\ dlink,dir-842-c1|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index a746bcfb8e..f358d44064 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -453,6 +453,29 @@ define Device/buffalo_wzr-hp-ag300h endef TARGET_DEVICES += buffalo_wzr-hp-ag300h +define Device/buffalo_wzr-hp-g300nh + $(Device/buffalo_common) + SOC := ar9132 + BUFFALO_PRODUCT := WZR-HP-G300NH + BUFFALO_HWVER := 1 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-gpio-nxp-74hc153 + BLOCKSIZE := 128k + IMAGE_SIZE := 32128k + SUPPORTED_DEVICES += wzr-hp-g300nh +endef + +define Device/buffalo_wzr-hp-g300nh-rb + $(Device/buffalo_wzr-hp-g300nh) + DEVICE_MODEL := WZR-HP-G300NH (RTL8366RB switch) +endef +TARGET_DEVICES += buffalo_wzr-hp-g300nh-rb + +define Device/buffalo_wzr-hp-g300nh-s + $(Device/buffalo_wzr-hp-g300nh) + DEVICE_MODEL := WZR-HP-G300NH (RTL8366S switch) +endef +TARGET_DEVICES += buffalo_wzr-hp-g300nh-s + define Device/buffalo_wzr-hp-g302h-a1a0 $(Device/buffalo_common) SOC := ar7242