diff --git a/CONTRIBUTED.md b/CONTRIBUTED.md deleted file mode 100644 index c6a28b30c6..0000000000 --- a/CONTRIBUTED.md +++ /dev/null @@ -1,52 +0,0 @@ -# CONTRIBUTED - -## Thanks to -Dler Cloud
-JetBrains Black Box Logo logo
-OSDN - -## The Source of Packages -### Based on: [openwrt/openwrt@openwrt-21.02](https://github.com/openwrt/openwrt/tree/openwrt-21.02).
-Package lean: [coolsnowwolf/lede](https://github.com/coolsnowwolf/lede).
-Package ntlf9t: [jsda/packages2](https://github.com/jsda/packages2).
-luci-app-serverchan source: [tty228/luci-app-serverchan](https://github.com/tty228/luci-app-serverchan).
-OpenAppFilter source: [destan19/OpenAppFilter](https://github.com/destan19/OpenAppFilter).
-luci-app-k3screenctrl source: [lwz322/luci-app-k3screenctrl](https://github.com/lwz322/luci-app-k3screenctrl).
-phicomm-k3screenctrl source: [lwz322/k3screenctrl\_build](https://github.com/lwz322/k3screenctrl_build).
-luci-app-smstool source: [f8q8/luci-app-smstool-master](https://github.com/f8q8/luci-app-smstool-master).
-luci-app-airwhu source: [KyleRicardo/luci-app-airwhu](https://github.com/KyleRicardo/luci-app-airwhu).
-Package Lienol: [Lienol/openwrt-package](https://github.com/Lienol/openwrt-package).
-luci-app-bbr-mod source: [ntlf9t/luci-app-bbr-mod](https://github.com/ntlf9t/luci-app-bbr-mod).
-Package Openwrt-BBR: [anshi233/Openwrt-BBR](https://github.com/anshi233/Openwrt-BBR).
-simple-obfs source: [aa65535/openwrt-simple-obfs](https://github.com/aa65535/openwrt-simple-obfs).
-v2ray-plugin source: [honwen/openwrt-v2ray-plugin](https://github.com/honwen/openwrt-v2ray-plugin).
-Package zxlhhyccc: [zxlhhyccc/MY-lede](https://github.com/zxlhhyccc/MY-lede).
-luci-theme-argon source: [jerrykuku/luci-theme-argon](https://github.com/jerrykuku/luci-theme-argon).
-openwrt-chinadns-ng source: [pexcn/openwrt-chinadns-ng](https://github.com/pexcn/openwrt-chinadns-ng).
-openwrt-udpspeeder source: [zhfreal/openwrt-UDPspeeder](https://github.com/zhfreal/openwrt-UDPspeeder).
-luci-app-onliner source: [rufengsuixing/luci-app-onliner](https://github.com/rufengsuixing/luci-app-onliner).
-luci-lib-docker source: [lisaac/luci-lib-docker](https://github.com/lisaac/luci-lib-docker).
-openwrt-iptvhelper source: [riverscn/openwrt-iptvhelper](https://github.com/riverscn/openwrt-iptvhelper).
-luci-app-autoipsetadder source: [rufengsuixing/luci-app-autoipsetadder](https://github.com/rufengsuixing/luci-app-autoipsetadder).
-luci-app-adguardhome source: [rufengsuixing/luci-app-adguardhome](https://github.com/rufengsuixing/luci-app-adguardhome).
-Rclone-OpenWrt source: [ElonH/Rclone-OpenWrt](https://github.com/ElonH/Rclone-OpenWrt).
-luci-app-usb3disable source: [rufengsuixing/luci-app-usb3disable](https://github.com/rufengsuixing/luci-app-usb3disable).
-lua-maxminddb source: [jerrykuku/lua-maxminddb](https://github.com/jerrykuku/lua-maxminddb).
-package openwrt-mwol: [Mleaf/openwrt-mwol](https://github.com/Mleaf/openwrt-mwol).
-package gargoyle: [ericpaulbishop/gargoyle](https://github.com/ericpaulbishop/gargoyle).
-luci-app-qos-gargoyle source: [kuoruan/luci-app-qos-gargoyle](https://github.com/kuoruan/luci-app-qos-gargoyle).
-luci-app-cupsd source: [F-Light/luci-app-cupsd](https://github.com/F-Light/luci-app-cupsd).
-ootoc-OpenWRT source: [ElonH/ootoc-OpenWRT](https://github.com/ElonH/ootoc-OpenWRT).
-r8168 source: [BROBIRD/openwrt-r8168](https://github.com/BROBIRD/openwrt-r8168).
-MentoHUST source: [KyleRicardo/MentoHUST-OpenWrt-ipk](https://github.com/KyleRicardo/MentoHUST-OpenWrt-ipk).
-luci-app-mentohust source: [BoringCat/luci-app-mentohust](https://github.com/BoringCat/luci-app-mentohust).
-luci-app-minieap source: [BoringCat/luci-app-minieap](https://github.com/BoringCat/luci-app-minieap).
-scutclient source: [scutclient/scutclient](https://github.com/scutclient/scutclient).
-luci-app-scutclient source: [scutclient/luci-app-scutclient](https://github.com/scutclient/luci-app-scutclient).
-MT-Wifi 5.0.4.0: [MeIsReallyBa/mt7615-dbdc-linux5.4](https://github.com/MeIsReallyBa/mt7615-dbdc-linux5.4).
-node-request source: [jerrykuku/node-request](https://github.com/jerrykuku/node-request).
-luci-app-jd-dailybonus source: [jerrykuku/luci-app-jd-dailybonus](https://github.com/jerrykuku/luci-app-jd-dailybonus).
-luci-app-oled source: [NateLol/luci-app-oled](https://github.com/NateLol/luci-app-oled).
-luci-app-beardropper source: [NateLol/natelol](https://github.com/NateLol/natelol).
-luci-app-vssr source: [jerrykuku/luci-app-vssr](https://github.com/jerrykuku/luci-app-vssr).
-luci-proto-minieap source: [ysc3839/luci-proto-minieap](https://github.com/ysc3839/luci-proto-minieap). diff --git a/README.md b/README.md index 7561d4bc9a..c6e97118a8 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens - [LuCI Web Interface](https://github.com/immortalwrt/luci): Modern and modular interface to control the device via a web browser. - [ImmortalWrt Packages](https://github.com/immortalwrt/packages): Community repository of ported packages. - [OpenWrt Routing](https://github.com/openwrt/routing): Packages specifically focused on (mesh) routing. - - [CONTRIBUTED.md](https://github.com/immortalwrt/immortalwrt/blob/master/CONTRIBUTED.md): the 3rd-party packages we introduced. ## Support Information For a list of supported devices see the [OpenWrt Hardware Database](https://openwrt.org/supported_devices) @@ -84,3 +83,12 @@ For a list of supported devices see the [OpenWrt Hardware Database](https://open ## License ImmortalWrt is licensed under [GPL-2.0-only](https://spdx.org/licenses/GPL-2.0-only.html). + +## Acknowledgements + + + + + + +
Dler CloudJetBrains Black Box Logo logoOSDN
diff --git a/include/kernel-5.4 b/include/kernel-5.4 index cd7de7b8fc..a31315270a 100644 --- a/include/kernel-5.4 +++ b/include/kernel-5.4 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.4 = .225 -LINUX_KERNEL_HASH-5.4.225 = 59f596f6714317955cf481590babcf015aff2bc1900bd8e8dc8f7af73bc560aa +LINUX_VERSION-5.4 = .238 +LINUX_KERNEL_HASH-5.4.238 = 70a2b2da85598eba6a73cdc0749e441cbdf3011d9babcb7028a46aa8d98aa91f diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index a2d967a83f..522ac082ff 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -49,7 +49,6 @@ generate_static_network() { uci -q batch <<-EOF delete network.globals set network.globals='globals' - set network.globals.ula_prefix='auto' EOF } diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x index 2bc14674cd..37ecc113df 100644 --- a/package/boot/uboot-envtools/files/ipq806x +++ b/package/boot/uboot-envtools/files/ipq806x @@ -31,6 +31,9 @@ ubootenv_mtdinfo () { } case "$board" in +askey,rt4230w-rev6) + ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x40000" "0x20000" + ;; edgecore,ecw5410) ubootenv_add_uci_config "/dev/mtd11" "0x0" "0x10000" "0x10000" ;; diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index c2e4a3021e..b8e5feff37 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -47,7 +47,9 @@ zte,mf283plus) h3c,tx1800-plus|\ h3c,tx1801-plus|\ h3c,tx1806|\ -jcg,q20) +jcg,q20|\ +jcg,q20-lzma-loader|\ +jcg,q20-pb-boot) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" ;; hootoo,ht-tm05|\ diff --git a/package/emortal/default-settings/Makefile b/package/emortal/default-settings/Makefile index 158bf814d4..492767ad48 100644 --- a/package/emortal/default-settings/Makefile +++ b/package/emortal/default-settings/Makefile @@ -36,9 +36,6 @@ define Build/Compile endef define Package/default-settings/install - # $(INSTALL_DIR) $(1)/etc - # $(INSTALL_DATA) ./files/openwrt_banner $(1)/etc/openwrt_banner - $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/99-default-settings $(1)/etc/uci-defaults/ endef diff --git a/package/emortal/default-settings/files/99-default-settings b/package/emortal/default-settings/files/99-default-settings index c89f5dc0c0..96b72f6f1e 100755 --- a/package/emortal/default-settings/files/99-default-settings +++ b/package/emortal/default-settings/files/99-default-settings @@ -14,7 +14,6 @@ rm -f /www/luci-static/resources/view/status/include/80_upnp.js ln -sf /sbin/ip /usr/bin/ip [ -f '/bin/bash' ] && sed -i 's|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g' /etc/passwd -[ -f '/etc/openwrt_banner' ] && mv '/etc/openwrt_banner' '/etc/banner' sed -i '/option disabled/d' /etc/config/wireless sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh diff --git a/package/emortal/default-settings/files/openwrt_banner b/package/emortal/default-settings/files/openwrt_banner deleted file mode 100644 index 3f58fe67d9..0000000000 --- a/package/emortal/default-settings/files/openwrt_banner +++ /dev/null @@ -1,11 +0,0 @@ -┌─────────────────────────────────────────────┐ -│ │ -│ mmmmm m ""# │ -│ # mmmmm mmmmm mmm mmm mm#mm mmm # │ -│ # # # # # # # #" "# #" " # " # # │ -│ # # # # # # # # # # # m"""# # │ -│ mm#mm # # # # # # "#m#" # "mm "mm"# "mm │ -│ │ -│─────────────────────────────────────────────│ -│ ImmortalWrt 21.02 │ -└─────────────────────────────────────────────┘ diff --git a/package/kernel/i40e/Makefile b/package/kernel/i40e/Makefile index 05ae749409..d58da7c366 100644 --- a/package/kernel/i40e/Makefile +++ b/package/kernel/i40e/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=i40e -PKG_VERSION:=2.22.8 -PKG_RELEASE:=2 +PKG_VERSION:=2.22.18 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@IMMORTALWRT -PKG_HASH:=938eac24067e385d6e7e47788c7a1c47987bbe0ed36f3360809cbaa8caf85c6b +PKG_SOURCE_URL:=@SF/e1000/i40e%20stable/$(PKG_VERSION)/ +PKG_HASH:=ba3fed07b178bc78bfeab3ba309f812243cbc88032333edca891eb74022468f6 PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=GPL-2.0-only @@ -37,6 +37,17 @@ define KernelPackage/i40e-vendor/description Kernel modules for Intel(R) Ethernet Controller XL710 Family 40 Gigabit Ethernet adapters. endef +define Build/Configure + ( \ + pushd $(PKG_BUILD_DIR)/src ; \ + KSRC=$(LINUX_DIR) \ + OUT=kcompat_generated_defs.h \ + CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \ + bash kcompat-generator.sh ; \ + popd ; \ + ) +endef + define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ M=$(PKG_BUILD_DIR)/src \ diff --git a/package/kernel/iavf/Makefile b/package/kernel/iavf/Makefile new file mode 100644 index 0000000000..f85a4b0aa5 --- /dev/null +++ b/package/kernel/iavf/Makefile @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2023 ImmortalWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=iavf +PKG_VERSION:=4.8.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/e1000/iavf%20stable/$(PKG_VERSION)/ +PKG_HASH:=78d986de9667f260e806a3d0962dfee32ac35a686a672c15c209a29252d42d48 + +PKG_MAINTAINER:=Tianling Shen +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/iavf-vendor + SUBMENU:=Network Devices + TITLE:=Intel(R) Ethernet Adaptive Virtual Function support (vendor driver) + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DEPENDS:=@PCI_SUPPORT +kmod-i40e-vendor + CONFLICTS:=kmod-iavf + FILES:=$(PKG_BUILD_DIR)/src/iavf.ko + AUTOLOAD:=$(call AutoProbe,iavf) +endef + +define KernelPackage/iavf-vendor/description + Kernel modules for Intel XL710, + X710, X722, XXV710, and all devices advertising support for + Intel Ethernet Adaptive Virtual Function devices. +endef + +define Build/Configure + ( \ + pushd $(PKG_BUILD_DIR)/src ; \ + KSRC=$(LINUX_DIR) \ + OUT=kcompat_generated_defs.h \ + CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \ + bash kcompat-generator.sh ; \ + popd ; \ + ) +endef + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M=$(PKG_BUILD_DIR)/src \ + NEED_AUX_BUS=2 \ + modules +endef + +$(eval $(call KernelPackage,iavf-vendor)) diff --git a/package/kernel/igb/Makefile b/package/kernel/igb/Makefile index 42321305ec..16e5592331 100644 --- a/package/kernel/igb/Makefile +++ b/package/kernel/igb/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=igb -PKG_VERSION:=5.13.7 +PKG_VERSION:=5.13.16 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@IMMORTALWRT -PKG_HASH:=4ccae73110f3c871a17b7cc6df7dbdf6295fc90f4941e8b2978a471c2fec83cb +PKG_SOURCE_URL:=@SF/e1000/igb%20stable/$(PKG_VERSION)/ +PKG_HASH:=23731b9d3630e20ecdbe6c5db06475f07c8b2d080a374635550957747db96183 PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=GPL-2.0-only @@ -25,7 +25,7 @@ define KernelPackage/igb-vendor SUBMENU:=Network Devices TITLE:=Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support (vendor driver) VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) - DEPENDS:=@PCI_SUPPORT +kmod-i2c-core +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core + DEPENDS:=@PCI_SUPPORT +kmod-i2c-core +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core @TARGET_x86 CONFLICTS:=kmod-igb FILES:=$(PKG_BUILD_DIR)/src/igb.ko AUTOLOAD:=$(call AutoProbe,igb) @@ -35,6 +35,17 @@ define KernelPackage/igb-vendor/description Kernel modules for Intel(R) 82575/82576 PCI-Express Gigabit Ethernet adapters. endef +define Build/Configure + ( \ + pushd $(PKG_BUILD_DIR)/src ; \ + KSRC=$(LINUX_DIR) \ + OUT=kcompat_generated_defs.h \ + CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \ + bash kcompat-generator.sh ; \ + popd ; \ + ) +endef + define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ M=$(PKG_BUILD_DIR)/src \ diff --git a/package/kernel/igb/patches/100-headers.patch b/package/kernel/igb/patches/100-headers.patch deleted file mode 100644 index af2114b978..0000000000 --- a/package/kernel/igb/patches/100-headers.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/igb_main.c -+++ b/src/igb_main.c -@@ -25,6 +25,7 @@ - #ifdef CONFIG_PM_RUNTIME - #include - #endif /* CONFIG_PM_RUNTIME */ -+#include - - #include - #include "igb.h" diff --git a/package/kernel/ixgbe/Makefile b/package/kernel/ixgbe/Makefile new file mode 100644 index 0000000000..b894ee9aab --- /dev/null +++ b/package/kernel/ixgbe/Makefile @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2023 ImmortalWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=ixgbe +PKG_VERSION:=5.18.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/e1000/ixgbe%20stable/$(PKG_VERSION)/ +PKG_HASH:=4ca9cc8d9041b8c9b4fdbbab4fe079e5da422fa1697ca5a58ebfa95d21e62daa + +PKG_MAINTAINER:=Tianling Shen +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/ixgbe-vendor + SUBMENU:=Network Devices + TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support (vendor driver) + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-libphy @TARGET_x86 + CONFLICTS:=kmod-ixgbe + FILES:=$(PKG_BUILD_DIR)/src/ixgbe.ko + AUTOLOAD:=$(call AutoProbe,ixgbe) +endef + +define KernelPackage/ixgbe-vendor/description + Kernel modules for Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet adapters. +endef + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M=$(PKG_BUILD_DIR)/src \ + CONFIG_IXGBE=m \ + modules +endef + +$(eval $(call KernelPackage,ixgbe-vendor)) diff --git a/package/kernel/ixgbevf/Makefile b/package/kernel/ixgbevf/Makefile new file mode 100644 index 0000000000..3725b9ff57 --- /dev/null +++ b/package/kernel/ixgbevf/Makefile @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2023 ImmortalWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=ixgbevf +PKG_VERSION:=4.17.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/e1000/ixgbevf%20stable/$(PKG_VERSION)/ +PKG_HASH:=59813a6f92e699b4cb6983b70b91137eece4609a113fa7bb60db0be9889d2b46 + +PKG_MAINTAINER:=Tianling Shen +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/ixgbevf-vendor + SUBMENU:=Network Devices + TITLE:=Intel(R) 82599 Virtual Function Ethernet support (vendor driver) + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DEPENDS:=@PCI_SUPPORT +kmod-ixgbe-vendor + CONFLICTS:=kmod-ixgbevf + FILES:=$(PKG_BUILD_DIR)/src/ixgbevf.ko + AUTOLOAD:=$(call AutoProbe,ixgbevf) +endef + +define KernelPackage/ixgbevf-vendor/description + Kernel modules for Intel(R) 82599 Virtual Function Ethernet adapters. +endef + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M=$(PKG_BUILD_DIR)/src \ + CONFIG_IXGBEVF=m \ + modules +endef + +$(eval $(call KernelPackage,ixgbevf-vendor)) diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index 55362a5c7b..0d20ba2ea9 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -199,7 +199,7 @@ static inline void mailbox_aal_rx_handler(void); static irqreturn_t mailbox_irq_handler(int, void *); static inline void mailbox_signal(unsigned int, int); static void do_ppe_tasklet(unsigned long); -DECLARE_TASKLET(g_dma_tasklet, do_ppe_tasklet, 0); +DECLARE_TASKLET_OLD(g_dma_tasklet, do_ppe_tasklet); /* * QSB & HTU setting functions diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index 44d805049b..70ba557e2a 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -125,7 +125,7 @@ static char *g_net_dev_name[1] = {"dsl0"}; static int g_ptm_prio_queue_map[8]; -static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0); +static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet); unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR; diff --git a/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch new file mode 100644 index 0000000000..1318e71e3f --- /dev/null +++ b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch @@ -0,0 +1,11 @@ +--- a/src/drv_tapi_kpi.c ++++ b/src/drv_tapi_kpi.c +@@ -134,7 +134,7 @@ extern IFX_int32_t block_ingre + /* ========================================================================== */ + static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo); + #ifdef KPI_TASKLET +-DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L); ++DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler); + #endif /* KPI_TASKLET */ + static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread); + static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup); diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index d1376a3fb9..8556354386 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -689,7 +689,7 @@ $(eval $(call KernelPackage,mppe)) SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko)) -SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall +SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES)) SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES))) @@ -711,7 +711,6 @@ define KernelPackage/sched-core CONFIG_NET_CLS_FLOW \ CONFIG_NET_CLS_FW \ CONFIG_NET_CLS_ROUTE4 \ - CONFIG_NET_CLS_TCINDEX \ CONFIG_NET_CLS_U32 \ CONFIG_NET_ACT_GACT \ CONFIG_NET_ACT_MIRRED \ diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 61d04544a4..4166040a49 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=5.15.81-1 +PKG_VERSION:=5.15.92-1 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.81/ -PKG_HASH:=5227d3c35ccebacfaee6b8180b3a87b9910f3c94ee768ebc5c0fef3c86b6146d +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.92/ +PKG_HASH:=d518e3614a0a8b635e7b7febf2a3ee1645a95d953fd353920ceee22f159f26f1 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 8efef9d0a3..54764b1d03 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -824,8 +824,8 @@ mac80211_setup_supplicant_noctl() { mac80211_prepare_iw_htmode() { case "$htmode" in - VHT20|HT20) iw_htmode=HT20;; - HT40*|VHT40|VHT160) + VHT20|HT20|HE20) iw_htmode=HT20;; + HT40*|VHT40|VHT160|HE40) case "$band" in 2g) case "$htmode" in @@ -849,7 +849,7 @@ mac80211_prepare_iw_htmode() { esac [ "$auto_channel" -gt 0 ] && iw_htmode="HT40+" ;; - VHT80) + VHT80|HE80) iw_htmode="80MHZ" ;; NONE|NOHT) diff --git a/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch b/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch index e47fb012fa..fc674a7992 100644 --- a/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch +++ b/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch @@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -3443,6 +3443,16 @@ int ath10k_core_register(struct ath10k * +@@ -3383,6 +3383,16 @@ int ath10k_core_register(struct ath10k * queue_work(ar->workqueue, &ar->register_work); diff --git a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 47b52416ab..ba1adf9932 100644 --- a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -124,7 +124,7 @@ v13: WCN36XX= --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -26,6 +26,7 @@ +@@ -25,6 +25,7 @@ #include "testmode.h" #include "wmi-ops.h" #include "coredump.h" @@ -132,7 +132,7 @@ v13: unsigned int ath10k_debug_mask; EXPORT_SYMBOL(ath10k_debug_mask); -@@ -65,6 +66,7 @@ static const struct ath10k_hw_params ath +@@ -64,6 +65,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA988X_2_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca988x hw2.0", @@ -140,7 +140,7 @@ v13: .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -138,6 +140,7 @@ static const struct ath10k_hw_params ath +@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9887_1_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca9887 hw1.0", @@ -148,7 +148,7 @@ v13: .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -355,6 +358,7 @@ static const struct ath10k_hw_params ath +@@ -354,6 +357,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA99X0_2_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca99x0 hw2.0", @@ -156,7 +156,7 @@ v13: .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .otp_exe_param = 0x00000700, -@@ -397,6 +401,7 @@ static const struct ath10k_hw_params ath +@@ -396,6 +400,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9984_1_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca9984/qca9994 hw1.0", @@ -164,7 +164,7 @@ v13: .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -446,6 +451,7 @@ static const struct ath10k_hw_params ath +@@ -445,6 +450,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9888_2_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca9888 hw2.0", @@ -172,7 +172,7 @@ v13: .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -3158,6 +3164,10 @@ int ath10k_core_start(struct ath10k *ar, +@@ -3098,6 +3104,10 @@ int ath10k_core_start(struct ath10k *ar, goto err_hif_stop; } @@ -183,7 +183,7 @@ v13: return 0; err_hif_stop: -@@ -3416,9 +3426,18 @@ static void ath10k_core_register_work(st +@@ -3356,9 +3366,18 @@ static void ath10k_core_register_work(st goto err_spectral_destroy; } @@ -202,7 +202,7 @@ v13: err_spectral_destroy: ath10k_spectral_destroy(ar); err_debug_destroy: -@@ -3464,6 +3483,8 @@ void ath10k_core_unregister(struct ath10 +@@ -3404,6 +3423,8 @@ void ath10k_core_unregister(struct ath10 if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; @@ -221,7 +221,7 @@ v13: #include "htt.h" #include "htc.h" -@@ -1256,6 +1257,13 @@ struct ath10k { +@@ -1250,6 +1251,13 @@ struct ath10k { } testmode; struct { diff --git a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch index 253fe96ddf..8db60041ca 100644 --- a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch @@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -1312,6 +1312,10 @@ struct ath10k { +@@ -1306,6 +1306,10 @@ struct ath10k { s32 tx_power_2g_limit; s32 tx_power_5g_limit; diff --git a/package/kernel/mac80211/patches/ath10k/983-ath10k-allow-vht-on-2g.patch b/package/kernel/mac80211/patches/ath10k/983-ath10k-allow-vht-on-2g.patch index eeca88a613..2aa27bf604 100644 --- a/package/kernel/mac80211/patches/ath10k/983-ath10k-allow-vht-on-2g.patch +++ b/package/kernel/mac80211/patches/ath10k/983-ath10k-allow-vht-on-2g.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -4718,6 +4718,7 @@ static void ath10k_mac_setup_ht_vht_cap( +@@ -5032,6 +5032,7 @@ static void ath10k_mac_setup_ht_vht_cap( if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { band = &ar->mac.sbands[NL80211_BAND_2GHZ]; band->ht_cap = ht_cap; diff --git a/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch b/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch index 8adb8c42a1..e105216c68 100644 --- a/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch +++ b/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch @@ -111,7 +111,7 @@ Signed-off-by: Phil Elwell #define TXCTL_CREDITS 2 static void pkt_align(struct sk_buff *p, int len, int align) -@@ -4140,7 +4144,7 @@ int brcmf_sdio_get_fwname(struct device +@@ -4141,7 +4145,7 @@ int brcmf_sdio_get_fwname(struct device fwreq = brcmf_fw_alloc_request(bus_if->chip, bus_if->chiprev, brcmf_sdio_fwnames, @@ -120,7 +120,7 @@ Signed-off-by: Phil Elwell fwnames, ARRAY_SIZE(fwnames)); if (!fwreq) return -ENOMEM; -@@ -4196,6 +4200,9 @@ static const struct brcmf_bus_ops brcmf_ +@@ -4197,6 +4201,9 @@ static const struct brcmf_bus_ops brcmf_ #define BRCMF_SDIO_FW_CODE 0 #define BRCMF_SDIO_FW_NVRAM 1 @@ -130,7 +130,7 @@ Signed-off-by: Phil Elwell static void brcmf_sdio_firmware_callback(struct device *dev, int err, struct brcmf_fw_request *fwreq) { -@@ -4211,6 +4218,22 @@ static void brcmf_sdio_firmware_callback +@@ -4212,6 +4219,22 @@ static void brcmf_sdio_firmware_callback brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); @@ -153,7 +153,7 @@ Signed-off-by: Phil Elwell if (err) goto fail; -@@ -4419,7 +4442,7 @@ brcmf_sdio_prepare_fw_request(struct brc +@@ -4420,7 +4443,7 @@ brcmf_sdio_prepare_fw_request(struct brc fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev, brcmf_sdio_fwnames, @@ -162,7 +162,7 @@ Signed-off-by: Phil Elwell fwnames, ARRAY_SIZE(fwnames)); if (!fwreq) return NULL; -@@ -4437,6 +4460,9 @@ struct brcmf_sdio *brcmf_sdio_probe(stru +@@ -4438,6 +4461,9 @@ struct brcmf_sdio *brcmf_sdio_probe(stru struct brcmf_sdio *bus; struct workqueue_struct *wq; struct brcmf_fw_request *fwreq; @@ -172,7 +172,7 @@ Signed-off-by: Phil Elwell brcmf_dbg(TRACE, "Enter\n"); -@@ -4519,6 +4545,21 @@ struct brcmf_sdio *brcmf_sdio_probe(stru +@@ -4520,6 +4546,21 @@ struct brcmf_sdio *brcmf_sdio_probe(stru brcmf_dbg(INFO, "completed!!\n"); diff --git a/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch b/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch index da9fcd2185..00b8de10d3 100644 --- a/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch +++ b/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch @@ -5,31 +5,31 @@ for (i = 0; i < sband->n_channels; i++) { if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | - IEEE80211_CHAN_NO_80MHZ)) -+ IEEE80211_CHAN_NO_80MHZ) && ++ IEEE80211_CHAN_NO_80MHZ) & + (sband->band != NL80211_BAND_2GHZ)) continue; have_80mhz = true; --- a/net/mac80211/util.c +++ b/net/mac80211/util.c -@@ -1769,7 +1769,8 @@ static int ieee80211_build_preq_ies_band +@@ -1925,7 +1925,8 @@ static int ieee80211_build_preq_ies_band /* Check if any channel in this sband supports at least 80 MHz */ for (i = 0; i < sband->n_channels; i++) { if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | - IEEE80211_CHAN_NO_80MHZ)) -+ IEEE80211_CHAN_NO_80MHZ) && ++ IEEE80211_CHAN_NO_80MHZ) & + (sband->band != NL80211_BAND_2GHZ)) continue; have_80mhz = true; --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c -@@ -4824,7 +4824,8 @@ static int ieee80211_prep_channel(struct +@@ -5122,7 +5122,8 @@ static int ieee80211_prep_channel(struct have_80mhz = false; for (i = 0; i < sband->n_channels; i++) { if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | - IEEE80211_CHAN_NO_80MHZ)) -+ IEEE80211_CHAN_NO_80MHZ) && ++ IEEE80211_CHAN_NO_80MHZ) & + (sband->band != NL80211_BAND_2GHZ)) continue; diff --git a/package/kernel/mac80211/patches/subsys/997-backport-API-from-v6.1.patch b/package/kernel/mac80211/patches/subsys/997-backport-API-from-v6.1.patch new file mode 100644 index 0000000000..142d1b2a88 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/997-backport-API-from-v6.1.patch @@ -0,0 +1,314 @@ +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -702,6 +702,8 @@ struct ieee80211_bss_conf { + u32 unsol_bcast_probe_resp_interval; + bool s1g; + struct cfg80211_bitrate_mask beacon_tx_rate; ++ ++ bool csa_active; + }; + + /** +@@ -1672,6 +1674,46 @@ enum ieee80211_offload_flags { + }; + + /** ++ * struct ieee80211_vif_cfg - interface configuration ++ * @assoc: association status ++ * @ibss_joined: indicates whether this station is part of an IBSS or not ++ * @ibss_creator: indicates if a new IBSS network is being created ++ * @ps: power-save mode (STA only). This flag is NOT affected by ++ * offchannel/dynamic_ps operations. ++ * @aid: association ID number, valid only when @assoc is true ++ * @arp_addr_list: List of IPv4 addresses for hardware ARP filtering. The ++ * may filter ARP queries targeted for other addresses than listed here. ++ * The driver must allow ARP queries targeted for all address listed here ++ * to pass through. An empty list implies no ARP queries need to pass. ++ * @arp_addr_cnt: Number of addresses currently on the list. Note that this ++ * may be larger than %IEEE80211_BSS_ARP_ADDR_LIST_LEN (the arp_addr_list ++ * array size), it's up to the driver what to do in that case. ++ * @ssid: The SSID of the current vif. Valid in AP and IBSS mode. ++ * @ssid_len: Length of SSID given in @ssid. ++ * @s1g: BSS is S1G BSS (affects Association Request format). ++ * @idle: This interface is idle. There's also a global idle flag in the ++ * hardware config which may be more appropriate depending on what ++ * your driver/device needs to do. ++ * @ap_addr: AP MLD address, or BSSID for non-MLO connections ++ * (station mode only) ++ */ ++struct ieee80211_vif_cfg { ++ /* association related data */ ++ bool assoc, ibss_joined; ++ bool ibss_creator; ++ bool ps; ++ u16 aid; ++ ++ __be32 arp_addr_list[IEEE80211_BSS_ARP_ADDR_LIST_LEN]; ++ int arp_addr_cnt; ++ u8 ssid[IEEE80211_MAX_SSID_LEN]; ++ size_t ssid_len; ++ bool s1g; ++ bool idle; ++ u8 ap_addr[ETH_ALEN] __aligned(2); ++}; ++ ++/** + * struct ieee80211_vif - per-interface data + * + * Data in this structure is continually present for driver +@@ -1725,6 +1767,7 @@ enum ieee80211_offload_flags { + */ + struct ieee80211_vif { + enum nl80211_iftype type; ++ struct ieee80211_vif_cfg cfg; + struct ieee80211_bss_conf bss_conf; + u8 addr[ETH_ALEN] __aligned(2); + bool p2p; +@@ -2045,6 +2088,80 @@ struct ieee80211_sta_txpwr { + }; + + /** ++ * struct ieee80211_sta_aggregates - info that is aggregated from active links ++ * ++ * Used for any per-link data that needs to be aggregated and updated in the ++ * main &struct ieee80211_sta when updated or the active links change. ++ * ++ * @max_amsdu_len: indicates the maximal length of an A-MSDU in bytes. ++ * This field is always valid for packets with a VHT preamble. ++ * For packets with a HT preamble, additional limits apply: ++ * ++ * * If the skb is transmitted as part of a BA agreement, the ++ * A-MSDU maximal size is min(max_amsdu_len, 4065) bytes. ++ * * If the skb is not part of a BA agreement, the A-MSDU maximal ++ * size is min(max_amsdu_len, 7935) bytes. ++ * ++ * Both additional HT limits must be enforced by the low level ++ * driver. This is defined by the spec (IEEE 802.11-2012 section ++ * 8.3.2.2 NOTE 2). ++ * @max_rc_amsdu_len: Maximum A-MSDU size in bytes recommended by rate control. ++ * @max_tid_amsdu_len: Maximum A-MSDU size in bytes for this TID ++ */ ++struct ieee80211_sta_aggregates { ++ u16 max_amsdu_len; ++ ++ u16 max_rc_amsdu_len; ++ u16 max_tid_amsdu_len[IEEE80211_NUM_TIDS]; ++}; ++ ++/** ++ * struct ieee80211_link_sta - station Link specific info ++ * All link specific info for a STA link for a non MLD STA(single) ++ * or a MLD STA(multiple entries) are stored here. ++ * ++ * @sta: reference to owning STA ++ * @addr: MAC address of the Link STA. For non-MLO STA this is same as the addr ++ * in ieee80211_sta. For MLO Link STA this addr can be same or different ++ * from addr in ieee80211_sta (representing MLD STA addr) ++ * @link_id: the link ID for this link STA (0 for deflink) ++ * @smps_mode: current SMPS mode (off, static or dynamic) ++ * @supp_rates: Bitmap of supported rates ++ * @ht_cap: HT capabilities of this STA; restricted to our own capabilities ++ * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities ++ * @he_cap: HE capabilities of this STA ++ * @he_6ghz_capa: on 6 GHz, holds the HE 6 GHz band capabilities ++ * @eht_cap: EHT capabilities of this STA ++ * @bandwidth: current bandwidth the station can receive with ++ * @rx_nss: in HT/VHT, the maximum number of spatial streams the ++ * station can receive at the moment, changed by operating mode ++ * notifications and capabilities. The value is only valid after ++ * the station moves to associated state. ++ * @txpwr: the station tx power configuration ++ * ++ */ ++struct ieee80211_link_sta { ++ struct ieee80211_sta *sta; ++ ++ u8 addr[ETH_ALEN]; ++ u8 link_id; ++ enum ieee80211_smps_mode smps_mode; ++ ++ u32 supp_rates[NUM_NL80211_BANDS]; ++ struct ieee80211_sta_ht_cap ht_cap; ++ struct ieee80211_sta_vht_cap vht_cap; ++ struct ieee80211_sta_he_cap he_cap; ++ struct ieee80211_he_6ghz_capa he_6ghz_capa; ++ struct ieee80211_sta_eht_cap eht_cap; ++ ++ struct ieee80211_sta_aggregates agg; ++ ++ u8 rx_nss; ++ enum ieee80211_sta_rx_bandwidth bandwidth; ++ struct ieee80211_sta_txpwr txpwr; ++}; ++ ++/** + * struct ieee80211_sta - station table entry + * + * A station table entry represents a station we are possibly +@@ -2136,6 +2253,10 @@ struct ieee80211_sta { + struct ieee80211_sta_txpwr txpwr; + + struct ieee80211_txq *txq[IEEE80211_NUM_TIDS + 1]; ++ ++ u16 valid_links; ++ struct ieee80211_link_sta deflink; ++ struct ieee80211_link_sta __rcu *link[IEEE80211_MLD_MAX_NUM_LINKS]; + + /* must be last */ + u8 drv_priv[] __aligned(sizeof(void *)); +--- a/include/linux/ieee80211.h ++++ b/include/linux/ieee80211.h +@@ -1916,6 +1916,73 @@ struct ieee80211_he_mu_edca_param_ac_rec + } __packed; + + /** ++ * struct ieee80211_eht_mcs_nss_supp_20mhz_only - EHT 20MHz only station max ++ * supported NSS for per MCS. ++ * ++ * For each field below, bits 0 - 3 indicate the maximal number of spatial ++ * streams for Rx, and bits 4 - 7 indicate the maximal number of spatial streams ++ * for Tx. ++ * ++ * @rx_tx_mcs7_max_nss: indicates the maximum number of spatial streams ++ * supported for reception and the maximum number of spatial streams ++ * supported for transmission for MCS 0 - 7. ++ * @rx_tx_mcs9_max_nss: indicates the maximum number of spatial streams ++ * supported for reception and the maximum number of spatial streams ++ * supported for transmission for MCS 8 - 9. ++ * @rx_tx_mcs11_max_nss: indicates the maximum number of spatial streams ++ * supported for reception and the maximum number of spatial streams ++ * supported for transmission for MCS 10 - 11. ++ * @rx_tx_mcs13_max_nss: indicates the maximum number of spatial streams ++ * supported for reception and the maximum number of spatial streams ++ * supported for transmission for MCS 12 - 13. ++ */ ++struct ieee80211_eht_mcs_nss_supp_20mhz_only { ++ u8 rx_tx_mcs7_max_nss; ++ u8 rx_tx_mcs9_max_nss; ++ u8 rx_tx_mcs11_max_nss; ++ u8 rx_tx_mcs13_max_nss; ++}; ++ ++/** ++ * struct ieee80211_eht_mcs_nss_supp_bw - EHT max supported NSS per MCS (except ++ * 20MHz only stations). ++ * ++ * For each field below, bits 0 - 3 indicate the maximal number of spatial ++ * streams for Rx, and bits 4 - 7 indicate the maximal number of spatial streams ++ * for Tx. ++ * ++ * @rx_tx_mcs9_max_nss: indicates the maximum number of spatial streams ++ * supported for reception and the maximum number of spatial streams ++ * supported for transmission for MCS 0 - 9. ++ * @rx_tx_mcs11_max_nss: indicates the maximum number of spatial streams ++ * supported for reception and the maximum number of spatial streams ++ * supported for transmission for MCS 10 - 11. ++ * @rx_tx_mcs13_max_nss: indicates the maximum number of spatial streams ++ * supported for reception and the maximum number of spatial streams ++ * supported for transmission for MCS 12 - 13. ++ */ ++struct ieee80211_eht_mcs_nss_supp_bw { ++ u8 rx_tx_mcs9_max_nss; ++ u8 rx_tx_mcs11_max_nss; ++ u8 rx_tx_mcs13_max_nss; ++}; ++ ++/** ++ * struct ieee80211_eht_cap_elem_fixed - EHT capabilities fixed data ++ * ++ * This structure is the "EHT Capabilities element" fixed fields as ++ * described in P802.11be_D2.0 section 9.4.2.313. ++ * ++ * @mac_cap_info: MAC capabilities, see IEEE80211_EHT_MAC_CAP* ++ * @phy_cap_info: PHY capabilities, see IEEE80211_EHT_PHY_CAP* ++ */ ++struct ieee80211_eht_cap_elem_fixed { ++ u8 mac_cap_info[2]; ++ u8 phy_cap_info[9]; ++} __packed; ++ ++ ++/** + * struct ieee80211_mu_edca_param_set - MU EDCA Parameter Set element + * + * This structure is the "MU EDCA Parameter Set element" fields as +@@ -2228,6 +2295,12 @@ int ieee80211_get_vht_max_nss(struct iee + #define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US 0x80 + #define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_RESERVED 0xc0 + #define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_MASK 0xc0 ++#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x0 ++#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x1 ++#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2 ++#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x3 ++#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS 6 ++#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0xc0 + + #define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x01 + +@@ -3982,4 +4055,7 @@ enum ieee80211_range_params_max_total_lt + IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_UNSPECIFIED, + }; + ++/* multi-link device */ ++#define IEEE80211_MLD_MAX_NUM_LINKS 15 ++ + #endif /* LINUX_IEEE80211_H */ +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -348,6 +348,31 @@ struct ieee80211_sta_vht_cap { + #define IEEE80211_HE_PPE_THRES_MAX_LEN 25 + + /** ++ * struct ieee80211_eht_mcs_nss_supp - EHT max supported NSS per MCS ++ * ++ * See P802.11be_D1.3 Table 9-401k - "Subfields of the Supported EHT-MCS ++ * and NSS Set field" ++ * ++ * @only_20mhz: MCS/NSS support for 20 MHz-only STA. ++ * @bw: MCS/NSS support for 80, 160 and 320 MHz ++ * @bw._80: MCS/NSS support for BW <= 80 MHz ++ * @bw._160: MCS/NSS support for BW = 160 MHz ++ * @bw._320: MCS/NSS support for BW = 320 MHz ++ */ ++struct ieee80211_eht_mcs_nss_supp { ++ union { ++ struct ieee80211_eht_mcs_nss_supp_20mhz_only only_20mhz; ++ struct { ++ struct ieee80211_eht_mcs_nss_supp_bw _80; ++ struct ieee80211_eht_mcs_nss_supp_bw _160; ++ struct ieee80211_eht_mcs_nss_supp_bw _320; ++ } __packed bw; ++ } __packed; ++} __packed; ++ ++#define IEEE80211_EHT_PPE_THRES_MAX_LEN 32 ++ ++/** + * struct ieee80211_sta_he_cap - STA's HE capabilities + * + * This structure describes most essential parameters needed +@@ -366,6 +391,24 @@ struct ieee80211_sta_he_cap { + }; + + /** ++ * struct ieee80211_sta_eht_cap - STA's EHT capabilities ++ * ++ * This structure describes most essential parameters needed ++ * to describe 802.11be EHT capabilities for a STA. ++ * ++ * @has_eht: true iff EHT data is valid. ++ * @eht_cap_elem: Fixed portion of the eht capabilities element. ++ * @eht_mcs_nss_supp: The supported NSS/MCS combinations. ++ * @eht_ppe_thres: Holds the PPE Thresholds data. ++ */ ++struct ieee80211_sta_eht_cap { ++ bool has_eht; ++ struct ieee80211_eht_cap_elem_fixed eht_cap_elem; ++ struct ieee80211_eht_mcs_nss_supp eht_mcs_nss_supp; ++ u8 eht_ppe_thres[IEEE80211_EHT_PPE_THRES_MAX_LEN]; ++}; ++ ++/** + * struct ieee80211_sband_iftype_data - sband data per interface type + * + * This structure encapsulates sband data that is relevant for the diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index b3efdab23e..4514937595 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,16 +1,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=4 +PKG_RELEASE=5 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-11-12 -PKG_SOURCE_VERSION:=4bf2607362fc64fc4cb7d662feb736b7536c0811 -PKG_MIRROR_HASH:=fd4291ac89e14750073cc8c345772883d756bf32cf19fc7205fa344b5b3b91d0 +PKG_SOURCE_DATE:=2022-12-22 +PKG_SOURCE_VERSION:=5b509e80384ab019ac11aa90c81ec0dbb5b0d7f2 +PKG_MIRROR_HASH:=6fc25df4d28becd010ff4971b23731c08b53e69381a9e4c868091899712f78a9 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 @@ -221,16 +221,21 @@ endef define KernelPackage/mt7915e $(KernelPackage/mt76-default) TITLE:=MediaTek MT7915e wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY + DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko AUTOLOAD:=$(call AutoProbe,mt7915e) endef +define KernelPackage/mt7921-firmware + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7921 firmware +endef + define KernelPackage/mt7921-common $(KernelPackage/mt76-default) TITLE:=MediaTek MT7615 wireless driver common code HIDDEN:=1 - DEPENDS+=+kmod-mt76-connac +@DRIVER_11AX_SUPPORT + DEPENDS+=+kmod-mt76-connac +kmod-mt7921-firmware +@DRIVER_11AX_SUPPORT FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko endef @@ -450,7 +455,7 @@ define KernelPackage/mt7915e/install $(1)/lib/firmware/mediatek endef -define KernelPackage/mt7921e/install +define KernelPackage/mt7921-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek cp \ $(PKG_BUILD_DIR)/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin \ @@ -485,6 +490,7 @@ $(eval $(call KernelPackage,mt7663-usb-sdio)) $(eval $(call KernelPackage,mt7663u)) $(eval $(call KernelPackage,mt7663s)) $(eval $(call KernelPackage,mt7915e)) +$(eval $(call KernelPackage,mt7921-firmware)) $(eval $(call KernelPackage,mt7921-common)) $(eval $(call KernelPackage,mt7921u)) $(eval $(call KernelPackage,mt7921s)) diff --git a/package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch b/package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch new file mode 100644 index 0000000000..3fe394c70c --- /dev/null +++ b/package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch @@ -0,0 +1,1535 @@ +From 6391507b204f63f7a048595a44b5eed4e5ede02b Mon Sep 17 00:00:00 2001 +From: coolsnowwolf +Date: Tue, 20 Dec 2022 22:32:46 +0800 +Subject: [PATCH] Revert "sync with upstream" + +This reverts commit ec46d7486ab91786fbfe77edd306911b7c543334. +--- + debugfs.c | 28 -------- + dma.c | 2 +- + eeprom.c | 1 + + mac80211.c | 4 +- + mt7603/beacon.c | 2 +- + mt7603/dma.c | 4 +- + mt7603/mac.c | 16 ++--- + mt7603/main.c | 9 ++- + mt7615/dma.c | 4 +- + mt7615/main.c | 7 +- + mt7615/mcu.c | 8 +-- + mt7615/soc.c | 3 +- + mt76_connac_mcu.c | 101 ++++++++++++++-------------- + mt76x02.h | 5 +- + mt76x02_beacon.c | 2 +- + mt76x02_mac.c | 6 +- + mt76x02_mmio.c | 4 +- + mt76x02_util.c | 5 +- + mt76x2/pci.c | 2 +- + mt7915/Kconfig | 1 - + mt7915/debugfs.c | 4 +- + mt7915/dma.c | 4 +- + mt7915/init.c | 3 +- + mt7915/mac.c | 2 +- + mt7915/main.c | 11 ++- + mt7915/mcu.c | 166 +++++++++++++++++++++++----------------------- + mt7915/soc.c | 1 - + mt7921/dma.c | 4 +- + mt7921/init.c | 4 +- + mt7921/mac.c | 2 +- + mt7921/main.c | 18 +++-- + mt7921/mcu.c | 6 +- + mt7921/pci_mac.c | 2 +- + tx.c | 11 +-- + usb.c | 2 +- + 35 files changed, 204 insertions(+), 250 deletions(-) + +--- a/debugfs.c ++++ b/debugfs.c +@@ -25,32 +25,6 @@ mt76_reg_get(void *data, u64 *val) + DEFINE_DEBUGFS_ATTRIBUTE(fops_regval, mt76_reg_get, mt76_reg_set, + "0x%08llx\n"); + +-static int +-mt76_napi_threaded_set(void *data, u64 val) +-{ +- struct mt76_dev *dev = data; +- +- if (!mt76_is_mmio(dev)) +- return -EOPNOTSUPP; +- +- if (dev->napi_dev.threaded != val) +- return dev_set_threaded(&dev->napi_dev, val); +- +- return 0; +-} +- +-static int +-mt76_napi_threaded_get(void *data, u64 *val) +-{ +- struct mt76_dev *dev = data; +- +- *val = dev->napi_dev.threaded; +- return 0; +-} +- +-DEFINE_DEBUGFS_ATTRIBUTE(fops_napi_threaded, mt76_napi_threaded_get, +- mt76_napi_threaded_set, "%llu\n"); +- + int mt76_queues_read(struct seq_file *s, void *data) + { + struct mt76_dev *dev = dev_get_drvdata(s->private); +@@ -116,8 +90,6 @@ mt76_register_debugfs_fops(struct mt76_p + debugfs_create_bool("led_active_low", 0600, dir, &phy->leds.al); + debugfs_create_u32("regidx", 0600, dir, &dev->debugfs_reg); + debugfs_create_file_unsafe("regval", 0600, dir, dev, fops); +- debugfs_create_file_unsafe("napi_threaded", 0600, dir, dev, +- &fops_napi_threaded); + debugfs_create_blob("eeprom", 0400, dir, &dev->eeprom); + if (dev->otp.data) + debugfs_create_blob("otp", 0400, dir, &dev->otp); +--- a/dma.c ++++ b/dma.c +@@ -910,7 +910,7 @@ mt76_dma_init(struct mt76_dev *dev, + dev->napi_dev.threaded = 1; + + mt76_for_each_q_rx(dev, i) { +- netif_napi_add(&dev->napi_dev, &dev->napi[i], poll); ++ netif_napi_add(&dev->napi_dev, &dev->napi[i], poll, 64); + mt76_dma_rx_fill(dev, &dev->q_rx[i]); + napi_enable(&dev->napi[i]); + } +--- a/eeprom.c ++++ b/eeprom.c +@@ -106,6 +106,7 @@ void + mt76_eeprom_override(struct mt76_phy *phy) + { + struct mt76_dev *dev = phy->dev; ++ + struct device_node *np = dev->dev->of_node; + + of_get_mac_address(np, phy->macaddr); +--- a/mac80211.c ++++ b/mac80211.c +@@ -1496,7 +1496,7 @@ EXPORT_SYMBOL_GPL(mt76_get_sar_power); + static void + __mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) + { +- if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif)) ++ if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif)) + ieee80211_csa_finish(vif); + } + +@@ -1518,7 +1518,7 @@ __mt76_csa_check(void *priv, u8 *mac, st + { + struct mt76_dev *dev = priv; + +- if (!vif->bss_conf.csa_active) ++ if (!vif->csa_active) + return; + + dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif); +--- a/mt7603/beacon.c ++++ b/mt7603/beacon.c +@@ -20,7 +20,7 @@ mt7603_update_beacon_iter(void *priv, u8 + if (!(mdev->beacon_mask & BIT(mvif->idx))) + return; + +- skb = ieee80211_beacon_get(mt76_hw(dev), vif, 0); ++ skb = ieee80211_beacon_get(mt76_hw(dev), vif); + if (!skb) + return; + +--- a/mt7603/dma.c ++++ b/mt7603/dma.c +@@ -223,8 +223,8 @@ int mt7603_dma_init(struct mt7603_dev *d + if (ret) + return ret; + +- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, +- mt7603_poll_tx); ++ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, ++ mt7603_poll_tx, NAPI_POLL_WEIGHT); + napi_enable(&dev->mt76.tx_napi); + + return 0; +--- a/mt7603/mac.c ++++ b/mt7603/mac.c +@@ -326,21 +326,19 @@ void mt7603_wtbl_update_cap(struct mt760 + + addr = mt7603_wtbl1_addr(idx); + +- ampdu_density = sta->deflink.ht_cap.ampdu_density; ++ ampdu_density = sta->ht_cap.ampdu_density; + if (ampdu_density < IEEE80211_HT_MPDU_DENSITY_4) + ampdu_density = IEEE80211_HT_MPDU_DENSITY_4; + + val = mt76_rr(dev, addr + 2 * 4); + val &= MT_WTBL1_W2_KEY_TYPE | MT_WTBL1_W2_ADMISSION_CONTROL; +- val |= FIELD_PREP(MT_WTBL1_W2_AMPDU_FACTOR, +- sta->deflink.ht_cap.ampdu_factor) | +- FIELD_PREP(MT_WTBL1_W2_MPDU_DENSITY, +- sta->deflink.ht_cap.ampdu_density) | ++ val |= FIELD_PREP(MT_WTBL1_W2_AMPDU_FACTOR, sta->ht_cap.ampdu_factor) | ++ FIELD_PREP(MT_WTBL1_W2_MPDU_DENSITY, sta->ht_cap.ampdu_density) | + MT_WTBL1_W2_TXS_BAF_REPORT; + +- if (sta->deflink.ht_cap.cap) ++ if (sta->ht_cap.cap) + val |= MT_WTBL1_W2_HT; +- if (sta->deflink.vht_cap.cap) ++ if (sta->vht_cap.cap) + val |= MT_WTBL1_W2_VHT; + + mt76_wr(dev, addr + 2 * 4, val); +@@ -349,9 +347,9 @@ void mt7603_wtbl_update_cap(struct mt760 + val = mt76_rr(dev, addr + 9 * 4); + val &= ~(MT_WTBL2_W9_SHORT_GI_20 | MT_WTBL2_W9_SHORT_GI_40 | + MT_WTBL2_W9_SHORT_GI_80); +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) + val |= MT_WTBL2_W9_SHORT_GI_20; +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) + val |= MT_WTBL2_W9_SHORT_GI_40; + mt76_wr(dev, addr + 9 * 4, val); + } +--- a/mt7603/main.c ++++ b/mt7603/main.c +@@ -297,7 +297,7 @@ mt7603_configure_filter(struct ieee80211 + + static void + mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- struct ieee80211_bss_conf *info, u64 changed) ++ struct ieee80211_bss_conf *info, u32 changed) + { + struct mt7603_dev *dev = hw->priv; + struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv; +@@ -305,7 +305,7 @@ mt7603_bss_info_changed(struct ieee80211 + mutex_lock(&dev->mt76.mutex); + + if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BSSID)) { +- if (vif->cfg.assoc || vif->cfg.ibss_joined) { ++ if (info->assoc || info->ibss_joined) { + mt76_wr(dev, MT_BSSID0(mvif->idx), + get_unaligned_le32(info->bssid)); + mt76_wr(dev, MT_BSSID1(mvif->idx), +@@ -527,8 +527,7 @@ mt7603_set_key(struct ieee80211_hw *hw, + } + + static int +-mt7603_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, u16 queue, ++mt7603_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, + const struct ieee80211_tx_queue_params *params) + { + struct mt7603_dev *dev = hw->priv; +@@ -658,7 +657,7 @@ mt7603_sta_rate_tbl_update(struct ieee80 + mt7603_wtbl_set_rates(dev, msta, NULL, msta->rates); + msta->rate_probe = false; + mt7603_wtbl_set_smps(dev, msta, +- sta->deflink.smps_mode == IEEE80211_SMPS_DYNAMIC); ++ sta->smps_mode == IEEE80211_SMPS_DYNAMIC); + spin_unlock_bh(&dev->mt76.lock); + } + +--- a/mt7615/dma.c ++++ b/mt7615/dma.c +@@ -281,8 +281,8 @@ int mt7615_dma_init(struct mt7615_dev *d + if (ret < 0) + return ret; + +- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, +- mt7615_poll_tx); ++ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, ++ mt7615_poll_tx, NAPI_POLL_WEIGHT); + napi_enable(&dev->mt76.tx_napi); + + mt76_poll(dev, MT_WPDMA_GLO_CFG, +--- a/mt7615/main.c ++++ b/mt7615/main.c +@@ -473,8 +473,7 @@ static int mt7615_config(struct ieee8021 + } + + static int +-mt7615_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, u16 queue, ++mt7615_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, + const struct ieee80211_tx_queue_params *params) + { + struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv; +@@ -556,7 +555,7 @@ static void mt7615_configure_filter(stru + static void mt7615_bss_info_changed(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *info, +- u64 changed) ++ u32 changed) + { + struct mt7615_dev *dev = mt7615_hw_dev(hw); + struct mt7615_phy *phy = mt7615_hw_phy(hw); +@@ -599,7 +598,7 @@ static void mt7615_bss_info_changed(stru + } + + if (changed & BSS_CHANGED_ASSOC) +- mt7615_mac_set_beacon_filter(phy, vif, vif->cfg.assoc); ++ mt7615_mac_set_beacon_filter(phy, vif, info->assoc); + + mt7615_mutex_release(dev); + } +--- a/mt7615/mcu.c ++++ b/mt7615/mcu.c +@@ -352,7 +352,7 @@ out: + static void + mt7615_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) + { +- if (vif->bss_conf.csa_active) ++ if (vif->csa_active) + ieee80211_csa_finish(vif); + } + +@@ -698,7 +698,7 @@ mt7615_mcu_add_beacon_offload(struct mt7 + if (!enable) + goto out; + +- skb = ieee80211_beacon_get_template(hw, vif, &offs, 0); ++ skb = ieee80211_beacon_get_template(hw, vif, &offs); + if (!skb) + return -EINVAL; + +@@ -1073,7 +1073,7 @@ mt7615_mcu_uni_add_beacon_offload(struct + if (!enable) + goto out; + +- skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs, 0); ++ skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs); + if (!skb) + return -EINVAL; + +@@ -2525,7 +2525,7 @@ int mt7615_mcu_set_bss_pm(struct mt7615_ + u8 pad; + } req = { + .bss_idx = mvif->mt76.idx, +- .aid = cpu_to_le16(vif->cfg.aid), ++ .aid = cpu_to_le16(vif->bss_conf.aid), + .dtim_period = vif->bss_conf.dtim_period, + .bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int), + }; +--- a/mt7615/soc.c ++++ b/mt7615/soc.c +@@ -31,6 +31,7 @@ int mt7622_wmac_init(struct mt7615_dev * + + static int mt7622_wmac_probe(struct platform_device *pdev) + { ++ struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + void __iomem *mem_base; + int irq; + +@@ -38,7 +39,7 @@ static int mt7622_wmac_probe(struct plat + if (irq < 0) + return irq; + +- mem_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); ++ mem_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(mem_base)) + return PTR_ERR(mem_base); + +--- a/mt76_connac_mcu.c ++++ b/mt76_connac_mcu.c +@@ -196,7 +196,7 @@ int mt76_connac_mcu_set_vif_ps(struct mt + */ + } req = { + .bss_idx = mvif->idx, +- .ps_state = vif->cfg.ps ? 2 : 0, ++ .ps_state = vif->bss_conf.ps ? 2 : 0, + }; + + if (vif->type != NL80211_IFTYPE_STATION) +@@ -407,7 +407,7 @@ void mt76_connac_mcu_sta_basic_tlv(struc + else + conn_type = CONNECTION_INFRA_AP; + basic->conn_type = cpu_to_le32(conn_type); +- basic->aid = cpu_to_le16(vif->cfg.aid); ++ basic->aid = cpu_to_le16(vif->bss_conf.aid); + break; + case NL80211_IFTYPE_ADHOC: + basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC); +@@ -551,7 +551,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(st + + if (sta) { + if (vif->type == NL80211_IFTYPE_STATION) +- generic->partial_aid = cpu_to_le16(vif->cfg.aid); ++ generic->partial_aid = cpu_to_le16(vif->bss_conf.aid); + else + generic->partial_aid = cpu_to_le16(sta->aid); + memcpy(generic->peer_addr, sta->addr, ETH_ALEN); +@@ -597,14 +597,14 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_ + vif->type != NL80211_IFTYPE_STATION) + return; + +- if (!sta->deflink.agg.max_amsdu_len) ++ if (!sta->max_amsdu_len) + return; + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu)); + amsdu = (struct sta_rec_amsdu *)tlv; + amsdu->max_amsdu_num = 8; + amsdu->amsdu_en = true; +- amsdu->max_mpdu_size = sta->deflink.agg.max_amsdu_len >= ++ amsdu->max_mpdu_size = sta->max_amsdu_len >= + IEEE80211_MAX_MPDU_LEN_VHT_7991; + + wcid->amsdu = true; +@@ -615,7 +615,7 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_ + static void + mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) + { +- struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap; ++ struct ieee80211_sta_he_cap *he_cap = &sta->he_cap; + struct ieee80211_he_cap_elem *elem = &he_cap->he_cap_elem; + struct sta_rec_he *he; + struct tlv *tlv; +@@ -703,7 +703,7 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buf + + he->he_cap = cpu_to_le32(cap); + +- switch (sta->deflink.bandwidth) { ++ switch (sta->bandwidth) { + case IEEE80211_STA_RX_BW_160: + if (elem->phy_cap_info[0] & + IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) +@@ -788,9 +788,9 @@ mt76_connac_get_phy_mode_v2(struct mt76_ + u8 mode = 0; + + if (sta) { +- ht_cap = &sta->deflink.ht_cap; +- vht_cap = &sta->deflink.vht_cap; +- he_cap = &sta->deflink.he_cap; ++ ht_cap = &sta->ht_cap; ++ vht_cap = &sta->vht_cap; ++ he_cap = &sta->he_cap; + } else { + struct ieee80211_supported_band *sband; + +@@ -839,25 +839,25 @@ void mt76_connac_mcu_sta_tlv(struct mt76 + u16 supp_rates; + + /* starec ht */ +- if (sta->deflink.ht_cap.ht_supported) { ++ if (sta->ht_cap.ht_supported) { + struct sta_rec_ht *ht; + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HT, sizeof(*ht)); + ht = (struct sta_rec_ht *)tlv; +- ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap); ++ ht->ht_cap = cpu_to_le16(sta->ht_cap.cap); + } + + /* starec vht */ +- if (sta->deflink.vht_cap.vht_supported) { ++ if (sta->vht_cap.vht_supported) { + struct sta_rec_vht *vht; + int len; + + len = is_mt7921(dev) ? sizeof(*vht) : sizeof(*vht) - 4; + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_VHT, len); + vht = (struct sta_rec_vht *)tlv; +- vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap); +- vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map; +- vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map; ++ vht->vht_cap = cpu_to_le32(sta->vht_cap.cap); ++ vht->vht_rx_mcs_map = sta->vht_cap.vht_mcs.rx_mcs_map; ++ vht->vht_tx_mcs_map = sta->vht_cap.vht_mcs.tx_mcs_map; + } + + /* starec uapsd */ +@@ -866,11 +866,11 @@ void mt76_connac_mcu_sta_tlv(struct mt76 + if (!is_mt7921(dev)) + return; + +- if (sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he) ++ if (sta->ht_cap.ht_supported || sta->he_cap.has_he) + mt76_connac_mcu_sta_amsdu_tlv(skb, sta, vif); + + /* starec he */ +- if (sta->deflink.he_cap.has_he) { ++ if (sta->he_cap.has_he) { + mt76_connac_mcu_sta_he_tlv(skb, sta); + mt76_connac_mcu_sta_he_tlv_v2(skb, sta); + if (band == NL80211_BAND_6GHZ && +@@ -880,7 +880,7 @@ void mt76_connac_mcu_sta_tlv(struct mt76 + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE_6G, + sizeof(*he_6g_capa)); + he_6g_capa = (struct sta_rec_he_6g_capa *)tlv; +- he_6g_capa->capa = sta->deflink.he_6ghz_capa.capa; ++ he_6g_capa->capa = sta->he_6ghz_capa.capa; + } + } + +@@ -890,14 +890,14 @@ void mt76_connac_mcu_sta_tlv(struct mt76 + phy->basic_rate = cpu_to_le16((u16)vif->bss_conf.basic_rates); + phy->rcpi = rcpi; + phy->ampdu = FIELD_PREP(IEEE80211_HT_AMPDU_PARM_FACTOR, +- sta->deflink.ht_cap.ampdu_factor) | ++ sta->ht_cap.ampdu_factor) | + FIELD_PREP(IEEE80211_HT_AMPDU_PARM_DENSITY, +- sta->deflink.ht_cap.ampdu_density); ++ sta->ht_cap.ampdu_density); + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra_info)); + ra_info = (struct sta_rec_ra_info *)tlv; + +- supp_rates = sta->deflink.supp_rates[band]; ++ supp_rates = sta->supp_rates[band]; + if (band == NL80211_BAND_2GHZ) + supp_rates = FIELD_PREP(RA_LEGACY_OFDM, supp_rates >> 4) | + FIELD_PREP(RA_LEGACY_CCK, supp_rates & 0xf); +@@ -906,18 +906,17 @@ void mt76_connac_mcu_sta_tlv(struct mt76 + + ra_info->legacy = cpu_to_le16(supp_rates); + +- if (sta->deflink.ht_cap.ht_supported) +- memcpy(ra_info->rx_mcs_bitmask, +- sta->deflink.ht_cap.mcs.rx_mask, ++ if (sta->ht_cap.ht_supported) ++ memcpy(ra_info->rx_mcs_bitmask, sta->ht_cap.mcs.rx_mask, + HT_MCS_MASK_NUM); + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_STATE, sizeof(*state)); + state = (struct sta_rec_state *)tlv; + state->state = sta_state; + +- if (sta->deflink.vht_cap.vht_supported) { +- state->vht_opmode = sta->deflink.bandwidth; +- state->vht_opmode |= (sta->deflink.rx_nss - 1) << ++ if (sta->vht_cap.vht_supported) { ++ state->vht_opmode = sta->bandwidth; ++ state->vht_opmode |= (sta->rx_nss - 1) << + IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT; + } + } +@@ -933,7 +932,7 @@ void mt76_connac_mcu_wtbl_smps_tlv(struc + tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_SMPS, sizeof(*smps), + wtbl_tlv, sta_wtbl); + smps = (struct wtbl_smps *)tlv; +- smps->smps = (sta->deflink.smps_mode == IEEE80211_SMPS_DYNAMIC); ++ smps->smps = (sta->smps_mode == IEEE80211_SMPS_DYNAMIC); + } + EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_smps_tlv); + +@@ -945,27 +944,27 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct + struct tlv *tlv; + u32 flags = 0; + +- if (sta->deflink.ht_cap.ht_supported || sta->deflink.he_6ghz_capa.capa) { ++ if (sta->ht_cap.ht_supported || sta->he_6ghz_capa.capa) { + tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_HT, sizeof(*ht), + wtbl_tlv, sta_wtbl); + ht = (struct wtbl_ht *)tlv; + ht->ldpc = ht_ldpc && +- !!(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING); ++ !!(sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING); + +- if (sta->deflink.ht_cap.ht_supported) { +- ht->af = sta->deflink.ht_cap.ampdu_factor; +- ht->mm = sta->deflink.ht_cap.ampdu_density; ++ if (sta->ht_cap.ht_supported) { ++ ht->af = sta->ht_cap.ampdu_factor; ++ ht->mm = sta->ht_cap.ampdu_density; + } else { +- ht->af = le16_get_bits(sta->deflink.he_6ghz_capa.capa, ++ ht->af = le16_get_bits(sta->he_6ghz_capa.capa, + IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP); +- ht->mm = le16_get_bits(sta->deflink.he_6ghz_capa.capa, ++ ht->mm = le16_get_bits(sta->he_6ghz_capa.capa, + IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START); + } + + ht->ht = true; + } + +- if (sta->deflink.vht_cap.vht_supported || sta->deflink.he_6ghz_capa.capa) { ++ if (sta->vht_cap.vht_supported || sta->he_6ghz_capa.capa) { + struct wtbl_vht *vht; + u8 af; + +@@ -974,18 +973,18 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct + sta_wtbl); + vht = (struct wtbl_vht *)tlv; + vht->ldpc = vht_ldpc && +- !!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC); ++ !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC); + vht->vht = true; + + af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK, +- sta->deflink.vht_cap.cap); ++ sta->vht_cap.cap); + if (ht) + ht->af = max(ht->af, af); + } + + mt76_connac_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_tlv); + +- if (is_connac_v1(dev) && sta->deflink.ht_cap.ht_supported) { ++ if (is_connac_v1(dev) && sta->ht_cap.ht_supported) { + /* sgi */ + u32 msk = MT_WTBL_W5_SHORT_GI_20 | MT_WTBL_W5_SHORT_GI_40 | + MT_WTBL_W5_SHORT_GI_80 | MT_WTBL_W5_SHORT_GI_160; +@@ -995,15 +994,15 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct + sizeof(*raw), wtbl_tlv, + sta_wtbl); + +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) + flags |= MT_WTBL_W5_SHORT_GI_20; +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) + flags |= MT_WTBL_W5_SHORT_GI_40; + +- if (sta->deflink.vht_cap.vht_supported) { +- if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80) ++ if (sta->vht_cap.vht_supported) { ++ if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80) + flags |= MT_WTBL_W5_SHORT_GI_80; +- if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160) ++ if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160) + flags |= MT_WTBL_W5_SHORT_GI_160; + } + raw = (struct wtbl_raw *)tlv; +@@ -1289,9 +1288,9 @@ u8 mt76_connac_get_phy_mode(struct mt76_ + return 0x38; + + if (sta) { +- ht_cap = &sta->deflink.ht_cap; +- vht_cap = &sta->deflink.vht_cap; +- he_cap = &sta->deflink.he_cap; ++ ht_cap = &sta->ht_cap; ++ vht_cap = &sta->vht_cap; ++ he_cap = &sta->he_cap; + } else { + struct ieee80211_supported_band *sband; + +@@ -2231,10 +2230,8 @@ int mt76_connac_mcu_update_arp_filter(st + struct mt76_vif *vif, + struct ieee80211_bss_conf *info) + { +- struct ieee80211_vif *mvif = container_of(info, struct ieee80211_vif, +- bss_conf); + struct sk_buff *skb; +- int i, len = min_t(int, mvif->cfg.arp_addr_cnt, ++ int i, len = min_t(int, info->arp_addr_cnt, + IEEE80211_BSS_ARP_ADDR_LIST_LEN); + struct { + struct { +@@ -2262,7 +2259,7 @@ int mt76_connac_mcu_update_arp_filter(st + + skb_put_data(skb, &req_hdr, sizeof(req_hdr)); + for (i = 0; i < len; i++) +- skb_put_data(skb, &mvif->cfg.arp_addr_list[i], sizeof(__be32)); ++ skb_put_data(skb, &info->arp_addr_list[i], sizeof(__be32)); + + return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(OFFLOAD), true); + } +--- a/mt76x02.h ++++ b/mt76x02.h +@@ -170,8 +170,7 @@ int mt76x02_set_key(struct ieee80211_hw + struct ieee80211_vif *vif, struct ieee80211_sta *sta, + struct ieee80211_key_conf *key); + int mt76x02_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, u16 queue, +- const struct ieee80211_tx_queue_params *params); ++ u16 queue, const struct ieee80211_tx_queue_params *params); + void mt76x02_sta_rate_tbl_update(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta); +@@ -202,7 +201,7 @@ void mt76x02_sw_scan_complete(struct iee + void mt76x02_sta_ps(struct mt76_dev *dev, struct ieee80211_sta *sta, bool ps); + void mt76x02_bss_info_changed(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, +- struct ieee80211_bss_conf *info, u64 changed); ++ struct ieee80211_bss_conf *info, u32 changed); + void mt76x02_reconfig_complete(struct ieee80211_hw *hw, + enum ieee80211_reconfig_type reconfig_type); + +--- a/mt76x02_beacon.c ++++ b/mt76x02_beacon.c +@@ -143,7 +143,7 @@ mt76x02_update_beacon_iter(void *priv, u + if (!(dev->mt76.beacon_mask & BIT(mvif->idx))) + return; + +- skb = ieee80211_beacon_get(mt76_hw(dev), vif, 0); ++ skb = ieee80211_beacon_get(mt76_hw(dev), vif); + if (!skb) + return; + +--- a/mt76x02_mac.c ++++ b/mt76x02_mac.c +@@ -404,7 +404,7 @@ void mt76x02_mac_write_txwi(struct mt76x + txwi->rate |= cpu_to_le16(MT_RXWI_RATE_LDPC); + if ((info->flags & IEEE80211_TX_CTL_STBC) && nss == 1) + txwi->rate |= cpu_to_le16(MT_RXWI_RATE_STBC); +- if (nss > 1 && sta && sta->deflink.smps_mode == IEEE80211_SMPS_DYNAMIC) ++ if (nss > 1 && sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC) + txwi_flags |= MT_TXWI_FLAGS_MMPS; + if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) + txwi->ack_ctl |= MT_TXWI_ACK_CTL_REQ; +@@ -412,9 +412,9 @@ void mt76x02_mac_write_txwi(struct mt76x + txwi->ack_ctl |= MT_TXWI_ACK_CTL_NSEQ; + if ((info->flags & IEEE80211_TX_CTL_AMPDU) && sta) { + u8 ba_size = IEEE80211_MIN_AMPDU_BUF; +- u8 ampdu_density = sta->deflink.ht_cap.ampdu_density; ++ u8 ampdu_density = sta->ht_cap.ampdu_density; + +- ba_size <<= sta->deflink.ht_cap.ampdu_factor; ++ ba_size <<= sta->ht_cap.ampdu_factor; + ba_size = min_t(int, 63, ba_size - 1); + if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) + ba_size = 0; +--- a/mt76x02_mmio.c ++++ b/mt76x02_mmio.c +@@ -231,8 +231,8 @@ int mt76x02_dma_init(struct mt76x02_dev + if (ret) + return ret; + +- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, +- mt76x02_poll_tx); ++ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, ++ mt76x02_poll_tx, NAPI_POLL_WEIGHT); + napi_enable(&dev->mt76.tx_napi); + + return 0; +--- a/mt76x02_util.c ++++ b/mt76x02_util.c +@@ -486,8 +486,7 @@ int mt76x02_set_key(struct ieee80211_hw + EXPORT_SYMBOL_GPL(mt76x02_set_key); + + int mt76x02_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, u16 queue, +- const struct ieee80211_tx_queue_params *params) ++ u16 queue, const struct ieee80211_tx_queue_params *params) + { + struct mt76x02_dev *dev = hw->priv; + u8 cw_min = 5, cw_max = 10, qid; +@@ -636,7 +635,7 @@ EXPORT_SYMBOL_GPL(mt76x02_sta_ps); + void mt76x02_bss_info_changed(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *info, +- u64 changed) ++ u32 changed) + { + struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv; + struct mt76x02_dev *dev = hw->priv; +--- a/mt76x2/pci.c ++++ b/mt76x2/pci.c +@@ -80,7 +80,7 @@ mt76x2e_probe(struct pci_dev *pdev, cons + mt76_rmw_field(dev, 0x15a10, 0x1f << 16, 0x9); + + /* RG_SSUSB_G1_CDR_BIC_LTR = 0xf */ +- mt76_rmw_field(dev, 0x15a0c, 0xfU << 28, 0xf); ++ mt76_rmw_field(dev, 0x15a0c, 0xf << 28, 0xf); + + /* RG_SSUSB_CDR_BR_PE1D = 0x3 */ + mt76_rmw_field(dev, 0x15c58, 0x3 << 6, 0x3); +--- a/mt7915/Kconfig ++++ b/mt7915/Kconfig +@@ -5,7 +5,6 @@ config MT7915E + select WANT_DEV_COREDUMP + depends on MAC80211 + depends on PCI +- select RELAY + help + This adds support for MT7915-based wireless PCIe devices, + which support concurrent dual-band operation at both 5GHz +--- a/mt7915/debugfs.c ++++ b/mt7915/debugfs.c +@@ -1364,8 +1364,8 @@ static ssize_t mt7915_sta_fixed_rate_set + + phy.ldpc = (phy.bw || phy.ldpc) * GENMASK(2, 0); + for (i = 0; i <= phy.bw; i++) { +- phy.sgi |= gi << (i << sta->deflink.he_cap.has_he); +- phy.he_ltf |= he_ltf << (i << sta->deflink.he_cap.has_he); ++ phy.sgi |= gi << (i << sta->he_cap.has_he); ++ phy.he_ltf |= he_ltf << (i << sta->he_cap.has_he); + } + field = RATE_PARAM_FIXED; + +--- a/mt7915/dma.c ++++ b/mt7915/dma.c +@@ -550,8 +550,8 @@ int mt7915_dma_init(struct mt7915_dev *d + if (ret < 0) + return ret; + +- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, +- mt7915_poll_tx); ++ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, ++ mt7915_poll_tx, NAPI_POLL_WEIGHT); + napi_enable(&dev->mt76.tx_napi); + + mt7915_dma_enable(dev); +--- a/mt7915/init.c ++++ b/mt7915/init.c +@@ -1093,8 +1093,7 @@ mt7915_init_he_caps(struct mt7915_phy *p + mt7915_gen_ppe_thresh(he_cap->ppe_thres, nss); + } else { + he_cap_elem->phy_cap_info[9] |= +- u8_encode_bits(IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US, +- IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK); ++ IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US; + } + + if (band == NL80211_BAND_6GHZ) { +--- a/mt7915/mac.c ++++ b/mt7915/mac.c +@@ -853,7 +853,7 @@ mt7915_tx_check_aggr(struct ieee80211_st + u16 fc, tid; + u32 val; + +- if (!sta || !(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he)) ++ if (!sta || !(sta->ht_cap.ht_supported || sta->he_cap.has_he)) + return; + + tid = le32_get_bits(txwi[1], MT_TXD1_TID); +--- a/mt7915/main.c ++++ b/mt7915/main.c +@@ -490,8 +490,7 @@ static int mt7915_config(struct ieee8021 + } + + static int +-mt7915_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, u16 queue, ++mt7915_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, + const struct ieee80211_tx_queue_params *params) + { + struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; +@@ -586,7 +585,7 @@ mt7915_update_bss_color(struct ieee80211 + static void mt7915_bss_info_changed(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *info, +- u64 changed) ++ u32 changed) + { + struct mt7915_phy *phy = mt7915_hw_phy(hw); + struct mt7915_dev *dev = mt7915_hw_dev(hw); +@@ -606,7 +605,7 @@ static void mt7915_bss_info_changed(stru + } + + if (changed & BSS_CHANGED_ASSOC) +- mt7915_mcu_add_bss_info(phy, vif, vif->cfg.assoc); ++ mt7915_mcu_add_bss_info(phy, vif, info->assoc); + + if (changed & BSS_CHANGED_ERP_CTS_PROT) + mt7915_mac_enable_rtscts(dev, vif, info->use_cts_prot); +@@ -1146,10 +1145,10 @@ static int mt7915_sta_set_txpwr(struct i + { + struct mt7915_phy *phy = mt7915_hw_phy(hw); + struct mt7915_dev *dev = mt7915_hw_dev(hw); +- s16 txpower = sta->deflink.txpwr.power; ++ s16 txpower = sta->txpwr.power; + int ret; + +- if (sta->deflink.txpwr.type == NL80211_TX_POWER_AUTOMATIC) ++ if (sta->txpwr.type == NL80211_TX_POWER_AUTOMATIC) + txpower = 0; + + mutex_lock(&dev->mt76.mutex); +--- a/mt7915/mcu.c ++++ b/mt7915/mcu.c +@@ -59,7 +59,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee802 + struct mt7915_dev *dev = msta->vif->phy->dev; + enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band; + const u16 *mask = msta->vif->bitrate_mask.control[band].he_mcs; +- int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss; ++ int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss; + + for (nss = 0; nss < max_nss; nss++) { + int mcs; +@@ -99,7 +99,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee802 + + /* only support 2ss on 160MHz for mt7915 */ + if (is_mt7915(&dev->mt76) && nss > 1 && +- sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) ++ sta->bandwidth == IEEE80211_STA_RX_BW_160) + break; + } + +@@ -112,8 +112,8 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80 + { + struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; + struct mt7915_dev *dev = msta->vif->phy->dev; +- u16 mcs_map = le16_to_cpu(sta->deflink.vht_cap.vht_mcs.rx_mcs_map); +- int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss; ++ u16 mcs_map = le16_to_cpu(sta->vht_cap.vht_mcs.rx_mcs_map); ++ int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss; + u16 mcs; + + for (nss = 0; nss < max_nss; nss++, mcs_map >>= 2) { +@@ -135,7 +135,7 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80 + + /* only support 2ss on 160MHz for mt7915 */ + if (is_mt7915(&dev->mt76) && nss > 1 && +- sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) ++ sta->bandwidth == IEEE80211_STA_RX_BW_160) + break; + } + } +@@ -144,10 +144,10 @@ static void + mt7915_mcu_set_sta_ht_mcs(struct ieee80211_sta *sta, u8 *ht_mcs, + const u8 *mask) + { +- int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss; ++ int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss; + + for (nss = 0; nss < max_nss; nss++) +- ht_mcs[nss] = sta->deflink.ht_cap.mcs.rx_mask[nss] & mask[nss]; ++ ht_mcs[nss] = sta->ht_cap.mcs.rx_mask[nss] & mask[nss]; + } + + static int +@@ -220,7 +220,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev + static void + mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) + { +- if (vif->bss_conf.csa_active) ++ if (vif->csa_active) + ieee80211_csa_finish(vif); + } + +@@ -321,7 +321,7 @@ mt7915_mcu_rx_log_message(struct mt7915_ + static void + mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) + { +- if (!vif->bss_conf.color_change_active) ++ if (!vif->color_change_active) + return; + + ieee80211_color_change_finish(vif); +@@ -707,13 +707,13 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *sk + struct ieee80211_vif *vif) + { + struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; +- struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem; ++ struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem; + struct ieee80211_he_mcs_nss_supp mcs_map; + struct sta_rec_he *he; + struct tlv *tlv; + u32 cap = 0; + +- if (!sta->deflink.he_cap.has_he) ++ if (!sta->he_cap.has_he) + return; + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE, sizeof(*he)); +@@ -799,8 +799,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *sk + + he->he_cap = cpu_to_le32(cap); + +- mcs_map = sta->deflink.he_cap.he_mcs_nss_supp; +- switch (sta->deflink.bandwidth) { ++ mcs_map = sta->he_cap.he_mcs_nss_supp; ++ switch (sta->bandwidth) { + case IEEE80211_STA_RX_BW_160: + if (elem->phy_cap_info[0] & + IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) +@@ -850,7 +850,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_de + struct ieee80211_sta *sta, struct ieee80211_vif *vif) + { + struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; +- struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem; ++ struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem; + struct sta_rec_muru *muru; + struct tlv *tlv; + +@@ -869,11 +869,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_de + muru->cfg.mimo_ul_en = true; + muru->cfg.ofdma_dl_en = true; + +- if (sta->deflink.vht_cap.vht_supported) ++ if (sta->vht_cap.vht_supported) + muru->mimo_dl.vht_mu_bfee = +- !!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); ++ !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); + +- if (!sta->deflink.he_cap.has_he) ++ if (!sta->he_cap.has_he) + return; + + muru->mimo_dl.partial_bw_dl_mimo = +@@ -907,13 +907,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *sk + struct sta_rec_ht *ht; + struct tlv *tlv; + +- if (!sta->deflink.ht_cap.ht_supported) ++ if (!sta->ht_cap.ht_supported) + return; + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HT, sizeof(*ht)); + + ht = (struct sta_rec_ht *)tlv; +- ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap); ++ ht->ht_cap = cpu_to_le16(sta->ht_cap.cap); + } + + static void +@@ -922,15 +922,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *s + struct sta_rec_vht *vht; + struct tlv *tlv; + +- if (!sta->deflink.vht_cap.vht_supported) ++ if (!sta->vht_cap.vht_supported) + return; + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_VHT, sizeof(*vht)); + + vht = (struct sta_rec_vht *)tlv; +- vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap); +- vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map; +- vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map; ++ vht->vht_cap = cpu_to_le32(sta->vht_cap.cap); ++ vht->vht_rx_mcs_map = sta->vht_cap.vht_mcs.rx_mcs_map; ++ vht->vht_tx_mcs_map = sta->vht_cap.vht_mcs.tx_mcs_map; + } + + static void +@@ -945,7 +945,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_d + vif->type != NL80211_IFTYPE_AP) + return; + +- if (!sta->deflink.agg.max_amsdu_len) ++ if (!sta->max_amsdu_len) + return; + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu)); +@@ -954,7 +954,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_d + amsdu->amsdu_en = true; + msta->wcid.amsdu = true; + +- switch (sta->deflink.agg.max_amsdu_len) { ++ switch (sta->max_amsdu_len) { + case IEEE80211_MAX_MPDU_LEN_VHT_11454: + if (!is_mt7915(&dev->mt76)) { + amsdu->max_mpdu_size = +@@ -1017,8 +1017,8 @@ mt7915_is_ebf_supported(struct mt7915_ph + if (!bfee && tx_ant < 2) + return false; + +- if (sta->deflink.he_cap.has_he) { +- struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem; ++ if (sta->he_cap.has_he) { ++ struct ieee80211_he_cap_elem *pe = &sta->he_cap.he_cap_elem; + + if (bfee) + return mvif->cap.he_su_ebfee && +@@ -1028,8 +1028,8 @@ mt7915_is_ebf_supported(struct mt7915_ph + HE_PHY(CAP4_SU_BEAMFORMEE, pe->phy_cap_info[4]); + } + +- if (sta->deflink.vht_cap.vht_supported) { +- u32 cap = sta->deflink.vht_cap.cap; ++ if (sta->vht_cap.vht_supported) { ++ u32 cap = sta->vht_cap.cap; + + if (bfee) + return mvif->cap.vht_su_ebfee && +@@ -1055,7 +1055,7 @@ static void + mt7915_mcu_sta_bfer_ht(struct ieee80211_sta *sta, struct mt7915_phy *phy, + struct sta_rec_bf *bf) + { +- struct ieee80211_mcs_info *mcs = &sta->deflink.ht_cap.mcs; ++ struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; + u8 n = 0; + + bf->tx_mode = MT_PHY_TYPE_HT; +@@ -1080,7 +1080,7 @@ static void + mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy, + struct sta_rec_bf *bf, bool explicit) + { +- struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap; ++ struct ieee80211_sta_vht_cap *pc = &sta->vht_cap; + struct ieee80211_sta_vht_cap *vc = &phy->mt76->sband_5g.sband.vht_cap; + u16 mcs_map = le16_to_cpu(pc->vht_mcs.rx_mcs_map); + u8 nss_mcs = mt7915_mcu_get_sta_nss(mcs_map); +@@ -1101,14 +1101,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211 + bf->ncol = min_t(u8, nss_mcs, bf->nrow); + bf->ibf_ncol = bf->ncol; + +- if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) ++ if (sta->bandwidth == IEEE80211_STA_RX_BW_160) + bf->nrow = 1; + } else { + bf->nrow = tx_ant; + bf->ncol = min_t(u8, nss_mcs, bf->nrow); + bf->ibf_ncol = nss_mcs; + +- if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) ++ if (sta->bandwidth == IEEE80211_STA_RX_BW_160) + bf->ibf_nrow = 1; + } + } +@@ -1117,7 +1117,7 @@ static void + mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif, + struct mt7915_phy *phy, struct sta_rec_bf *bf) + { +- struct ieee80211_sta_he_cap *pc = &sta->deflink.he_cap; ++ struct ieee80211_sta_he_cap *pc = &sta->he_cap; + struct ieee80211_he_cap_elem *pe = &pc->he_cap_elem; + const struct ieee80211_sta_he_cap *vc = + mt76_connac_get_he_phy_cap(phy->mt76, vif); +@@ -1142,7 +1142,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_ + bf->ncol = min_t(u8, nss_mcs, bf->nrow); + bf->ibf_ncol = bf->ncol; + +- if (sta->deflink.bandwidth != IEEE80211_STA_RX_BW_160) ++ if (sta->bandwidth != IEEE80211_STA_RX_BW_160) + return; + + /* go over for 160MHz and 80p80 */ +@@ -1190,7 +1190,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_de + }; + bool ebf; + +- if (!(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he)) ++ if (!(sta->ht_cap.ht_supported || sta->he_cap.has_he)) + return; + + ebf = mt7915_is_ebf_supported(phy, vif, sta, false); +@@ -1204,21 +1204,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_de + * vht: support eBF and iBF + * ht: iBF only, since mac80211 lacks of eBF support + */ +- if (sta->deflink.he_cap.has_he && ebf) ++ if (sta->he_cap.has_he && ebf) + mt7915_mcu_sta_bfer_he(sta, vif, phy, bf); +- else if (sta->deflink.vht_cap.vht_supported) ++ else if (sta->vht_cap.vht_supported) + mt7915_mcu_sta_bfer_vht(sta, phy, bf, ebf); +- else if (sta->deflink.ht_cap.ht_supported) ++ else if (sta->ht_cap.ht_supported) + mt7915_mcu_sta_bfer_ht(sta, phy, bf); + else + return; + + bf->bf_cap = ebf ? ebf : dev->ibf << 1; +- bf->bw = sta->deflink.bandwidth; +- bf->ibf_dbw = sta->deflink.bandwidth; ++ bf->bw = sta->bandwidth; ++ bf->ibf_dbw = sta->bandwidth; + bf->ibf_nrow = tx_ant; + +- if (!ebf && sta->deflink.bandwidth <= IEEE80211_STA_RX_BW_40 && !bf->ncol) ++ if (!ebf && sta->bandwidth <= IEEE80211_STA_RX_BW_40 && !bf->ncol) + bf->ibf_timeout = 0x48; + else + bf->ibf_timeout = 0x18; +@@ -1228,7 +1228,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_de + else + bf->mem_20m = matrix[bf->nrow][bf->ncol]; + +- switch (sta->deflink.bandwidth) { ++ switch (sta->bandwidth) { + case IEEE80211_STA_RX_BW_160: + case IEEE80211_STA_RX_BW_80: + bf->mem_total = bf->mem_20m * 2; +@@ -1253,7 +1253,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_de + struct tlv *tlv; + u8 nrow = 0; + +- if (!(sta->deflink.vht_cap.vht_supported || sta->deflink.he_cap.has_he)) ++ if (!(sta->vht_cap.vht_supported || sta->he_cap.has_he)) + return; + + if (!mt7915_is_ebf_supported(phy, vif, sta, true)) +@@ -1262,13 +1262,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_de + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_BFEE, sizeof(*bfee)); + bfee = (struct sta_rec_bfee *)tlv; + +- if (sta->deflink.he_cap.has_he) { +- struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem; ++ if (sta->he_cap.has_he) { ++ struct ieee80211_he_cap_elem *pe = &sta->he_cap.he_cap_elem; + + nrow = HE_PHY(CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK, + pe->phy_cap_info[5]); +- } else if (sta->deflink.vht_cap.vht_supported) { +- struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap; ++ } else if (sta->vht_cap.vht_supported) { ++ struct ieee80211_sta_vht_cap *pc = &sta->vht_cap; + + nrow = FIELD_GET(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK, + pc->cap); +@@ -1324,7 +1324,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struc + ra->phy = *phy; + break; + case RATE_PARAM_MMPS_UPDATE: +- ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode); ++ ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->smps_mode); + break; + case RATE_PARAM_SPE_UPDATE: + ra->spe_idx = *(u8 *)data; +@@ -1399,7 +1399,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt + do { \ + u8 i, gi = mask->control[band]._gi; \ + gi = (_he) ? gi : gi == NL80211_TXRATE_FORCE_SGI; \ +- for (i = 0; i <= sta->deflink.bandwidth; i++) { \ ++ for (i = 0; i <= sta->bandwidth; i++) { \ + phy.sgi |= gi << (i << (_he)); \ + phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\ + } \ +@@ -1413,11 +1413,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt + } \ + } while (0) + +- if (sta->deflink.he_cap.has_he) { ++ if (sta->he_cap.has_he) { + __sta_phy_bitrate_mask_check(he_mcs, he_gi, 0, 1); +- } else if (sta->deflink.vht_cap.vht_supported) { ++ } else if (sta->vht_cap.vht_supported) { + __sta_phy_bitrate_mask_check(vht_mcs, gi, 0, 0); +- } else if (sta->deflink.ht_cap.ht_supported) { ++ } else if (sta->ht_cap.ht_supported) { + __sta_phy_bitrate_mask_check(ht_mcs, gi, 1, 0); + } else { + nrates = hweight32(mask->control[band].legacy); +@@ -1451,7 +1451,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt + * actual txrate hardware sends out. + */ + addr = mt7915_mac_wtbl_lmac_addr(dev, msta->wcid.idx, 7); +- if (sta->deflink.he_cap.has_he) ++ if (sta->he_cap.has_he) + mt76_rmw_field(dev, addr, GENMASK(31, 24), phy.sgi); + else + mt76_rmw_field(dev, addr, GENMASK(15, 12), phy.sgi); +@@ -1484,7 +1484,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b + enum nl80211_band band = chandef->chan->band; + struct sta_rec_ra *ra; + struct tlv *tlv; +- u32 supp_rate = sta->deflink.supp_rates[band]; ++ u32 supp_rate = sta->supp_rates[band]; + u32 cap = sta->wme ? STA_CAP_WMM : 0; + + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra)); +@@ -1494,9 +1494,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b + ra->auto_rate = true; + ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, sta); + ra->channel = chandef->chan->hw_value; +- ra->bw = sta->deflink.bandwidth; +- ra->phy.bw = sta->deflink.bandwidth; +- ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode); ++ ra->bw = sta->bandwidth; ++ ra->phy.bw = sta->bandwidth; ++ ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->smps_mode); + + if (supp_rate) { + supp_rate &= mask->control[band].legacy; +@@ -1516,22 +1516,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b + } + } + +- if (sta->deflink.ht_cap.ht_supported) { ++ if (sta->ht_cap.ht_supported) { + ra->supp_mode |= MODE_HT; +- ra->af = sta->deflink.ht_cap.ampdu_factor; +- ra->ht_gf = !!(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD); ++ ra->af = sta->ht_cap.ampdu_factor; ++ ra->ht_gf = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD); + + cap |= STA_CAP_HT; +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) + cap |= STA_CAP_SGI_20; +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) + cap |= STA_CAP_SGI_40; +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_TX_STBC) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_TX_STBC) + cap |= STA_CAP_TX_STBC; +- if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_RX_STBC) ++ if (sta->ht_cap.cap & IEEE80211_HT_CAP_RX_STBC) + cap |= STA_CAP_RX_STBC; + if (mvif->cap.ht_ldpc && +- (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING)) ++ (sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING)) + cap |= STA_CAP_LDPC; + + mt7915_mcu_set_sta_ht_mcs(sta, ra->ht_mcs, +@@ -1539,37 +1539,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b + ra->supp_ht_mcs = *(__le32 *)ra->ht_mcs; + } + +- if (sta->deflink.vht_cap.vht_supported) { ++ if (sta->vht_cap.vht_supported) { + u8 af; + + ra->supp_mode |= MODE_VHT; + af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK, +- sta->deflink.vht_cap.cap); ++ sta->vht_cap.cap); + ra->af = max_t(u8, ra->af, af); + + cap |= STA_CAP_VHT; +- if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80) ++ if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80) + cap |= STA_CAP_VHT_SGI_80; +- if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160) ++ if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160) + cap |= STA_CAP_VHT_SGI_160; +- if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_TXSTBC) ++ if (sta->vht_cap.cap & IEEE80211_VHT_CAP_TXSTBC) + cap |= STA_CAP_VHT_TX_STBC; +- if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1) ++ if (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1) + cap |= STA_CAP_VHT_RX_STBC; + if (mvif->cap.vht_ldpc && +- (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC)) ++ (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC)) + cap |= STA_CAP_VHT_LDPC; + + mt7915_mcu_set_sta_vht_mcs(sta, ra->supp_vht_mcs, + mask->control[band].vht_mcs); + } + +- if (sta->deflink.he_cap.has_he) { ++ if (sta->he_cap.has_he) { + ra->supp_mode |= MODE_HE; + cap |= STA_CAP_HE; + +- if (sta->deflink.he_6ghz_capa.capa) +- ra->af = le16_get_bits(sta->deflink.he_6ghz_capa.capa, ++ if (sta->he_6ghz_capa.capa) ++ ra->af = le16_get_bits(sta->he_6ghz_capa.capa, + IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP); + } + +@@ -1778,7 +1778,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee8021 + if (!offs->cntdwn_counter_offs[0]) + return; + +- sub_tag = vif->bss_conf.csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC; ++ sub_tag = vif->csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC; + tlv = mt7915_mcu_add_nested_subtlv(rskb, sub_tag, sizeof(*info), + &bcn->sub_ntlv, &bcn->len); + info = (struct bss_info_bcn_cntdwn *)tlv; +@@ -1863,9 +1863,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev + if (offs->cntdwn_counter_offs[0]) { + u16 offset = offs->cntdwn_counter_offs[0]; + +- if (vif->bss_conf.csa_active) ++ if (vif->csa_active) + cont->csa_ofs = cpu_to_le16(offset - 4); +- if (vif->bss_conf.color_change_active) ++ if (vif->color_change_active) + cont->bcc_ofs = cpu_to_le16(offset - 3); + } + +@@ -2050,7 +2050,7 @@ int mt7915_mcu_add_beacon(struct ieee802 + if (!en) + goto out; + +- skb = ieee80211_beacon_get_template(hw, vif, &offs, 0); ++ skb = ieee80211_beacon_get_template(hw, vif, &offs); + if (!skb) + return -EINVAL; + +@@ -3181,17 +3181,17 @@ int mt7915_mcu_set_txpower_frame(struct + if (txpower) { + u32 offs, len, i; + +- if (sta->deflink.ht_cap.ht_supported) { ++ if (sta->ht_cap.ht_supported) { + const u8 *sku_len = mt7915_sku_group_len; + + offs = sku_len[SKU_CCK] + sku_len[SKU_OFDM]; + len = sku_len[SKU_HT_BW20] + sku_len[SKU_HT_BW40]; + +- if (sta->deflink.vht_cap.vht_supported) { ++ if (sta->vht_cap.vht_supported) { + offs += len; + len = sku_len[SKU_VHT_BW20] * 4; + +- if (sta->deflink.he_cap.has_he) { ++ if (sta->he_cap.has_he) { + offs += len + sku_len[SKU_HE_RU26] * 3; + len = sku_len[SKU_HE_RU242] * 4; + } +--- a/mt7915/soc.c ++++ b/mt7915/soc.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/mt7921/dma.c ++++ b/mt7921/dma.c +@@ -283,8 +283,8 @@ int mt7921_dma_init(struct mt7921_dev *d + if (ret < 0) + return ret; + +- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, +- mt7921_poll_tx); ++ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, ++ mt7921_poll_tx, NAPI_POLL_WEIGHT); + napi_enable(&dev->mt76.tx_napi); + + return mt7921_dma_enable(dev); +--- a/mt7921/init.c ++++ b/mt7921/init.c +@@ -76,8 +76,8 @@ mt7921_init_wiphy(struct ieee80211_hw *h + struct wiphy *wiphy = hw->wiphy; + + hw->queues = 4; +- hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE; +- hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE; ++ hw->max_rx_aggregation_subframes = 256; ++ hw->max_tx_aggregation_subframes = 256; + hw->netdev_features = NETIF_F_RXCSUM; + + hw->radiotap_timestamp.units_pos = +--- a/mt7921/mac.c ++++ b/mt7921/mac.c +@@ -496,7 +496,7 @@ static void mt7921_tx_check_aggr(struct + u16 fc, tid; + u32 val; + +- if (!sta || !(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he)) ++ if (!sta || !(sta->ht_cap.ht_supported || sta->he_cap.has_he)) + return; + + tid = le32_get_bits(txwi[1], MT_TXD1_TID); +--- a/mt7921/main.c ++++ b/mt7921/main.c +@@ -171,8 +171,7 @@ mt7921_init_he_caps(struct mt7921_phy *p + mt7921_gen_ppe_thresh(he_cap->ppe_thres, nss); + } else { + he_cap_elem->phy_cap_info[9] |= +- u8_encode_bits(IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US, +- IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK); ++ IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US; + } + + if (band == NL80211_BAND_6GHZ) { +@@ -686,8 +685,7 @@ out: + } + + static int +-mt7921_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, u16 queue, ++mt7921_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, + const struct ieee80211_tx_queue_params *params) + { + struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; +@@ -757,7 +755,7 @@ static void mt7921_configure_filter(stru + static void mt7921_bss_info_changed(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *info, +- u64 changed) ++ u32 changed) + { + struct mt7921_phy *phy = mt7921_hw_phy(hw); + struct mt7921_dev *dev = mt7921_hw_dev(hw); +@@ -788,7 +786,7 @@ static void mt7921_bss_info_changed(stru + if (changed & BSS_CHANGED_ASSOC) { + mt7921_mcu_sta_update(dev, NULL, vif, true, + MT76_STA_INFO_STATE_ASSOC); +- mt7921_mcu_set_beacon_filter(dev, vif, vif->cfg.assoc); ++ mt7921_mcu_set_beacon_filter(dev, vif, info->assoc); + } + + if (changed & BSS_CHANGED_ARP_FILTER) { +@@ -1635,8 +1633,8 @@ mt7921_channel_switch_beacon(struct ieee + } + + static int +-mt7921_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- struct ieee80211_bss_conf *link_conf) ++mt7921_start_ap(struct ieee80211_hw *hw, ++ struct ieee80211_vif *vif) + { + struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; + struct mt7921_phy *phy = mt7921_hw_phy(hw); +@@ -1663,8 +1661,8 @@ out: + } + + static void +-mt7921_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- struct ieee80211_bss_conf *link_conf) ++mt7921_stop_ap(struct ieee80211_hw *hw, ++ struct ieee80211_vif *vif) + { + struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; + struct mt7921_phy *phy = mt7921_hw_phy(hw); +--- a/mt7921/mcu.c ++++ b/mt7921/mcu.c +@@ -862,7 +862,7 @@ int mt7921_mcu_uni_bss_ps(struct mt7921_ + .ps = { + .tag = cpu_to_le16(UNI_BSS_INFO_PS), + .len = cpu_to_le16(sizeof(struct ps_tlv)), +- .ps_state = vif->cfg.ps ? 2 : 0, ++ .ps_state = vif->bss_conf.ps ? 2 : 0, + }, + }; + +@@ -926,7 +926,7 @@ mt7921_mcu_set_bss_pm(struct mt7921_dev + u8 pad; + } req = { + .bss_idx = mvif->mt76.idx, +- .aid = cpu_to_le16(vif->cfg.aid), ++ .aid = cpu_to_le16(vif->bss_conf.aid), + .dtim_period = vif->bss_conf.dtim_period, + .bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int), + }; +@@ -1143,7 +1143,7 @@ mt7921_mcu_uni_add_beacon_offload(struct + if (!enable) + return -EOPNOTSUPP; + +- skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs, 0); ++ skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs); + if (!skb) + return -EINVAL; + +--- a/mt7921/pci_mac.c ++++ b/mt7921/pci_mac.c +@@ -113,7 +113,7 @@ int mt7921e_mac_reset(struct mt7921_dev + + err = mt7921e_driver_own(dev); + if (err) +- goto out; ++ return err; + + err = mt7921_run_firmware(dev); + if (err) +--- a/tx.c ++++ b/tx.c +@@ -60,20 +60,15 @@ mt76_tx_status_unlock(struct mt76_dev *d + .skb = skb, + .info = IEEE80211_SKB_CB(skb), + }; +- struct ieee80211_rate_status rs = {}; + struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb); + struct mt76_wcid *wcid; + + wcid = rcu_dereference(dev->wcid[cb->wcid]); + if (wcid) { + status.sta = wcid_to_sta(wcid); +- if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) { +- rs.rate_idx = wcid->rate; +- status.rates = &rs; +- status.n_rates = 1; +- } else { +- status.n_rates = 0; +- } ++ ++ if (status.sta) ++ status.rate = &wcid->rate; + } + + hw = mt76_tx_status_get_hw(dev, skb); +--- a/usb.c ++++ b/usb.c +@@ -1075,7 +1075,7 @@ int __mt76u_init(struct mt76_dev *dev, s + + INIT_WORK(&usb->stat_work, mt76u_tx_status_data); + +- usb->data_len = usb_maxpacket(udev, usb_sndctrlpipe(udev, 0)); ++ usb->data_len = usb_maxpacket(udev, usb_sndctrlpipe(udev, 0), 1); + if (usb->data_len < 32) + usb->data_len = 32; + diff --git a/package/kernel/mt76/patches/002-Revert-wifi-mt76-mt7921-introduce-chanctx-support.patch b/package/kernel/mt76/patches/002-Revert-wifi-mt76-mt7921-introduce-chanctx-support.patch new file mode 100644 index 0000000000..b5a1b88b26 --- /dev/null +++ b/package/kernel/mt76/patches/002-Revert-wifi-mt76-mt7921-introduce-chanctx-support.patch @@ -0,0 +1,296 @@ +From dab03e40b8c614d18dfeec054767275de25ff8ab Mon Sep 17 00:00:00 2001 +From: coolsnowwolf +Date: Tue, 20 Dec 2022 23:01:27 +0800 +Subject: [PATCH 2/2] Revert "wifi: mt76: mt7921: introduce chanctx support" + +This reverts commit 2575de3aea332837a0784629b11146efa1c55e58. +--- + mt7921/init.c | 33 +++----------- + mt7921/mac.c | 8 ++++ + mt7921/main.c | 111 ++---------------------------------------------- + mt7921/mt7921.h | 1 - + mt7921/pci.c | 7 --- + mt7921/sdio.c | 7 --- + mt7921/usb.c | 7 --- + 7 files changed, 17 insertions(+), 157 deletions(-) + +--- a/mt7921/init.c ++++ b/mt7921/init.c +@@ -26,27 +26,6 @@ static const struct ieee80211_iface_comb + .max_interfaces = MT7921_MAX_INTERFACES, + .num_different_channels = 1, + .beacon_int_infra_match = true, +- }, +-}; +- +-static const struct ieee80211_iface_limit if_limits_chanctx[] = { +- { +- .max = 2, +- .types = BIT(NL80211_IFTYPE_STATION), +- }, +- { +- .max = 1, +- .types = BIT(NL80211_IFTYPE_AP), +- } +-}; +- +-static const struct ieee80211_iface_combination if_comb_chanctx[] = { +- { +- .limits = if_limits_chanctx, +- .n_limits = ARRAY_SIZE(if_limits_chanctx), +- .max_interfaces = 2, +- .num_different_channels = 2, +- .beacon_int_infra_match = false, + } + }; + +@@ -88,19 +67,17 @@ mt7921_init_wiphy(struct ieee80211_hw *h + hw->sta_data_size = sizeof(struct mt7921_sta); + hw->vif_data_size = sizeof(struct mt7921_vif); + +- if (dev->fw_features & MT7921_FW_CAP_CNM) { ++ if (dev->fw_features & MT7921_FW_CAP_CNM) + wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; +- wiphy->iface_combinations = if_comb_chanctx; +- wiphy->n_iface_combinations = ARRAY_SIZE(if_comb_chanctx); +- } else { ++ else + wiphy->flags &= ~WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; +- wiphy->iface_combinations = if_comb; +- wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); +- } ++ ++ wiphy->iface_combinations = if_comb; + wiphy->flags &= ~(WIPHY_FLAG_IBSS_RSN | WIPHY_FLAG_4ADDR_AP | + WIPHY_FLAG_4ADDR_STATION); + wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_AP); ++ wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); + wiphy->max_remain_on_channel_duration = 5000; + wiphy->max_scan_ie_len = MT76_CONNAC_SCAN_IE_LEN; + wiphy->max_scan_ssids = 4; +--- a/mt7921/mac.c ++++ b/mt7921/mac.c +@@ -168,6 +168,14 @@ static void + mt7921_get_status_freq_info(struct mt7921_dev *dev, struct mt76_phy *mphy, + struct mt76_rx_status *status, u8 chfreq) + { ++ if (!test_bit(MT76_HW_SCANNING, &mphy->state) && ++ !test_bit(MT76_HW_SCHED_SCANNING, &mphy->state) && ++ !test_bit(MT76_STATE_ROC, &mphy->state)) { ++ status->freq = mphy->chandef.chan->center_freq; ++ status->band = mphy->chandef.chan->band; ++ return; ++ } ++ + if (chfreq > 180) { + status->band = NL80211_BAND_6GHZ; + chfreq = (chfreq - 181) * 4 + 1; +--- a/mt7921/main.c ++++ b/mt7921/main.c +@@ -851,7 +851,7 @@ void mt7921_mac_sta_assoc(struct mt76_de + + if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) + mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, &mvif->sta.wcid, +- true, mvif->ctx); ++ true, NULL); + + mt7921_mac_wtbl_update(dev, msta->wcid.idx, + MT_WTBL_UPDATE_ADM_COUNT_CLEAR); +@@ -884,7 +884,7 @@ void mt7921_mac_sta_remove(struct mt76_d + if (!sta->tdls) + mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, + &mvif->sta.wcid, false, +- mvif->ctx); ++ NULL); + } + + spin_lock_bh(&dev->sta_poll_lock); +@@ -1644,7 +1644,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, + mt7921_mutex_acquire(dev); + + err = mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, +- true, mvif->ctx); ++ true, NULL); + if (err) + goto out; + +@@ -1676,105 +1676,12 @@ mt7921_stop_ap(struct ieee80211_hw *hw, + goto out; + + mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, false, +- mvif->ctx); ++ NULL); + + out: + mt7921_mutex_release(dev); + } + +-static int +-mt7921_add_chanctx(struct ieee80211_hw *hw, +- struct ieee80211_chanctx_conf *ctx) +-{ +- return 0; +-} +- +-static void +-mt7921_remove_chanctx(struct ieee80211_hw *hw, +- struct ieee80211_chanctx_conf *ctx) +-{ +-} +- +-static void mt7921_ctx_iter(void *priv, u8 *mac, +- struct ieee80211_vif *vif) +-{ +- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; +- struct ieee80211_chanctx_conf *ctx = priv; +- +- if (ctx != mvif->ctx) +- return; +- +- mt76_connac_mcu_uni_set_chctx(mvif->phy->mt76, &mvif->mt76, ctx); +-} +- +-static void +-mt7921_change_chanctx(struct ieee80211_hw *hw, +- struct ieee80211_chanctx_conf *ctx, +- u32 changed) +-{ +- struct mt7921_phy *phy = mt7921_hw_phy(hw); +- +- mt7921_mutex_acquire(phy->dev); +- ieee80211_iterate_active_interfaces(phy->mt76->hw, +- IEEE80211_IFACE_ITER_ACTIVE, +- mt7921_ctx_iter, ctx); +- mt7921_mutex_release(phy->dev); +-} +- +-static int +-mt7921_assign_vif_chanctx(struct ieee80211_hw *hw, +- struct ieee80211_vif *vif, +- struct ieee80211_bss_conf *link_conf, +- struct ieee80211_chanctx_conf *ctx) +-{ +- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; +- struct mt7921_dev *dev = mt7921_hw_dev(hw); +- +- mutex_lock(&dev->mt76.mutex); +- mvif->ctx = ctx; +- mutex_unlock(&dev->mt76.mutex); +- +- return 0; +-} +- +-static void +-mt7921_unassign_vif_chanctx(struct ieee80211_hw *hw, +- struct ieee80211_vif *vif, +- struct ieee80211_bss_conf *link_conf, +- struct ieee80211_chanctx_conf *ctx) +-{ +- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; +- struct mt7921_dev *dev = mt7921_hw_dev(hw); +- +- mutex_lock(&dev->mt76.mutex); +- mvif->ctx = NULL; +- mutex_unlock(&dev->mt76.mutex); +-} +- +-static void mt7921_mgd_prepare_tx(struct ieee80211_hw *hw, +- struct ieee80211_vif *vif, +- struct ieee80211_prep_tx_info *info) +-{ +- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; +- struct mt7921_dev *dev = mt7921_hw_dev(hw); +- u16 duration = info->duration ? info->duration : +- jiffies_to_msecs(HZ); +- +- mt7921_mutex_acquire(dev); +- mt7921_set_roc(mvif->phy, mvif, mvif->ctx->def.chan, duration, +- MT7921_ROC_REQ_JOIN); +- mt7921_mutex_release(dev); +-} +- +-static void mt7921_mgd_complete_tx(struct ieee80211_hw *hw, +- struct ieee80211_vif *vif, +- struct ieee80211_prep_tx_info *info) +-{ +- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; +- +- mt7921_abort_roc(mvif->phy, mvif); +-} +- + const struct ieee80211_ops mt7921_ops = { + .tx = mt7921_tx, + .start = mt7921_start, +@@ -1827,13 +1734,6 @@ const struct ieee80211_ops mt7921_ops = + .set_sar_specs = mt7921_set_sar_specs, + .remain_on_channel = mt7921_remain_on_channel, + .cancel_remain_on_channel = mt7921_cancel_remain_on_channel, +- .add_chanctx = mt7921_add_chanctx, +- .remove_chanctx = mt7921_remove_chanctx, +- .change_chanctx = mt7921_change_chanctx, +- .assign_vif_chanctx = mt7921_assign_vif_chanctx, +- .unassign_vif_chanctx = mt7921_unassign_vif_chanctx, +- .mgd_prepare_tx = mt7921_mgd_prepare_tx, +- .mgd_complete_tx = mt7921_mgd_complete_tx, + }; + EXPORT_SYMBOL_GPL(mt7921_ops); + +--- a/mt7921/mt7921.h ++++ b/mt7921/mt7921.h +@@ -171,7 +171,6 @@ struct mt7921_vif { + struct ewma_rssi rssi; + + struct ieee80211_tx_queue_params queue_params[IEEE80211_NUM_ACS]; +- struct ieee80211_chanctx_conf *ctx; + }; + + struct mib_stats { +--- a/mt7921/pci.c ++++ b/mt7921/pci.c +@@ -297,13 +297,6 @@ static int mt7921_pci_probe(struct pci_d + if (!(features & MT7921_FW_CAP_CNM)) { + ops->remain_on_channel = NULL; + ops->cancel_remain_on_channel = NULL; +- ops->add_chanctx = NULL; +- ops->remove_chanctx = NULL; +- ops->change_chanctx = NULL; +- ops->assign_vif_chanctx = NULL; +- ops->unassign_vif_chanctx = NULL; +- ops->mgd_prepare_tx = NULL; +- ops->mgd_complete_tx = NULL; + } + + mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), ops, &drv_ops); +--- a/mt7921/sdio.c ++++ b/mt7921/sdio.c +@@ -140,13 +140,6 @@ static int mt7921s_probe(struct sdio_fun + if (!(features & MT7921_FW_CAP_CNM)) { + ops->remain_on_channel = NULL; + ops->cancel_remain_on_channel = NULL; +- ops->add_chanctx = NULL; +- ops->remove_chanctx = NULL; +- ops->change_chanctx = NULL; +- ops->assign_vif_chanctx = NULL; +- ops->unassign_vif_chanctx = NULL; +- ops->mgd_prepare_tx = NULL; +- ops->mgd_complete_tx = NULL; + } + + mdev = mt76_alloc_device(&func->dev, sizeof(*dev), ops, &drv_ops); +--- a/mt7921/usb.c ++++ b/mt7921/usb.c +@@ -218,13 +218,6 @@ static int mt7921u_probe(struct usb_inte + if (!(features & MT7921_FW_CAP_CNM)) { + ops->remain_on_channel = NULL; + ops->cancel_remain_on_channel = NULL; +- ops->add_chanctx = NULL; +- ops->remove_chanctx = NULL; +- ops->change_chanctx = NULL; +- ops->assign_vif_chanctx = NULL; +- ops->unassign_vif_chanctx = NULL; +- ops->mgd_prepare_tx = NULL; +- ops->mgd_complete_tx = NULL; + } + + ops->stop = mt7921u_stop; diff --git a/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch b/package/kernel/mt76/patches/010-mt76-allow-VHT-rate-on-2.4GHz.patch similarity index 60% rename from package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch rename to package/kernel/mt76/patches/010-mt76-allow-VHT-rate-on-2.4GHz.patch index 27110f1870..2661848828 100644 --- a/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch +++ b/package/kernel/mt76/patches/010-mt76-allow-VHT-rate-on-2.4GHz.patch @@ -1,4 +1,4 @@ -From fcddb155b538beb0ca7614260a1323d64bfc656a Mon Sep 17 00:00:00 2001 +From 62468f0b5a72e506915cf50176b701626767e353 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Mon, 23 Nov 2020 10:46:37 +0800 Subject: [PATCH] mt76: allow VHT rate on 2.4GHz @@ -7,13 +7,12 @@ Allow chips that support 11ac to use 256QAM on 2.4GHz Signed-off-by: DENG Qingfang --- - mac80211.c | 10 +++++----- - mt7615/init.c | 2 ++ - 2 files changed, 7 insertions(+), 5 deletions(-) + mac80211.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) --- a/mac80211.c +++ b/mac80211.c -@@ -275,7 +275,7 @@ static void mt76_init_stream_cap(struct +@@ -281,7 +281,7 @@ static void mt76_init_stream_cap(struct void mt76_set_stream_caps(struct mt76_phy *phy, bool vht) { if (phy->cap.has_2ghz) @@ -22,7 +21,7 @@ Signed-off-by: DENG Qingfang if (phy->cap.has_5ghz) mt76_init_stream_cap(phy, &phy->sband_5g.sband, vht); if (phy->cap.has_6ghz) -@@ -342,13 +342,13 @@ mt76_init_sband(struct mt76_phy *phy, st +@@ -348,13 +348,13 @@ mt76_init_sband(struct mt76_phy *phy, st static int mt76_init_sband_2g(struct mt76_phy *phy, struct ieee80211_rate *rates, @@ -38,7 +37,7 @@ Signed-off-by: DENG Qingfang } static int -@@ -496,7 +496,7 @@ int mt76_register_phy(struct mt76_phy *p +@@ -506,7 +506,7 @@ int mt76_register_phy(struct mt76_phy *p return ret; if (phy->cap.has_2ghz) { @@ -47,7 +46,7 @@ Signed-off-by: DENG Qingfang if (ret) return ret; } -@@ -621,7 +621,7 @@ int mt76_register_device(struct mt76_dev +@@ -644,7 +644,7 @@ int mt76_register_device(struct mt76_dev return ret; if (phy->cap.has_2ghz) { @@ -56,14 +55,3 @@ Signed-off-by: DENG Qingfang if (ret) return ret; } ---- a/mt7615/init.c -+++ b/mt7615/init.c -@@ -409,6 +409,8 @@ mt7615_init_wiphy(struct ieee80211_hw *h - hw->max_tx_fragments = MT_HW_TXP_MAX_BUF_NUM; - - phy->mt76->sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING; -+ phy->mt76->sband_2g.sband.vht_cap.cap |= -+ IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; - phy->mt76->sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING; - phy->mt76->sband_5g.sband.vht_cap.cap |= - IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index 08adf34913..b8b1a81437 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8125 -PKG_VERSION:=9.010.01-1 +PKG_VERSION:=9.010.01-2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)? -PKG_HASH:=81fb9a100e6cefb421557639b476fd03af61a99c55bc8fb03c6e396532bd0944 +PKG_HASH:=b3e1b36578ba92a775049535e7434a9fc46710a721846c3706aca3d265db8cb9 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0-only diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index fe7d402b2f..fe855f7dc9 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -46,7 +46,6 @@ $(call Package/mbedtls/Default) CATEGORY:=Libraries SUBMENU:=SSL TITLE+= (library) - PKGFLAGS:=nonshared ABI_VERSION:=12 endef diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index ccda4fe297..cbdb3e3b3e 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.1.1 -PKG_BUGFIX:=s +PKG_BUGFIX:=t PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -28,7 +28,7 @@ PKG_SOURCE_URL:= \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/ -PKG_HASH:=c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa +PKG_HASH:=8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index cd4f8f423d..771146830a 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netifd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git diff --git a/package/network/config/netifd/patches/100-Revert-device-add-support-for-configuring-device-link-spe.patch b/package/network/config/netifd/patches/100-Revert-device-add-support-for-configuring-device-link-spe.patch new file mode 100644 index 0000000000..c46717dd49 --- /dev/null +++ b/package/network/config/netifd/patches/100-Revert-device-add-support-for-configuring-device-link-spe.patch @@ -0,0 +1,148 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +Date: Fri, 24 Feb 2023 13:28:52 +0800 +Subject: [PATCH] Revert "device: add support for configuring device link + speed/duplex" + +Fixes auto-negotiate for out-of-tree ethernet drivers. + +This reverts commit 1eb0fafaa9865b729509a7d47ecf1f05c2c0595c. +--- + device.c | 14 -------------- + device.h | 6 ------ + system-linux.c | 52 -------------------------------------------------- + 3 files changed, 72 deletions(-) + +--- a/device.c ++++ b/device.c +@@ -61,8 +61,6 @@ static const struct blobmsg_policy dev_a + [DEV_ATTR_DROP_UNSOLICITED_NA] = { .name = "drop_unsolicited_na", .type = BLOBMSG_TYPE_BOOL }, + [DEV_ATTR_ARP_ACCEPT] = { .name = "arp_accept", .type = BLOBMSG_TYPE_BOOL }, + [DEV_ATTR_AUTH] = { .name = "auth", .type = BLOBMSG_TYPE_BOOL }, +- [DEV_ATTR_SPEED] = { .name = "speed", .type = BLOBMSG_TYPE_INT32 }, +- [DEV_ATTR_DUPLEX] = { .name = "duplex", .type = BLOBMSG_TYPE_BOOL }, + }; + + const struct uci_blob_param_list device_attr_list = { +@@ -278,8 +276,6 @@ device_merge_settings(struct device *dev + n->arp_accept = s->flags & DEV_OPT_ARP_ACCEPT ? + s->arp_accept : os->arp_accept; + n->auth = s->flags & DEV_OPT_AUTH ? s->auth : os->auth; +- n->speed = s->flags & DEV_OPT_SPEED ? s->speed : os->speed; +- n->duplex = s->flags & DEV_OPT_DUPLEX ? s->duplex : os->duplex; + n->flags = s->flags | os->flags | os->valid_flags; + } + +@@ -454,16 +450,6 @@ device_init_settings(struct device *dev, + s->flags |= DEV_OPT_AUTH; + } + +- if ((cur = tb[DEV_ATTR_SPEED])) { +- s->speed = blobmsg_get_u32(cur); +- s->flags |= DEV_OPT_SPEED; +- } +- +- if ((cur = tb[DEV_ATTR_DUPLEX])) { +- s->duplex = blobmsg_get_bool(cur); +- s->flags |= DEV_OPT_DUPLEX; +- } +- + device_set_disabled(dev, disabled); + } + +--- a/device.h ++++ b/device.h +@@ -60,8 +60,6 @@ enum { + DEV_ATTR_DROP_UNSOLICITED_NA, + DEV_ATTR_ARP_ACCEPT, + DEV_ATTR_AUTH, +- DEV_ATTR_SPEED, +- DEV_ATTR_DUPLEX, + __DEV_ATTR_MAX, + }; + +@@ -124,8 +122,6 @@ enum { + DEV_OPT_DROP_GRATUITOUS_ARP = (1ULL << 27), + DEV_OPT_DROP_UNSOLICITED_NA = (1ULL << 28), + DEV_OPT_ARP_ACCEPT = (1ULL << 29), +- DEV_OPT_SPEED = (1ULL << 30), +- DEV_OPT_DUPLEX = (1ULL << 31), + }; + + /* events broadcasted to all users of a device */ +@@ -201,8 +197,6 @@ struct device_settings { + bool drop_unsolicited_na; + bool arp_accept; + bool auth; +- unsigned int speed; +- bool duplex; + }; + + /* +--- a/system-linux.c ++++ b/system-linux.c +@@ -1715,57 +1715,6 @@ int system_vlandev_del(struct device *vl + return system_link_del(vlandev->ifname); + } + +-static void +-system_set_ethtool_settings(struct device *dev, struct device_settings *s) +-{ +- struct ethtool_cmd ecmd = { +- .cmd = ETHTOOL_GSET, +- }; +- struct ifreq ifr = { +- .ifr_data = (caddr_t)&ecmd, +- }; +- static const struct { +- int speed; +- uint8_t bit_half; +- uint8_t bit_full; +- } speed_mask[] = { +- { 10, ETHTOOL_LINK_MODE_10baseT_Half_BIT, ETHTOOL_LINK_MODE_10baseT_Full_BIT }, +- { 100, ETHTOOL_LINK_MODE_100baseT_Half_BIT, ETHTOOL_LINK_MODE_100baseT_Full_BIT }, +- { 1000, ETHTOOL_LINK_MODE_1000baseT_Half_BIT, ETHTOOL_LINK_MODE_1000baseT_Full_BIT }, +- }; +- uint32_t adv; +- int i; +- +- strncpy(ifr.ifr_name, dev->ifname, sizeof(ifr.ifr_name) - 1); +- +- if (ioctl(sock_ioctl, SIOCETHTOOL, &ifr) != 0) +- return; +- +- adv = ecmd.supported; +- for (i = 0; i < ARRAY_SIZE(speed_mask); i++) { +- if (s->flags & DEV_OPT_DUPLEX) { +- int bit = s->duplex ? speed_mask[i].bit_half : speed_mask[i].bit_full; +- adv &= ~(1 << bit); +- } +- +- if (!(s->flags & DEV_OPT_SPEED) || +- s->speed == speed_mask[i].speed) +- continue; +- +- adv &= ~(1 << speed_mask[i].bit_full); +- adv &= ~(1 << speed_mask[i].bit_half); +- } +- +- +- if (ecmd.autoneg && ecmd.advertising == adv) +- return; +- +- ecmd.autoneg = 1; +- ecmd.advertising = adv; +- ecmd.cmd = ETHTOOL_SSET; +- ioctl(sock_ioctl, SIOCETHTOOL, &ifr); +-} +- + void + system_if_get_settings(struct device *dev, struct device_settings *s) + { +@@ -1989,7 +1938,6 @@ system_if_apply_settings(struct device * + system_set_drop_unsolicited_na(dev, s->drop_unsolicited_na ? "1" : "0"); + if (apply_mask & DEV_OPT_ARP_ACCEPT) + system_set_arp_accept(dev, s->arp_accept ? "1" : "0"); +- system_set_ethtool_settings(dev, s); + } + + int system_if_up(struct device *dev) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 23df5b717a..e7aac44d56 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -24,12 +24,12 @@ hostapd_append_wep_key() { [1234]) for idx in 1 2 3 4; do local zidx - zidx=$(($idx - 1)) + zidx="$(($idx - 1))" json_get_var ckey "key${idx}" [ -n "$ckey" ] && \ append $var "wep_key${zidx}=$(prepare_key_wep "$ckey")" "$N$T" done - wep_keyidx=$((key - 1)) + wep_keyidx="$((key - 1))" ;; *) append $var "wep_key0=$(prepare_key_wep "$key")" "$N$T" @@ -790,7 +790,7 @@ hostapd_set_bss_options() { ;; esac - local auth_algs=$((($auth_mode_shared << 1) | $auth_mode_open)) + local auth_algs="$((($auth_mode_shared << 1) | $auth_mode_open))" append bss_conf "auth_algs=${auth_algs:-1}" "$N" append bss_conf "wpa=$wpa" "$N" [ -n "$wpa_pairwise" ] && append bss_conf "wpa_pairwise=$wpa_pairwise" "$N" @@ -1159,7 +1159,7 @@ hostapd_set_bss_options() { append bss_conf "$val" "$N" done - bss_md5sum=$(echo $bss_conf | md5sum | cut -d" " -f1) + bss_md5sum="$(echo $bss_conf | md5sum | cut -d" " -f1)" append bss_conf "config_id=$bss_md5sum" "$N" append "$var" "$bss_conf" "$N" @@ -1181,7 +1181,7 @@ hostapd_set_log_options() { set_default log_iapp 1 set_default log_mlme 1 - local log_mask=$(( \ + local log_mask="$(( \ ($log_80211 << 0) | \ ($log_8021x << 1) | \ ($log_radius << 2) | \ @@ -1189,7 +1189,7 @@ hostapd_set_log_options() { ($log_driver << 4) | \ ($log_iapp << 5) | \ ($log_mlme << 6) \ - )) + ))" append "$var" "logger_syslog=$log_mask" "$N" append "$var" "logger_syslog_level=$log_level" "$N" @@ -1375,11 +1375,11 @@ wpa_supplicant_add_network() { key_mgmt="$wpa_key_mgmt" - if [ ${#key} -eq 64 ]; then - passphrase="psk=${key}" + if [ "$_w_mode" = "mesh" ] || [ "$auth_type" = "sae" ]; then + passphrase="sae_password=\"${key}\"" else - if [ "$_w_mode" = "mesh" ]; then - passphrase="sae_password=\"${key}\"" + if [ ${#key} -eq 64 ]; then + passphrase="psk=${key}" else passphrase="psk=\"${key}\"" fi diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 50012252e4..ddd86447eb 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -1084,6 +1084,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj, } __hostapd_bss_mgmt_enable(hapd, flags); + + return 0; } diff --git a/scripts/dl_github_archive.py b/scripts/dl_github_archive.py index b992227dc9..328d588e78 100755 --- a/scripts/dl_github_archive.py +++ b/scripts/dl_github_archive.py @@ -133,7 +133,7 @@ class Path(object): def tar(path, subdir, into=None, ts=None): """Pack ``path`` into tarball ``into``.""" # --sort=name requires a recent build of GNU tar - args = ['tar', '--numeric-owner', '--owner=0', '--group=0', '--sort=name'] + args = ['tar', '--numeric-owner', '--owner=0', '--group=0', '--sort=name', '--mode=a-s'] args += ['-C', path, '-cf', into, subdir] envs = os.environ.copy() if ts is not None: diff --git a/scripts/download.pl b/scripts/download.pl index a7865f285c..f08bf8de33 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -302,8 +302,8 @@ foreach my $mirror (@ARGV) { # push @mirrors, 'https://mirror01.download.immortalwrt.eu.org'; push @mirrors, 'https://mirror2.immortalwrt.org/sources'; push @mirrors, 'https://mirror.immortalwrt.org/sources'; +push @mirrors, 'https://sources-cdn.immortalwrt.org'; push @mirrors, 'https://sources.immortalwrt.org'; -push @mirrors, 'https://sources.cdn.immortalwrt.org'; push @mirrors, 'https://sources.cdn.openwrt.org'; push @mirrors, 'https://sources.openwrt.org'; push @mirrors, 'https://mirror2.openwrt.org/sources'; diff --git a/target/linux/apm821xx/patches-5.4/111-crypto-crypto4xx-reduce-memory-fragmentation.patch b/target/linux/apm821xx/patches-5.4/111-crypto-crypto4xx-reduce-memory-fragmentation.patch index 4d23b8816a..b9ddd48c22 100644 --- a/target/linux/apm821xx/patches-5.4/111-crypto-crypto4xx-reduce-memory-fragmentation.patch +++ b/target/linux/apm821xx/patches-5.4/111-crypto-crypto4xx-reduce-memory-fragmentation.patch @@ -68,7 +68,7 @@ Signed-off-by: Christian Lamparter for (i = 0; i < PPC4XX_NUM_SD; i++) { dev->sdr[i].ptr = dev->scatter_buffer_pa + PPC4XX_SD_BUFFER_SIZE * i; -@@ -1439,16 +1440,15 @@ static int crypto4xx_probe(struct platfo +@@ -1437,16 +1438,15 @@ static int crypto4xx_probe(struct platfo spin_lock_init(&core_dev->lock); INIT_LIST_HEAD(&core_dev->dev->alg_list); ratelimit_default_init(&core_dev->dev->aead_ratelimit); @@ -89,7 +89,7 @@ Signed-off-by: Christian Lamparter goto err_build_sdr; /* Init tasklet for bottom half processing */ -@@ -1493,7 +1493,6 @@ err_iomap: +@@ -1491,7 +1491,6 @@ err_iomap: err_build_sdr: crypto4xx_destroy_sdr(core_dev->dev); crypto4xx_destroy_gdr(core_dev->dev); 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 0cb786de62..6d53cd4051 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 @@ -93,8 +93,8 @@ Signed-off-by: Vinod Koul static const char hcd_name[] = "xhci_hcd"; static struct hc_driver __read_mostly xhci_pci_hc_driver; -@@ -340,6 +380,873 @@ static void xhci_pme_acpi_rtd3_enable(st - static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } +@@ -373,6 +413,873 @@ static void xhci_pme_acpi_rtd3_enable(st + static void xhci_find_lpm_incapable_ports(struct usb_hcd *hcd, struct usb_device *hdev) { } #endif /* CONFIG_ACPI */ +static const struct renesas_fw_entry { @@ -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) { -@@ -381,6 +1288,27 @@ static int xhci_pci_probe(struct pci_dev +@@ -424,6 +1331,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 */ -@@ -442,6 +1370,16 @@ static void xhci_pci_remove(struct pci_d +@@ -487,6 +1415,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; -@@ -581,6 +1519,11 @@ static int xhci_pci_resume(struct usb_hc +@@ -626,6 +1564,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 fbcbc8db16..0da57d3ddd 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 -@@ -302,6 +302,7 @@ static void xhci_pci_quirks(struct devic +@@ -305,6 +305,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 -@@ -1890,6 +1890,7 @@ struct xhci_hcd { +@@ -1891,6 +1891,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/ath79/generic/target.mk b/target/linux/ath79/generic/target.mk index ca6c2da1e5..78e690713b 100644 --- a/target/linux/ath79/generic/target.mk +++ b/target/linux/ath79/generic/target.mk @@ -1,6 +1,6 @@ BOARDNAME:=Generic -DEFAULT_PACKAGES += wpad-basic-openssl +DEFAULT_PACKAGES += wpad-openssl define Target/Description Build firmware images for generic Atheros AR71xx/AR913x/AR934x based boards. diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 7f1f152879..a4503c3ea2 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -347,7 +347,7 @@ endef TARGET_DEVICES += ubnt_rocket-m define Device/ubnt_routerstation_common - DEVICE_PACKAGES := -kmod-ath9k -wpad-basic-openssl -uboot-envtools kmod-usb-ohci \ + DEVICE_PACKAGES := -kmod-ath9k -wpad-openssl -uboot-envtools kmod-usb-ohci \ kmod-usb2 fconfig DEVICE_VENDOR := Ubiquiti SOC := ar7161 diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 3fedd7d54f..2b77a6ad80 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1233,7 +1233,7 @@ define Device/hak5_lan-turtle TPLINK_HWID := 0x5348334c IMAGES := sysupgrade.bin DEVICE_PACKAGES := kmod-usb-chipidea2 -iwinfo -kmod-ath9k -swconfig \ - -uboot-envtools -wpad-basic-openssl + -uboot-envtools -wpad-openssl SUPPORTED_DEVICES += lan-turtle endef TARGET_DEVICES += hak5_lan-turtle @@ -1246,7 +1246,7 @@ define Device/hak5_packet-squirrel TPLINK_HWID := 0x5351524c IMAGES := sysupgrade.bin DEVICE_PACKAGES := kmod-usb-chipidea2 -iwinfo -kmod-ath9k -swconfig \ - -uboot-envtools -wpad-basic-openssl + -uboot-envtools -wpad-openssl SUPPORTED_DEVICES += packet-squirrel endef TARGET_DEVICES += hak5_packet-squirrel @@ -1269,7 +1269,7 @@ define Device/iodata_etg3-r DEVICE_VENDOR := I-O DATA DEVICE_MODEL := ETG3-R IMAGE_SIZE := 7680k - DEVICE_PACKAGES := -iwinfo -kmod-ath9k -wpad-basic-openssl + DEVICE_PACKAGES := -iwinfo -kmod-ath9k -wpad-openssl endef TARGET_DEVICES += iodata_etg3-r @@ -1329,7 +1329,7 @@ define Device/jjplus_ja76pf2 SOC := ar7161 DEVICE_VENDOR := jjPlus DEVICE_MODEL := JA76PF2 - DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-openssl -uboot-envtools fconfig + DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-openssl -uboot-envtools fconfig IMAGES += kernel.bin rootfs.bin IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-rootfs | pad-rootfs diff --git a/target/linux/ath79/mikrotik/target.mk b/target/linux/ath79/mikrotik/target.mk index 5618f6cbd7..68e9af7808 100644 --- a/target/linux/ath79/mikrotik/target.mk +++ b/target/linux/ath79/mikrotik/target.mk @@ -3,7 +3,7 @@ FEATURES += minor nand KERNELNAME := vmlinux vmlinuz IMAGES_DIR := ../../.. -DEFAULT_PACKAGES += wpad-basic-openssl +DEFAULT_PACKAGES += wpad-openssl define Target/Description Build firmware images for MikroTik devices based on Qualcomm Atheros diff --git a/target/linux/ath79/nand/target.mk b/target/linux/ath79/nand/target.mk index 52befec039..a852cf0c0a 100644 --- a/target/linux/ath79/nand/target.mk +++ b/target/linux/ath79/nand/target.mk @@ -2,7 +2,7 @@ BOARDNAME := Generic devices with NAND flash FEATURES += nand -DEFAULT_PACKAGES += wpad-basic-openssl +DEFAULT_PACKAGES += wpad-openssl define Target/Description Firmware for boards using Qualcomm Atheros, MIPS-based SoCs diff --git a/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch b/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch index 863f9ddd70..7c13d94df7 100644 --- a/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch +++ b/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch @@ -17,7 +17,7 @@ Signed-off-by: Nick Hainke --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1987,7 +1987,7 @@ static int sr2_bit7_quad_enable(struct s +@@ -1989,7 +1989,7 @@ static int sr2_bit7_quad_enable(struct s static int spi_nor_clear_sr_bp(struct spi_nor *nor) { int ret; diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch index 1405047176..5b67fcda6d 100644 --- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch @@ -214,7 +214,7 @@ #include #include #include -@@ -864,10 +865,10 @@ static void tcp_v6_send_response(const s +@@ -867,10 +868,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { @@ -682,7 +682,7 @@ struct fib6_info *fib6_info_alloc(gfp_t gfp_flags, bool with_fib6_nh) --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c -@@ -415,7 +415,7 @@ static void tcp_sack(const struct sk_buf +@@ -423,7 +423,7 @@ static void tcp_sack(const struct sk_buf /* Fast path for timestamp-only option */ if (length == TCPOLEN_TSTAMP_ALIGNED diff --git a/target/linux/bcm27xx/patches-5.4/950-0011-spi-spidev-Completely-disable-the-spidev-warning.patch b/target/linux/bcm27xx/patches-5.4/950-0011-spi-spidev-Completely-disable-the-spidev-warning.patch index 0284c9b05f..94bb608355 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0011-spi-spidev-Completely-disable-the-spidev-warning.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0011-spi-spidev-Completely-disable-the-spidev-warning.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -734,7 +734,7 @@ static int spidev_probe(struct spi_devic +@@ -743,7 +743,7 @@ static int spidev_probe(struct spi_devic * compatible string, it is a Linux implementation thing * rather than a description of the hardware. */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0030-lan78xx-Enable-LEDs-and-auto-negotiation.patch b/target/linux/bcm27xx/patches-5.4/950-0030-lan78xx-Enable-LEDs-and-auto-negotiation.patch index 1964988c75..0e7c0c83b1 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0030-lan78xx-Enable-LEDs-and-auto-negotiation.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0030-lan78xx-Enable-LEDs-and-auto-negotiation.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2471,6 +2471,11 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2435,6 +2435,11 @@ static int lan78xx_reset(struct lan78xx_ int ret = 0; unsigned long timeout; u8 sig; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_LRST_; -@@ -2524,6 +2529,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2488,6 +2493,9 @@ static int lan78xx_reset(struct lan78xx_ ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_MEF_; @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_write_reg(dev, HW_CFG, buf); ret = lan78xx_read_reg(dev, USB_CFG0, &buf); -@@ -2579,6 +2587,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2543,6 +2551,9 @@ static int lan78xx_reset(struct lan78xx_ buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_; } } diff --git a/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch b/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch index 8e0ccd4d4e..e58c7605e5 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0031-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch @@ -14,7 +14,7 @@ use the same logic. --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2576,7 +2576,12 @@ static int pl011_setup_port(struct devic +@@ -2588,7 +2588,12 @@ static int pl011_setup_port(struct devic if (IS_ERR(base)) return PTR_ERR(base); diff --git a/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch b/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch index 6552e9f6c1..3d0adf429d 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0032-amba_pl011-Round-input-clock-up.patch @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1662,6 +1662,23 @@ static void pl011_put_poll_char(struct u +@@ -1665,6 +1665,23 @@ static void pl011_put_poll_char(struct u #endif /* CONFIG_CONSOLE_POLL */ @@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell static int pl011_hwinit(struct uart_port *port) { struct uart_amba_port *uap = -@@ -1678,7 +1695,7 @@ static int pl011_hwinit(struct uart_port +@@ -1681,7 +1698,7 @@ static int pl011_hwinit(struct uart_port if (retval) return retval; @@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell /* Clear pending error and receive interrupts */ pl011_write(UART011_OEIS | UART011_BEIS | UART011_PEIS | -@@ -2322,7 +2339,7 @@ static int pl011_console_setup(struct co +@@ -2334,7 +2351,7 @@ static int pl011_console_setup(struct co plat->init(); } @@ -68,7 +68,7 @@ Signed-off-by: Phil Elwell if (uap->vendor->fixed_options) { baud = uap->fixed_baud; -@@ -2507,6 +2524,7 @@ static struct uart_driver amba_reg = { +@@ -2519,6 +2536,7 @@ static struct uart_driver amba_reg = { .cons = AMBA_CONSOLE, }; @@ -76,7 +76,7 @@ Signed-off-by: Phil Elwell static int pl011_probe_dt_alias(int index, struct device *dev) { struct device_node *np; -@@ -2538,6 +2556,7 @@ static int pl011_probe_dt_alias(int inde +@@ -2550,6 +2568,7 @@ static int pl011_probe_dt_alias(int inde return ret; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch b/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch index c57cf2d8dc..c2a77c72f8 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0033-amba_pl011-Insert-mb-for-correct-FIFO-handling.patch @@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1395,6 +1395,7 @@ static bool pl011_tx_char(struct uart_am +@@ -1398,6 +1398,7 @@ static bool pl011_tx_char(struct uart_am return false; /* unable to transmit character */ pl011_write(c, uap, REG_DR); diff --git a/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch b/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch index acf1caff28..cb9345eb49 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell - reg --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2663,6 +2663,11 @@ static int pl011_probe(struct amba_devic +@@ -2675,6 +2675,11 @@ static int pl011_probe(struct amba_devic if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); diff --git a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch index c79751c2c7..1b5a0d1358 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch @@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5382,7 +5382,7 @@ static void port_event(struct usb_hub *h +@@ -5384,7 +5384,7 @@ static void port_event(struct usb_hub *h port_dev->over_current_count++; port_over_current_notify(port_dev); diff --git a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch index e688302597..c2d725efe5 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch @@ -267,7 +267,7 @@ Signed-off-by: Yaroslav Rosomakho goto out; --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c -@@ -1931,7 +1931,8 @@ EXPORT_SYMBOL(mmc_erase); +@@ -1936,7 +1936,8 @@ EXPORT_SYMBOL(mmc_erase); int mmc_can_erase(struct mmc_card *card) { if ((card->host->caps & MMC_CAP_ERASE) && diff --git a/target/linux/bcm27xx/patches-5.4/950-0058-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0058-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch index 2533571c78..7b8c3b11db 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0058-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0058-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch @@ -399,7 +399,7 @@ mfd: Add rpi_sense_core of compatible string + --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig -@@ -2277,6 +2277,19 @@ config FB_SM712 +@@ -2276,6 +2276,19 @@ config FB_SM712 called sm712fb. If you want to compile it as a module, say M here and read . diff --git a/target/linux/bcm27xx/patches-5.4/950-0111-lan78xx-Read-initial-EEE-status-from-DT.patch b/target/linux/bcm27xx/patches-5.4/950-0111-lan78xx-Read-initial-EEE-status-from-DT.patch index 796ec2fe8f..cebdb38afb 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0111-lan78xx-Read-initial-EEE-status-from-DT.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0111-lan78xx-Read-initial-EEE-status-from-DT.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2653,6 +2653,22 @@ static int lan78xx_open(struct net_devic +@@ -2617,6 +2617,22 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-5.4/950-0117-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch b/target/linux/bcm27xx/patches-5.4/950-0117-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch index 5310569838..9cc52f0934 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0117-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0117-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch @@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -2935,8 +2944,14 @@ static int lan78xx_bind(struct lan78xx_n +@@ -2899,8 +2908,14 @@ static int lan78xx_bind(struct lan78xx_n if (DEFAULT_RX_CSUM_ENABLE) dev->net->features |= NETIF_F_RXCSUM; diff --git a/target/linux/bcm27xx/patches-5.4/950-0118-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch b/target/linux/bcm27xx/patches-5.4/950-0118-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch index 7b931de951..95877137db 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0118-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0118-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2185,6 +2185,22 @@ static int lan78xx_phy_init(struct lan78 +@@ -2153,6 +2153,22 @@ static int lan78xx_phy_init(struct lan78 mii_adv_to_linkmode_adv_t(fc, mii_adv); linkmode_or(phydev->advertising, fc, phydev->advertising); @@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell if (phydev->mdio.dev.of_node) { u32 reg; int len; -@@ -2662,22 +2678,6 @@ static int lan78xx_open(struct net_devic +@@ -2626,22 +2642,6 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-5.4/950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch b/target/linux/bcm27xx/patches-5.4/950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch index fe073c66df..78b6894f24 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch @@ -27,7 +27,7 @@ See: https://github.com/raspberrypi/linux/issues/2447 static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -3778,7 +3783,12 @@ static int lan78xx_probe(struct usb_inte +@@ -3742,7 +3747,12 @@ static int lan78xx_probe(struct usb_inte netdev->max_mtu = MAX_SINGLE_PACKET_SIZE; netif_set_gso_max_size(netdev, MAX_SINGLE_PACKET_SIZE - MAX_HEADER); diff --git a/target/linux/bcm27xx/patches-5.4/950-0137-lan78xx-EEE-support-is-now-a-PHY-property.patch b/target/linux/bcm27xx/patches-5.4/950-0137-lan78xx-EEE-support-is-now-a-PHY-property.patch index 719264994e..d90fec9808 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0137-lan78xx-EEE-support-is-now-a-PHY-property.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0137-lan78xx-EEE-support-is-now-a-PHY-property.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2190,7 +2190,7 @@ static int lan78xx_phy_init(struct lan78 +@@ -2158,7 +2158,7 @@ static int lan78xx_phy_init(struct lan78 mii_adv_to_linkmode_adv_t(fc, mii_adv); linkmode_or(phydev->advertising, fc, phydev->advertising); diff --git a/target/linux/bcm27xx/patches-5.4/950-0145-lan78xx-use-default-alignment-for-rx-buffers.patch b/target/linux/bcm27xx/patches-5.4/950-0145-lan78xx-use-default-alignment-for-rx-buffers.patch index 6784c906e2..79882c4122 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0145-lan78xx-use-default-alignment-for-rx-buffers.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0145-lan78xx-use-default-alignment-for-rx-buffers.patch @@ -12,7 +12,7 @@ in both dwc_otg and in ipv6 processing. --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -3179,7 +3179,7 @@ static int rx_submit(struct lan78xx_net +@@ -3143,7 +3143,7 @@ static int rx_submit(struct lan78xx_net size_t size = dev->rx_urb_size; int ret = 0; diff --git a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch index a52331dff9..796f7dfe0a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch @@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -2157,7 +2157,7 @@ static void bcmgenet_init_tx_ring(struct +@@ -2165,7 +2165,7 @@ static void bcmgenet_init_tx_ring(struct bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX); bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX); @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell /* Disable rate control for now */ bcmgenet_tdma_ring_writel(priv, index, flow_period_val, TDMA_FLOW_PERIOD); -@@ -3583,9 +3583,12 @@ static int bcmgenet_probe(struct platfor +@@ -3591,9 +3591,12 @@ static int bcmgenet_probe(struct platfor netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1); /* Set default coalescing parameters */ diff --git a/target/linux/bcm27xx/patches-5.4/950-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 b41e963f9f..0eb44d9ed8 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 -@@ -271,6 +271,10 @@ static void xhci_pci_quirks(struct devic +@@ -274,6 +274,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-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch index 5b47e7dfac..5837187b26 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch @@ -70,7 +70,7 @@ Signed-off-by: Jonathan Bell * @dev: the device whose endpoint is being disabled --- a/include/linux/usb.h +++ b/include/linux/usb.h -@@ -1818,6 +1818,8 @@ extern int usb_clear_halt(struct usb_dev +@@ -1821,6 +1821,8 @@ extern int usb_clear_halt(struct usb_dev extern int usb_reset_configuration(struct usb_device *dev); extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); extern void usb_reset_endpoint(struct usb_device *dev, unsigned int epaddr); diff --git a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 0b49a3e199..39ce3f939b 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 -@@ -1486,6 +1486,103 @@ command_cleanup: +@@ -1487,6 +1487,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 */ -@@ -5387,6 +5484,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5402,6 +5499,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-0263-tty-amba-pl011-Make-TX-optimisation-conditional.patch b/target/linux/bcm27xx/patches-5.4/950-0263-tty-amba-pl011-Make-TX-optimisation-conditional.patch index 88188ce617..aeccb0d7b3 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0263-tty-amba-pl011-Make-TX-optimisation-conditional.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0263-tty-amba-pl011-Make-TX-optimisation-conditional.patch @@ -58,7 +58,7 @@ Signed-off-by: Phil Elwell spin_unlock(&uap->port.lock); dev_vdbg(uap->port.dev, "Took %d chars from DMA buffer and %d chars from the FIFO\n", -@@ -1359,6 +1362,7 @@ __acquires(&uap->port.lock) +@@ -1362,6 +1365,7 @@ __acquires(&uap->port.lock) { pl011_fifo_to_tty(uap); @@ -66,7 +66,7 @@ Signed-off-by: Phil Elwell spin_unlock(&uap->port.lock); tty_flip_buffer_push(&uap->port.state->port); /* -@@ -1494,6 +1498,7 @@ static irqreturn_t pl011_int(int irq, vo +@@ -1497,6 +1501,7 @@ static irqreturn_t pl011_int(int irq, vo int handled = 0; spin_lock_irqsave(&uap->port.lock, flags); @@ -74,7 +74,7 @@ Signed-off-by: Phil Elwell status = pl011_read(uap, REG_RIS) & uap->im; if (status) { do { -@@ -1513,7 +1518,7 @@ static irqreturn_t pl011_int(int irq, vo +@@ -1516,7 +1521,7 @@ static irqreturn_t pl011_int(int irq, vo UART011_CTSMIS|UART011_RIMIS)) pl011_modem_status(uap); if (status & UART011_TXIS) 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 304e7aab40..e3e6daad80 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 -@@ -272,8 +272,10 @@ static void xhci_pci_quirks(struct devic +@@ -275,8 +275,10 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_VIA && @@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1880,6 +1880,7 @@ struct xhci_hcd { +@@ -1881,6 +1881,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index afce661ba4..9d06e3c494 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1264,6 +1267,9 @@ +@@ -1271,6 +1274,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -194,6 +195,7 @@ static const struct hid_device_id hid_qu +@@ -196,6 +197,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, diff --git a/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch b/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch index ebbc07e86d..c2627136c0 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch @@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell static inline void bcmgenet_writel(u32 value, void __iomem *offset) { /* MIPS chips strapped for BE will automagically configure the -@@ -2003,6 +2007,11 @@ static void reset_umac(struct bcmgenet_p +@@ -2011,6 +2015,11 @@ static void reset_umac(struct bcmgenet_p bcmgenet_rbuf_ctrl_set(priv, 0); udelay(10); diff --git a/target/linux/bcm27xx/patches-5.4/950-0298-arch-arm64-Add-Revision-Serial-Model-to-cpuinfo.patch b/target/linux/bcm27xx/patches-5.4/950-0298-arch-arm64-Add-Revision-Serial-Model-to-cpuinfo.patch index af76b81f31..3ae5f24542 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0298-arch-arm64-Add-Revision-Serial-Model-to-cpuinfo.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0298-arch-arm64-Add-Revision-Serial-Model-to-cpuinfo.patch @@ -29,7 +29,7 @@ Signed-off-by: Phil Elwell for_each_online_cpu(i) { struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i); -@@ -179,6 +184,26 @@ static int c_show(struct seq_file *m, vo +@@ -178,6 +183,26 @@ static int c_show(struct seq_file *m, vo seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr)); } 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 7a9646689f..d72712eb8b 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 -@@ -1274,6 +1274,9 @@ ifneq ($(dtstree),) +@@ -1281,6 +1281,9 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ diff --git a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch index 50fc594e1e..7d4b6bb4d9 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -3482,7 +3482,7 @@ static int bcmgenet_probe(struct platfor +@@ -3490,7 +3490,7 @@ static int bcmgenet_probe(struct platfor priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); priv->irq1 = platform_get_irq(pdev, 1); diff --git a/target/linux/bcm27xx/patches-5.4/950-0402-tty-amba-pl011-Avoid-rare-write-when-full-error.patch b/target/linux/bcm27xx/patches-5.4/950-0402-tty-amba-pl011-Avoid-rare-write-when-full-error.patch index 12f1ec3555..a4bd3d3325 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0402-tty-amba-pl011-Avoid-rare-write-when-full-error.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0402-tty-amba-pl011-Avoid-rare-write-when-full-error.patch @@ -29,7 +29,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1430,6 +1430,10 @@ static bool pl011_tx_chars(struct uart_a +@@ -1433,6 +1433,10 @@ static bool pl011_tx_chars(struct uart_a if (likely(from_irq) && count-- == 0) break; diff --git a/target/linux/bcm27xx/patches-5.4/950-0437-mm-refresh-ZONE_DMA-and-ZONE_DMA32-comments-in-enum-.patch b/target/linux/bcm27xx/patches-5.4/950-0437-mm-refresh-ZONE_DMA-and-ZONE_DMA32-comments-in-enum-.patch index 23811e0b6e..15de161761 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0437-mm-refresh-ZONE_DMA-and-ZONE_DMA32-comments-in-enum-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0437-mm-refresh-ZONE_DMA-and-ZONE_DMA32-comments-in-enum-.patch @@ -20,7 +20,7 @@ Signed-off-by: Catalin Marinas --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h -@@ -358,33 +358,40 @@ struct per_cpu_nodestat { +@@ -481,33 +481,40 @@ struct per_cpu_nodestat { #endif /* !__GENERATING_BOUNDS.H */ enum zone_type { diff --git a/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch b/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch index 51fd4be35e..539f5e1c0b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch @@ -31,7 +31,7 @@ Signed-off-by: Christoph Hellwig --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -708,7 +708,6 @@ config X86_SUPPORTS_MEMORY_FAILURE +@@ -709,7 +709,6 @@ config X86_SUPPORTS_MEMORY_FAILURE config STA2X11 bool "STA2X11 Companion Chip Support" depends on X86_32_NON_STANDARD && PCI diff --git a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch index 08d0b1cb9a..e515f331ee 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch @@ -382,7 +382,7 @@ Cc: linux-rockchip@lists.infradead.org --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h -@@ -643,11 +643,15 @@ static inline void pci_release_bus_of_no +@@ -634,11 +634,15 @@ static inline void pci_release_bus_of_no #if defined(CONFIG_OF_ADDRESS) int devm_of_pci_get_host_bridge_resources(struct device *dev, unsigned char busno, unsigned char bus_max, diff --git a/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch b/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch index a428c1a5c2..8cdc4b6c72 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch @@ -187,7 +187,7 @@ Signed-off-by: Christoph Hellwig } --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c -@@ -901,7 +901,7 @@ static int ahci_configure_dma_masks(stru +@@ -921,7 +921,7 @@ static int ahci_configure_dma_masks(stru * value, don't extend it here. This happens on STA2X11, for example. * * XXX: manipulating the DMA mask from platform code is completely @@ -271,7 +271,7 @@ Signed-off-by: Christoph Hellwig u64 dma_direct_get_required_mask(struct device *dev); --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h -@@ -697,7 +697,7 @@ static inline int dma_coerce_mask_and_co +@@ -777,7 +777,7 @@ static inline int dma_coerce_mask_and_co */ static inline bool dma_addressing_limited(struct device *dev) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch b/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch index bc69d5868e..09ea71185c 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0451-media-dt-bindings-media-i2c-Add-IMX219-CMOS-sensor-b.patch @@ -139,7 +139,7 @@ Signed-off-by: Mauro Carvalho Chehab +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15144,6 +15144,14 @@ S: Maintained +@@ -15145,6 +15145,14 @@ S: Maintained F: drivers/media/i2c/imx214.c F: Documentation/devicetree/bindings/media/i2c/sony,imx214.txt diff --git a/target/linux/bcm27xx/patches-5.4/950-0454-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch b/target/linux/bcm27xx/patches-5.4/950-0454-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch index d1b71a9cf8..e61e6e4e13 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 -@@ -1274,7 +1274,7 @@ ifneq ($(dtstree),) +@@ -1281,7 +1281,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-0461-drm-fourcc-Add-packed-10bit-YUV-4-2-0-format.patch b/target/linux/bcm27xx/patches-5.4/950-0461-drm-fourcc-Add-packed-10bit-YUV-4-2-0-format.patch index ac4fe1698b..6c9239c1ad 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0461-drm-fourcc-Add-packed-10bit-YUV-4-2-0-format.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0461-drm-fourcc-Add-packed-10bit-YUV-4-2-0-format.patch @@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c -@@ -274,6 +274,9 @@ const struct drm_format_info *__drm_form +@@ -278,6 +278,9 @@ const struct drm_format_info *__drm_form { .format = DRM_FORMAT_YUV420_10BIT, .depth = 0, .num_planes = 1, .cpp = { 0, 0, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true }, diff --git a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch index bf15071587..93b85a6ced 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch @@ -13,7 +13,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -39,7 +39,7 @@ +@@ -40,7 +40,7 @@ pr_debug("%s: " DRIVER_NAME ": " f, mmc_hostname(host->mmc), ## x) #define SDHCI_DUMP(f, x...) \ @@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard #define MAX_TUNING_LOOP 40 -@@ -2780,7 +2780,7 @@ static void sdhci_timeout_timer(struct t +@@ -2825,7 +2825,7 @@ static void sdhci_timeout_timer(struct t spin_lock_irqsave(&host->lock, flags); if (host->cmd && !sdhci_data_line_cmd(host->cmd)) { @@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard mmc_hostname(host->mmc)); sdhci_dumpregs(host); -@@ -2802,7 +2802,7 @@ static void sdhci_timeout_data_timer(str +@@ -2847,7 +2847,7 @@ static void sdhci_timeout_data_timer(str if (host->data || host->data_cmd || (host->cmd && sdhci_data_line_cmd(host->cmd))) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0664-Revert-spi-spidev-Fix-CS-polarity-if-GPIO-descriptor.patch b/target/linux/bcm27xx/patches-5.4/950-0664-Revert-spi-spidev-Fix-CS-polarity-if-GPIO-descriptor.patch index 00bbe98117..fee4afad59 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0664-Revert-spi-spidev-Fix-CS-polarity-if-GPIO-descriptor.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0664-Revert-spi-spidev-Fix-CS-polarity-if-GPIO-descriptor.patch @@ -11,7 +11,7 @@ This reverts commit 83b2a8fe43bda0c11981ad6afa5dd0104d78be28. --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -399,7 +399,6 @@ spidev_ioctl(struct file *filp, unsigned +@@ -410,7 +410,6 @@ spidev_ioctl(struct file *filp, unsigned else retval = get_user(tmp, (u32 __user *)arg); if (retval == 0) { @@ -19,7 +19,7 @@ This reverts commit 83b2a8fe43bda0c11981ad6afa5dd0104d78be28. u32 save = spi->mode; if (tmp & ~SPI_MODE_MASK) { -@@ -407,10 +406,6 @@ spidev_ioctl(struct file *filp, unsigned +@@ -418,10 +417,6 @@ spidev_ioctl(struct file *filp, unsigned break; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch b/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch index cd2ef3838c..e90c9656f2 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0714-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch @@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15197,6 +15197,14 @@ T: git git://linuxtv.org/media_tree.git +@@ -15198,6 +15198,14 @@ T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/i2c/imx355.c diff --git a/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch b/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch index ae6ec005d5..6852dbf275 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0815-media-dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-b.patch @@ -81,7 +81,7 @@ Signed-off-by: Mauro Carvalho Chehab + }; --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15201,6 +15201,14 @@ S: Maintained +@@ -15202,6 +15202,14 @@ S: Maintained F: drivers/media/i2c/imx274.c F: Documentation/devicetree/bindings/media/i2c/imx274.txt diff --git a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch index 367eb9ef8d..c66ce3c0a2 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch @@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -2798,7 +2798,7 @@ static void bcmgenet_set_hw_addr(struct +@@ -2806,7 +2806,7 @@ static void bcmgenet_set_hw_addr(struct } /* Returns a reusable dma control register value */ @@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell { unsigned int i; u32 reg; -@@ -2823,6 +2823,14 @@ static u32 bcmgenet_dma_disable(struct b +@@ -2831,6 +2831,14 @@ static u32 bcmgenet_dma_disable(struct b udelay(10); bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH); @@ -48,7 +48,7 @@ Signed-off-by: Phil Elwell return dma_ctrl; } -@@ -2918,8 +2926,8 @@ static int bcmgenet_open(struct net_devi +@@ -2926,8 +2934,8 @@ static int bcmgenet_open(struct net_devi bcmgenet_set_hw_addr(priv, dev->dev_addr); @@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell /* Reinitialize TDMA and RDMA and SW housekeeping */ ret = bcmgenet_init_dma(priv); -@@ -3674,7 +3682,7 @@ static int bcmgenet_resume(struct device +@@ -3682,7 +3690,7 @@ static int bcmgenet_resume(struct device bcmgenet_power_up(priv, GENET_POWER_WOL_MAGIC); /* Disable RX/TX DMA and flush TX queues */ diff --git a/target/linux/bcm27xx/patches-5.4/950-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 62ee237fcb..74e91ebf95 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 -@@ -275,6 +275,7 @@ static void xhci_pci_quirks(struct devic +@@ -278,6 +278,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3483) { xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; @@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1883,6 +1883,7 @@ struct xhci_hcd { +@@ -1884,6 +1884,7 @@ struct xhci_hcd { #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) diff --git a/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch b/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch index f0d23f9be1..3cb59fafd8 100644 --- a/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch +++ b/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch @@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -1183,6 +1183,9 @@ static int lan78xx_link_reset(struct lan +@@ -1179,6 +1179,9 @@ static int lan78xx_link_reset(struct lan if (unlikely(ret < 0)) return -EIO; diff --git a/target/linux/bcm4908/Makefile b/target/linux/bcm4908/Makefile index 3177bd9ded..f86127ff58 100644 --- a/target/linux/bcm4908/Makefile +++ b/target/linux/bcm4908/Makefile @@ -23,6 +23,7 @@ KERNELNAME:=Image dtbs DEFAULT_PACKAGES += \ bcm4908img fdt-utils uboot-envtools \ kmod-gpio-button-hotplug \ - kmod-usb-ohci kmod-usb2 kmod-usb3 + kmod-usb-ohci kmod-usb2 kmod-usb3 \ + kmod-usb-ledtrig-usbport $(eval $(call BuildTarget)) diff --git a/target/linux/bcm4908/patches-5.4/039-v6.2-0003-arm64-dts-Update-cache-properties-for-broadcom.patch b/target/linux/bcm4908/patches-5.4/039-v6.2-0003-arm64-dts-Update-cache-properties-for-broadcom.patch new file mode 100644 index 0000000000..a19ab8cf8f --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/039-v6.2-0003-arm64-dts-Update-cache-properties-for-broadcom.patch @@ -0,0 +1,134 @@ +From e567e58d6819adc002c57b81e16b88da24d3b4aa Mon Sep 17 00:00:00 2001 +From: Pierre Gondois +Date: Tue, 22 Nov 2022 17:32:07 +0100 +Subject: [PATCH] arm64: dts: Update cache properties for broadcom + +The DeviceTree Specification v0.3 specifies that the cache node +'compatible' and 'cache-level' properties are 'required'. Cf. +s3.8 Multi-level and Shared Cache Nodes +The 'cache-unified' property should be present if one of the +properties for unified cache is present ('cache-size', ...). + +Update the Device Trees accordingly. + +Acked-by: William Zhang +Signed-off-by: Pierre Gondois +Link: https://lore.kernel.org/r/20221122163208.3810985-3-pierre.gondois@arm.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 1 + + arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi | 1 + + arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi | 1 + + arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi | 1 + + arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi | 1 + + arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi | 1 + + arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi | 1 + + arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 1 + + arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi | 4 ++++ + 9 files changed, 12 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -63,6 +63,7 @@ + + l2: l2-cache0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi +@@ -51,6 +51,7 @@ + + L2_0: l2-cache0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi +@@ -35,6 +35,7 @@ + + L2_0: l2-cache0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi +@@ -51,6 +51,7 @@ + + L2_0: l2-cache0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi +@@ -51,6 +51,7 @@ + + L2_0: l2-cache0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi +@@ -35,6 +35,7 @@ + + L2_0: l2-cache0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi +@@ -50,6 +50,7 @@ + }; + L2_0: l2-cache0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi ++++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +@@ -79,6 +79,7 @@ + + CLUSTER0_L2: l2-cache@0 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + +--- a/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi ++++ b/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi +@@ -108,18 +108,22 @@ + + CLUSTER0_L2: l2-cache@0 { + compatible = "cache"; ++ cache-level = <2>; + }; + + CLUSTER1_L2: l2-cache@100 { + compatible = "cache"; ++ cache-level = <2>; + }; + + CLUSTER2_L2: l2-cache@200 { + compatible = "cache"; ++ cache-level = <2>; + }; + + CLUSTER3_L2: l2-cache@300 { + compatible = "cache"; ++ cache-level = <2>; + }; + }; + diff --git a/target/linux/bcm4908/patches-5.4/040-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch b/target/linux/bcm4908/patches-5.4/040-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch new file mode 100644 index 0000000000..e8e1228179 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/040-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch @@ -0,0 +1,367 @@ +From f5d83b714e304d5f3229da434af2eeea033c4f5d Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Mon, 6 Feb 2023 22:58:15 -0800 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: Add spi controller node + +Add support for HSSPI controller in ARMv8 chip dts files. + +Signed-off-by: William Zhang +Link: https://lore.kernel.org/r/20230207065826.285013-5-william.zhang@broadcom.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcmbca/bcm4908.dtsi | 18 +++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm4912.dtsi | 20 +++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm63146.dtsi | 19 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm63158.dtsi | 19 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm6813.dtsi | 20 +++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm6856.dtsi | 18 +++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm6858.dtsi | 18 +++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm94908.dts | 4 ++++ + .../boot/dts/broadcom/bcmbca/bcm94912.dts | 4 ++++ + .../boot/dts/broadcom/bcmbca/bcm963146.dts | 4 ++++ + .../boot/dts/broadcom/bcmbca/bcm963158.dts | 4 ++++ + .../boot/dts/broadcom/bcmbca/bcm96813.dts | 4 ++++ + .../boot/dts/broadcom/bcmbca/bcm96856.dts | 4 ++++ + .../boot/dts/broadcom/bcmbca/bcm96858.dts | 4 ++++ + 14 files changed, 160 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -107,6 +107,12 @@ + clock-frequency = <50000000>; + clock-output-names = "periph"; + }; ++ ++ hsspi_pll: hsspi-pll { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <400000000>; ++ }; + }; + + soc { +@@ -531,6 +537,18 @@ + #size-cells = <0>; + }; + ++ hsspi: spi@1000{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,bcm4908-hsspi", "brcm,bcmbca-hsspi-v1.0"; ++ reg = <0x1000 0x600>; ++ interrupts = ; ++ clocks = <&hsspi_pll &hsspi_pll>; ++ clock-names = "hsspi", "pll"; ++ num-cs = <8>; ++ status = "disabled"; ++ }; ++ + nand-controller@1800 { + #address-cells = <1>; + #size-cells = <0>; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi +@@ -79,6 +79,7 @@ + #clock-cells = <0>; + clock-frequency = <200000000>; + }; ++ + uart_clk: uart-clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; +@@ -86,6 +87,12 @@ + clock-div = <4>; + clock-mult = <1>; + }; ++ ++ hsspi_pll: hsspi-pll { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; + }; + + psci { +@@ -117,6 +124,19 @@ + #size-cells = <1>; + ranges = <0x0 0x0 0xff800000 0x800000>; + ++ hsspi: spi@1000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,bcm4912-hsspi", "brcm,bcmbca-hsspi-v1.1"; ++ reg = <0x1000 0x600>, <0x2610 0x4>; ++ reg-names = "hsspi", "spim-ctrl"; ++ interrupts = ; ++ clocks = <&hsspi_pll &hsspi_pll>; ++ clock-names = "hsspi", "pll"; ++ num-cs = <8>; ++ status = "disabled"; ++ }; ++ + uart0: serial@12000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x12000 0x1000>; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi +@@ -60,6 +60,7 @@ + #clock-cells = <0>; + clock-frequency = <200000000>; + }; ++ + uart_clk: uart-clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; +@@ -67,6 +68,12 @@ + clock-div = <4>; + clock-mult = <1>; + }; ++ ++ hsspi_pll: hsspi-pll { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; + }; + + psci { +@@ -99,6 +106,18 @@ + #size-cells = <1>; + ranges = <0x0 0x0 0xff800000 0x800000>; + ++ hsspi: spi@1000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,bcm63146-hsspi", "brcm,bcmbca-hsspi-v1.0"; ++ reg = <0x1000 0x600>; ++ interrupts = ; ++ clocks = <&hsspi_pll &hsspi_pll>; ++ clock-names = "hsspi", "pll"; ++ num-cs = <8>; ++ status = "disabled"; ++ }; ++ + uart0: serial@12000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x12000 0x1000>; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi +@@ -79,6 +79,7 @@ + #clock-cells = <0>; + clock-frequency = <200000000>; + }; ++ + uart_clk: uart-clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; +@@ -86,6 +87,12 @@ + clock-div = <4>; + clock-mult = <1>; + }; ++ ++ hsspi_pll: hsspi-pll { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <400000000>; ++ }; + }; + + psci { +@@ -117,6 +124,18 @@ + #size-cells = <1>; + ranges = <0x0 0x0 0xff800000 0x800000>; + ++ hsspi: spi@1000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,bcm63158-hsspi", "brcm,bcmbca-hsspi-v1.0"; ++ reg = <0x1000 0x600>; ++ interrupts = ; ++ clocks = <&hsspi_pll &hsspi_pll>; ++ clock-names = "hsspi", "pll"; ++ num-cs = <8>; ++ status = "disabled"; ++ }; ++ + uart0: serial@12000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x12000 0x1000>; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi +@@ -79,6 +79,7 @@ + #clock-cells = <0>; + clock-frequency = <200000000>; + }; ++ + uart_clk: uart-clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; +@@ -86,6 +87,12 @@ + clock-div = <4>; + clock-mult = <1>; + }; ++ ++ hsspi_pll: hsspi-pll { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; + }; + + psci { +@@ -117,6 +124,19 @@ + #size-cells = <1>; + ranges = <0x0 0x0 0xff800000 0x800000>; + ++ hsspi: spi@1000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,bcm6813-hsspi", "brcm,bcmbca-hsspi-v1.1"; ++ reg = <0x1000 0x600>, <0x2610 0x4>; ++ reg-names = "hsspi", "spim-ctrl"; ++ interrupts = ; ++ clocks = <&hsspi_pll &hsspi_pll>; ++ clock-names = "hsspi", "pll"; ++ num-cs = <8>; ++ status = "disabled"; ++ }; ++ + uart0: serial@12000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x12000 0x1000>; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi +@@ -60,6 +60,12 @@ + #clock-cells = <0>; + clock-frequency = <200000000>; + }; ++ ++ hsspi_pll: hsspi-pll { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <400000000>; ++ }; + }; + + psci { +@@ -100,5 +106,17 @@ + clock-names = "refclk"; + status = "disabled"; + }; ++ ++ hsspi: spi@1000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,bcm6856-hsspi", "brcm,bcmbca-hsspi-v1.0"; ++ reg = <0x1000 0x600>; ++ interrupts = ; ++ clocks = <&hsspi_pll &hsspi_pll>; ++ clock-names = "hsspi", "pll"; ++ num-cs = <8>; ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi +@@ -78,6 +78,12 @@ + #clock-cells = <0>; + clock-frequency = <200000000>; + }; ++ ++ hsspi_pll: hsspi-pll { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <400000000>; ++ }; + }; + + psci { +@@ -137,5 +143,17 @@ + clock-names = "refclk"; + status = "disabled"; + }; ++ ++ hsspi: spi@1000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,bcm6858-hsspi", "brcm,bcmbca-hsspi-v1.0"; ++ reg = <0x1000 0x600>; ++ interrupts = ; ++ clocks = <&hsspi_pll &hsspi_pll>; ++ clock-names = "hsspi", "pll"; ++ num-cs = <8>; ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts +@@ -28,3 +28,7 @@ + &uart0 { + status = "okay"; + }; ++ ++&hsspi { ++ status = "okay"; ++}; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts +@@ -28,3 +28,7 @@ + &uart0 { + status = "okay"; + }; ++ ++&hsspi { ++ status = "okay"; ++}; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts +@@ -28,3 +28,7 @@ + &uart0 { + status = "okay"; + }; ++ ++&hsspi { ++ status = "okay"; ++}; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts +@@ -28,3 +28,7 @@ + &uart0 { + status = "okay"; + }; ++ ++&hsspi { ++ status = "okay"; ++}; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts +@@ -28,3 +28,7 @@ + &uart0 { + status = "okay"; + }; ++ ++&hsspi { ++ status = "okay"; ++}; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts +@@ -28,3 +28,7 @@ + &uart0 { + status = "okay"; + }; ++ ++&hsspi { ++ status = "okay"; ++}; +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts +@@ -28,3 +28,7 @@ + &uart0 { + status = "okay"; + }; ++ ++&hsspi { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.4/040-v6.4-0002-arm64-dts-broadcom-bcmbca-bcm4908-fix-NAND-interrupt.patch b/target/linux/bcm4908/patches-5.4/040-v6.4-0002-arm64-dts-broadcom-bcmbca-bcm4908-fix-NAND-interrupt.patch new file mode 100644 index 0000000000..b121200a25 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/040-v6.4-0002-arm64-dts-broadcom-bcmbca-bcm4908-fix-NAND-interrupt.patch @@ -0,0 +1,33 @@ +From 5cca02449490e767289bda38db1577e2c375c084 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 28 Feb 2023 15:43:58 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: fix NAND interrupt + name +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes: +arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: interrupt-names:0: 'nand_ctlrdy' was expected + From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml +arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: Unevaluated properties are not allowed ('interrupt-names' was unexpected) + From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/all/20230228144400.21689-1-zajec5@gmail.com/ +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -556,7 +556,7 @@ + reg = <0x1800 0x600>, <0x2000 0x10>; + reg-names = "nand", "nand-int-base"; + interrupts = ; +- interrupt-names = "nand"; ++ interrupt-names = "nand_ctlrdy"; + status = "okay"; + + nandcs: nand@0 { diff --git a/target/linux/bcm4908/patches-5.4/040-v6.4-0003-arm64-dts-broadcom-bcmbca-bcm4908-fix-LED-nodenames.patch b/target/linux/bcm4908/patches-5.4/040-v6.4-0003-arm64-dts-broadcom-bcmbca-bcm4908-fix-LED-nodenames.patch new file mode 100644 index 0000000000..7ce17c1870 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/040-v6.4-0003-arm64-dts-broadcom-bcmbca-bcm4908-fix-LED-nodenames.patch @@ -0,0 +1,66 @@ +From 23be9f68f933adee8163b8efc9c6bff71410cc7c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 28 Feb 2023 15:43:59 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: fix LED nodenames +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes: +arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dtb: leds@800: 'led-lan@19', 'led-power@11', 'led-wan-red@12', 'led-wan-white@15', 'led-wps@14' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+' + From schema: Documentation/devicetree/bindings/leds/leds-bcm63138.yaml + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/all/20230228144400.21689-2-zajec5@gmail.com/ +Signed-off-by: Florian Fainelli +--- + .../dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts +@@ -120,7 +120,7 @@ + }; + + &leds { +- led-power@11 { ++ led@11 { + reg = <0x11>; + function = LED_FUNCTION_POWER; + color = ; +@@ -130,7 +130,7 @@ + pinctrl-0 = <&pins_led_17_a>; + }; + +- led-wan-red@12 { ++ led@12 { + reg = <0x12>; + function = LED_FUNCTION_WAN; + color = ; +@@ -139,7 +139,7 @@ + pinctrl-0 = <&pins_led_18_a>; + }; + +- led-wps@14 { ++ led@14 { + reg = <0x14>; + function = LED_FUNCTION_WPS; + color = ; +@@ -148,7 +148,7 @@ + pinctrl-0 = <&pins_led_20_a>; + }; + +- led-wan-white@15 { ++ led@15 { + reg = <0x15>; + function = LED_FUNCTION_WAN; + color = ; +@@ -157,7 +157,7 @@ + pinctrl-0 = <&pins_led_21_a>; + }; + +- led-lan@19 { ++ led@19 { + reg = <0x19>; + function = LED_FUNCTION_LAN; + color = ; diff --git a/target/linux/bcm4908/patches-5.4/040-v6.4-0004-arm64-dts-broadcom-bcmbca-bcm4908-fix-procmon-nodena.patch b/target/linux/bcm4908/patches-5.4/040-v6.4-0004-arm64-dts-broadcom-bcmbca-bcm4908-fix-procmon-nodena.patch new file mode 100644 index 0000000000..a469a32a2c --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/040-v6.4-0004-arm64-dts-broadcom-bcmbca-bcm4908-fix-procmon-nodena.patch @@ -0,0 +1,30 @@ +From f16a8294dd7a02c7ad042cd2e3acc5ea06698dc1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 28 Feb 2023 15:44:00 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: fix procmon nodename +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes: +arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: syscon@280000: $nodename:0: 'syscon@280000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' + From schema: schemas/simple-bus.yaml + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/all/20230228144400.21689-3-zajec5@gmail.com/ +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -260,7 +260,7 @@ + }; + }; + +- procmon: syscon@280000 { ++ procmon: bus@280000 { + compatible = "simple-bus"; + reg = <0x280000 0x1000>; + ranges; diff --git a/target/linux/bcm4908/patches-5.4/040-v6.4-0005-arm64-dts-broadcom-bcmbca-bcm4908-add-on-SoC-USB-por.patch b/target/linux/bcm4908/patches-5.4/040-v6.4-0005-arm64-dts-broadcom-bcmbca-bcm4908-add-on-SoC-USB-por.patch new file mode 100644 index 0000000000..47b2455ae6 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/040-v6.4-0005-arm64-dts-broadcom-bcmbca-bcm4908-add-on-SoC-USB-por.patch @@ -0,0 +1,81 @@ +From 477cad715de1dfc256a20da3ed83b62f3cb2944d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 28 Feb 2023 15:45:18 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 has 3 USB controllers each with 2 USB ports. Home routers often +have LEDs indicating state of selected USB ports. Describe those SoC USB +ports to allow using them as LED trigger sources. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/all/20230228144520.21816-1-zajec5@gmail.com/ +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcmbca/bcm4908.dtsi | 39 +++++++++++++++++++ + 1 file changed, 39 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -148,6 +148,19 @@ + interrupts = ; + phys = <&usb_phy PHY_TYPE_USB2>; + status = "disabled"; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ehci_port1: port@1 { ++ reg = <1>; ++ #trigger-source-cells = <0>; ++ }; ++ ++ ehci_port2: port@2 { ++ reg = <2>; ++ #trigger-source-cells = <0>; ++ }; + }; + + ohci: usb@c400 { +@@ -156,6 +169,19 @@ + interrupts = ; + phys = <&usb_phy PHY_TYPE_USB2>; + status = "disabled"; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ohci_port1: port@1 { ++ reg = <1>; ++ #trigger-source-cells = <0>; ++ }; ++ ++ ohci_port2: port@2 { ++ reg = <2>; ++ #trigger-source-cells = <0>; ++ }; + }; + + xhci: usb@d000 { +@@ -164,6 +190,19 @@ + interrupts = ; + phys = <&usb_phy PHY_TYPE_USB3>; + status = "disabled"; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ xhci_port1: port@1 { ++ reg = <1>; ++ #trigger-source-cells = <0>; ++ }; ++ ++ xhci_port2: port@2 { ++ reg = <2>; ++ #trigger-source-cells = <0>; ++ }; + }; + + bus@80000 { diff --git a/target/linux/bcm4908/patches-5.4/040-v6.4-0006-arm64-dts-broadcom-bcmbca-bcm4908-add-Netgear-R8000P.patch b/target/linux/bcm4908/patches-5.4/040-v6.4-0006-arm64-dts-broadcom-bcmbca-bcm4908-add-Netgear-R8000P.patch new file mode 100644 index 0000000000..3e210d68e1 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/040-v6.4-0006-arm64-dts-broadcom-bcmbca-bcm4908-add-Netgear-R8000P.patch @@ -0,0 +1,38 @@ +From 889e53ccccc29ff4bf8d4c89cca34e8768845747 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 28 Feb 2023 15:45:19 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add Netgear R8000P USB + LED triggers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This device has 2 USB LEDs meant to be triggered by devices in relevant +USB ports. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/all/20230228144520.21816-2-zajec5@gmail.com/ +Signed-off-by: Florian Fainelli +--- + .../arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +@@ -58,12 +58,16 @@ + function = "usb2"; + color = ; + gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ohci_port1>, <&ehci_port1>; ++ linux,default-trigger = "usbport"; + }; + + led-usb3 { + function = "usb3"; + color = ; + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>; ++ linux,default-trigger = "usbport"; + }; + + led-wifi { diff --git a/target/linux/bcm4908/patches-5.4/040-v6.4-0007-arm64-dts-broadcom-bcmbca-bcm4908-add-TP-Link-C2300-.patch b/target/linux/bcm4908/patches-5.4/040-v6.4-0007-arm64-dts-broadcom-bcmbca-bcm4908-add-TP-Link-C2300-.patch new file mode 100644 index 0000000000..959ccd4fa3 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/040-v6.4-0007-arm64-dts-broadcom-bcmbca-bcm4908-add-TP-Link-C2300-.patch @@ -0,0 +1,41 @@ +From e6d356b146b75f1f77621aab7950a1eb550859f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 28 Feb 2023 15:45:20 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add TP-Link C2300 USB + LED triggers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This device has 2 USB LEDs meant to be triggered by devices in relevant +USB ports. + +While at it fix typo in USB LED name. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/all/20230228144520.21816-3-zajec5@gmail.com/ +Signed-off-by: Florian Fainelli +--- + .../dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +@@ -64,12 +64,16 @@ + function = "usb2"; + color = ; + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ohci_port1>, <&ehci_port1>; ++ linux,default-trigger = "usbport"; + }; + + led-usb3 { +- function = "usbd3"; ++ function = "usb3"; + color = ; + gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>; ++ linux,default-trigger = "usbport"; + }; + + led-brightness { diff --git a/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch b/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch index bc0743c800..a7c6d0102f 100644 --- a/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch +++ b/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch @@ -12,7 +12,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi -@@ -297,7 +297,7 @@ +@@ -343,7 +343,7 @@ gpio0: gpio-controller@500 { compatible = "brcm,bcm6345-gpio"; reg-names = "dirout", "dat"; diff --git a/target/linux/bcm53xx/base-files/etc/board.d/05_compat-version b/target/linux/bcm53xx/base-files/etc/board.d/05_compat-version new file mode 100755 index 0000000000..d79092f76f --- /dev/null +++ b/target/linux/bcm53xx/base-files/etc/board.d/05_compat-version @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in + *) + ucidef_set_compat_version "1.1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 9e97893b0d..b583001a8c 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -116,7 +116,7 @@ DEVICE_VARS += SIGNATURE DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION TPLINK_BOARD DEVICE_VARS += LUXUL_BOARD -IEEE8021X := wpad-basic-openssl +IEEE8021X := wpad-openssl B43 := $(IEEE8021X) kmod-b43 BRCMFMAC_43602A1 := $(IEEE8021X) kmod-brcmfmac brcmfmac-firmware-43602a1-pcie BRCMFMAC_4366B1 := $(IEEE8021X) kmod-brcmfmac brcmfmac-firmware-4366b1-pcie 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 aa6339935e..dcdf48149a 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 @@ -127,7 +127,7 @@ it on BCM4708 family. /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1880,6 +1880,7 @@ struct xhci_hcd { +@@ -1881,6 +1881,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch index ed70482bb0..add4d2d893 100644 --- a/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch +++ b/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch @@ -107,7 +107,7 @@ Signed-off-by: Jonas Gorski } static struct clk clk_pcie = { -@@ -548,6 +562,21 @@ static struct clk_lookup bcm6368_clks[] +@@ -550,6 +564,21 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "ipsec", &clk_ipsec), }; @@ -129,7 +129,7 @@ Signed-off-by: Jonas Gorski #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -580,6 +609,10 @@ static int __init bcm63xx_clk_init(void) +@@ -582,6 +611,10 @@ static int __init bcm63xx_clk_init(void) case BCM6368_CPU_ID: clkdev_add_table(bcm6368_clks, ARRAY_SIZE(bcm6368_clks)); break; diff --git a/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch index ac354a4787..68f56b1f34 100644 --- a/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch +++ b/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch @@ -57,7 +57,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 mask = CKCTL_6328_HSSPI_EN; else if (BCMCPU_IS_6362()) mask = CKCTL_6362_HSSPI_EN; -@@ -456,6 +458,19 @@ static struct clk_lookup bcm3368_clks[] +@@ -458,6 +460,19 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT("bcm63xx_enet.1", "enet", &clk_enet1), }; @@ -77,7 +77,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 static struct clk_lookup bcm6328_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), -@@ -577,6 +592,7 @@ static struct clk_lookup bcm63268_clks[] +@@ -579,6 +594,7 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "pcie", &clk_pcie), }; @@ -85,7 +85,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -586,6 +602,10 @@ static int __init bcm63xx_clk_init(void) +@@ -588,6 +604,10 @@ static int __init bcm63xx_clk_init(void) case BCM3368_CPU_ID: clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks)); break; diff --git a/target/linux/bcm63xx/patches-5.4/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch b/target/linux/bcm63xx/patches-5.4/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch index d6b1190b9d..b5085ea7d4 100644 --- a/target/linux/bcm63xx/patches-5.4/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch +++ b/target/linux/bcm63xx/patches-5.4/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch @@ -9,7 +9,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -501,6 +501,8 @@ static struct clk_lookup bcm3368_clks[] +@@ -503,6 +503,8 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -18,7 +18,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -517,7 +519,9 @@ static struct clk_lookup bcm6318_clks[] +@@ -519,7 +521,9 @@ static struct clk_lookup bcm6318_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -28,7 +28,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -531,7 +535,10 @@ static struct clk_lookup bcm6328_clks[] +@@ -533,7 +537,10 @@ static struct clk_lookup bcm6328_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -39,7 +39,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -544,6 +551,7 @@ static struct clk_lookup bcm6338_clks[] +@@ -546,6 +553,7 @@ static struct clk_lookup bcm6338_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -47,7 +47,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -558,6 +566,7 @@ static struct clk_lookup bcm6345_clks[] +@@ -560,6 +568,7 @@ static struct clk_lookup bcm6345_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -55,7 +55,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -572,6 +581,7 @@ static struct clk_lookup bcm6348_clks[] +@@ -574,6 +583,7 @@ static struct clk_lookup bcm6348_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -63,7 +63,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -588,6 +598,8 @@ static struct clk_lookup bcm6358_clks[] +@@ -590,6 +600,8 @@ static struct clk_lookup bcm6358_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -72,7 +72,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -607,7 +619,10 @@ static struct clk_lookup bcm6362_clks[] +@@ -609,7 +621,10 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -83,7 +83,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -623,6 +638,8 @@ static struct clk_lookup bcm6368_clks[] +@@ -625,6 +640,8 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -92,7 +92,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -637,7 +654,10 @@ static struct clk_lookup bcm63268_clks[] +@@ -639,7 +656,10 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), diff --git a/target/linux/bcm63xx/patches-5.4/430-MIPS-BCM63XX-add-nand-clocks.patch b/target/linux/bcm63xx/patches-5.4/430-MIPS-BCM63XX-add-nand-clocks.patch index a29c3b780b..b5979ff248 100644 --- a/target/linux/bcm63xx/patches-5.4/430-MIPS-BCM63XX-add-nand-clocks.patch +++ b/target/linux/bcm63xx/patches-5.4/430-MIPS-BCM63XX-add-nand-clocks.patch @@ -24,7 +24,7 @@ * Internal peripheral clock */ static struct clk clk_periph = { -@@ -624,6 +641,7 @@ static struct clk_lookup bcm6362_clks[] +@@ -626,6 +643,7 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), /* gated clocks */ @@ -32,7 +32,7 @@ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -641,6 +659,7 @@ static struct clk_lookup bcm6368_clks[] +@@ -643,6 +661,7 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), /* gated clocks */ @@ -40,7 +40,7 @@ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -659,6 +678,7 @@ static struct clk_lookup bcm63268_clks[] +@@ -661,6 +680,7 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), /* gated clocks */ diff --git a/target/linux/generic/backport-5.4/011-kbuild-export-SUBARCH.patch b/target/linux/generic/backport-5.4/011-kbuild-export-SUBARCH.patch index 60defa39c5..59f7a909c5 100644 --- a/target/linux/generic/backport-5.4/011-kbuild-export-SUBARCH.patch +++ b/target/linux/generic/backport-5.4/011-kbuild-export-SUBARCH.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -493,7 +493,7 @@ KBUILD_LDFLAGS := +@@ -500,7 +500,7 @@ KBUILD_LDFLAGS := GCC_PLUGINS_CFLAGS := CLANG_FLAGS := diff --git a/target/linux/generic/backport-5.4/020-03-BACKPORT-mm-use-self-explanatory-macros-rather-than-.patch b/target/linux/generic/backport-5.4/020-03-BACKPORT-mm-use-self-explanatory-macros-rather-than-.patch index 9325df0ff9..55514e2dac 100644 --- a/target/linux/generic/backport-5.4/020-03-BACKPORT-mm-use-self-explanatory-macros-rather-than-.patch +++ b/target/linux/generic/backport-5.4/020-03-BACKPORT-mm-use-self-explanatory-macros-rather-than-.patch @@ -71,7 +71,7 @@ Commit-Queue: Yu Zhao #endif --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -3980,8 +3980,8 @@ static int memcg_stat_show(struct seq_fi +@@ -3984,8 +3984,8 @@ static int memcg_stat_show(struct seq_fi pg_data_t *pgdat; struct mem_cgroup_per_node *mz; struct zone_reclaim_stat *rstat; diff --git a/target/linux/generic/backport-5.4/020-16-FROMLIST-include-linux-cgroup.h-export-cgroup_mutex.patch b/target/linux/generic/backport-5.4/020-16-FROMLIST-include-linux-cgroup.h-export-cgroup_mutex.patch index 267771a5d4..9dce36ea82 100644 --- a/target/linux/generic/backport-5.4/020-16-FROMLIST-include-linux-cgroup.h-export-cgroup_mutex.patch +++ b/target/linux/generic/backport-5.4/020-16-FROMLIST-include-linux-cgroup.h-export-cgroup_mutex.patch @@ -24,7 +24,7 @@ Tested-by: Yu Zhao --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h -@@ -426,6 +426,18 @@ static inline void cgroup_put(struct cgr +@@ -427,6 +427,18 @@ static inline void cgroup_put(struct cgr css_put(&cgrp->self); } @@ -43,7 +43,7 @@ Tested-by: Yu Zhao /** * task_css_set_check - obtain a task's css_set with extra access conditions * @task: the task to obtain css_set for -@@ -440,7 +452,6 @@ static inline void cgroup_put(struct cgr +@@ -441,7 +453,6 @@ static inline void cgroup_put(struct cgr * as locks used during the cgroup_subsys::attach() methods. */ #ifdef CONFIG_PROVE_RCU @@ -51,7 +51,7 @@ Tested-by: Yu Zhao extern spinlock_t css_set_lock; #define task_css_set_check(task, __c) \ rcu_dereference_check((task)->cgroups, \ -@@ -703,6 +714,8 @@ struct cgroup; +@@ -704,6 +715,8 @@ struct cgroup; static inline void css_get(struct cgroup_subsys_state *css) {} static inline void css_put(struct cgroup_subsys_state *css) {} diff --git a/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch b/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch index 9ea5f8456f..29c023714f 100644 --- a/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch +++ b/target/linux/generic/backport-5.4/020-19-BACKPORT-FROMLIST-mm-multigenerational-lru-groundwor.patch @@ -570,7 +570,7 @@ Commit-Queue: Yu Zhao #if defined(CONFIG_NUMA_BALANCING) && !defined(LAST_CPUPID_NOT_IN_PAGE_FLAGS) --- a/mm/swapfile.c +++ b/mm/swapfile.c -@@ -2697,6 +2697,8 @@ SYSCALL_DEFINE1(swapoff, const char __us +@@ -2702,6 +2702,8 @@ SYSCALL_DEFINE1(swapoff, const char __us err = 0; atomic_inc(&proc_poll_event); wake_up_interruptible(&proc_poll_wait); @@ -579,7 +579,7 @@ Commit-Queue: Yu Zhao out_dput: filp_close(victim, NULL); -@@ -3323,6 +3325,8 @@ SYSCALL_DEFINE2(swapon, const char __use +@@ -3328,6 +3330,8 @@ SYSCALL_DEFINE2(swapon, const char __use mutex_unlock(&swapon_mutex); atomic_inc(&proc_poll_event); wake_up_interruptible(&proc_poll_wait); diff --git a/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch b/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch index cce26c4b3a..215e1df3d8 100644 --- a/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch +++ b/target/linux/generic/backport-5.4/020-21-BACKPORT-FROMLIST-mm-multigenerational-lru-mm_struct.patch @@ -210,7 +210,7 @@ Commit-Queue: Yu Zhao unsigned long start, unsigned long end); --- a/kernel/exit.c +++ b/kernel/exit.c -@@ -423,6 +423,7 @@ assign_new_owner: +@@ -470,6 +470,7 @@ assign_new_owner: goto retry; } WRITE_ONCE(mm->owner, c); @@ -268,7 +268,7 @@ Commit-Queue: Yu Zhao if (!prev->mm) { // from kernel /* will mmdrop() in finish_task_switch(). */ -@@ -6284,6 +6285,7 @@ void idle_task_exit(void) +@@ -6283,6 +6284,7 @@ void idle_task_exit(void) if (mm != &init_mm) { switch_mm(mm, &init_mm, current); @@ -278,7 +278,7 @@ Commit-Queue: Yu Zhao --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -5087,6 +5087,7 @@ static void __mem_cgroup_free(struct mem +@@ -5102,6 +5102,7 @@ static void __mem_cgroup_free(struct mem free_mem_cgroup_per_node_info(memcg, node); free_percpu(memcg->vmstats_percpu); free_percpu(memcg->vmstats_local); @@ -286,7 +286,7 @@ Commit-Queue: Yu Zhao kfree(memcg); } -@@ -5137,6 +5138,9 @@ static struct mem_cgroup *mem_cgroup_all +@@ -5152,6 +5153,9 @@ static struct mem_cgroup *mem_cgroup_all if (alloc_mem_cgroup_per_node_info(memcg, node)) goto fail; @@ -296,7 +296,7 @@ Commit-Queue: Yu Zhao if (memcg_wb_domain_init(memcg, GFP_KERNEL)) goto fail; -@@ -6055,6 +6059,29 @@ static void mem_cgroup_move_task(void) +@@ -6070,6 +6074,29 @@ static void mem_cgroup_move_task(void) } #endif @@ -326,7 +326,7 @@ Commit-Queue: Yu Zhao /* * Cgroup retains root cgroups across [un]mount cycles making it necessary * to verify whether we're attached to the default hierarchy on each mount -@@ -6355,6 +6382,7 @@ struct cgroup_subsys memory_cgrp_subsys +@@ -6370,6 +6397,7 @@ struct cgroup_subsys memory_cgrp_subsys .css_free = mem_cgroup_css_free, .css_reset = mem_cgroup_css_reset, .can_attach = mem_cgroup_can_attach, diff --git a/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch b/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch index a29da1e7b2..ec6d0e5092 100644 --- a/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch +++ b/target/linux/generic/backport-5.4/080-wireguard-0072-net-WireGuard-secure-network-tunnel.patch @@ -192,7 +192,7 @@ Signed-off-by: Jason A. Donenfeld --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17585,6 +17585,14 @@ L: linux-gpio@vger.kernel.org +@@ -17586,6 +17586,14 @@ L: linux-gpio@vger.kernel.org S: Maintained F: drivers/gpio/gpio-ws16c48.c diff --git a/target/linux/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch b/target/linux/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch index 475f72f272..9f0c53b6b5 100644 --- a/target/linux/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch +++ b/target/linux/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch @@ -103,4 +103,4 @@ Link: https://lore.kernel.org/linux-mtd/20220622010628.30414-4-ansuelsmth@gmail. + mtd_check_of_node(mtd); of_node_get(mtd_get_of_node(mtd)); error = device_register(&mtd->dev); - if (error) + if (error) { diff --git a/target/linux/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch b/target/linux/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch index f65fc6c8be..6c92182084 100644 --- a/target/linux/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch +++ b/target/linux/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch @@ -25,7 +25,7 @@ Signed-off-by: Srinivas Kandagatla --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -1067,6 +1067,34 @@ int __get_mtd_device(struct mtd_info *mt +@@ -1069,6 +1069,34 @@ int __get_mtd_device(struct mtd_info *mt EXPORT_SYMBOL_GPL(__get_mtd_device); /** diff --git a/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch b/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch index 02b5b575db..34686f84a7 100644 --- a/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch +++ b/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6326,15 +6326,10 @@ void netif_napi_del(struct napi_struct * +@@ -6328,15 +6328,10 @@ void netif_napi_del(struct napi_struct * } EXPORT_SYMBOL(netif_napi_del); @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller weight = n->weight; /* This NAPI_STATE_SCHED test is for avoiding a race -@@ -6352,7 +6347,7 @@ static int napi_poll(struct napi_struct +@@ -6354,7 +6349,7 @@ static int napi_poll(struct napi_struct WARN_ON_ONCE(work > weight); if (likely(work < weight)) @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller /* Drivers must not modify the NAPI state if they * consume the entire weight. In such cases this code -@@ -6361,7 +6356,7 @@ static int napi_poll(struct napi_struct +@@ -6363,7 +6358,7 @@ static int napi_poll(struct napi_struct */ if (unlikely(napi_disable_pending(n))) { napi_complete(n); @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller } if (n->gro_bitmask) { -@@ -6379,12 +6374,29 @@ static int napi_poll(struct napi_struct +@@ -6381,12 +6376,29 @@ static int napi_poll(struct napi_struct if (unlikely(!list_empty(&n->poll_list))) { pr_warn_once("%s: Budget exhausted after napi rescheduled\n", n->dev ? n->dev->name : "backlog"); diff --git a/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch index e613b17143..c890240915 100644 --- a/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch +++ b/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch @@ -30,7 +30,7 @@ Signed-off-by: David S. Miller --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -340,6 +340,7 @@ struct napi_struct { +@@ -349,6 +349,7 @@ struct napi_struct { struct list_head dev_list; struct hlist_node napi_hash_node; unsigned int napi_id; @@ -38,7 +38,7 @@ Signed-off-by: David S. Miller }; enum { -@@ -350,6 +351,7 @@ enum { +@@ -359,6 +360,7 @@ enum { NAPI_STATE_HASHED, /* In NAPI hash (busy polling possible) */ NAPI_STATE_NO_BUSY_POLL,/* Do not add in napi_hash, no busy polling */ NAPI_STATE_IN_BUSY_POLL,/* sk_busy_loop() owns this NAPI */ @@ -46,7 +46,7 @@ Signed-off-by: David S. Miller }; enum { -@@ -360,6 +362,7 @@ enum { +@@ -369,6 +371,7 @@ enum { NAPIF_STATE_HASHED = BIT(NAPI_STATE_HASHED), NAPIF_STATE_NO_BUSY_POLL = BIT(NAPI_STATE_NO_BUSY_POLL), NAPIF_STATE_IN_BUSY_POLL = BIT(NAPI_STATE_IN_BUSY_POLL), @@ -54,7 +54,7 @@ Signed-off-by: David S. Miller }; enum gro_result { -@@ -504,20 +507,7 @@ bool napi_hash_del(struct napi_struct *n +@@ -513,20 +516,7 @@ bool napi_hash_del(struct napi_struct *n */ void napi_disable(struct napi_struct *n); @@ -76,7 +76,7 @@ Signed-off-by: David S. Miller /** * napi_synchronize - wait until NAPI is not running -@@ -1783,6 +1773,8 @@ enum netdev_ml_priv_type { +@@ -1792,6 +1782,8 @@ enum netdev_ml_priv_type { * * @wol_enabled: Wake-on-LAN is enabled * @@ -85,7 +85,7 @@ Signed-off-by: David S. Miller * FIXME: cleanup struct net_device such that network protocol info * moves out. */ -@@ -2075,6 +2067,7 @@ struct net_device { +@@ -2084,6 +2076,7 @@ struct net_device { struct lock_class_key addr_list_lock_key; bool proto_down; unsigned wol_enabled:1; @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller static int __dev_open(struct net_device *dev, struct netlink_ext_ack *extack) { const struct net_device_ops *ops = dev->netdev_ops; -@@ -3889,6 +3911,21 @@ int gro_normal_batch __read_mostly = 8; +@@ -3891,6 +3913,21 @@ int gro_normal_batch __read_mostly = 8; static inline void ____napi_schedule(struct softnet_data *sd, struct napi_struct *napi) { @@ -153,7 +153,7 @@ Signed-off-by: David S. Miller list_add_tail(&napi->poll_list, &sd->poll_list); __raise_softirq_irqoff(NET_RX_SOFTIRQ); } -@@ -6280,6 +6317,12 @@ void netif_napi_add(struct net_device *d +@@ -6282,6 +6319,12 @@ void netif_napi_add(struct net_device *d set_bit(NAPI_STATE_NPSVC, &napi->state); list_add_rcu(&napi->dev_list, &dev->napi_list); napi_hash_add(napi); @@ -166,7 +166,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(netif_napi_add); -@@ -6296,9 +6339,28 @@ void napi_disable(struct napi_struct *n) +@@ -6298,9 +6341,28 @@ void napi_disable(struct napi_struct *n) hrtimer_cancel(&n->timer); clear_bit(NAPI_STATE_DISABLE, &n->state); @@ -195,7 +195,7 @@ Signed-off-by: David S. Miller static void flush_gro_hash(struct napi_struct *napi) { int i; -@@ -6323,6 +6385,11 @@ void netif_napi_del(struct napi_struct * +@@ -6325,6 +6387,11 @@ void netif_napi_del(struct napi_struct * flush_gro_hash(napi); napi->gro_bitmask = 0; @@ -207,7 +207,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(netif_napi_del); -@@ -6402,6 +6469,51 @@ static int napi_poll(struct napi_struct +@@ -6404,6 +6471,51 @@ static int napi_poll(struct napi_struct return work; } diff --git a/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch index 2911400a70..05c40a91d5 100644 --- a/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch +++ b/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch @@ -46,7 +46,7 @@ Signed-off-by: David S. Miller + == ================================== --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -498,6 +498,8 @@ static inline bool napi_complete(struct +@@ -507,6 +507,8 @@ static inline bool napi_complete(struct */ bool napi_hash_del(struct napi_struct *napi); @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller * @n: NAPI context --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3915,8 +3915,9 @@ static inline void ____napi_schedule(str +@@ -3917,8 +3917,9 @@ static inline void ____napi_schedule(str if (test_bit(NAPI_STATE_THREADED, &napi->state)) { /* Paired with smp_mb__before_atomic() in @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller * wake_up_process() when it's not NULL. */ thread = READ_ONCE(napi->thread); -@@ -6294,6 +6295,49 @@ static void init_gro_hash(struct napi_st +@@ -6296,6 +6297,49 @@ static void init_gro_hash(struct napi_st napi->gro_bitmask = 0; } diff --git a/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch index 8f93cddb51..103ed5713b 100644 --- a/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch +++ b/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch @@ -27,7 +27,7 @@ Cc: Hannes Frederic Sowa --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -352,6 +352,7 @@ enum { +@@ -361,6 +361,7 @@ enum { NAPI_STATE_NO_BUSY_POLL,/* Do not add in napi_hash, no busy polling */ NAPI_STATE_IN_BUSY_POLL,/* sk_busy_loop() owns this NAPI */ NAPI_STATE_THREADED, /* The poll is performed inside its own thread*/ @@ -35,7 +35,7 @@ Cc: Hannes Frederic Sowa }; enum { -@@ -363,6 +364,7 @@ enum { +@@ -372,6 +373,7 @@ enum { NAPIF_STATE_NO_BUSY_POLL = BIT(NAPI_STATE_NO_BUSY_POLL), NAPIF_STATE_IN_BUSY_POLL = BIT(NAPI_STATE_IN_BUSY_POLL), NAPIF_STATE_THREADED = BIT(NAPI_STATE_THREADED), @@ -45,7 +45,7 @@ Cc: Hannes Frederic Sowa enum gro_result { --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3922,6 +3922,8 @@ static inline void ____napi_schedule(str +@@ -3924,6 +3924,8 @@ static inline void ____napi_schedule(str */ thread = READ_ONCE(napi->thread); if (thread) { @@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa wake_up_process(thread); return; } -@@ -6082,7 +6084,8 @@ bool napi_complete_done(struct napi_stru +@@ -6084,7 +6086,8 @@ bool napi_complete_done(struct napi_stru WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED)); @@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa /* If STATE_MISSED was set, leave STATE_SCHED set, * because we will call napi->poll() one more time. -@@ -6515,16 +6518,25 @@ static int napi_poll(struct napi_struct +@@ -6517,16 +6520,25 @@ static int napi_poll(struct napi_struct static int napi_thread_wait(struct napi_struct *napi) { diff --git a/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch index a60763db60..a02597329b 100644 --- a/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch +++ b/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch @@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6522,7 +6522,7 @@ static int napi_thread_wait(struct napi_ +@@ -6524,7 +6524,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); @@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski /* Testing SCHED_THREADED bit here to make sure the current * kthread owns this napi and could poll on this napi. * Testing SCHED bit is not enough because SCHED bit might be -@@ -6540,6 +6540,7 @@ static int napi_thread_wait(struct napi_ +@@ -6542,6 +6542,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); } __set_current_state(TASK_RUNNING); diff --git a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch index aeb22f5a0a..b063efb859 100644 --- a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch +++ b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch @@ -66,7 +66,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5476,8 +5476,7 @@ static inline void skb_gro_reset_offset( +@@ -5478,8 +5478,7 @@ static inline void skb_gro_reset_offset( NAPI_GRO_CB(skb)->frag0 = NULL; NAPI_GRO_CB(skb)->frag0_len = 0; diff --git a/target/linux/generic/backport-5.4/702-Revert-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch b/target/linux/generic/backport-5.4/702-Revert-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch deleted file mode 100644 index d9602fab7a..0000000000 --- a/target/linux/generic/backport-5.4/702-Revert-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 7 Dec 2022 07:57:58 +0100 -Subject: [PATCH] Revert "net: dsa: b53: Fix valid setting for MDB entries" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This reverts commit 1fae6eb0fc91d3ecb539e03f9e4dcd1c53ada553. - -Upstream commit was a fix for an overlook of setting "ent.is_valid" -twice after 5d65b64a3d97 ("net: dsa: b53: Add support for MDB"). - -Since MDB support was not backported to stable kernels (it's not a bug -fix) there is nothing to fix there. Backporting this commit resulted in -"env.is_valid" not being set at all. - -Signed-off-by: Rafał Miłecki ---- - drivers/net/dsa/b53/b53_common.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -1551,6 +1551,7 @@ static int b53_arl_op(struct b53_device - - memset(&ent, 0, sizeof(ent)); - ent.port = port; -+ ent.is_valid = is_valid; - ent.vid = vid; - ent.is_static = true; - memcpy(ent.mac, addr, ETH_ALEN); 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 0797131367..036a44b523 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 @@ -130,7 +130,7 @@ Signed-off-by: Russell King /* Some Ethernet drivers try to connect to a PHY device before * calling register_netdevice() -> netdev_register_kobject() and * does the dev->dev.kobj initialization. Here we only check for -@@ -2291,6 +2354,9 @@ static int phy_remove(struct device *dev +@@ -2292,6 +2355,9 @@ static int phy_remove(struct device *dev phydev->state = PHY_DOWN; mutex_unlock(&phydev->lock); diff --git a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch index 69c56eca7a..9c57aafe99 100644 --- a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch +++ b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch @@ -20,7 +20,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1682,6 +1682,40 @@ static int genphy_config_advert(struct p +@@ -1683,6 +1683,40 @@ static int genphy_config_advert(struct p } /** @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller * genphy_config_eee_advert - disable unwanted eee mode advertisement * @phydev: target phy_device struct * -@@ -1790,6 +1824,54 @@ int __genphy_config_aneg(struct phy_devi +@@ -1791,6 +1825,54 @@ int __genphy_config_aneg(struct phy_devi EXPORT_SYMBOL(__genphy_config_aneg); /** @@ -116,7 +116,7 @@ Signed-off-by: David S. Miller * genphy_aneg_done - return auto-negotiation status * @phydev: target phy_device struct * -@@ -1962,6 +2044,63 @@ int genphy_read_status(struct phy_device +@@ -1963,6 +2045,63 @@ int genphy_read_status(struct phy_device EXPORT_SYMBOL(genphy_read_status); /** diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index c8d52644dd..08c20d54e2 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -658,9 +658,9 @@ CONFIG_BPF=y # CONFIG_BPFILTER is not set CONFIG_BPF_JIT=y # CONFIG_BPF_JIT_ALWAYS_ON is not set -# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set # CONFIG_BPF_STREAM_PARSER is not set CONFIG_BPF_SYSCALL=y +# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set # CONFIG_BPQETHER is not set CONFIG_BQL=y CONFIG_BRANCH_PROFILE_NONE=y @@ -969,14 +969,14 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_AES=y # CONFIG_CRYPTO_AES_586 is not set # CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_AES_ARM_BS is not set -# CONFIG_CRYPTO_AES_ARM_CE is not set # CONFIG_CRYPTO_AES_ARM64 is not set # CONFIG_CRYPTO_AES_ARM64_BS is not set # CONFIG_CRYPTO_AES_ARM64_CE is not set # CONFIG_CRYPTO_AES_ARM64_CE_BLK is not set # CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set # CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set +# CONFIG_CRYPTO_AES_ARM_BS is not set +# CONFIG_CRYPTO_AES_ARM_CE is not set # CONFIG_CRYPTO_AES_NI_INTEL is not set # CONFIG_CRYPTO_AES_TI is not set CONFIG_CRYPTO_ALGAPI=y @@ -1006,8 +1006,8 @@ CONFIG_CRYPTO_BLKCIPHER2=y # CONFIG_CRYPTO_CRC32C_INTEL is not set # CONFIG_CRYPTO_CRC32_ARM_CE is not set # CONFIG_CRYPTO_CRCT10DIF is not set -# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set # CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set +# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_CTR is not set # CONFIG_CRYPTO_CTS is not set @@ -1065,8 +1065,8 @@ CONFIG_CRYPTO_BLKCIPHER2=y # CONFIG_CRYPTO_GCM is not set # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_GHASH_ARM_CE is not set # CONFIG_CRYPTO_GHASH_ARM64_CE is not set +# CONFIG_CRYPTO_GHASH_ARM_CE is not set # CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set # CONFIG_CRYPTO_HASH is not set # CONFIG_CRYPTO_HMAC is not set @@ -1121,14 +1121,14 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_CRYPTO_SERPENT is not set # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA1_ARM is not set +# CONFIG_CRYPTO_SHA1_ARM64_CE is not set # CONFIG_CRYPTO_SHA1_ARM_CE is not set # CONFIG_CRYPTO_SHA1_ARM_NEON is not set -# CONFIG_CRYPTO_SHA1_ARM64_CE is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA256_ARM is not set # CONFIG_CRYPTO_SHA256_ARM64 is not set -# CONFIG_CRYPTO_SHA2_ARM_CE is not set # CONFIG_CRYPTO_SHA2_ARM64_CE 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 @@ -2260,6 +2260,7 @@ CONFIG_INET=y # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_LRO is not set +CONFIG_INET_TABLE_PERTURB_ORDER=16 # CONFIG_INET_TCP_DIAG is not set # CONFIG_INET_TUNNEL is not set # CONFIG_INET_UDP_DIAG is not set @@ -3479,7 +3480,6 @@ CONFIG_NET_CLS_IND=y # CONFIG_NET_CLS_ROUTE4 is not set # CONFIG_NET_CLS_RSVP is not set # CONFIG_NET_CLS_RSVP6 is not set -# CONFIG_NET_CLS_TCINDEX is not set # CONFIG_NET_CLS_U32 is not set CONFIG_NET_CORE=y # CONFIG_NET_DEVLINK is not set @@ -3725,8 +3725,8 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_CONNTRACK_TIMESTAMP is not set # CONFIG_NF_CONNTRACK_ZONES is not set # CONFIG_NF_CT_NETLINK is not set -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set # CONFIG_NF_CT_NETLINK_HELPER is not set +# CONFIG_NF_CT_NETLINK_TIMEOUT is not set # CONFIG_NF_CT_PROTO_DCCP is not set # CONFIG_NF_CT_PROTO_GRE is not set # CONFIG_NF_CT_PROTO_SCTP is not set @@ -5888,9 +5888,9 @@ CONFIG_TTY=y # CONFIG_UBIFS_FS_AUTHENTICATION is not set # CONFIG_UBIFS_FS_ENCRYPTION is not set # CONFIG_UBIFS_FS_SECURITY is not set +CONFIG_UBIFS_FS_XATTR=y # CONFIG_UBIFS_FS_ZLIB is not set # CONFIG_UBIFS_FS_ZSTD is not set -CONFIG_UBIFS_FS_XATTR=y # CONFIG_UBSAN is not set CONFIG_UBSAN_ALIGNMENT=y # CONFIG_UCB1400_CORE is not set diff --git a/target/linux/generic/files-5.4/include/linux/soc/mediatek/mtk_wed.h b/target/linux/generic/files-5.4/include/linux/soc/mediatek/mtk_wed.h index 04bc75138d..b0af6262a8 100644 --- a/target/linux/generic/files-5.4/include/linux/soc/mediatek/mtk_wed.h +++ b/target/linux/generic/files-5.4/include/linux/soc/mediatek/mtk_wed.h @@ -52,6 +52,12 @@ mtk_wed_device_attach(struct mtk_wed_device *dev) return ret; } +static inline bool +mtk_wed_get_rx_capa(struct mtk_wed_device *dev) +{ + return false; +} + static inline bool mtk_wed_device_active(struct mtk_wed_device *dev) { return false; diff --git a/target/linux/generic/hack-5.4/221-module_exports.patch b/target/linux/generic/hack-5.4/221-module_exports.patch index 446bf53008..e8b775e2a9 100644 --- a/target/linux/generic/hack-5.4/221-module_exports.patch +++ b/target/linux/generic/hack-5.4/221-module_exports.patch @@ -56,9 +56,9 @@ Signed-off-by: Felix Fietkau } \ \ /* __*init sections */ \ -@@ -905,6 +915,8 @@ - EXIT_TEXT \ - EXIT_DATA \ +@@ -917,6 +927,8 @@ + /DISCARD/ : { \ + EXIT_DISCARDS \ EXIT_CALL \ + SYMTAB_DISCARD \ + SYMTAB_DISCARD_GPL \ diff --git a/target/linux/generic/hack-5.4/252-init-Kconfig-make-ASN1-explicitly-selectable-unhide-.patch b/target/linux/generic/hack-5.4/252-init-Kconfig-make-ASN1-explicitly-selectable-unhide-.patch new file mode 100644 index 0000000000..62bf7f77d5 --- /dev/null +++ b/target/linux/generic/hack-5.4/252-init-Kconfig-make-ASN1-explicitly-selectable-unhide-.patch @@ -0,0 +1,30 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 23 Jan 2023 12:24:12 +0100 +Subject: [PATCH] init/Kconfig: make ASN1 explicitly selectable (unhide it) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Kernel developers assumed ASN1 symbol may be needed only by in-kernel +code and they made it hidden. It is actually used by ksmbd version being +developed in GitHub (there is also upstream one since Linux 5.15). + +To allow building ksmbd from GitHub cleanly allow selecting its +dependency (CONFIG_ASN1) explicitly by unhiding it. + +Signed-off-by: Rafał Miłecki +--- + init/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -2249,7 +2249,7 @@ config PADATA + bool + + config ASN1 +- tristate ++ tristate "ASN.1 grammar compiler" + help + Build a simple ASN.1 grammar compiler that produces a bytecode output + that can be interpreted by the ASN.1 stream decoder and used to diff --git a/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch b/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch index 8112fa7e13..7d1f545025 100644 --- a/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch +++ b/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch @@ -20,7 +20,7 @@ /* Part specific fixup hooks. */ const struct spi_nor_fixups *fixups; -@@ -1985,6 +1989,9 @@ static int spi_nor_clear_sr_bp(struct sp +@@ -1987,6 +1991,9 @@ static int spi_nor_clear_sr_bp(struct sp int ret; u8 mask = SR_BP2 | SR_BP1 | SR_BP0; @@ -30,7 +30,7 @@ ret = read_sr(nor); if (ret < 0) { dev_err(nor->dev, "error while reading status register\n"); -@@ -2338,7 +2345,7 @@ static const struct flash_info spi_nor_i +@@ -2340,7 +2347,7 @@ static const struct flash_info spi_nor_i { "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) }, { "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) }, { "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) }, @@ -39,7 +39,7 @@ { "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) }, { "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -@@ -5026,6 +5033,9 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -5028,6 +5035,9 @@ int spi_nor_scan(struct spi_nor *nor, co if (info->flags & USE_CLSR) nor->flags |= SNOR_F_USE_CLSR; diff --git a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch index b77633d69c..64d7684420 100644 --- a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau device, it has to decide which ones to send first, which ones to --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -2278,7 +2278,7 @@ static int __init pktsched_init(void) +@@ -2283,7 +2283,7 @@ static int __init pktsched_init(void) return err; } diff --git a/target/linux/generic/hack-5.4/721-phy_packets.patch b/target/linux/generic/hack-5.4/721-phy_packets.patch index f9fa50b299..3df66bc4df 100644 --- a/target/linux/generic/hack-5.4/721-phy_packets.patch +++ b/target/linux/generic/hack-5.4/721-phy_packets.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1540,6 +1540,7 @@ enum netdev_priv_flags { +@@ -1549,6 +1549,7 @@ enum netdev_priv_flags { IFF_FAILOVER_SLAVE = 1<<28, IFF_L3MDEV_RX_HANDLER = 1<<29, IFF_LIVE_RENAME_OK = 1<<30, @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau }; #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN -@@ -1572,6 +1573,7 @@ enum netdev_priv_flags { +@@ -1581,6 +1582,7 @@ enum netdev_priv_flags { #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER #define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK @@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau /* Specifies the type of the struct net_device::ml_priv pointer */ enum netdev_ml_priv_type { -@@ -1882,6 +1884,11 @@ struct net_device { +@@ -1891,6 +1893,11 @@ struct net_device { const struct tlsdev_ops *tlsdev_ops; #endif @@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau const struct header_ops *header_ops; unsigned int flags; -@@ -1964,6 +1971,10 @@ struct net_device { +@@ -1973,6 +1980,10 @@ struct net_device { struct mpls_dev __rcu *mpls_ptr; #endif @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3221,10 +3221,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -3223,10 +3223,20 @@ static int xmit_one(struct sk_buff *skb, if (dev_nit_active(dev)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-5.4/760-net-usb-r8152-add-LED-configuration-from-OF.patch b/target/linux/generic/hack-5.4/760-net-usb-r8152-add-LED-configuration-from-OF.patch index a5942e85af..7debec5a12 100644 --- a/target/linux/generic/hack-5.4/760-net-usb-r8152-add-LED-configuration-from-OF.patch +++ b/target/linux/generic/hack-5.4/760-net-usb-r8152-add-LED-configuration-from-OF.patch @@ -36,7 +36,7 @@ Signed-off-by: David Bauer + + if (ret) + return ret; -+ ++ + ocp_write_word(tp, MCU_TYPE_PLA, PLA_LEDSEL, led_data); + + return 0; diff --git a/target/linux/generic/hack-5.4/800-leds-leds-bcm63138-read-default-trigger-from-OF.patch b/target/linux/generic/hack-5.4/800-leds-leds-bcm63138-read-default-trigger-from-OF.patch new file mode 100644 index 0000000000..684bb9f842 --- /dev/null +++ b/target/linux/generic/hack-5.4/800-leds-leds-bcm63138-read-default-trigger-from-OF.patch @@ -0,0 +1,26 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 28 Feb 2023 23:38:30 +0100 +Subject: [PATCH] leds: leds-bcm63138: read default trigger from OF +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's needed in kernels older than 5.10 due to the missing commit +c49d6cab0d7f ("leds: parse linux,default-trigger DT property in LED +core"). + +Signed-off-by: Rafał Miłecki +--- + drivers/leds/blink/leds-bcm63138.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/leds/blink/leds-bcm63138.c ++++ b/drivers/leds/blink/leds-bcm63138.c +@@ -228,6 +228,7 @@ static void bcm63138_leds_create_led(str + led->cdev.max_brightness = BCM63138_MAX_BRIGHTNESS; + led->cdev.brightness_set = bcm63138_leds_brightness_set; + led->cdev.blink_set = bcm63138_leds_blink_set; ++ led->cdev.default_trigger = of_get_property(np, "linux,default-trigger", NULL); + + err = devm_led_classdev_register_ext(dev, &led->cdev, &init_data); + if (err) { diff --git a/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch b/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch index 0abb672639..a52be65f2a 100644 --- a/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch @@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau { --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig -@@ -400,6 +400,7 @@ config INET_TUNNEL +@@ -410,6 +410,7 @@ config INET_TUNNEL config INET_DIAG tristate "INET: socket monitoring interface" diff --git a/target/linux/generic/hack-5.4/902-debloat_proc.patch b/target/linux/generic/hack-5.4/902-debloat_proc.patch index afde1e88df..44423db0d8 100644 --- a/target/linux/generic/hack-5.4/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.4/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3641,6 +3641,8 @@ static __net_initdata struct pernet_oper +@@ -3657,6 +3657,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch index d09b367194..2c332fa331 100644 --- a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch @@ -295,7 +295,7 @@ Signed-off-by: Zhi Chen struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3508,9 +3515,15 @@ static int ctnetlink_stat_exp_cpu(struct +@@ -3511,9 +3518,15 @@ static int ctnetlink_stat_exp_cpu(struct } #ifdef CONFIG_NF_CONNTRACK_EVENTS diff --git a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch index 1904c5d6c2..cb3198fc6d 100644 --- a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -80,7 +80,7 @@ struct net_bridge_port *p; --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3218,9 +3218,17 @@ static int xmit_one(struct sk_buff *skb, +@@ -3220,9 +3220,17 @@ static int xmit_one(struct sk_buff *skb, unsigned int len; int rc; @@ -99,7 +99,7 @@ #ifdef CONFIG_ETHERNET_PACKET_MANGLE if (!dev->eth_mangle_tx || (skb = dev->eth_mangle_tx(dev, skb)) != NULL) -@@ -4754,6 +4762,11 @@ void netdev_rx_handler_unregister(struct +@@ -4756,6 +4764,11 @@ void netdev_rx_handler_unregister(struct } EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); @@ -111,7 +111,7 @@ /* * Limit the use of PFMEMALLOC reserves to those protocols that implement * the special handling of PFMEMALLOC skbs. -@@ -4804,6 +4817,10 @@ static int __netif_receive_skb_core(stru +@@ -4806,6 +4819,10 @@ static int __netif_receive_skb_core(stru int ret = NET_RX_DROP; __be16 type; @@ -122,7 +122,7 @@ net_timestamp_check(!READ_ONCE(netdev_tstamp_prequeue), skb); trace_netif_receive_skb(skb); -@@ -4843,6 +4860,16 @@ another_round: +@@ -4845,6 +4862,16 @@ another_round: goto out; } diff --git a/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch b/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch index 047949eb3d..698eea8a99 100644 --- a/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch +++ b/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch @@ -1,6 +1,6 @@ --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1365,6 +1365,7 @@ static const struct usb_device_id produc +@@ -1366,6 +1366,7 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ @@ -10,15 +10,15 @@ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */ --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -393,6 +393,7 @@ static void option_instat_callback(struc +@@ -400,6 +400,7 @@ static void option_instat_callback(struc * Mobidata, etc sell under their own brand names. */ #define LONGCHEER_VENDOR_ID 0x1c9e +#define LONGSUNG_U9300_PRODUCT_ID 0x9b3c /* 4G Systems products */ - /* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick * -@@ -603,6 +604,16 @@ static void option_instat_callback(struc + /* This one was sold as the VW and Skoda "Carstick LTE" */ +@@ -612,6 +613,16 @@ static void option_instat_callback(struc /* Device needs ZLP */ #define ZLP BIT(17) @@ -35,7 +35,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, -@@ -637,6 +648,8 @@ static const struct usb_device_id option +@@ -646,6 +657,8 @@ static const struct usb_device_id option { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), .driver_info = RSVD(4) }, diff --git a/target/linux/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch b/target/linux/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch index eedb2bb28d..911c05f929 100644 --- a/target/linux/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch +++ b/target/linux/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch @@ -8,7 +8,7 @@ Signed-off-by: Giuseppe Lippolis --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -678,6 +678,7 @@ static const struct of_device_id spidev_ +@@ -687,6 +687,7 @@ static const struct of_device_id spidev_ { .compatible = "lwn,bk4" }, { .compatible = "dh,dhcom-board" }, { .compatible = "menlo,m53cpld" }, diff --git a/target/linux/generic/pending-5.4/430-mtd-add-myloader-partition-parser.patch b/target/linux/generic/pending-5.4/430-mtd-add-myloader-partition-parser.patch index 3319ed94c2..621e7ecdb7 100644 --- a/target/linux/generic/pending-5.4/430-mtd-add-myloader-partition-parser.patch +++ b/target/linux/generic/pending-5.4/430-mtd-add-myloader-partition-parser.patch @@ -20,7 +20,7 @@ Signed-off-by: Adrian Schmutzler + ---help--- + MyLoader is a bootloader which allows the user to define partitions + in flash devices, by putting a table in the second erase block -+ on the device, similar to a partition table. This table gives the ++ on the device, similar to a partition table. This table gives the + offsets and lengths of the user defined partitions. + + If you need code which can detect and parse these tables, and diff --git a/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch b/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch index fe2d7a6b23..087ee97cc2 100644 --- a/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch +++ b/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2706,7 +2706,7 @@ static int spi_nor_write(struct mtd_info +@@ -2708,7 +2708,7 @@ static int spi_nor_write(struct mtd_info write_enable(nor); ret = spi_nor_write_data(nor, addr, page_remain, buf + i); diff --git a/target/linux/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch index 24d2d4567d..a71175f9e3 100644 --- a/target/linux/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch +++ b/target/linux/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch @@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -4884,6 +4884,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -4886,6 +4886,7 @@ int spi_nor_scan(struct spi_nor *nor, co */ if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL || JEDEC_MFR(nor->info) == SNOR_MFR_INTEL || diff --git a/target/linux/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch b/target/linux/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch index 70f1e9f059..93be276146 100644 --- a/target/linux/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch +++ b/target/linux/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch @@ -17,7 +17,7 @@ Signed-off-by: Matthias Schiffer --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -4398,6 +4398,7 @@ static void st_micron_set_default_init(s +@@ -4400,6 +4400,7 @@ static void st_micron_set_default_init(s static void winbond_set_default_init(struct spi_nor *nor) { @@ -25,7 +25,7 @@ Signed-off-by: Matthias Schiffer nor->params.set_4byte = winbond_set_4byte; } -@@ -4886,6 +4887,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -4888,6 +4889,7 @@ int spi_nor_scan(struct spi_nor *nor, co JEDEC_MFR(nor->info) == SNOR_MFR_INTEL || JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX || JEDEC_MFR(nor->info) == SNOR_MFR_SST || diff --git a/target/linux/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch b/target/linux/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch index d3e587ff97..e9207bd6aa 100644 --- a/target/linux/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch +++ b/target/linux/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau depends on OF && (ARM || ARM64 || COMPILE_TEST) --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -4464,6 +4464,7 @@ static void spi_nor_info_init_params(str +@@ -4466,6 +4466,7 @@ static void spi_nor_info_init_params(str struct spi_nor_erase_map *map = ¶ms->erase_map; const struct flash_info *info = nor->info; struct device_node *np = spi_nor_get_flash_node(nor); @@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau u8 i, erase_mask; /* Initialize legacy flash parameters and settings. */ -@@ -4527,6 +4528,21 @@ static void spi_nor_info_init_params(str +@@ -4529,6 +4530,21 @@ static void spi_nor_info_init_params(str */ erase_mask = 0; i = 0; @@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau if (info->flags & SECT_4K_PMC) { erase_mask |= BIT(i); spi_nor_set_erase_type(&map->erase_type[i], 4096u, -@@ -4538,6 +4554,7 @@ static void spi_nor_info_init_params(str +@@ -4540,6 +4556,7 @@ static void spi_nor_info_init_params(str SPINOR_OP_BE_4K); i++; } diff --git a/target/linux/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch b/target/linux/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch index b62dae536b..25ff9733ab 100644 --- a/target/linux/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch +++ b/target/linux/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch @@ -8,7 +8,7 @@ Signed-off-by: Piotr Dymacz --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2179,6 +2179,7 @@ static const struct flash_info spi_nor_i +@@ -2181,6 +2181,7 @@ static const struct flash_info spi_nor_i { "en25q32b", INFO(0x1c3016, 0, 64 * 1024, 64, 0) }, { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) }, { "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128, SECT_4K) }, diff --git a/target/linux/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch b/target/linux/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch index ec4052e54f..d6108c5db4 100644 --- a/target/linux/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch +++ b/target/linux/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch @@ -11,7 +11,7 @@ Signed-off-by: Christian Marangi --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2180,6 +2180,7 @@ static const struct flash_info spi_nor_i +@@ -2182,6 +2182,7 @@ static const struct flash_info spi_nor_i { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) }, { "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128, SECT_4K) }, { "en25q128", INFO(0x1c3018, 0, 64 * 1024, 256, SECT_4K) }, diff --git a/target/linux/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch b/target/linux/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch index 1cce9a96b2..0d3a92098b 100644 --- a/target/linux/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch +++ b/target/linux/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch @@ -30,7 +30,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2507,6 +2507,9 @@ static const struct flash_info spi_nor_i +@@ -2509,6 +2509,9 @@ static const struct flash_info spi_nor_i /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, diff --git a/target/linux/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch b/target/linux/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch index 53894df69a..21b98e0d5f 100644 --- a/target/linux/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch +++ b/target/linux/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch @@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos #include #include -@@ -754,6 +755,15 @@ int add_mtd_device(struct mtd_info *mtd) +@@ -756,6 +757,15 @@ int add_mtd_device(struct mtd_info *mtd) of this try_ nonsense, and no bitching about it either. :) */ __module_get(THIS_MODULE); diff --git a/target/linux/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch b/target/linux/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch index 75112d2233..064019d411 100644 --- a/target/linux/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch +++ b/target/linux/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch @@ -42,7 +42,7 @@ Signed-off-by: Chuanhong Guo static int macronix_set_4byte(struct spi_nor *nor, bool enable) { if (nor->spimem) { -@@ -1261,6 +1277,10 @@ static int spi_nor_erase(struct mtd_info +@@ -1263,6 +1279,10 @@ static int spi_nor_erase(struct mtd_info if (ret) return ret; @@ -53,7 +53,7 @@ Signed-off-by: Chuanhong Guo /* whole-chip erase? */ if (len == mtd->size && !(nor->flags & SNOR_F_NO_OP_CHIP_ERASE)) { unsigned long timeout; -@@ -1317,6 +1337,7 @@ static int spi_nor_erase(struct mtd_info +@@ -1319,6 +1339,7 @@ static int spi_nor_erase(struct mtd_info write_disable(nor); erase_err: @@ -61,7 +61,7 @@ Signed-off-by: Chuanhong Guo spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_ERASE); return ret; -@@ -1623,7 +1644,9 @@ static int spi_nor_lock(struct mtd_info +@@ -1625,7 +1646,9 @@ static int spi_nor_lock(struct mtd_info if (ret) return ret; @@ -71,7 +71,7 @@ Signed-off-by: Chuanhong Guo spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_UNLOCK); return ret; -@@ -1638,7 +1661,9 @@ static int spi_nor_unlock(struct mtd_inf +@@ -1640,7 +1663,9 @@ static int spi_nor_unlock(struct mtd_inf if (ret) return ret; @@ -81,7 +81,7 @@ Signed-off-by: Chuanhong Guo spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_LOCK); return ret; -@@ -1653,7 +1678,9 @@ static int spi_nor_is_locked(struct mtd_ +@@ -1655,7 +1680,9 @@ static int spi_nor_is_locked(struct mtd_ if (ret) return ret; @@ -91,7 +91,7 @@ Signed-off-by: Chuanhong Guo spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_LOCK); return ret; -@@ -2560,6 +2587,10 @@ static int spi_nor_read(struct mtd_info +@@ -2562,6 +2589,10 @@ static int spi_nor_read(struct mtd_info if (ret) return ret; @@ -102,7 +102,7 @@ Signed-off-by: Chuanhong Guo while (len) { loff_t addr = from; -@@ -2583,6 +2614,7 @@ static int spi_nor_read(struct mtd_info +@@ -2585,6 +2616,7 @@ static int spi_nor_read(struct mtd_info ret = 0; read_err: @@ -110,7 +110,7 @@ Signed-off-by: Chuanhong Guo spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_READ); return ret; } -@@ -2600,6 +2632,10 @@ static int sst_write(struct mtd_info *mt +@@ -2602,6 +2634,10 @@ static int sst_write(struct mtd_info *mt if (ret) return ret; @@ -121,7 +121,7 @@ Signed-off-by: Chuanhong Guo write_enable(nor); nor->sst_write_second = false; -@@ -2662,6 +2698,7 @@ static int sst_write(struct mtd_info *mt +@@ -2664,6 +2700,7 @@ static int sst_write(struct mtd_info *mt } sst_write_err: *retlen += actual; @@ -129,7 +129,7 @@ Signed-off-by: Chuanhong Guo spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE); return ret; } -@@ -2684,6 +2721,10 @@ static int spi_nor_write(struct mtd_info +@@ -2686,6 +2723,10 @@ static int spi_nor_write(struct mtd_info if (ret) return ret; @@ -140,7 +140,7 @@ Signed-off-by: Chuanhong Guo for (i = 0; i < len; ) { ssize_t written; loff_t addr = to + i; -@@ -2723,6 +2764,7 @@ static int spi_nor_write(struct mtd_info +@@ -2725,6 +2766,7 @@ static int spi_nor_write(struct mtd_info } write_err: @@ -148,7 +148,7 @@ Signed-off-by: Chuanhong Guo spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE); return ret; } -@@ -4727,9 +4769,13 @@ static int spi_nor_init(struct spi_nor * +@@ -4729,9 +4771,13 @@ static int spi_nor_init(struct spi_nor * * reboots (e.g., crashes). Warn the user (or hopefully, system * designer) that this is bad. */ diff --git a/target/linux/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch b/target/linux/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch index 6685562c6c..158e7f6d3d 100644 --- a/target/linux/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch +++ b/target/linux/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch @@ -10,7 +10,7 @@ Signed-off-by: Koen Vandeputte --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2233,6 +2233,11 @@ static const struct flash_info spi_nor_i +@@ -2235,6 +2235,11 @@ static const struct flash_info spi_nor_i /* GigaDevice */ { diff --git a/target/linux/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch b/target/linux/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch index a9a1d47662..82bd7c407f 100644 --- a/target/linux/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch +++ b/target/linux/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch @@ -15,7 +15,7 @@ Signed-off-by: Mantas Pucka --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2172,6 +2172,32 @@ static struct spi_nor_fixups gd25q256_fi +@@ -2174,6 +2174,32 @@ static struct spi_nor_fixups gd25q256_fi .default_init = gd25q256_default_init, }; @@ -48,7 +48,7 @@ Signed-off-by: Mantas Pucka /* NOTE: double check command sets and memory organization when you add * more nor chips. This current list focusses on newer chips, which * have been converging on command sets which including JEDEC ID. -@@ -2516,7 +2542,8 @@ static const struct flash_info spi_nor_i +@@ -2518,7 +2544,8 @@ static const struct flash_info spi_nor_i { "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) }, { "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) }, { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) }, diff --git a/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index c670010989..b21daea4f0 100644 --- a/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/pending-5.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1161,6 +1161,73 @@ static struct mtd_info * __init open_mtd +@@ -1168,6 +1168,73 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -82,7 +82,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1244,6 +1311,12 @@ static int __init ubi_init(void) +@@ -1251,6 +1318,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch b/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch index 1b726c3345..3ff45630c0 100644 --- a/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch +++ b/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch @@ -17,7 +17,7 @@ Reviewed-by: Miquel Raynal --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -1136,6 +1136,44 @@ out_unlock: +@@ -1138,6 +1138,44 @@ out_unlock: } EXPORT_SYMBOL_GPL(get_mtd_device_nm); diff --git a/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch index deed70efee..f6a3a82eca 100644 --- a/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch +++ b/target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch @@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau static bool enable_hooks __read_mostly; MODULE_PARM_DESC(enable_hooks, "Always enable conntrack hooks"); module_param(enable_hooks, bool, 0000); -@@ -650,6 +653,7 @@ enum nf_ct_sysctl_index { +@@ -649,6 +652,7 @@ enum nf_ct_sysctl_index { NF_SYSCTL_CT_PROTO_TIMEOUT_GRE_STREAM, #endif @@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau __NF_SYSCTL_CT_LAST_SYSCTL, }; -@@ -976,6 +980,13 @@ static struct ctl_table nf_ct_sysctl_tab +@@ -969,6 +973,13 @@ static struct ctl_table nf_ct_sysctl_tab .proc_handler = proc_dointvec_jiffies, }, #endif diff --git a/target/linux/generic/pending-5.4/630-packet_socket_type.patch b/target/linux/generic/pending-5.4/630-packet_socket_type.patch index 54c087bf65..38323ab5f0 100644 --- a/target/linux/generic/pending-5.4/630-packet_socket_type.patch +++ b/target/linux/generic/pending-5.4/630-packet_socket_type.patch @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2058,12 +2060,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2068,12 +2070,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2189,12 +2191,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2199,12 +2201,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3301,6 +3303,7 @@ static int packet_create(struct net *net +@@ -3310,6 +3312,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3944,6 +3947,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3952,6 +3955,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -4000,6 +4013,13 @@ static int packet_getsockopt(struct sock +@@ -4008,6 +4021,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch b/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch index 4d6a4ac1f3..88d2cb10ad 100644 --- a/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch +++ b/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch @@ -23,7 +23,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -922,6 +922,13 @@ struct devlink; +@@ -931,6 +931,13 @@ struct devlink; struct tlsdev_ops; @@ -37,7 +37,7 @@ Signed-off-by: Pablo Neira Ayuso /* * This structure defines the management hooks for network devices. * The following hooks can be defined; unless noted otherwise, they are -@@ -1154,6 +1161,10 @@ struct tlsdev_ops; +@@ -1163,6 +1170,10 @@ struct tlsdev_ops; * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, * u16 flags); * @@ -48,7 +48,7 @@ Signed-off-by: Pablo Neira Ayuso * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); * Called to change device carrier. Soft-devices (like dummy, team, etc) * which do not represent real hardware may define this to allow their -@@ -1401,6 +1412,8 @@ struct net_device_ops { +@@ -1410,6 +1421,8 @@ struct net_device_ops { int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, u16 flags); diff --git a/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch b/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch index ae9f7f0d83..d766ca9140 100644 --- a/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch +++ b/target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -923,6 +923,7 @@ struct tlsdev_ops; +@@ -932,6 +932,7 @@ struct tlsdev_ops; struct flow_offload; @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau enum flow_offload_type { FLOW_OFFLOAD_ADD = 0, -@@ -1161,8 +1162,15 @@ enum flow_offload_type { +@@ -1170,8 +1171,15 @@ enum flow_offload_type { * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, * u16 flags); * @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau * Adds/deletes flow entry to/from net device flowtable. * * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); -@@ -1412,8 +1420,11 @@ struct net_device_ops { +@@ -1421,8 +1429,11 @@ struct net_device_ops { int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, u16 flags); diff --git a/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 39f7af29d9..0830f2aefb 100644 --- a/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -328,7 +328,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1504,6 +1658,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1506,6 +1660,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.link = p->link; t->parms.proto = p->proto; t->parms.fwmark = p->fwmark; @@ -343,7 +343,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1542,6 +1704,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1544,6 +1706,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -351,7 +351,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1926,6 +2089,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1928,6 +2091,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -367,7 +367,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1963,6 +2135,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1965,6 +2137,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_FWMARK]) parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); @@ -414,7 +414,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2078,6 +2290,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2080,6 +2292,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -427,7 +427,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2107,6 +2325,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2109,6 +2327,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -452,7 +452,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2114,6 +2350,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2116,6 +2352,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -462,7 +462,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2123,9 +2362,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2125,9 +2364,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) || @@ -491,7 +491,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2165,6 +2422,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2167,6 +2424,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, [IFLA_IPTUN_FWMARK] = { .type = NLA_U32 }, diff --git a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 10e58b4907..96aa2fd8fc 100644 --- a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -53,7 +53,7 @@ Signed-off-by: Jonas Gorski --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c -@@ -142,6 +142,10 @@ const struct fib_prop fib_props[RTN_MAX +@@ -143,6 +143,10 @@ const struct fib_prop fib_props[RTN_MAX .error = -EINVAL, .scope = RT_SCOPE_NOWHERE, }, @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -6091,6 +6122,8 @@ static int ip6_route_dev_notify(struct n +@@ -6092,6 +6123,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -6102,6 +6135,7 @@ static int ip6_route_dev_notify(struct n +@@ -6103,6 +6136,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -6294,6 +6328,8 @@ static int __net_init ip6_route_net_init +@@ -6295,6 +6329,8 @@ static int __net_init ip6_route_net_init #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.fib6_has_custom_rules = false; @@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, sizeof(*net->ipv6.ip6_prohibit_entry), GFP_KERNEL); -@@ -6304,11 +6340,21 @@ static int __net_init ip6_route_net_init +@@ -6305,11 +6341,21 @@ static int __net_init ip6_route_net_init ip6_template_metrics, true); INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); @@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); -@@ -6332,6 +6378,8 @@ out: +@@ -6333,6 +6379,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -6351,6 +6399,7 @@ static void __net_exit ip6_route_net_exi +@@ -6352,6 +6400,7 @@ static void __net_exit ip6_route_net_exi kfree(net->ipv6.ip6_null_entry); #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); @@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski kfree(net->ipv6.ip6_blk_hole_entry); #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); -@@ -6434,6 +6483,9 @@ void __init ip6_route_init_special_entri +@@ -6435,6 +6484,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 3162efd41f..bec6787dc8 100644 --- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1927,6 +1927,8 @@ struct net_device { +@@ -1936,6 +1936,8 @@ struct net_device { struct netdev_hw_addr_list mc; struct netdev_hw_addr_list dev_addrs; @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5542,6 +5542,9 @@ static enum gro_result dev_gro_receive(s +@@ -5544,6 +5544,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -7485,6 +7488,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7487,6 +7490,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7535,6 +7580,7 @@ static int __netdev_upper_dev_link(struc +@@ -7537,6 +7582,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7628,6 +7674,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7630,6 +7676,7 @@ void netdev_upper_dev_unlink(struct net_ __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8358,6 +8405,7 @@ int dev_set_mac_address(struct net_devic +@@ -8360,6 +8407,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-5.4/682-add-bcm-fullconenat-support.patch b/target/linux/generic/pending-5.4/682-add-bcm-fullconenat-support.patch index 41b16c36d6..d8858d4bed 100644 --- a/target/linux/generic/pending-5.4/682-add-bcm-fullconenat-support.patch +++ b/target/linux/generic/pending-5.4/682-add-bcm-fullconenat-support.patch @@ -169,13 +169,13 @@ + } else { /* no previous expect */ + u_int16_t newport, tmpport, orgport; + -+ minport = range->min_proto.all == 0? ++ minport = range->min_proto.all == 0? + ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src. + u.udp.port : range->min_proto.all; -+ maxport = range->max_proto.all == 0? ++ maxport = range->max_proto.all == 0? + htons(65535) : range->max_proto.all; + orgport = ntohs(minport); -+ for (newport = ntohs(minport),tmpport = ntohs(maxport); ++ for (newport = ntohs(minport),tmpport = ntohs(maxport); + newport <= tmpport; newport++) { + if (CHECK_PORT_PARITY(orgport, newport) && !find_exp(newsrc, htons(newport), ct)) { + pr_debug("bcm_nat: new mapped port = " diff --git a/target/linux/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch index b74b04ca59..6af22ca12a 100644 --- a/target/linux/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1465,6 +1465,9 @@ void phy_detach(struct phy_device *phyde +@@ -1466,6 +1466,9 @@ void phy_detach(struct phy_device *phyde struct module *ndev_owner = NULL; struct mii_bus *bus; diff --git a/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch b/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch index 98987d5a49..0cebbf258c 100644 --- a/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch +++ b/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch @@ -27,7 +27,7 @@ Signed-off-by: Russell King + /* If this SFP module has a PHY, start the PHY now. */ + if (pl->phydev) + phy_start(pl->phydev); -+ ++ + return 0; +} + diff --git a/target/linux/generic/pending-5.4/745-net-mdio-i2c-add-support-for-Clause-45-accesses.patch b/target/linux/generic/pending-5.4/745-net-mdio-i2c-add-support-for-Clause-45-accesses.patch index 761a94b3d4..3b33f63fd0 100644 --- a/target/linux/generic/pending-5.4/745-net-mdio-i2c-add-support-for-Clause-45-accesses.patch +++ b/target/linux/generic/pending-5.4/745-net-mdio-i2c-add-support-for-Clause-45-accesses.patch @@ -15,7 +15,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/mdio-i2c.c +++ b/drivers/net/phy/mdio-i2c.c -@@ -33,17 +33,24 @@ static int i2c_mii_read(struct mii_bus * +@@ -32,17 +32,24 @@ static int i2c_mii_read(struct mii_bus * { struct i2c_adapter *i2c = bus->priv; struct i2c_msg msgs[2]; @@ -43,7 +43,7 @@ Signed-off-by: Russell King msgs[1].addr = bus_addr; msgs[1].flags = I2C_M_RD; msgs[1].len = sizeof(data); -@@ -61,18 +68,23 @@ static int i2c_mii_write(struct mii_bus +@@ -60,18 +67,23 @@ static int i2c_mii_write(struct mii_bus struct i2c_adapter *i2c = bus->priv; struct i2c_msg msg; int ret; diff --git a/target/linux/generic/pending-5.4/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch b/target/linux/generic/pending-5.4/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch index 667170a398..526e7d9bcc 100644 --- a/target/linux/generic/pending-5.4/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch +++ b/target/linux/generic/pending-5.4/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch @@ -87,11 +87,10 @@ Signed-off-by: David S. Miller - if (pl->phydev) + if (pl->phydev) { phy_start(pl->phydev); -- -- return 0; + return 0; + } -+ + +- return 0; + /* If the module may have a PHY but we didn't detect one we + * need to configure the MAC here. + */ diff --git a/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch b/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch index 537b6f4d67..e0cea1bb59 100644 --- a/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch +++ b/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch @@ -48,7 +48,7 @@ Signed-off-by: Shawn Guo }; &i2c3 { -@@ -609,6 +628,12 @@ +@@ -608,6 +627,12 @@ >; }; @@ -61,7 +61,7 @@ Signed-off-by: Shawn Guo pinctrl_keypad: keypadgrp { fsl,pins = < MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11 0x0001b0b0 /* KEYPAD_IRQ# */ -@@ -616,6 +641,12 @@ +@@ -615,6 +640,12 @@ >; }; diff --git a/target/linux/ipq40xx/patches-5.4/0019-v5.6-mtd-spi-nor-Add-support-for-mx25r3235f.patch b/target/linux/ipq40xx/patches-5.4/0019-v5.6-mtd-spi-nor-Add-support-for-mx25r3235f.patch index 7202478610..641e379e3d 100644 --- a/target/linux/ipq40xx/patches-5.4/0019-v5.6-mtd-spi-nor-Add-support-for-mx25r3235f.patch +++ b/target/linux/ipq40xx/patches-5.4/0019-v5.6-mtd-spi-nor-Add-support-for-mx25r3235f.patch @@ -18,7 +18,7 @@ Signed-off-by: Tudor Ambarus --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2354,6 +2354,8 @@ static const struct flash_info spi_nor_i +@@ -2356,6 +2356,8 @@ static const struct flash_info spi_nor_i { "mx25u6435f", INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) }, { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, diff --git a/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch b/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch index 1e22abdf51..167673bd11 100644 --- a/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch +++ b/target/linux/ipq40xx/patches-5.4/703-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch @@ -24,7 +24,7 @@ Reviewed-by: Grant Grundler --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -767,6 +767,16 @@ struct xps_map { +@@ -776,6 +776,16 @@ struct xps_map { #define XPS_MIN_MAP_ALLOC ((L1_CACHE_ALIGN(offsetof(struct xps_map, queues[1])) \ - sizeof(struct xps_map)) / sizeof(u16)) @@ -41,7 +41,7 @@ Reviewed-by: Grant Grundler /* * This structure holds all XPS maps for device. Maps are indexed by CPU. */ -@@ -1370,6 +1380,9 @@ struct net_device_ops { +@@ -1379,6 +1389,9 @@ struct net_device_ops { const struct sk_buff *skb, u16 rxq_index, u32 flow_id); diff --git a/target/linux/ipq40xx/patches-5.4/710-net-add-qualcomm-essedma-ethernet-driver.patch b/target/linux/ipq40xx/patches-5.4/710-net-add-qualcomm-essedma-ethernet-driver.patch index 1a6be0d175..979924494a 100644 --- a/target/linux/ipq40xx/patches-5.4/710-net-add-qualcomm-essedma-ethernet-driver.patch +++ b/target/linux/ipq40xx/patches-5.4/710-net-add-qualcomm-essedma-ethernet-driver.patch @@ -35,10 +35,9 @@ Signed-off-by: Christian Lamparter +obj-$(CONFIG_ESSEDMA) += essedma/ obj-$(CONFIG_RMNET) += rmnet/ - --- a/drivers/net/ethernet/qualcomm/essedma/edma.c +++ b/drivers/net/ethernet/qualcomm/essedma/edma.c -@@ -1493,7 +1493,7 @@ +@@ -1489,7 +1489,7 @@ int edma_rx_flow_steer(struct net_device int res; if (skb->protocol == htons(ETH_P_IPV6)) { diff --git a/target/linux/ipq40xx/patches-5.4/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq40xx/patches-5.4/850-soc-add-qualcomm-syscon.patch index 17e9047dfb..d879730ae7 100644 --- a/target/linux/ipq40xx/patches-5.4/850-soc-add-qualcomm-syscon.patch +++ b/target/linux/ipq40xx/patches-5.4/850-soc-add-qualcomm-syscon.patch @@ -12,7 +12,7 @@ Subject: SoC: add qualcomm syscon obj-$(CONFIG_QCOM_SDM845_LLCC) += llcc-sdm845.o --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig -@@ -183,6 +183,13 @@ config QCOM_SOCINFO +@@ -184,6 +184,13 @@ config QCOM_SOCINFO Say yes here to support the Qualcomm socinfo driver, providing information about the SoC to user space. diff --git a/target/linux/ipq40xx/patches-5.4/999-ipq40xx-unlock-cpu-frequency.patch b/target/linux/ipq40xx/patches-5.4/999-ipq40xx-unlock-cpu-frequency.patch index cc5e195d12..73a00d3a72 100644 --- a/target/linux/ipq40xx/patches-5.4/999-ipq40xx-unlock-cpu-frequency.patch +++ b/target/linux/ipq40xx/patches-5.4/999-ipq40xx-unlock-cpu-frequency.patch @@ -10,7 +10,7 @@ Signed-off-by: William --- --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi -@@ -124,20 +124,24 @@ +@@ -115,20 +115,24 @@ opp-48000000 { opp-hz = /bits/ 64 <48000000>; diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 895a3933d9..00fb6390cc 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -12,6 +12,7 @@ board_config_update board=$(board_name) case "$board" in +askey,rt4230w-rev6 |\ asrock,g10 |\ nec,wg2600hp) ucidef_add_switch "switch0" \ diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 73b5a69d75..abfe789ca9 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -9,6 +9,7 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/pre-cal-pci-0000:01:00.0.bin") case $board in + askey,rt4230w-rev6 |\ asrock,g10) caldata_extract "0:ART" 0x1000 0x2f20 ;; @@ -55,6 +56,7 @@ case "$FIRMWARE" in ;; "ath10k/pre-cal-pci-0001:01:00.0.bin") case $board in + askey,rt4230w-rev6 |\ asrock,g10) caldata_extract "0:ART" 0x5000 0x2f20 ;; diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index b278db1299..5b6e78a7b3 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -10,15 +10,7 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in - asrock,g10) - asrock_upgrade_prepare - nand_do_upgrade "$1" - ;; - buffalo,wxr-2533dhp) - buffalo_upgrade_prepare_ubi - CI_ROOTPART="ubi_rootfs" - nand_do_upgrade "$1" - ;; + askey,rt4230w-rev6 |\ compex,wpq864|\ netgear,d7800 |\ netgear,r7500 |\ @@ -28,6 +20,15 @@ platform_do_upgrade() { qcom,ipq8064-ap161) nand_do_upgrade "$1" ;; + asrock,g10) + asrock_upgrade_prepare + nand_do_upgrade "$1" + ;; + buffalo,wxr-2533dhp) + buffalo_upgrade_prepare_ubi + CI_ROOTPART="ubi_rootfs" + nand_do_upgrade "$1" + ;; edgecore,ecw5410) part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" if [ "$part" = "rootfs1" ]; then diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts new file mode 100644 index 0000000000..2a468d3a75 --- /dev/null +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts @@ -0,0 +1,334 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "qcom-ipq8065.dtsi" +#include + +/ { + model = "Askey RT4230W REV6"; + compatible = "askey,rt4230w-rev6", "qcom,ipq8065", "qcom,ipq8064"; + + memory@0 { + reg = <0x42000000 0x3e000000>; + device_type = "memory"; + }; + + aliases { + led-boot = &ledctrl3; + led-failsafe = &ledctrl1; + led-running = &ledctrl2; + led-upgrade = &ledctrl3; + }; + + chosen { + bootargs = "rootfstype=squashfs noinitrd"; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pins>; + pinctrl-names = "default"; + + ledctrl1: ledctrl1 { + label = "ledctrl1"; + gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>; + }; + + ledctrl2: ledctrl2 { + label = "ledctrl2"; + gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>; + }; + + ledctrl3: ledctrl3 { + label = "ledctrl3"; + gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&qcom_pinmux { + button_pins: button_pins { + mux { + pins = "gpio54", "gpio68"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + led_pins: led_pins { + mux { + pins = "gpio22", "gpio23", "gpio24"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + }; + + rgmii2_pins: rgmii2_pins { + mux { + pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", + "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62"; + function = "rgmii2"; + drive-strength = <8>; + bias-disable; + }; + + tx { + pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32"; + input-disable; + }; + }; + + spi_pins: spi_pins { + cs { + pins = "gpio20"; + drive-strength = <12>; + }; + }; +}; + +&gsbi5 { + qcom,mode = ; + status = "okay"; + + spi@1a280000 { + status = "okay"; + + pinctrl-0 = <&spi_pins>; + pinctrl-names = "default"; + + cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; + + flash@0 { + compatible = "everspin,mr25h256"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <40000000>; + reg = <0>; + }; + }; +}; + +&nand_controller { + status = "okay"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + nand@0 { + reg = <0>; + compatible = "qcom,nandcs"; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + nand-ecc-step-size = <512>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:SBL1"; + reg = <0x0000000 0x0040000>; + read-only; + }; + partition@40000 { + label = "0:MIBIB"; + reg = <0x0040000 0x0140000>; + read-only; + }; + partition@180000 { + label = "0:SBL2"; + reg = <0x0180000 0x0140000>; + read-only; + }; + partition@2c0000 { + label = "0:SBL3"; + reg = <0x02c0000 0x0280000>; + read-only; + }; + partition@540000 { + label = "0:DDRCONFIG"; + reg = <0x0540000 0x0120000>; + read-only; + }; + partition@660000 { + label = "0:SSD"; + reg = <0x0660000 0x0120000>; + read-only; + }; + partition@780000 { + label = "0:TZ"; + reg = <0x0780000 0x0280000>; + read-only; + }; + partition@a00000 { + label = "0:RPM"; + reg = <0x0a00000 0x0280000>; + read-only; + }; + partition@c80000 { + label = "0:APPSBL"; + reg = <0x0c80000 0x0500000>; + read-only; + }; + partition@1180000 { + label = "0:APPSBLENV"; + reg = <0x1180000 0x0080000>; + }; + ART: partition@1200000 { + label = "0:ART"; + reg = <0x1200000 0x0140000>; + read-only; + }; + partition@1340000 { + label = "0:BOOTCONFIG"; + reg = <0x1340000 0x0060000>; + read-only; + }; + partition@13a0000 { + label = "0:SBL2_1"; + reg = <0x13a0000 0x0140000>; + read-only; + }; + partition@14e0000 { + label = "0:SBL3_1"; + reg = <0x14e0000 0x0280000>; + read-only; + }; + partition@1760000 { + label = "0:DDRCONFIG_1"; + reg = <0x1760000 0x0120000>; + read-only; + }; + partition@1880000 { + label = "0:SSD_1"; + reg = <0x1880000 0x0120000>; + read-only; + }; + partition@19a0000 { + label = "0:TZ_1"; + reg = <0x19a0000 0x0280000>; + read-only; + }; + partition@1c20000 { + label = "0:RPM_1"; + reg = <0x1c20000 0x0280000>; + read-only; + }; + partition@1ea0000 { + label = "0:BOOTCONFIG1"; + reg = <0x1ea0000 0x0060000>; + read-only; + }; + partition@1f00000 { + label = "0:APPSBL_1"; + reg = <0x1f00000 0x0500000>; + read-only; + }; + partition@2400000 { + label = "ubi"; + reg = <0x2400000 0x1a000000>; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + pinctrl-0 = <&mdio0_pins>; + pinctrl-names = "default"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + qca,ar8327-initvals = < + 0x00004 0x7600000 /* PAD0_MODE */ + 0x00008 0x1000000 /* PAD5_MODE */ + 0x0000c 0x80 /* PAD6_MODE */ + 0x000e4 0xaa545 /* MAC_POWER_SEL */ + 0x000e0 0xc74164de /* SGMII_CTRL */ + 0x0007c 0x4e /* PORT0_STATUS */ + 0x00094 0x4e /* PORT6_STATUS */ + 0x00050 0xcf02cf02 /* LED_CTRL_0 */ + 0x00054 0xc832c832 /* LED_CTRL_1 */ + >; + }; +}; + +&gmac0 { + status = "okay"; + phy-mode = "rgmii"; + qcom,id = <0>; + + mtd-mac-address = <&ART 0x0>; + + pinctrl-0 = <&rgmii2_pins>; + pinctrl-names = "default"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&gmac1 { + status = "okay"; + phy-mode = "sgmii"; + qcom,id = <1>; + + mtd-mac-address = <&ART 0x6>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&adm_dma { + status = "okay"; +}; + +&usb3_0 { + status = "okay"; + clocks = <&gcc USB30_1_MASTER_CLK>; +}; + +&usb3_1 { + status = "okay"; + clocks = <&gcc USB30_0_MASTER_CLK>; +}; + +&pcie0 { + status = "okay"; + reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&pcie0_pins>; + pinctrl-names = "default"; +}; + +&pcie1 { + status = "okay"; + reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&pcie1_pins>; + pinctrl-names = "default"; + max-link-speed = <1>; +}; diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 1f6578e4cf..71d2fcf25b 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -91,6 +91,19 @@ define Device/ZyXELImage IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata endef +define Device/askey_rt4230w-rev6 + $(call Device/LegacyImage) + DEVICE_VENDOR := Askey + DEVICE_MODEL := RT4230W + DEVICE_VARIANT := REV6 + SOC := qcom-ipq8065 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := ath10k-firmware-qca9984-ct + KERNEL_IN_UBI := 1 +endef +TARGET_DEVICES += askey_rt4230w-rev6 + define Device/asrock_g10 $(call Device/FitImage) $(call Device/UbiFit) diff --git a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch index 96affb61c6..ab355ac62b 100644 --- a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -842,7 +842,25 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -842,7 +842,26 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq4019-ap.dk04.1-c3.dtb \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ @@ -32,6 +32,7 @@ Signed-off-by: John Crispin + qcom-ipq8064-wxr-2533dhp.dtb \ + qcom-ipq8065-nbg6817.dtb \ + qcom-ipq8065-r7800.dtb \ ++ qcom-ipq8065-rt4230w-rev6.dtb \ + qcom-ipq8068-ecw5410.dtb \ qcom-msm8660-surf.dtb \ qcom-msm8960-cdp.dtb \ diff --git a/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch b/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch index bdf0f8f2b9..06b18b3852 100644 --- a/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch +++ b/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch @@ -46,7 +46,7 @@ Signed-off-by: Viresh Kumar select PM_OPP --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c -@@ -140,6 +140,11 @@ static const struct of_device_id blackli +@@ -141,6 +141,11 @@ static const struct of_device_id blackli { .compatible = "ti,am43", }, { .compatible = "ti,dra7", }, diff --git a/target/linux/ipq806x/patches-5.4/099-1-mtd-nand-raw-qcom_nandc-add-boot_layout_mode-support.patch b/target/linux/ipq806x/patches-5.4/099-1-mtd-nand-raw-qcom_nandc-add-boot_layout_mode-support.patch index 6106dfb8dc..60b430afc1 100644 --- a/target/linux/ipq806x/patches-5.4/099-1-mtd-nand-raw-qcom_nandc-add-boot_layout_mode-support.patch +++ b/target/linux/ipq806x/patches-5.4/099-1-mtd-nand-raw-qcom_nandc-add-boot_layout_mode-support.patch @@ -16,7 +16,7 @@ Signed-off-by: Ansuel Smith --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c -@@ -159,6 +159,11 @@ +@@ -158,6 +158,11 @@ /* NAND_CTRL bits */ #define BAM_MODE_EN BIT(0) @@ -28,7 +28,7 @@ Signed-off-by: Ansuel Smith /* * the NAND controller performs reads/writes with ECC in 516 byte chunks. * the driver calls the chunks 'step' or 'codeword' interchangeably -@@ -430,6 +435,13 @@ struct qcom_nand_controller { +@@ -429,6 +434,13 @@ struct qcom_nand_controller { * @cfg0, cfg1, cfg0_raw..: NANDc register configurations needed for * ecc/non-ecc mode for the current nand flash * device @@ -42,7 +42,7 @@ Signed-off-by: Ansuel Smith */ struct qcom_nand_host { struct nand_chip chip; -@@ -452,6 +464,9 @@ struct qcom_nand_host { +@@ -451,6 +463,9 @@ struct qcom_nand_host { u32 ecc_bch_cfg; u32 clrflashstatus; u32 clrreadstatus; @@ -52,7 +52,7 @@ Signed-off-by: Ansuel Smith }; /* -@@ -460,12 +475,14 @@ struct qcom_nand_host { +@@ -459,12 +474,14 @@ struct qcom_nand_host { * @ecc_modes - ecc mode for NAND * @is_bam - whether NAND controller is using BAM * @is_qpic - whether NAND CTRL is part of qpic IP @@ -67,7 +67,7 @@ Signed-off-by: Ansuel Smith u32 dev_cmd_reg_start; }; -@@ -1604,7 +1621,7 @@ qcom_nandc_read_cw_raw(struct mtd_info * +@@ -1603,7 +1620,7 @@ qcom_nandc_read_cw_raw(struct mtd_info * data_size1 = mtd->writesize - host->cw_size * (ecc->steps - 1); oob_size1 = host->bbm_size; @@ -76,7 +76,7 @@ Signed-off-by: Ansuel Smith data_size2 = ecc->size - data_size1 - ((ecc->steps - 1) * 4); oob_size2 = (ecc->steps * 4) + host->ecc_bytes_hw + -@@ -1685,7 +1702,7 @@ check_for_erased_page(struct qcom_nand_h +@@ -1684,7 +1701,7 @@ check_for_erased_page(struct qcom_nand_h } for_each_set_bit(cw, &uncorrectable_cws, ecc->steps) { @@ -85,7 +85,7 @@ Signed-off-by: Ansuel Smith data_size = ecc->size - ((ecc->steps - 1) * 4); oob_size = (ecc->steps * 4) + host->ecc_bytes_hw; } else { -@@ -1844,7 +1861,7 @@ static int read_page_ecc(struct qcom_nan +@@ -1843,7 +1860,7 @@ static int read_page_ecc(struct qcom_nan for (i = 0; i < ecc->steps; i++) { int data_size, oob_size; @@ -94,7 +94,7 @@ Signed-off-by: Ansuel Smith data_size = ecc->size - ((ecc->steps - 1) << 2); oob_size = (ecc->steps << 2) + host->ecc_bytes_hw + host->spare_bytes; -@@ -1941,6 +1958,30 @@ static int copy_last_cw(struct qcom_nand +@@ -1940,6 +1957,30 @@ static int copy_last_cw(struct qcom_nand return ret; } @@ -125,7 +125,7 @@ Signed-off-by: Ansuel Smith /* implements ecc->read_page() */ static int qcom_nandc_read_page(struct nand_chip *chip, uint8_t *buf, int oob_required, int page) -@@ -1949,6 +1990,9 @@ static int qcom_nandc_read_page(struct n +@@ -1948,6 +1989,9 @@ static int qcom_nandc_read_page(struct n struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip); u8 *data_buf, *oob_buf = NULL; @@ -135,7 +135,7 @@ Signed-off-by: Ansuel Smith nand_read_page_op(chip, page, 0, NULL, 0); data_buf = buf; oob_buf = oob_required ? chip->oob_poi : NULL; -@@ -1968,6 +2012,9 @@ static int qcom_nandc_read_page_raw(stru +@@ -1967,6 +2011,9 @@ static int qcom_nandc_read_page_raw(stru int cw, ret; u8 *data_buf = buf, *oob_buf = chip->oob_poi; @@ -145,7 +145,7 @@ Signed-off-by: Ansuel Smith for (cw = 0; cw < ecc->steps; cw++) { ret = qcom_nandc_read_cw_raw(mtd, chip, data_buf, oob_buf, page, cw); -@@ -1988,6 +2035,9 @@ static int qcom_nandc_read_oob(struct na +@@ -1987,6 +2034,9 @@ static int qcom_nandc_read_oob(struct na struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip); struct nand_ecc_ctrl *ecc = &chip->ecc; @@ -155,7 +155,7 @@ Signed-off-by: Ansuel Smith clear_read_regs(nandc); clear_bam_transaction(nandc); -@@ -2008,6 +2058,9 @@ static int qcom_nandc_write_page(struct +@@ -2007,6 +2057,9 @@ static int qcom_nandc_write_page(struct u8 *data_buf, *oob_buf; int i, ret; @@ -165,7 +165,7 @@ Signed-off-by: Ansuel Smith nand_prog_page_begin_op(chip, page, 0, NULL, 0); clear_read_regs(nandc); -@@ -2023,7 +2076,7 @@ static int qcom_nandc_write_page(struct +@@ -2022,7 +2075,7 @@ static int qcom_nandc_write_page(struct for (i = 0; i < ecc->steps; i++) { int data_size, oob_size; @@ -174,7 +174,7 @@ Signed-off-by: Ansuel Smith data_size = ecc->size - ((ecc->steps - 1) << 2); oob_size = (ecc->steps << 2) + host->ecc_bytes_hw + host->spare_bytes; -@@ -2080,6 +2133,9 @@ static int qcom_nandc_write_page_raw(str +@@ -2079,6 +2132,9 @@ static int qcom_nandc_write_page_raw(str u8 *data_buf, *oob_buf; int i, ret; @@ -184,7 +184,7 @@ Signed-off-by: Ansuel Smith nand_prog_page_begin_op(chip, page, 0, NULL, 0); clear_read_regs(nandc); clear_bam_transaction(nandc); -@@ -2098,7 +2154,7 @@ static int qcom_nandc_write_page_raw(str +@@ -2097,7 +2153,7 @@ static int qcom_nandc_write_page_raw(str data_size1 = mtd->writesize - host->cw_size * (ecc->steps - 1); oob_size1 = host->bbm_size; @@ -193,7 +193,7 @@ Signed-off-by: Ansuel Smith data_size2 = ecc->size - data_size1 - ((ecc->steps - 1) << 2); oob_size2 = (ecc->steps << 2) + host->ecc_bytes_hw + -@@ -2158,6 +2214,9 @@ static int qcom_nandc_write_oob(struct n +@@ -2157,6 +2213,9 @@ static int qcom_nandc_write_oob(struct n int data_size, oob_size; int ret; @@ -203,7 +203,7 @@ Signed-off-by: Ansuel Smith host->use_ecc = true; clear_bam_transaction(nandc); -@@ -2806,6 +2865,7 @@ static int qcom_nand_host_init_and_regis +@@ -2781,6 +2840,7 @@ static int qcom_nand_host_init_and_regis struct nand_chip *chip = &host->chip; struct mtd_info *mtd = nand_to_mtd(chip); struct device *dev = nandc->dev; @@ -211,7 +211,7 @@ Signed-off-by: Ansuel Smith int ret; ret = of_property_read_u32(dn, "reg", &host->cs); -@@ -2866,6 +2926,17 @@ static int qcom_nand_host_init_and_regis +@@ -2841,6 +2901,17 @@ static int qcom_nand_host_init_and_regis if (ret) nand_cleanup(chip); @@ -229,7 +229,7 @@ Signed-off-by: Ansuel Smith return ret; } -@@ -3032,6 +3103,7 @@ static int qcom_nandc_remove(struct plat +@@ -3001,6 +3072,7 @@ static int qcom_nandc_remove(struct plat static const struct qcom_nandc_props ipq806x_nandc_props = { .ecc_modes = (ECC_RS_4BIT | ECC_BCH_8BIT), .is_bam = false, diff --git a/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch index 9e1ac7db04..bd2bc55521 100644 --- a/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch +++ b/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch @@ -12,7 +12,7 @@ Subject: SoC: add qualcomm syscon obj-$(CONFIG_QCOM_SDM845_LLCC) += llcc-sdm845.o --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig -@@ -183,6 +183,13 @@ config QCOM_SOCINFO +@@ -184,6 +184,13 @@ config QCOM_SOCINFO Say yes here to support the Qualcomm socinfo driver, providing information about the SoC to user space. diff --git a/target/linux/lantiq/patches-5.4/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-5.4/0152-lantiq-VPE.patch index 066d4313e1..4f5c18b037 100644 --- a/target/linux/lantiq/patches-5.4/0152-lantiq-VPE.patch +++ b/target/linux/lantiq/patches-5.4/0152-lantiq-VPE.patch @@ -15,7 +15,7 @@ default "y" --- a/arch/mips/include/asm/vpe.h +++ b/arch/mips/include/asm/vpe.h -@@ -127,4 +127,13 @@ void cleanup_tc(struct tc *tc); +@@ -126,4 +126,13 @@ void cleanup_tc(struct tc *tc); int __init vpe_module_init(void); void __exit vpe_module_exit(void); @@ -31,15 +31,7 @@ #endif /* _ASM_VPE_H */ --- a/arch/mips/kernel/vpe-mt.c +++ b/arch/mips/kernel/vpe-mt.c -@@ -29,6 +29,7 @@ int vpe_run(struct vpe *v) - struct vpe_notifications *notifier; - unsigned int vpeflags; - struct tc *t; -+ unsigned long physical_memsize = 0L; - - /* check we are the Master VPE */ - local_irq_save(flags); -@@ -417,6 +418,8 @@ int __init vpe_module_init(void) +@@ -415,6 +415,8 @@ int __init vpe_module_init(void) } v->ntcs = hw_tcs - aprp_cpu_index(); @@ -48,7 +40,7 @@ /* add the tc to the list of this vpe's tc's. */ list_add(&t->tc, &v->tc); -@@ -519,3 +522,47 @@ void __exit vpe_module_exit(void) +@@ -518,3 +520,47 @@ void __exit vpe_module_exit(void) release_vpe(v); } } @@ -142,7 +134,7 @@ { --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c -@@ -34,10 +34,14 @@ unsigned long physical_memsize = 0L; +@@ -28,10 +28,14 @@ EXPORT_SYMBOL_GPL(ebu_lock); */ static struct ltq_soc_info soc_info; diff --git a/target/linux/lantiq/patches-5.4/0155-lantiq-VPE-nosmp.patch b/target/linux/lantiq/patches-5.4/0155-lantiq-VPE-nosmp.patch index 898c2d4821..2705723dda 100644 --- a/target/linux/lantiq/patches-5.4/0155-lantiq-VPE-nosmp.patch +++ b/target/linux/lantiq/patches-5.4/0155-lantiq-VPE-nosmp.patch @@ -1,6 +1,6 @@ --- a/arch/mips/kernel/vpe-mt.c +++ b/arch/mips/kernel/vpe-mt.c -@@ -132,7 +132,10 @@ int vpe_run(struct vpe *v) +@@ -130,7 +130,10 @@ int vpe_run(struct vpe *v) * kernels need to turn it on, even if that wasn't the pre-dvpe() state. */ #ifdef CONFIG_SMP diff --git a/target/linux/lantiq/patches-5.4/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch b/target/linux/lantiq/patches-5.4/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch index b7b95d6bfc..0bb1fefc5f 100644 --- a/target/linux/lantiq/patches-5.4/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch +++ b/target/linux/lantiq/patches-5.4/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch @@ -39,7 +39,7 @@ Signed-off-by: Thomas Bogendoerfer --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c -@@ -37,6 +37,14 @@ static struct ltq_soc_info soc_info; +@@ -31,6 +31,14 @@ static struct ltq_soc_info soc_info; /* for Multithreading (APRP), vpe.c will use it */ unsigned long cp0_memsize; @@ -54,7 +54,7 @@ Signed-off-by: Thomas Bogendoerfer const char *get_system_type(void) { return soc_info.sys_type; -@@ -100,6 +108,17 @@ void __init device_tree_init(void) +@@ -94,6 +102,17 @@ void __init device_tree_init(void) unflatten_and_copy_device_tree(); } @@ -72,7 +72,7 @@ Signed-off-by: Thomas Bogendoerfer void __init prom_init(void) { /* call the soc specific detetcion code and get it to fill soc_info */ -@@ -111,7 +130,10 @@ void __init prom_init(void) +@@ -105,7 +124,10 @@ void __init prom_init(void) prom_init_cmdline(); #if defined(CONFIG_MIPS_MT_SMP) diff --git a/target/linux/layerscape/patches-5.4/301-arch-0002-arm64-add-support-to-remap-kernel-cacheable-memory-t.patch b/target/linux/layerscape/patches-5.4/301-arch-0002-arm64-add-support-to-remap-kernel-cacheable-memory-t.patch index e6c96a052a..bfcc7820b7 100644 --- a/target/linux/layerscape/patches-5.4/301-arch-0002-arm64-add-support-to-remap-kernel-cacheable-memory-t.patch +++ b/target/linux/layerscape/patches-5.4/301-arch-0002-arm64-add-support-to-remap-kernel-cacheable-memory-t.patch @@ -13,7 +13,7 @@ Reviewed-by: Stuart Yoder --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h -@@ -428,6 +428,9 @@ static inline pmd_t pmd_mkdevmap(pmd_t p +@@ -429,6 +429,9 @@ static inline pmd_t pmd_mkdevmap(pmd_t p __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) #define pgprot_writecombine(prot) \ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) diff --git a/target/linux/layerscape/patches-5.4/301-arch-0003-arm64-pgtable-add-support-to-map-cacheable-and-non-s.patch b/target/linux/layerscape/patches-5.4/301-arch-0003-arm64-pgtable-add-support-to-map-cacheable-and-non-s.patch index bd39eb7e14..e6e2f0c0b5 100644 --- a/target/linux/layerscape/patches-5.4/301-arch-0003-arm64-pgtable-add-support-to-map-cacheable-and-non-s.patch +++ b/target/linux/layerscape/patches-5.4/301-arch-0003-arm64-pgtable-add-support-to-map-cacheable-and-non-s.patch @@ -11,7 +11,7 @@ Signed-off-by: Haiying Wang --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h -@@ -431,6 +431,8 @@ static inline pmd_t pmd_mkdevmap(pmd_t p +@@ -432,6 +432,8 @@ static inline pmd_t pmd_mkdevmap(pmd_t p #define pgprot_cached(prot) \ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL) | \ PTE_PXN | PTE_UXN) diff --git a/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch b/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch index 1f990734c8..d4bce52a44 100644 --- a/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch +++ b/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch @@ -10,7 +10,7 @@ Signed-off-by: Jianhua Xie --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h -@@ -116,6 +116,13 @@ extern pgprot_t pgprot_s2_device; +@@ -125,6 +125,13 @@ extern pgprot_t pgprot_s2_device; #define pgprot_noncached(prot) \ __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) diff --git a/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch b/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch index 3ea73c33ea..f77b067f16 100644 --- a/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch +++ b/target/linux/layerscape/patches-5.4/303-core-0001-net-readd-skb_recycle.patch @@ -14,7 +14,7 @@ Signed-off-by: Madalin Bucur --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -1027,6 +1027,7 @@ void skb_dump(const char *level, const s +@@ -1031,6 +1031,7 @@ void skb_dump(const char *level, const s void skb_tx_error(struct sk_buff *skb); void consume_skb(struct sk_buff *skb); void __consume_stateless_skb(struct sk_buff *skb); diff --git a/target/linux/layerscape/patches-5.4/303-core-0008-ENGR00279980-ubi-attach-do-not-return-EINVAL-if-the-.patch b/target/linux/layerscape/patches-5.4/303-core-0008-ENGR00279980-ubi-attach-do-not-return-EINVAL-if-the-.patch index 8b6515c759..95b8ca5b6c 100644 --- a/target/linux/layerscape/patches-5.4/303-core-0008-ENGR00279980-ubi-attach-do-not-return-EINVAL-if-the-.patch +++ b/target/linux/layerscape/patches-5.4/303-core-0008-ENGR00279980-ubi-attach-do-not-return-EINVAL-if-the-.patch @@ -35,7 +35,7 @@ Signed-off-by: Han Xu --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -572,7 +572,7 @@ static int io_init(struct ubi_device *ub +@@ -573,7 +573,7 @@ static int io_init(struct ubi_device *ub dbg_gen("sizeof(struct ubi_ainf_peb) %zu", sizeof(struct ubi_ainf_peb)); dbg_gen("sizeof(struct ubi_wl_entry) %zu", sizeof(struct ubi_wl_entry)); diff --git a/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch b/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch index 5304bbca0a..a6bc7d846e 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17356,6 +17356,13 @@ S: Maintained +@@ -17357,6 +17357,13 @@ S: Maintained F: drivers/input/serio/userio.c F: include/uapi/linux/userio.h diff --git a/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch b/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch index 5dc50c5ee6..b0831675a7 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0263-net-dsa-ocelot-add-driver-for-Felix-switch-family.patch @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17361,6 +17361,7 @@ M: Vladimir Oltean L: netdev@vger.kernel.org S: Maintained diff --git a/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch b/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch index 98c9214eaf..6328ea00cd 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0001-Revert-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch @@ -11,7 +11,7 @@ This reverts commit e75f4940e8ad0dd76527302a10c06b58bf7eb590. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -628,16 +628,6 @@ static int fsl_sai_startup(struct snd_pc +@@ -629,16 +629,6 @@ static int fsl_sai_startup(struct snd_pc FSL_SAI_CR3_TRCE_MASK, FSL_SAI_CR3_TRCE); @@ -28,7 +28,7 @@ This reverts commit e75f4940e8ad0dd76527302a10c06b58bf7eb590. ret = snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &fsl_sai_rate_constraints); -@@ -1052,35 +1042,30 @@ static int fsl_sai_remove(struct platfor +@@ -1053,35 +1043,30 @@ static int fsl_sai_remove(struct platfor static const struct fsl_sai_soc_data fsl_sai_vf610_data = { .use_imx_pcm = false, diff --git a/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch b/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch index 60e3e3e853..7771134276 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch @@ -28,7 +28,7 @@ This reverts commit 63d1a3488ff58e094a7f517cf93c0250f0a3f6be. static int fsl_sai_set_dai_sysclk_tr(struct snd_soc_dai *cpu_dai, int clk_id, unsigned int freq, int fsl_dir) { -@@ -433,14 +423,8 @@ static int fsl_sai_hw_params(struct snd_ +@@ -434,14 +424,8 @@ static int fsl_sai_hw_params(struct snd_ slot_width = sai->slot_width; if (!sai->is_slave_mode) { @@ -45,7 +45,7 @@ This reverts commit 63d1a3488ff58e094a7f517cf93c0250f0a3f6be. if (ret) return ret; -@@ -646,7 +630,6 @@ static void fsl_sai_shutdown(struct snd_ +@@ -647,7 +631,6 @@ static void fsl_sai_shutdown(struct snd_ } static const struct snd_soc_dai_ops fsl_sai_pcm_dai_ops = { diff --git a/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch b/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch index 1fe6c649dc..3f0d4ccdb4 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0003-Revert-ASoC-fsl_sai-Add-support-for-imx8qm.patch @@ -10,7 +10,7 @@ This reverts commit 6eeb60be5ebb73b2e5911e26fb1aed02940b7d09. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1047,19 +1047,12 @@ static const struct fsl_sai_soc_data fsl +@@ -1048,19 +1048,12 @@ static const struct fsl_sai_soc_data fsl .reg_offset = 8, }; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch b/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch index f08d8e0e38..e73be4c229 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0004-Revert-ASoC-fsl_sai-Add-support-for-imx7ulp-imx8mq.patch @@ -10,7 +10,7 @@ This reverts commit a860fac420971c5a90d4f78959b44ead793aee4f. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1035,24 +1035,10 @@ static const struct fsl_sai_soc_data fsl +@@ -1036,24 +1036,10 @@ static const struct fsl_sai_soc_data fsl .reg_offset = 0, }; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch b/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch index d685119e04..87b74f17dc 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch @@ -76,7 +76,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. bool tx = fsl_dir == FSL_FMT_TRANSMITTER; u32 val_cr2 = 0, val_cr4 = 0; -@@ -290,9 +287,9 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -291,9 +288,9 @@ static int fsl_sai_set_dai_fmt_tr(struct return -EINVAL; } @@ -88,7 +88,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_CR4_MF | FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP | FSL_SAI_CR4_FSD_MSTR, val_cr4); -@@ -319,7 +316,6 @@ static int fsl_sai_set_dai_fmt(struct sn +@@ -320,7 +317,6 @@ static int fsl_sai_set_dai_fmt(struct sn static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(dai); @@ -96,7 +96,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. unsigned long clk_rate; u32 savediv = 0, ratio, savesub = freq; u32 id; -@@ -382,17 +378,17 @@ static int fsl_sai_set_bclk(struct snd_s +@@ -383,17 +379,17 @@ static int fsl_sai_set_bclk(struct snd_s */ if ((sai->synchronous[TX] && !sai->synchronous[RX]) || (!tx && !sai->synchronous[RX])) { @@ -118,7 +118,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_CR2_DIV_MASK, savediv - 1); } -@@ -407,7 +403,6 @@ static int fsl_sai_hw_params(struct snd_ +@@ -408,7 +404,6 @@ static int fsl_sai_hw_params(struct snd_ struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -126,7 +126,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; unsigned int channels = params_channels(params); u32 word_width = params_width(params); -@@ -460,19 +455,19 @@ static int fsl_sai_hw_params(struct snd_ +@@ -461,19 +456,19 @@ static int fsl_sai_hw_params(struct snd_ if (!sai->is_slave_mode) { if (!sai->synchronous[TX] && sai->synchronous[RX] && !tx) { @@ -150,7 +150,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); regmap_write(sai->regmap, FSL_SAI_RMR, -@@ -480,10 +475,10 @@ static int fsl_sai_hw_params(struct snd_ +@@ -481,10 +476,10 @@ static int fsl_sai_hw_params(struct snd_ } } @@ -163,7 +163,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); regmap_write(sai->regmap, FSL_SAI_xMR(tx), ~0UL - ((1 << channels) - 1)); -@@ -511,8 +506,6 @@ static int fsl_sai_trigger(struct snd_pc +@@ -512,8 +507,6 @@ static int fsl_sai_trigger(struct snd_pc struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -172,7 +172,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; u32 xcsr, count = 100; -@@ -521,9 +514,9 @@ static int fsl_sai_trigger(struct snd_pc +@@ -522,9 +515,9 @@ static int fsl_sai_trigger(struct snd_pc * Rx sync with Tx clocks: Clear SYNC for Tx, set it for Rx. * Tx sync with Rx clocks: Clear SYNC for Rx, set it for Tx. */ @@ -185,7 +185,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. sai->synchronous[RX] ? FSL_SAI_CR2_SYNC : 0); /* -@@ -534,44 +527,43 @@ static int fsl_sai_trigger(struct snd_pc +@@ -535,44 +528,43 @@ static int fsl_sai_trigger(struct snd_pc case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: @@ -242,7 +242,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_CSR_FR, FSL_SAI_CSR_FR); /* -@@ -583,13 +575,13 @@ static int fsl_sai_trigger(struct snd_pc +@@ -584,13 +576,13 @@ static int fsl_sai_trigger(struct snd_pc */ if (!sai->is_slave_mode) { /* Software Reset for both Tx and Rx */ @@ -262,7 +262,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. } } break; -@@ -604,11 +596,10 @@ static int fsl_sai_startup(struct snd_pc +@@ -605,11 +597,10 @@ static int fsl_sai_startup(struct snd_pc struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -275,7 +275,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_CR3_TRCE_MASK, FSL_SAI_CR3_TRCE); -@@ -622,10 +613,9 @@ static void fsl_sai_shutdown(struct snd_ +@@ -623,10 +614,9 @@ static void fsl_sai_shutdown(struct snd_ struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -287,7 +287,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_CR3_TRCE_MASK, 0); } -@@ -643,20 +633,17 @@ static const struct snd_soc_dai_ops fsl_ +@@ -644,20 +634,17 @@ static const struct snd_soc_dai_ops fsl_ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev); @@ -314,7 +314,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. FSL_SAI_MAXBURST_RX - 1); snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx, -@@ -694,12 +681,12 @@ static const struct snd_soc_component_dr +@@ -695,12 +682,12 @@ static const struct snd_soc_component_dr .name = "fsl-sai", }; @@ -333,7 +333,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. {FSL_SAI_TDR0, 0}, {FSL_SAI_TDR1, 0}, {FSL_SAI_TDR2, 0}, -@@ -708,50 +695,24 @@ static struct reg_default fsl_sai_reg_de +@@ -709,50 +696,24 @@ static struct reg_default fsl_sai_reg_de {FSL_SAI_TDR5, 0}, {FSL_SAI_TDR6, 0}, {FSL_SAI_TDR7, 0}, @@ -397,7 +397,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. case FSL_SAI_TFR0: case FSL_SAI_TFR1: case FSL_SAI_TFR2: -@@ -761,6 +722,12 @@ static bool fsl_sai_readable_reg(struct +@@ -762,6 +723,12 @@ static bool fsl_sai_readable_reg(struct case FSL_SAI_TFR6: case FSL_SAI_TFR7: case FSL_SAI_TMR: @@ -410,7 +410,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. case FSL_SAI_RDR0: case FSL_SAI_RDR1: case FSL_SAI_RDR2: -@@ -786,13 +753,9 @@ static bool fsl_sai_readable_reg(struct +@@ -787,13 +754,9 @@ static bool fsl_sai_readable_reg(struct static bool fsl_sai_volatile_reg(struct device *dev, unsigned int reg) { @@ -426,7 +426,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. case FSL_SAI_TFR0: case FSL_SAI_TFR1: case FSL_SAI_TFR2: -@@ -825,16 +788,13 @@ static bool fsl_sai_volatile_reg(struct +@@ -826,16 +789,13 @@ static bool fsl_sai_volatile_reg(struct static bool fsl_sai_writeable_reg(struct device *dev, unsigned int reg) { @@ -449,7 +449,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. case FSL_SAI_TDR0: case FSL_SAI_TDR1: case FSL_SAI_TDR2: -@@ -844,6 +804,12 @@ static bool fsl_sai_writeable_reg(struct +@@ -845,6 +805,12 @@ static bool fsl_sai_writeable_reg(struct case FSL_SAI_TDR6: case FSL_SAI_TDR7: case FSL_SAI_TMR: @@ -462,7 +462,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. case FSL_SAI_RMR: return true; default: -@@ -851,15 +817,15 @@ static bool fsl_sai_writeable_reg(struct +@@ -852,15 +818,15 @@ static bool fsl_sai_writeable_reg(struct } } @@ -481,7 +481,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. .readable_reg = fsl_sai_readable_reg, .volatile_reg = fsl_sai_volatile_reg, .writeable_reg = fsl_sai_writeable_reg, -@@ -891,12 +857,6 @@ static int fsl_sai_probe(struct platform +@@ -892,12 +858,6 @@ static int fsl_sai_probe(struct platform if (IS_ERR(base)) return PTR_ERR(base); @@ -494,7 +494,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "bus", base, &fsl_sai_regmap_config); -@@ -1026,13 +986,11 @@ static int fsl_sai_remove(struct platfor +@@ -1027,13 +987,11 @@ static int fsl_sai_remove(struct platfor static const struct fsl_sai_soc_data fsl_sai_vf610_data = { .use_imx_pcm = false, .fifo_depth = 32, @@ -508,7 +508,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. }; static const struct of_device_id fsl_sai_ids[] = { -@@ -1065,7 +1023,6 @@ static int fsl_sai_runtime_suspend(struc +@@ -1066,7 +1024,6 @@ static int fsl_sai_runtime_suspend(struc static int fsl_sai_runtime_resume(struct device *dev) { struct fsl_sai *sai = dev_get_drvdata(dev); @@ -516,7 +516,7 @@ This reverts commit 4f7a0728b5305e2d865f543fbcffd617e03c7674. int ret; ret = clk_prepare_enable(sai->bus_clk); -@@ -1087,11 +1044,11 @@ static int fsl_sai_runtime_resume(struct +@@ -1088,11 +1045,11 @@ static int fsl_sai_runtime_resume(struct } regcache_cache_only(sai->regmap, false); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0006-Revert-ASoC-fsl_sai-Update-Tx-Rx-channel-enable-mask.patch b/target/linux/layerscape/patches-5.4/801-audio-0006-Revert-ASoC-fsl_sai-Update-Tx-Rx-channel-enable-mask.patch index e116389031..1283e3edc6 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0006-Revert-ASoC-fsl_sai-Update-Tx-Rx-channel-enable-mask.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0006-Revert-ASoC-fsl_sai-Update-Tx-Rx-channel-enable-mask.patch @@ -11,7 +11,7 @@ This reverts commit b84f50b0fcb497a62068926fca793d2d213c7dbd. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -599,8 +599,7 @@ static int fsl_sai_startup(struct snd_pc +@@ -600,8 +600,7 @@ static int fsl_sai_startup(struct snd_pc bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; int ret; @@ -21,7 +21,7 @@ This reverts commit b84f50b0fcb497a62068926fca793d2d213c7dbd. FSL_SAI_CR3_TRCE); ret = snd_pcm_hw_constraint_list(substream->runtime, 0, -@@ -615,8 +614,7 @@ static void fsl_sai_shutdown(struct snd_ +@@ -616,8 +615,7 @@ static void fsl_sai_shutdown(struct snd_ struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; diff --git a/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch b/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch index d73a4269d6..62aba38119 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0007-Revert-ASoC-fsl_sai-Add-registers-definition-for-mul.patch @@ -12,7 +12,7 @@ This reverts commit 5f0ac20ed6db1d6da2eea8b862cf3d54fdfb5830. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -685,14 +685,7 @@ static struct reg_default fsl_sai_reg_de +@@ -686,14 +686,7 @@ static struct reg_default fsl_sai_reg_de {FSL_SAI_TCR3, 0}, {FSL_SAI_TCR4, 0}, {FSL_SAI_TCR5, 0}, @@ -28,7 +28,7 @@ This reverts commit 5f0ac20ed6db1d6da2eea8b862cf3d54fdfb5830. {FSL_SAI_TMR, 0}, {FSL_SAI_RCR1, 0}, {FSL_SAI_RCR2, 0}, -@@ -711,14 +704,7 @@ static bool fsl_sai_readable_reg(struct +@@ -712,14 +705,7 @@ static bool fsl_sai_readable_reg(struct case FSL_SAI_TCR3: case FSL_SAI_TCR4: case FSL_SAI_TCR5: @@ -44,7 +44,7 @@ This reverts commit 5f0ac20ed6db1d6da2eea8b862cf3d54fdfb5830. case FSL_SAI_TMR: case FSL_SAI_RCSR: case FSL_SAI_RCR1: -@@ -726,22 +712,8 @@ static bool fsl_sai_readable_reg(struct +@@ -727,22 +713,8 @@ static bool fsl_sai_readable_reg(struct case FSL_SAI_RCR3: case FSL_SAI_RCR4: case FSL_SAI_RCR5: @@ -69,7 +69,7 @@ This reverts commit 5f0ac20ed6db1d6da2eea8b862cf3d54fdfb5830. case FSL_SAI_RMR: return true; default: -@@ -754,30 +726,9 @@ static bool fsl_sai_volatile_reg(struct +@@ -755,30 +727,9 @@ static bool fsl_sai_volatile_reg(struct switch (reg) { case FSL_SAI_TCSR: case FSL_SAI_RCSR: @@ -103,7 +103,7 @@ This reverts commit 5f0ac20ed6db1d6da2eea8b862cf3d54fdfb5830. return true; default: return false; -@@ -793,14 +744,7 @@ static bool fsl_sai_writeable_reg(struct +@@ -794,14 +745,7 @@ static bool fsl_sai_writeable_reg(struct case FSL_SAI_TCR3: case FSL_SAI_TCR4: case FSL_SAI_TCR5: @@ -119,7 +119,7 @@ This reverts commit 5f0ac20ed6db1d6da2eea8b862cf3d54fdfb5830. case FSL_SAI_TMR: case FSL_SAI_RCSR: case FSL_SAI_RCR1: -@@ -942,8 +886,8 @@ static int fsl_sai_probe(struct platform +@@ -943,8 +887,8 @@ static int fsl_sai_probe(struct platform MCLK_DIR(index)); } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch b/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch index d30d09db32..9dfde30beb 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch @@ -154,7 +154,7 @@ This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5. esai_priv->name, esai_priv); --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -831,8 +831,10 @@ static int fsl_sai_probe(struct platform +@@ -832,8 +832,10 @@ static int fsl_sai_probe(struct platform } irq = platform_get_irq(pdev, 0); @@ -224,7 +224,7 @@ This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5. priv->burst = 128; /* might be 32 or 128 */ --- a/sound/soc/mediatek/common/mtk-btcvsd.c +++ b/sound/soc/mediatek/common/mtk-btcvsd.c -@@ -1335,8 +1335,10 @@ static int mtk_btcvsd_snd_probe(struct p +@@ -1333,8 +1333,10 @@ static int mtk_btcvsd_snd_probe(struct p /* irq */ irq_id = platform_get_irq(pdev, 0); @@ -252,8 +252,8 @@ This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5. IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c -@@ -1074,8 +1074,10 @@ static int mt8173_afe_pcm_dev_probe(stru - afe->dev = &pdev->dev; +@@ -1149,8 +1149,10 @@ static int mt8173_afe_pcm_dev_probe(stru + goto err_pm_disable; irq_id = platform_get_irq(pdev, 0); - if (irq_id <= 0) diff --git a/target/linux/layerscape/patches-5.4/801-audio-0009-Revert-ASoC-fsl_sai-mark-regmap-as-fast_io.patch b/target/linux/layerscape/patches-5.4/801-audio-0009-Revert-ASoC-fsl_sai-mark-regmap-as-fast_io.patch index 454bfd5a18..0c031f9491 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0009-Revert-ASoC-fsl_sai-mark-regmap-as-fast_io.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0009-Revert-ASoC-fsl_sai-mark-regmap-as-fast_io.patch @@ -10,7 +10,7 @@ This reverts commit 6d19d8a3cec74a9680947ecb6abdeda38583110e. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -763,7 +763,6 @@ static const struct regmap_config fsl_sa +@@ -764,7 +764,6 @@ static const struct regmap_config fsl_sa .reg_bits = 32, .reg_stride = 4, .val_bits = 32, diff --git a/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch b/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch index 07c3b87b04..62e2151888 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0010-Revert-ASoC-fsl_sai-derive-TX-FIFO-watermark-from-FI.patch @@ -12,7 +12,7 @@ This reverts commit bd517707d85f19a7339ea8b882fcbf0fd9976bd6. --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -640,7 +640,7 @@ static int fsl_sai_dai_probe(struct snd_ +@@ -641,7 +641,7 @@ static int fsl_sai_dai_probe(struct snd_ regmap_write(sai->regmap, FSL_SAI_RCSR, 0); regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK, @@ -21,7 +21,7 @@ This reverts commit bd517707d85f19a7339ea8b882fcbf0fd9976bd6. regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK, FSL_SAI_MAXBURST_RX - 1); -@@ -928,12 +928,10 @@ static int fsl_sai_remove(struct platfor +@@ -929,12 +929,10 @@ static int fsl_sai_remove(struct platfor static const struct fsl_sai_soc_data fsl_sai_vf610_data = { .use_imx_pcm = false, diff --git a/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch b/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch index 12a32bc26b..d6a8c97379 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch @@ -22,7 +22,7 @@ Signed-off-by: Yangbo Lu #include #include #include -@@ -789,7 +788,10 @@ static int fsl_sai_probe(struct platform +@@ -790,7 +789,10 @@ static int fsl_sai_probe(struct platform return -ENOMEM; sai->pdev = pdev; @@ -34,7 +34,7 @@ Signed-off-by: Yangbo Lu sai->is_lsb_first = of_property_read_bool(np, "lsb-first"); -@@ -901,7 +903,7 @@ static int fsl_sai_probe(struct platform +@@ -902,7 +904,7 @@ static int fsl_sai_probe(struct platform if (ret) goto err_pm_disable; @@ -43,7 +43,7 @@ Signed-off-by: Yangbo Lu ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); if (ret) goto err_pm_disable; -@@ -926,18 +928,10 @@ static int fsl_sai_remove(struct platfor +@@ -927,18 +929,10 @@ static int fsl_sai_remove(struct platfor return 0; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0012-MLK-9974-ASoC-fsl_sai-There-is-underrun-detected-in-.patch b/target/linux/layerscape/patches-5.4/801-audio-0012-MLK-9974-ASoC-fsl_sai-There-is-underrun-detected-in-.patch index 3b7de3c98b..809a642ce9 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0012-MLK-9974-ASoC-fsl_sai-There-is-underrun-detected-in-.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0012-MLK-9974-ASoC-fsl_sai-There-is-underrun-detected-in-.patch @@ -15,7 +15,7 @@ Signed-off-by: Shengjiu Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -506,7 +506,9 @@ static int fsl_sai_trigger(struct snd_pc +@@ -507,7 +507,9 @@ static int fsl_sai_trigger(struct snd_pc { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; @@ -25,7 +25,7 @@ Signed-off-by: Shengjiu Wang /* * Asynchronous mode: Clear SYNC for both Tx and Rx. -@@ -529,6 +531,11 @@ static int fsl_sai_trigger(struct snd_pc +@@ -530,6 +532,11 @@ static int fsl_sai_trigger(struct snd_pc regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0013-MLK-10611-1-ASoC-fsl-sai-Just-one-device-can-playbac.patch b/target/linux/layerscape/patches-5.4/801-audio-0013-MLK-10611-1-ASoC-fsl-sai-Just-one-device-can-playbac.patch index faff9786b7..d365c6c525 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0013-MLK-10611-1-ASoC-fsl-sai-Just-one-device-can-playbac.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0013-MLK-10611-1-ASoC-fsl-sai-Just-one-device-can-playbac.patch @@ -15,7 +15,7 @@ Signed-off-by: Zidan Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -605,6 +605,11 @@ static int fsl_sai_startup(struct snd_pc +@@ -606,6 +606,11 @@ static int fsl_sai_startup(struct snd_pc bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; int ret; @@ -27,7 +27,7 @@ Signed-off-by: Zidan Wang regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), FSL_SAI_CR3_TRCE, FSL_SAI_CR3_TRCE); -@@ -621,6 +626,11 @@ static void fsl_sai_shutdown(struct snd_ +@@ -622,6 +627,11 @@ static void fsl_sai_shutdown(struct snd_ bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), FSL_SAI_CR3_TRCE, 0); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0014-MLK-11628-ASoC-fsl_sai-add-initial-value-for-is_slav.patch b/target/linux/layerscape/patches-5.4/801-audio-0014-MLK-11628-ASoC-fsl_sai-add-initial-value-for-is_slav.patch index 0fe22451f1..0e282895cd 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0014-MLK-11628-ASoC-fsl_sai-add-initial-value-for-is_slav.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0014-MLK-11628-ASoC-fsl_sai-add-initial-value-for-is_slav.patch @@ -14,7 +14,7 @@ Signed-off-by: Zidan Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -264,6 +264,8 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -265,6 +265,8 @@ static int fsl_sai_set_dai_fmt_tr(struct return -EINVAL; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0015-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-SAI-master-mode.patch b/target/linux/layerscape/patches-5.4/801-audio-0015-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-SAI-master-mode.patch index 8dbc6d1551..b43e581b30 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0015-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-SAI-master-mode.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0015-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-SAI-master-mode.patch @@ -18,7 +18,7 @@ Signed-off-by: Mark Brown --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -476,6 +476,35 @@ static int fsl_sai_hw_params(struct snd_ +@@ -477,6 +477,35 @@ static int fsl_sai_hw_params(struct snd_ } } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0017-MLK-12786-2-ASoC-fsl_sai-correct-the-clock-source-fo.patch b/target/linux/layerscape/patches-5.4/801-audio-0017-MLK-12786-2-ASoC-fsl_sai-correct-the-clock-source-fo.patch index 470b1d02c4..5c52d0334d 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0017-MLK-12786-2-ASoC-fsl_sai-correct-the-clock-source-fo.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0017-MLK-12786-2-ASoC-fsl_sai-correct-the-clock-source-fo.patch @@ -13,7 +13,7 @@ Signed-off-by: Shengjiu Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -868,8 +868,7 @@ static int fsl_sai_probe(struct platform +@@ -869,8 +869,7 @@ static int fsl_sai_probe(struct platform sai->bus_clk = NULL; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch b/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch index 793936d376..0e35a7c79a 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0018-MLK-13574-2-ASoC-fsl_sai-refine-driver-for-ip-upgrad.patch @@ -76,7 +76,7 @@ Signed-off-by: Yangbo Lu static const unsigned int fsl_sai_rates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, -@@ -505,6 +541,29 @@ static int fsl_sai_hw_params(struct snd_ +@@ -506,6 +542,29 @@ static int fsl_sai_hw_params(struct snd_ } } @@ -106,7 +106,7 @@ Signed-off-by: Yangbo Lu regmap_update_bits(sai->regmap, FSL_SAI_xCR4(tx), FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK, val_cr4); -@@ -563,14 +622,16 @@ static int fsl_sai_trigger(struct snd_pc +@@ -564,14 +623,16 @@ static int fsl_sai_trigger(struct snd_pc FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE); for (i = 0; tx && i < channels; i++) @@ -126,7 +126,7 @@ Signed-off-by: Yangbo Lu regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), FSL_SAI_CSR_xIE_MASK, FSL_SAI_FLAGS); -@@ -641,8 +702,8 @@ static int fsl_sai_startup(struct snd_pc +@@ -642,8 +703,8 @@ static int fsl_sai_startup(struct snd_pc else sai->is_stream_opened[tx] = true; @@ -137,7 +137,7 @@ Signed-off-by: Yangbo Lu ret = snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &fsl_sai_rate_constraints); -@@ -659,7 +720,7 @@ static void fsl_sai_shutdown(struct snd_ +@@ -660,7 +721,7 @@ static void fsl_sai_shutdown(struct snd_ regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), FSL_SAI_CR3_TRCE, 0); if (sai->is_stream_opened[tx]) { @@ -146,7 +146,7 @@ Signed-off-by: Yangbo Lu sai->is_stream_opened[tx] = false; } } -@@ -687,7 +748,7 @@ static int fsl_sai_dai_probe(struct snd_ +@@ -688,7 +749,7 @@ static int fsl_sai_dai_probe(struct snd_ regmap_write(sai->regmap, FSL_SAI_RCSR, 0); regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK, @@ -155,7 +155,7 @@ Signed-off-by: Yangbo Lu regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK, FSL_SAI_MAXBURST_RX - 1); -@@ -732,7 +793,8 @@ static struct reg_default fsl_sai_reg_de +@@ -733,7 +794,8 @@ static struct reg_default fsl_sai_reg_de {FSL_SAI_TCR3, 0}, {FSL_SAI_TCR4, 0}, {FSL_SAI_TCR5, 0}, @@ -165,7 +165,7 @@ Signed-off-by: Yangbo Lu {FSL_SAI_TMR, 0}, {FSL_SAI_RCR1, 0}, {FSL_SAI_RCR2, 0}, -@@ -751,7 +813,8 @@ static bool fsl_sai_readable_reg(struct +@@ -752,7 +814,8 @@ static bool fsl_sai_readable_reg(struct case FSL_SAI_TCR3: case FSL_SAI_TCR4: case FSL_SAI_TCR5: @@ -175,7 +175,7 @@ Signed-off-by: Yangbo Lu case FSL_SAI_TMR: case FSL_SAI_RCSR: case FSL_SAI_RCR1: -@@ -759,8 +822,10 @@ static bool fsl_sai_readable_reg(struct +@@ -760,8 +823,10 @@ static bool fsl_sai_readable_reg(struct case FSL_SAI_RCR3: case FSL_SAI_RCR4: case FSL_SAI_RCR5: @@ -188,7 +188,7 @@ Signed-off-by: Yangbo Lu case FSL_SAI_RMR: return true; default: -@@ -773,9 +838,12 @@ static bool fsl_sai_volatile_reg(struct +@@ -774,9 +839,12 @@ static bool fsl_sai_volatile_reg(struct switch (reg) { case FSL_SAI_TCSR: case FSL_SAI_RCSR: @@ -204,7 +204,7 @@ Signed-off-by: Yangbo Lu return true; default: return false; -@@ -791,7 +859,8 @@ static bool fsl_sai_writeable_reg(struct +@@ -792,7 +860,8 @@ static bool fsl_sai_writeable_reg(struct case FSL_SAI_TCR3: case FSL_SAI_TCR4: case FSL_SAI_TCR5: @@ -214,7 +214,7 @@ Signed-off-by: Yangbo Lu case FSL_SAI_TMR: case FSL_SAI_RCSR: case FSL_SAI_RCR1: -@@ -820,9 +889,19 @@ static const struct regmap_config fsl_sa +@@ -821,9 +890,19 @@ static const struct regmap_config fsl_sa .cache_type = REGCACHE_FLAT, }; @@ -234,7 +234,7 @@ Signed-off-by: Yangbo Lu struct fsl_sai *sai; struct regmap *gpr; struct resource *res; -@@ -837,11 +916,12 @@ static int fsl_sai_probe(struct platform +@@ -838,11 +917,12 @@ static int fsl_sai_probe(struct platform sai->pdev = pdev; @@ -250,7 +250,7 @@ Signed-off-by: Yangbo Lu res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(&pdev->dev, res); -@@ -873,11 +953,25 @@ static int fsl_sai_probe(struct platform +@@ -874,11 +954,25 @@ static int fsl_sai_probe(struct platform sai->mclk_clk[i] = devm_clk_get(&pdev->dev, tmp); if (IS_ERR(sai->mclk_clk[i])) { dev_err(&pdev->dev, "failed to get mclk%d clock: %ld\n", @@ -277,7 +277,7 @@ Signed-off-by: Yangbo Lu irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); -@@ -936,8 +1030,8 @@ static int fsl_sai_probe(struct platform +@@ -937,8 +1031,8 @@ static int fsl_sai_probe(struct platform MCLK_DIR(index)); } @@ -288,7 +288,7 @@ Signed-off-by: Yangbo Lu sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX; sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX; -@@ -950,7 +1044,7 @@ static int fsl_sai_probe(struct platform +@@ -951,7 +1045,7 @@ static int fsl_sai_probe(struct platform if (ret) goto err_pm_disable; @@ -297,7 +297,7 @@ Signed-off-by: Yangbo Lu ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); if (ret) goto err_pm_disable; -@@ -996,6 +1090,9 @@ static int fsl_sai_runtime_suspend(struc +@@ -997,6 +1091,9 @@ static int fsl_sai_runtime_suspend(struc clk_disable_unprepare(sai->bus_clk); @@ -307,7 +307,7 @@ Signed-off-by: Yangbo Lu regcache_cache_only(sai->regmap, true); regcache_mark_dirty(sai->regmap); -@@ -1025,6 +1122,10 @@ static int fsl_sai_runtime_resume(struct +@@ -1026,6 +1123,10 @@ static int fsl_sai_runtime_resume(struct goto disable_tx_clk; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0019-MLK-13609-ASoC-fsl_sai-fix-for-synchronize-mode.patch b/target/linux/layerscape/patches-5.4/801-audio-0019-MLK-13609-ASoC-fsl_sai-fix-for-synchronize-mode.patch index 2d7832744a..40915d41cd 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0019-MLK-13609-ASoC-fsl_sai-fix-for-synchronize-mode.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0019-MLK-13609-ASoC-fsl_sai-fix-for-synchronize-mode.patch @@ -15,7 +15,7 @@ Signed-off-by: Shengjiu Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -527,8 +527,6 @@ static int fsl_sai_hw_params(struct snd_ +@@ -528,8 +528,6 @@ static int fsl_sai_hw_params(struct snd_ regmap_update_bits(sai->regmap, FSL_SAI_TCR5, FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); @@ -24,7 +24,7 @@ Signed-off-by: Shengjiu Wang } else if (!sai->synchronous[RX] && sai->synchronous[TX] && tx) { regmap_update_bits(sai->regmap, FSL_SAI_RCR4, FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK, -@@ -536,8 +534,6 @@ static int fsl_sai_hw_params(struct snd_ +@@ -537,8 +535,6 @@ static int fsl_sai_hw_params(struct snd_ regmap_update_bits(sai->regmap, FSL_SAI_RCR5, FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); @@ -33,7 +33,7 @@ Signed-off-by: Shengjiu Wang } } -@@ -626,12 +622,17 @@ static int fsl_sai_trigger(struct snd_pc +@@ -627,12 +623,17 @@ static int fsl_sai_trigger(struct snd_pc if (tx) udelay(10); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0020-ASoC-fsl_-e-sai-introduce-shared-interrupt-DT-flag-p.patch b/target/linux/layerscape/patches-5.4/801-audio-0020-ASoC-fsl_-e-sai-introduce-shared-interrupt-DT-flag-p.patch index 1184bce0e3..5397a3e8d1 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0020-ASoC-fsl_-e-sai-introduce-shared-interrupt-DT-flag-p.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0020-ASoC-fsl_-e-sai-introduce-shared-interrupt-DT-flag-p.patch @@ -18,7 +18,7 @@ Signed-off-by: Dong Aisheng --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -910,6 +910,7 @@ static int fsl_sai_probe(struct platform +@@ -911,6 +911,7 @@ static int fsl_sai_probe(struct platform char tmp[8]; int irq, ret, i; int index; @@ -26,7 +26,7 @@ Signed-off-by: Dong Aisheng sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL); if (!sai) -@@ -979,7 +980,12 @@ static int fsl_sai_probe(struct platform +@@ -980,7 +981,12 @@ static int fsl_sai_probe(struct platform return irq; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0021-ASoC-fsl_sai-handle-slave-mode-per-TX-RX-direction.patch b/target/linux/layerscape/patches-5.4/801-audio-0021-ASoC-fsl_sai-handle-slave-mode-per-TX-RX-direction.patch index 2fb5789ef3..bcdd39a9b3 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0021-ASoC-fsl_sai-handle-slave-mode-per-TX-RX-direction.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0021-ASoC-fsl_sai-handle-slave-mode-per-TX-RX-direction.patch @@ -16,7 +16,7 @@ Signed-off-by: Viorel Suman --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -300,7 +300,7 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -301,7 +301,7 @@ static int fsl_sai_set_dai_fmt_tr(struct return -EINVAL; } @@ -25,7 +25,7 @@ Signed-off-by: Viorel Suman /* DAI clock master masks */ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { -@@ -310,7 +310,7 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -311,7 +311,7 @@ static int fsl_sai_set_dai_fmt_tr(struct sai->is_slave_mode = false; break; case SND_SOC_DAIFMT_CBM_CFM: @@ -34,7 +34,7 @@ Signed-off-by: Viorel Suman break; case SND_SOC_DAIFMT_CBS_CFM: val_cr2 |= FSL_SAI_CR2_BCD_MSTR; -@@ -318,7 +318,7 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -319,7 +319,7 @@ static int fsl_sai_set_dai_fmt_tr(struct break; case SND_SOC_DAIFMT_CBM_CFS: val_cr4 |= FSL_SAI_CR4_FSD_MSTR; @@ -43,7 +43,7 @@ Signed-off-by: Viorel Suman break; default: return -EINVAL; -@@ -359,7 +359,7 @@ static int fsl_sai_set_bclk(struct snd_s +@@ -360,7 +360,7 @@ static int fsl_sai_set_bclk(struct snd_s int ret = 0; /* Don't apply to slave mode */ @@ -52,7 +52,7 @@ Signed-off-by: Viorel Suman return 0; for (id = 0; id < FSL_SAI_MCLK_MAX; id++) { -@@ -454,7 +454,7 @@ static int fsl_sai_hw_params(struct snd_ +@@ -455,7 +455,7 @@ static int fsl_sai_hw_params(struct snd_ if (sai->slot_width) slot_width = sai->slot_width; @@ -61,7 +61,7 @@ Signed-off-by: Viorel Suman ret = fsl_sai_set_bclk(cpu_dai, tx, slots * slot_width * params_rate(params)); if (ret) -@@ -490,7 +490,7 @@ static int fsl_sai_hw_params(struct snd_ +@@ -491,7 +491,7 @@ static int fsl_sai_hw_params(struct snd_ * error. */ @@ -70,7 +70,7 @@ Signed-off-by: Viorel Suman if (!sai->synchronous[TX] && sai->synchronous[RX] && !tx) { regmap_update_bits(sai->regmap, FSL_SAI_TCR4, FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK, -@@ -519,7 +519,7 @@ static int fsl_sai_hw_params(struct snd_ +@@ -520,7 +520,7 @@ static int fsl_sai_hw_params(struct snd_ * error. */ @@ -79,7 +79,7 @@ Signed-off-by: Viorel Suman if (!sai->synchronous[TX] && sai->synchronous[RX] && !tx) { regmap_update_bits(sai->regmap, FSL_SAI_TCR4, FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK, -@@ -577,7 +577,7 @@ static int fsl_sai_hw_free(struct snd_pc +@@ -578,7 +578,7 @@ static int fsl_sai_hw_free(struct snd_pc struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; @@ -88,7 +88,7 @@ Signed-off-by: Viorel Suman sai->mclk_streams & BIT(substream->stream)) { clk_disable_unprepare(sai->mclk_clk[sai->mclk_id[tx]]); sai->mclk_streams &= ~BIT(substream->stream); -@@ -672,7 +672,7 @@ static int fsl_sai_trigger(struct snd_pc +@@ -673,7 +673,7 @@ static int fsl_sai_trigger(struct snd_pc * This is a hardware bug, and will be fix in the * next sai version. */ diff --git a/target/linux/layerscape/patches-5.4/801-audio-0022-ASoC-fsl_sai-set-specific-fmt-for-I2S-XTOR.patch b/target/linux/layerscape/patches-5.4/801-audio-0022-ASoC-fsl_sai-set-specific-fmt-for-I2S-XTOR.patch index 84bf81ae64..cfdfac9c3a 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0022-ASoC-fsl_sai-set-specific-fmt-for-I2S-XTOR.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0022-ASoC-fsl_sai-set-specific-fmt-for-I2S-XTOR.patch @@ -15,7 +15,7 @@ Signed-off-by: Viorel Suman --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -335,14 +335,23 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -336,14 +336,23 @@ static int fsl_sai_set_dai_fmt_tr(struct static int fsl_sai_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) { @@ -39,7 +39,7 @@ Signed-off-by: Viorel Suman ret = fsl_sai_set_dai_fmt_tr(cpu_dai, fmt, FSL_FMT_RECEIVER); if (ret) dev_err(cpu_dai->dev, "Cannot set rx format: %d\n", ret); -@@ -974,6 +983,9 @@ static int fsl_sai_probe(struct platform +@@ -975,6 +984,9 @@ static int fsl_sai_probe(struct platform return -EINVAL; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0024-MLK-14847-Revert-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-.patch b/target/linux/layerscape/patches-5.4/801-audio-0024-MLK-14847-Revert-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-.patch index 1edd4a35ea..d7b01df073 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0024-MLK-14847-Revert-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0024-MLK-14847-Revert-ASoC-fsl-sai-set-xCR4-xCR5-xMR-for-.patch @@ -21,7 +21,7 @@ Signed-off-by: Mihai Serban --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -507,35 +507,6 @@ static int fsl_sai_hw_params(struct snd_ +@@ -508,35 +508,6 @@ static int fsl_sai_hw_params(struct snd_ regmap_update_bits(sai->regmap, FSL_SAI_TCR5, FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0026-MLK-14935-ASoC-fsl_sai-Fix-mixing-initialization-dat.patch b/target/linux/layerscape/patches-5.4/801-audio-0026-MLK-14935-ASoC-fsl_sai-Fix-mixing-initialization-dat.patch index a68985fa02..1fdb99645a 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0026-MLK-14935-ASoC-fsl_sai-Fix-mixing-initialization-dat.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0026-MLK-14935-ASoC-fsl_sai-Fix-mixing-initialization-dat.patch @@ -16,7 +16,7 @@ Signed-off-by: Mihai Serban --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -594,15 +594,14 @@ static int fsl_sai_trigger(struct snd_pc +@@ -595,15 +595,14 @@ static int fsl_sai_trigger(struct snd_pc case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: diff --git a/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch b/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch index f0063453d5..49f777603a 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0027-MLK-15140-1-ASoC-fsl_sai-support-latest-sai-module.patch @@ -114,7 +114,7 @@ Signed-off-by: Shengjiu Wang bool tx = fsl_dir == FSL_FMT_TRANSMITTER; u32 val_cr2 = 0, val_cr4 = 0; -@@ -324,9 +339,9 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -325,9 +340,9 @@ static int fsl_sai_set_dai_fmt_tr(struct return -EINVAL; } @@ -126,7 +126,7 @@ Signed-off-by: Shengjiu Wang FSL_SAI_CR4_MF | FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP | FSL_SAI_CR4_FSD_MSTR, val_cr4); -@@ -362,6 +377,7 @@ static int fsl_sai_set_dai_fmt(struct sn +@@ -363,6 +378,7 @@ static int fsl_sai_set_dai_fmt(struct sn static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(dai); @@ -134,7 +134,7 @@ Signed-off-by: Shengjiu Wang unsigned long clk_rate; u32 savediv = 0, ratio, savesub = freq; u32 id; -@@ -424,17 +440,17 @@ static int fsl_sai_set_bclk(struct snd_s +@@ -425,17 +441,17 @@ static int fsl_sai_set_bclk(struct snd_s */ if ((sai->synchronous[TX] && !sai->synchronous[RX]) || (!tx && !sai->synchronous[RX])) { @@ -156,7 +156,7 @@ Signed-off-by: Shengjiu Wang FSL_SAI_CR2_DIV_MASK, savediv - 1); } -@@ -449,6 +465,7 @@ static int fsl_sai_hw_params(struct snd_ +@@ -450,6 +466,7 @@ static int fsl_sai_hw_params(struct snd_ struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -164,7 +164,7 @@ Signed-off-by: Shengjiu Wang bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; unsigned int channels = params_channels(params); u32 word_width = params_width(params); -@@ -501,49 +518,35 @@ static int fsl_sai_hw_params(struct snd_ +@@ -502,49 +519,35 @@ static int fsl_sai_hw_params(struct snd_ if (!sai->slave_mode[tx]) { if (!sai->synchronous[TX] && sai->synchronous[RX] && !tx) { @@ -226,7 +226,7 @@ Signed-off-by: Shengjiu Wang FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); regmap_write(sai->regmap, FSL_SAI_xMR(tx), ~0UL - ((1 << channels) - 1)); -@@ -571,6 +574,7 @@ static int fsl_sai_trigger(struct snd_pc +@@ -572,6 +575,7 @@ static int fsl_sai_trigger(struct snd_pc struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -234,7 +234,7 @@ Signed-off-by: Shengjiu Wang bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; u8 channels = substream->runtime->channels; u32 xcsr, count = 100; -@@ -581,9 +585,9 @@ static int fsl_sai_trigger(struct snd_pc +@@ -582,9 +586,9 @@ static int fsl_sai_trigger(struct snd_pc * Rx sync with Tx clocks: Clear SYNC for Tx, set it for Rx. * Tx sync with Rx clocks: Clear SYNC for Rx, set it for Tx. */ @@ -246,7 +246,7 @@ Signed-off-by: Shengjiu Wang sai->synchronous[RX] ? FSL_SAI_CR2_SYNC : 0); /* -@@ -599,49 +603,50 @@ static int fsl_sai_trigger(struct snd_pc +@@ -600,49 +604,50 @@ static int fsl_sai_trigger(struct snd_pc if (tx) udelay(10); @@ -311,7 +311,7 @@ Signed-off-by: Shengjiu Wang FSL_SAI_CSR_FR, FSL_SAI_CSR_FR); /* -@@ -654,12 +659,12 @@ static int fsl_sai_trigger(struct snd_pc +@@ -655,12 +660,12 @@ static int fsl_sai_trigger(struct snd_pc if (!sai->slave_mode[tx]) { /* Software Reset for both Tx and Rx */ regmap_write(sai->regmap, @@ -328,7 +328,7 @@ Signed-off-by: Shengjiu Wang } } break; -@@ -674,6 +679,7 @@ static int fsl_sai_startup(struct snd_pc +@@ -675,6 +680,7 @@ static int fsl_sai_startup(struct snd_pc struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -336,7 +336,7 @@ Signed-off-by: Shengjiu Wang bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; int ret; -@@ -682,7 +688,8 @@ static int fsl_sai_startup(struct snd_pc +@@ -683,7 +689,8 @@ static int fsl_sai_startup(struct snd_pc else sai->is_stream_opened[tx] = true; @@ -346,7 +346,7 @@ Signed-off-by: Shengjiu Wang FSL_SAI_CR3_TRCE(sai->dataline[tx])); ret = snd_pcm_hw_constraint_list(substream->runtime, 0, -@@ -695,12 +702,14 @@ static void fsl_sai_shutdown(struct snd_ +@@ -696,12 +703,14 @@ static void fsl_sai_shutdown(struct snd_ struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -362,7 +362,7 @@ Signed-off-by: Shengjiu Wang sai->is_stream_opened[tx] = false; } } -@@ -719,17 +728,18 @@ static const struct snd_soc_dai_ops fsl_ +@@ -720,17 +729,18 @@ static const struct snd_soc_dai_ops fsl_ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev); @@ -387,7 +387,7 @@ Signed-off-by: Shengjiu Wang FSL_SAI_MAXBURST_RX - 1); snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx, -@@ -767,41 +777,55 @@ static const struct snd_soc_component_dr +@@ -768,41 +778,55 @@ static const struct snd_soc_component_dr .name = "fsl-sai", }; @@ -466,7 +466,7 @@ Signed-off-by: Shengjiu Wang case FSL_SAI_RDR0: case FSL_SAI_RDR1: case FSL_SAI_RFR0: -@@ -815,9 +839,13 @@ static bool fsl_sai_readable_reg(struct +@@ -816,9 +840,13 @@ static bool fsl_sai_readable_reg(struct static bool fsl_sai_volatile_reg(struct device *dev, unsigned int reg) { @@ -482,7 +482,7 @@ Signed-off-by: Shengjiu Wang case FSL_SAI_TFR0: case FSL_SAI_TFR1: case FSL_SAI_RFR0: -@@ -832,22 +860,19 @@ static bool fsl_sai_volatile_reg(struct +@@ -833,22 +861,19 @@ static bool fsl_sai_volatile_reg(struct static bool fsl_sai_writeable_reg(struct device *dev, unsigned int reg) { @@ -514,7 +514,7 @@ Signed-off-by: Shengjiu Wang case FSL_SAI_RMR: return true; default: -@@ -855,14 +880,28 @@ static bool fsl_sai_writeable_reg(struct +@@ -856,14 +881,28 @@ static bool fsl_sai_writeable_reg(struct } } @@ -546,7 +546,7 @@ Signed-off-by: Shengjiu Wang .readable_reg = fsl_sai_readable_reg, .volatile_reg = fsl_sai_volatile_reg, .writeable_reg = fsl_sai_writeable_reg, -@@ -874,6 +913,7 @@ static const struct of_device_id fsl_sai +@@ -875,6 +914,7 @@ static const struct of_device_id fsl_sai { .compatible = "fsl,imx6sx-sai", .data = &fsl_sai_imx6sx }, { .compatible = "fsl,imx6ul-sai", .data = &fsl_sai_imx6ul }, { .compatible = "fsl,imx7ulp-sai", .data = &fsl_sai_imx7ulp }, @@ -554,7 +554,7 @@ Signed-off-by: Shengjiu Wang { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_sai_ids); -@@ -889,7 +929,8 @@ static int fsl_sai_probe(struct platform +@@ -890,7 +930,8 @@ static int fsl_sai_probe(struct platform char tmp[8]; int irq, ret, i; int index; @@ -564,7 +564,7 @@ Signed-off-by: Shengjiu Wang sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL); if (!sai) -@@ -909,6 +950,9 @@ static int fsl_sai_probe(struct platform +@@ -910,6 +951,9 @@ static int fsl_sai_probe(struct platform if (IS_ERR(base)) return PTR_ERR(base); @@ -574,7 +574,7 @@ Signed-off-by: Shengjiu Wang sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "bus", base, &fsl_sai_regmap_config); -@@ -963,11 +1007,11 @@ static int fsl_sai_probe(struct platform +@@ -964,11 +1008,11 @@ static int fsl_sai_probe(struct platform } /* SAI shared interrupt */ @@ -590,7 +590,7 @@ Signed-off-by: Shengjiu Wang if (ret) { dev_err(&pdev->dev, "failed to claim irq %u\n", irq); return ret; -@@ -1091,6 +1135,7 @@ static int fsl_sai_runtime_suspend(struc +@@ -1092,6 +1136,7 @@ static int fsl_sai_runtime_suspend(struc static int fsl_sai_runtime_resume(struct device *dev) { struct fsl_sai *sai = dev_get_drvdata(dev); @@ -598,7 +598,7 @@ Signed-off-by: Shengjiu Wang int ret; ret = clk_prepare_enable(sai->bus_clk); -@@ -1116,11 +1161,11 @@ static int fsl_sai_runtime_resume(struct +@@ -1117,11 +1162,11 @@ static int fsl_sai_runtime_resume(struct PM_QOS_CPU_DMA_LATENCY, 0); regcache_cache_only(sai->regmap, false); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0028-MLK-15927-1-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch b/target/linux/layerscape/patches-5.4/801-audio-0028-MLK-15927-1-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch index 71554d295a..d3ab26b7c7 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0028-MLK-15927-1-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0028-MLK-15927-1-ASoC-fsl_sai-Fix-noise-when-using-EDMA.patch @@ -72,7 +72,7 @@ Reviewed-by: Shengjiu Wang }; static const unsigned int fsl_sai_rates[] = { -@@ -692,6 +707,13 @@ static int fsl_sai_startup(struct snd_pc +@@ -693,6 +708,13 @@ static int fsl_sai_startup(struct snd_pc FSL_SAI_CR3_TRCE_MASK, FSL_SAI_CR3_TRCE(sai->dataline[tx])); @@ -86,7 +86,7 @@ Reviewed-by: Shengjiu Wang ret = snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &fsl_sai_rate_constraints); -@@ -914,6 +936,7 @@ static const struct of_device_id fsl_sai +@@ -915,6 +937,7 @@ static const struct of_device_id fsl_sai { .compatible = "fsl,imx6ul-sai", .data = &fsl_sai_imx6ul }, { .compatible = "fsl,imx7ulp-sai", .data = &fsl_sai_imx7ulp }, { .compatible = "fsl,imx8mq-sai", .data = &fsl_sai_imx8mq }, diff --git a/target/linux/layerscape/patches-5.4/801-audio-0029-MLK-15960-1-ASoC-fsl_sai-update-fifo_depth-for-diffe.patch b/target/linux/layerscape/patches-5.4/801-audio-0029-MLK-15960-1-ASoC-fsl_sai-update-fifo_depth-for-diffe.patch index d2a7955cae..480ae311e4 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0029-MLK-15960-1-ASoC-fsl_sai-update-fifo_depth-for-diffe.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0029-MLK-15960-1-ASoC-fsl_sai-update-fifo_depth-for-diffe.patch @@ -32,7 +32,7 @@ Signed-off-by: Shengjiu Wang .flags = 0, .reg_offset = 0, .constrain_period_size = true, -@@ -759,10 +759,12 @@ static int fsl_sai_dai_probe(struct snd_ +@@ -760,10 +760,12 @@ static int fsl_sai_dai_probe(struct snd_ regmap_write(sai->regmap, FSL_SAI_TCSR(offset), 0); regmap_write(sai->regmap, FSL_SAI_RCSR(offset), 0); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch b/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch index 03201fea90..8eb7cb1bac 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0030-MLK-15960-2-ASoC-fsl_sai-refine-the-pm-runtime-funct.patch @@ -16,7 +16,7 @@ Signed-off-by: Shengjiu Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -1097,6 +1097,8 @@ static int fsl_sai_probe(struct platform +@@ -1098,6 +1098,8 @@ static int fsl_sai_probe(struct platform pm_runtime_enable(&pdev->dev); @@ -25,7 +25,7 @@ Signed-off-by: Shengjiu Wang ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component, &sai->cpu_dai_drv, 1); if (ret) -@@ -1140,6 +1142,8 @@ static int fsl_sai_runtime_suspend(struc +@@ -1141,6 +1143,8 @@ static int fsl_sai_runtime_suspend(struc { struct fsl_sai *sai = dev_get_drvdata(dev); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0031-MLK-13975-ASoC-fsl_sai-Refine-master-flag-handling.patch b/target/linux/layerscape/patches-5.4/801-audio-0031-MLK-13975-ASoC-fsl_sai-Refine-master-flag-handling.patch index cc60638f2b..643606808e 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0031-MLK-13975-ASoC-fsl_sai-Refine-master-flag-handling.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0031-MLK-13975-ASoC-fsl_sai-Refine-master-flag-handling.patch @@ -16,7 +16,7 @@ Signed-off-by: Viorel Suman --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -368,9 +368,9 @@ static int fsl_sai_set_dai_fmt(struct sn +@@ -369,9 +369,9 @@ static int fsl_sai_set_dai_fmt(struct sn struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); int ret; @@ -29,7 +29,7 @@ Signed-off-by: Viorel Suman ret = fsl_sai_set_dai_fmt_tr(cpu_dai, fmt, FSL_FMT_TRANSMITTER); if (ret) { -@@ -378,9 +378,9 @@ static int fsl_sai_set_dai_fmt(struct sn +@@ -379,9 +379,9 @@ static int fsl_sai_set_dai_fmt(struct sn return ret; } @@ -42,7 +42,7 @@ Signed-off-by: Viorel Suman ret = fsl_sai_set_dai_fmt_tr(cpu_dai, fmt, FSL_FMT_RECEIVER); if (ret) -@@ -1022,8 +1022,19 @@ static int fsl_sai_probe(struct platform +@@ -1023,8 +1023,19 @@ static int fsl_sai_probe(struct platform return -EINVAL; } diff --git a/target/linux/layerscape/patches-5.4/801-audio-0032-MLK-16130-1-ASoC-fsl_sai-enable-TCE-RCE-according-to.patch b/target/linux/layerscape/patches-5.4/801-audio-0032-MLK-16130-1-ASoC-fsl_sai-enable-TCE-RCE-according-to.patch index 25275a27a2..2178da53b8 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0032-MLK-16130-1-ASoC-fsl_sai-enable-TCE-RCE-according-to.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0032-MLK-16130-1-ASoC-fsl_sai-enable-TCE-RCE-according-to.patch @@ -15,7 +15,7 @@ Signed-off-by: Shengjiu Wang --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -487,11 +487,14 @@ static int fsl_sai_hw_params(struct snd_ +@@ -488,11 +488,14 @@ static int fsl_sai_hw_params(struct snd_ u32 val_cr4 = 0, val_cr5 = 0; u32 slots = (channels == 1) ? 2 : channels; u32 slot_width = word_width; @@ -30,7 +30,7 @@ Signed-off-by: Shengjiu Wang if (sai->slot_width) slot_width = sai->slot_width; -@@ -558,6 +561,10 @@ static int fsl_sai_hw_params(struct snd_ +@@ -559,6 +562,10 @@ static int fsl_sai_hw_params(struct snd_ FSL_SAI_CR4_FCOMB_MASK, FSL_SAI_CR4_FCOMB_SOFT); } @@ -41,7 +41,7 @@ Signed-off-by: Shengjiu Wang regmap_update_bits(sai->regmap, FSL_SAI_xCR4(tx, offset), FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK, val_cr4); -@@ -573,8 +580,12 @@ static int fsl_sai_hw_free(struct snd_pc +@@ -574,8 +581,12 @@ static int fsl_sai_hw_free(struct snd_pc struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -54,7 +54,7 @@ Signed-off-by: Shengjiu Wang if (!sai->slave_mode[tx] && sai->mclk_streams & BIT(substream->stream)) { clk_disable_unprepare(sai->mclk_clk[sai->mclk_id[tx]]); -@@ -694,7 +705,6 @@ static int fsl_sai_startup(struct snd_pc +@@ -695,7 +706,6 @@ static int fsl_sai_startup(struct snd_pc struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); @@ -62,7 +62,7 @@ Signed-off-by: Shengjiu Wang bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; int ret; -@@ -724,7 +734,6 @@ static void fsl_sai_shutdown(struct snd_ +@@ -725,7 +735,6 @@ static void fsl_sai_shutdown(struct snd_ struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0033-MLK-13946-3-ASoC-fsl_sai-fix-the-xMR-setting.patch b/target/linux/layerscape/patches-5.4/801-audio-0033-MLK-13946-3-ASoC-fsl_sai-fix-the-xMR-setting.patch index c353ba4ae4..fa9ae220a2 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0033-MLK-13946-3-ASoC-fsl_sai-fix-the-xMR-setting.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0033-MLK-13946-3-ASoC-fsl_sai-fix-the-xMR-setting.patch @@ -24,7 +24,7 @@ Signed-off-by: Shengjiu Wang .fifos = 1, .fifo_depth = 64, .flags = 0, -@@ -571,7 +571,7 @@ static int fsl_sai_hw_params(struct snd_ +@@ -572,7 +572,7 @@ static int fsl_sai_hw_params(struct snd_ regmap_update_bits(sai->regmap, FSL_SAI_xCR5(tx, offset), FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); @@ -33,7 +33,7 @@ Signed-off-by: Shengjiu Wang return 0; } -@@ -858,11 +858,23 @@ static bool fsl_sai_readable_reg(struct +@@ -859,11 +859,23 @@ static bool fsl_sai_readable_reg(struct switch (reg) { case FSL_SAI_TFR0: case FSL_SAI_TFR1: @@ -57,7 +57,7 @@ Signed-off-by: Shengjiu Wang case FSL_SAI_RMR: return true; default: -@@ -881,8 +893,20 @@ static bool fsl_sai_volatile_reg(struct +@@ -882,8 +894,20 @@ static bool fsl_sai_volatile_reg(struct switch (reg) { case FSL_SAI_TFR0: case FSL_SAI_TFR1: diff --git a/target/linux/layerscape/patches-5.4/801-audio-0034-MLK-13946-8-ASoC-fsl_sai-use-min-channels-slots-for-.patch b/target/linux/layerscape/patches-5.4/801-audio-0034-MLK-13946-8-ASoC-fsl_sai-use-min-channels-slots-for-.patch index ab89291189..fc90f2616f 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0034-MLK-13946-8-ASoC-fsl_sai-use-min-channels-slots-for-.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0034-MLK-13946-8-ASoC-fsl_sai-use-min-channels-slots-for-.patch @@ -15,7 +15,7 @@ Signed-off-by: Viorel Suman --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -571,8 +571,8 @@ static int fsl_sai_hw_params(struct snd_ +@@ -572,8 +572,8 @@ static int fsl_sai_hw_params(struct snd_ regmap_update_bits(sai->regmap, FSL_SAI_xCR5(tx, offset), FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch b/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch index c095f5ff35..7bdd15ccc1 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0035-MLK-16929-1-ASoC-fsl_sai-add-bitclk_freq.patch @@ -30,7 +30,7 @@ Signed-off-by: Adrian Alonso ret = fsl_sai_set_dai_sysclk_tr(cpu_dai, clk_id, freq, FSL_FMT_TRANSMITTER); if (ret) { -@@ -499,7 +502,11 @@ static int fsl_sai_hw_params(struct snd_ +@@ -500,7 +503,11 @@ static int fsl_sai_hw_params(struct snd_ slot_width = sai->slot_width; if (!sai->slave_mode[tx]) { diff --git a/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch b/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch index c2952deaab..ee47b150c5 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0037-MLK-16224-4-ASoC-fsl_sai-support-multi-fifo-and-DSD.patch @@ -31,15 +31,7 @@ Reviewed-by: Viorel Suman --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c -@@ -267,6 +267,7 @@ static int fsl_sai_set_dai_fmt_tr(struct - if (!sai->is_lsb_first) - val_cr4 |= FSL_SAI_CR4_MF; - -+ sai->is_dsp_mode = false; - /* DAI mode */ - switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { - case SND_SOC_DAIFMT_I2S: -@@ -305,6 +306,11 @@ static int fsl_sai_set_dai_fmt_tr(struct +@@ -306,6 +306,11 @@ static int fsl_sai_set_dai_fmt_tr(struct val_cr2 |= FSL_SAI_CR2_BCP; sai->is_dsp_mode = true; break; @@ -51,7 +43,7 @@ Reviewed-by: Viorel Suman case SND_SOC_DAIFMT_RIGHT_J: /* To be done */ default: -@@ -492,12 +498,38 @@ static int fsl_sai_hw_params(struct snd_ +@@ -493,12 +498,38 @@ static int fsl_sai_hw_params(struct snd_ u32 slot_width = word_width; u32 pins; int ret; @@ -90,7 +82,7 @@ Reviewed-by: Viorel Suman if (sai->slot_width) slot_width = sai->slot_width; -@@ -527,7 +559,7 @@ static int fsl_sai_hw_params(struct snd_ +@@ -528,7 +559,7 @@ static int fsl_sai_hw_params(struct snd_ val_cr5 |= FSL_SAI_CR5_WNW(slot_width); val_cr5 |= FSL_SAI_CR5_W0W(slot_width); @@ -99,7 +91,7 @@ Reviewed-by: Viorel Suman val_cr5 |= FSL_SAI_CR5_FBT(0); else val_cr5 |= FSL_SAI_CR5_FBT(word_width - 1); -@@ -560,17 +592,71 @@ static int fsl_sai_hw_params(struct snd_ +@@ -561,17 +592,71 @@ static int fsl_sai_hw_params(struct snd_ } if (sai->soc->dataline != 0x1) { @@ -174,7 +166,7 @@ Reviewed-by: Viorel Suman regmap_update_bits(sai->regmap, FSL_SAI_xCR4(tx, offset), FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK, -@@ -610,9 +696,18 @@ static int fsl_sai_trigger(struct snd_pc +@@ -611,9 +696,18 @@ static int fsl_sai_trigger(struct snd_pc unsigned char offset = sai->soc->reg_offset; bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; u8 channels = substream->runtime->channels; @@ -194,7 +186,7 @@ Reviewed-by: Viorel Suman /* * Asynchronous mode: Clear SYNC for both Tx and Rx. * Rx sync with Tx clocks: Clear SYNC for Tx, set it for Rx. -@@ -631,10 +726,19 @@ static int fsl_sai_trigger(struct snd_pc +@@ -632,10 +726,19 @@ static int fsl_sai_trigger(struct snd_pc case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: @@ -218,7 +210,7 @@ Reviewed-by: Viorel Suman regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, offset), FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE); -@@ -994,6 +1098,7 @@ static int fsl_sai_probe(struct platform +@@ -995,6 +1098,7 @@ static int fsl_sai_probe(struct platform char tmp[8]; int irq, ret, i; int index; @@ -226,7 +218,7 @@ Reviewed-by: Viorel Suman struct regmap_config fsl_sai_regmap_config = fsl_sai_v2_regmap_config; unsigned long irqflags = 0; -@@ -1048,6 +1153,9 @@ static int fsl_sai_probe(struct platform +@@ -1049,6 +1153,9 @@ static int fsl_sai_probe(struct platform } } @@ -236,7 +228,7 @@ Reviewed-by: Viorel Suman /*dataline mask for rx and tx*/ ret = of_property_read_u32_index(np, "fsl,dataline", 0, &sai->dataline[0]); if (ret) -@@ -1062,6 +1170,37 @@ static int fsl_sai_probe(struct platform +@@ -1063,6 +1170,37 @@ static int fsl_sai_probe(struct platform return -EINVAL; } @@ -274,7 +266,7 @@ Reviewed-by: Viorel Suman if ((of_find_property(np, "fsl,i2s-xtor", NULL) != NULL) || (of_find_property(np, "fsl,txm-rxs", NULL) != NULL)) { -@@ -1144,6 +1283,11 @@ static int fsl_sai_probe(struct platform +@@ -1145,6 +1283,11 @@ static int fsl_sai_probe(struct platform sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX; sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX; diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0001-crypto-add-support-for-TLS-1.0-record-encryption.patch b/target/linux/layerscape/patches-5.4/804-crypto-0001-crypto-add-support-for-TLS-1.0-record-encryption.patch index c73baa42ea..a8922002fe 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0001-crypto-add-support-for-TLS-1.0-record-encryption.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0001-crypto-add-support-for-TLS-1.0-record-encryption.patch @@ -67,7 +67,7 @@ Signed-off-by: Horia Geantă obj-$(CONFIG_CRYPTO_XXHASH) += xxhash_generic.o --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c -@@ -2049,6 +2049,9 @@ static int do_test(const char *alg, u32 +@@ -2040,6 +2040,9 @@ static int do_test(const char *alg, u32 ret += tcrypt_test("cbc(sm4)"); ret += tcrypt_test("ctr(sm4)"); break; diff --git a/target/linux/layerscape/patches-5.4/804-crypto-0002-crypto-tcrypt-include-rsa-test.patch b/target/linux/layerscape/patches-5.4/804-crypto-0002-crypto-tcrypt-include-rsa-test.patch index 5be1e051a9..632bf326de 100644 --- a/target/linux/layerscape/patches-5.4/804-crypto-0002-crypto-tcrypt-include-rsa-test.patch +++ b/target/linux/layerscape/patches-5.4/804-crypto-0002-crypto-tcrypt-include-rsa-test.patch @@ -23,7 +23,7 @@ Signed-off-by: Tudor Ambarus }; static u32 block_sizes[] = { 16, 64, 256, 1024, 1472, 8192, 0 }; -@@ -1983,6 +1982,10 @@ static int do_test(const char *alg, u32 +@@ -1974,6 +1973,10 @@ static int do_test(const char *alg, u32 ret += tcrypt_test("hmac(streebog512)"); break; diff --git a/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch b/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch index 91b2dba7d8..aea3f914e8 100644 --- a/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch +++ b/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch @@ -378,8 +378,8 @@ Signed-off-by: Sandor Yu video->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC); video->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC); -- memcpy(&dp->mode, adjusted, sizeof(*mode)); -+ memcpy(&dp->mhdp.mode, adjusted, sizeof(*mode)); +- drm_mode_copy(&dp->mode, adjusted); ++ drm_mode_copy(&dp->mhdp.mode, adjusted); } static bool cdn_dp_check_link_status(struct cdn_dp_device *dp) diff --git a/target/linux/layerscape/patches-5.4/805-display-0041-drm-fourcc-add-a-10bits-fully-packed-variant-of-NV12.patch b/target/linux/layerscape/patches-5.4/805-display-0041-drm-fourcc-add-a-10bits-fully-packed-variant-of-NV12.patch index 3bccbbd138..70f449dd75 100644 --- a/target/linux/layerscape/patches-5.4/805-display-0041-drm-fourcc-add-a-10bits-fully-packed-variant-of-NV12.patch +++ b/target/linux/layerscape/patches-5.4/805-display-0041-drm-fourcc-add-a-10bits-fully-packed-variant-of-NV12.patch @@ -16,7 +16,7 @@ Signed-off-by: Laurentiu Palcu --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c -@@ -261,6 +261,9 @@ const struct drm_format_info *__drm_form +@@ -265,6 +265,9 @@ const struct drm_format_info *__drm_form { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .char_per_block = { 2, 4, 0 }, .block_w = { 1, 0, 0 }, .block_h = { 1, 0, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true}, diff --git a/target/linux/layerscape/patches-5.4/817-spi-0006-LF-20-2-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch b/target/linux/layerscape/patches-5.4/817-spi-0006-LF-20-2-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch index 8488bbaf50..8157d82493 100644 --- a/target/linux/layerscape/patches-5.4/817-spi-0006-LF-20-2-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch +++ b/target/linux/layerscape/patches-5.4/817-spi-0006-LF-20-2-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch @@ -11,7 +11,7 @@ Signed-off-by: Kuldeep Singh --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2420,7 +2420,7 @@ static const struct flash_info spi_nor_i +@@ -2422,7 +2422,7 @@ static const struct flash_info spi_nor_i { "s25fl512s", INFO6(0x010220, 0x4d0080, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | USE_CLSR) }, diff --git a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch index 120a14c3be..9050a4df75 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch @@ -27,7 +27,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -2394,6 +2396,54 @@ static struct uart_driver lpuart_reg = { +@@ -2420,6 +2422,54 @@ static struct uart_driver lpuart_reg = { .cons = LPUART_CONSOLE, }; @@ -82,7 +82,7 @@ Signed-off-by: Fugang Duan static int lpuart_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(lpuart_dt_ids, -@@ -2431,6 +2481,10 @@ static int lpuart_probe(struct platform_ +@@ -2457,6 +2507,10 @@ static int lpuart_probe(struct platform_ sport->port.rs485_config = lpuart_config_rs485; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch index 7d6efc38c5..9427ed667c 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch @@ -20,7 +20,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -1552,8 +1553,17 @@ static void lpuart32_configure(struct lp +@@ -1572,8 +1573,17 @@ static void lpuart32_configure(struct lp static int lpuart32_startup(struct uart_port *port) { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch index 82438c8591..23c99d19cf 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch @@ -351,7 +351,7 @@ Signed-off-by: Fugang Duan } static void lpuart_dma_rx_free(struct uart_port *port) -@@ -1413,8 +1525,10 @@ static void lpuart_setup_watermark(struc +@@ -1433,8 +1545,10 @@ static void lpuart_setup_watermark(struc writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO); } @@ -363,7 +363,7 @@ Signed-off-by: Fugang Duan /* Restore cr2 */ writeb(cr2_saved, sport->port.membase + UARTCR2); -@@ -1435,6 +1549,7 @@ static void lpuart32_setup_watermark(str +@@ -1455,6 +1569,7 @@ static void lpuart32_setup_watermark(str { unsigned long val, ctrl; unsigned long ctrl_saved; @@ -371,7 +371,7 @@ Signed-off-by: Fugang Duan ctrl = lpuart32_read(&sport->port, UARTCTRL); ctrl_saved = ctrl; -@@ -1446,12 +1561,26 @@ static void lpuart32_setup_watermark(str +@@ -1466,12 +1581,26 @@ static void lpuart32_setup_watermark(str val = lpuart32_read(&sport->port, UARTFIFO); val |= UARTFIFO_TXFE | UARTFIFO_RXFE; val |= UARTFIFO_TXFLUSH | UARTFIFO_RXFLUSH; @@ -399,7 +399,7 @@ Signed-off-by: Fugang Duan /* Restore cr2 */ lpuart32_write(&sport->port, ctrl_saved, UARTCTRL); } -@@ -1463,17 +1592,29 @@ static void lpuart32_setup_watermark_ena +@@ -1483,17 +1612,29 @@ static void lpuart32_setup_watermark_ena lpuart32_setup_watermark(sport); temp = lpuart32_read(&sport->port, UARTCTRL); @@ -430,7 +430,7 @@ Signed-off-by: Fugang Duan static void lpuart_tx_dma_startup(struct lpuart_port *sport) { u32 uartbaud; -@@ -1537,19 +1678,23 @@ static int lpuart_startup(struct uart_po +@@ -1557,19 +1698,23 @@ static int lpuart_startup(struct uart_po return 0; } @@ -461,7 +461,7 @@ Signed-off-by: Fugang Duan if (!sport->lpuart_dma_tx_use) temp |= UARTCTRL_TIE; lpuart32_write(&sport->port, temp, UARTCTRL); -@@ -1593,12 +1738,12 @@ static int lpuart32_startup(struct uart_ +@@ -1613,12 +1758,12 @@ static int lpuart32_startup(struct uart_ spin_lock_irqsave(&sport->port.lock, flags); @@ -476,7 +476,7 @@ Signed-off-by: Fugang Duan lpuart32_configure(sport); spin_unlock_irqrestore(&sport->port.lock, flags); -@@ -1608,7 +1753,7 @@ static int lpuart32_startup(struct uart_ +@@ -1628,7 +1773,7 @@ static int lpuart32_startup(struct uart_ static void lpuart_dma_shutdown(struct lpuart_port *sport) { if (sport->lpuart_dma_rx_use) { @@ -485,7 +485,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); sport->lpuart_dma_rx_use = false; } -@@ -1651,11 +1796,22 @@ static void lpuart32_shutdown(struct uar +@@ -1671,11 +1816,22 @@ static void lpuart32_shutdown(struct uar spin_lock_irqsave(&port->lock, flags); @@ -510,7 +510,7 @@ Signed-off-by: Fugang Duan spin_unlock_irqrestore(&port->lock, flags); -@@ -1752,10 +1908,10 @@ lpuart_set_termios(struct uart_port *por +@@ -1772,10 +1928,10 @@ lpuart_set_termios(struct uart_port *por * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -523,7 +523,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); } -@@ -1967,10 +2123,10 @@ lpuart32_set_termios(struct uart_port *p +@@ -1987,10 +2143,10 @@ lpuart32_set_termios(struct uart_port *p * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -536,7 +536,7 @@ Signed-off-by: Fugang Duan lpuart_dma_rx_free(&sport->port); } -@@ -2483,6 +2639,10 @@ static int lpuart_probe(struct platform_ +@@ -2509,6 +2665,10 @@ static int lpuart_probe(struct platform_ sport->port.dev = &pdev->dev; sport->port.type = PORT_LPUART; sport->devtype = sdata->devtype; @@ -547,7 +547,7 @@ Signed-off-by: Fugang Duan ret = platform_get_irq(pdev, 0); if (ret < 0) return ret; -@@ -2633,7 +2793,7 @@ static int lpuart_suspend(struct device +@@ -2659,7 +2819,7 @@ static int lpuart_suspend(struct device * Rx DMA path before suspend and start Rx DMA path on resume. */ if (irq_wake) { diff --git a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch index 73d80925c7..3849ac2225 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch @@ -105,7 +105,7 @@ Signed-off-by: Shrikant Bobade static void lpuart_stop_tx(struct uart_port *port) { unsigned char temp; -@@ -2726,6 +2768,10 @@ static int lpuart_probe(struct platform_ +@@ -2752,6 +2794,10 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_attach_port; @@ -116,7 +116,7 @@ Signed-off-by: Shrikant Bobade uart_get_rs485_mode(&pdev->dev, &sport->port.rs485); if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX) -@@ -2749,6 +2795,8 @@ static int lpuart_probe(struct platform_ +@@ -2775,6 +2821,8 @@ static int lpuart_probe(struct platform_ return 0; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch index afc5d3207b..201e792681 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch @@ -43,7 +43,7 @@ Reviewed-by: Robin Gong /* return TIOCSER_TEMT when transmitter is not busy */ static unsigned int lpuart_tx_empty(struct uart_port *port) { -@@ -2283,6 +2298,7 @@ static const struct uart_ops lpuart_pops +@@ -2309,6 +2324,7 @@ static const struct uart_ops lpuart_pops .break_ctl = lpuart_break_ctl, .startup = lpuart_startup, .shutdown = lpuart_shutdown, @@ -51,7 +51,7 @@ Reviewed-by: Robin Gong .set_termios = lpuart_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2307,6 +2323,7 @@ static const struct uart_ops lpuart32_po +@@ -2333,6 +2349,7 @@ static const struct uart_ops lpuart32_po .break_ctl = lpuart32_break_ctl, .startup = lpuart32_startup, .shutdown = lpuart32_shutdown, @@ -59,7 +59,7 @@ Reviewed-by: Robin Gong .set_termios = lpuart32_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2764,6 +2781,11 @@ static int lpuart_probe(struct platform_ +@@ -2790,6 +2807,11 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_irq_request; @@ -71,7 +71,7 @@ Reviewed-by: Robin Gong ret = uart_add_one_port(&lpuart_reg, &sport->port); if (ret) goto failed_attach_port; -@@ -2798,6 +2820,9 @@ static int lpuart_probe(struct platform_ +@@ -2824,6 +2846,9 @@ static int lpuart_probe(struct platform_ failed_reset: uart_remove_one_port(&lpuart_reg, &sport->port); failed_attach_port: @@ -81,7 +81,7 @@ Reviewed-by: Robin Gong failed_irq_request: lpuart_disable_clks(sport); return ret; -@@ -2817,15 +2842,41 @@ static int lpuart_remove(struct platform +@@ -2843,15 +2868,41 @@ static int lpuart_remove(struct platform if (sport->dma_rx_chan) dma_release_channel(sport->dma_rx_chan); @@ -123,7 +123,7 @@ Reviewed-by: Robin Gong if (lpuart_is_32(sport)) { /* disable Rx/Tx and interrupts */ -@@ -2839,10 +2890,14 @@ static int lpuart_suspend(struct device +@@ -2865,10 +2916,14 @@ static int lpuart_suspend(struct device writeb(temp, sport->port.membase + UARTCR2); } @@ -138,7 +138,7 @@ Reviewed-by: Robin Gong if (sport->lpuart_dma_rx_use) { /* -@@ -2873,9 +2928,6 @@ static int lpuart_suspend(struct device +@@ -2899,9 +2954,6 @@ static int lpuart_suspend(struct device dmaengine_terminate_all(sport->dma_tx_chan); } @@ -148,7 +148,7 @@ Reviewed-by: Robin Gong return 0; } -@@ -2883,9 +2935,11 @@ static int lpuart_resume(struct device * +@@ -2909,9 +2961,11 @@ static int lpuart_resume(struct device * { struct lpuart_port *sport = dev_get_drvdata(dev); bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); @@ -162,7 +162,7 @@ Reviewed-by: Robin Gong if (lpuart_is_32(sport)) lpuart32_setup_watermark_enable(sport); -@@ -2906,13 +2960,23 @@ static int lpuart_resume(struct device * +@@ -2932,13 +2986,23 @@ static int lpuart_resume(struct device * if (lpuart_is_32(sport)) lpuart32_configure(sport); @@ -188,7 +188,7 @@ Reviewed-by: Robin Gong static struct platform_driver lpuart_driver = { .probe = lpuart_probe, -@@ -2920,7 +2984,7 @@ static struct platform_driver lpuart_dri +@@ -2946,7 +3010,7 @@ static struct platform_driver lpuart_dri .driver = { .name = "fsl-lpuart", .of_match_table = lpuart_dt_ids, diff --git a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch index 5a9304ce13..be1a5675a6 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan #include #include #include -@@ -1719,10 +1720,23 @@ static void lpuart_rx_dma_startup(struct +@@ -1739,10 +1740,23 @@ static void lpuart_rx_dma_startup(struct } } @@ -53,7 +53,7 @@ Signed-off-by: Fugang Duan unsigned char temp; /* determine FIFO size and enable FIFO mode */ -@@ -1735,14 +1749,7 @@ static int lpuart_startup(struct uart_po +@@ -1755,14 +1769,7 @@ static int lpuart_startup(struct uart_po sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) & UARTPFIFO_FIFOSIZE_MASK); @@ -69,7 +69,7 @@ Signed-off-by: Fugang Duan return 0; } -@@ -1769,11 +1776,27 @@ static void lpuart32_configure(struct lp +@@ -1789,11 +1796,27 @@ static void lpuart32_configure(struct lp lpuart32_write(&sport->port, temp, UARTCTRL); } @@ -98,7 +98,7 @@ Signed-off-by: Fugang Duan unsigned long temp; int ret; -@@ -1805,17 +1828,8 @@ static int lpuart32_startup(struct uart_ +@@ -1825,17 +1848,8 @@ static int lpuart32_startup(struct uart_ sport->port.fifosize = sport->txfifo_size; } @@ -108,16 +108,16 @@ Signed-off-by: Fugang Duan - - lpuart_rx_dma_startup(sport); - lpuart_tx_dma_startup(sport); -- -- lpuart32_setup_watermark_enable(sport); -- lpuart32_configure(sport); + lpuart32_hw_setup(sport); +- lpuart32_setup_watermark_enable(sport); +- lpuart32_configure(sport); +- - spin_unlock_irqrestore(&sport->port.lock, flags); return 0; } -@@ -2867,108 +2881,205 @@ static int lpuart_runtime_resume(struct +@@ -2893,108 +2907,205 @@ static int lpuart_runtime_resume(struct return lpuart_enable_clks(sport); }; @@ -197,8 +197,7 @@ Signed-off-by: Fugang Duan - } + return false; +} - -- /* Disable Rx DMA to use UART port as wakeup source */ ++ +static int lpuart_suspend_noirq(struct device *dev) +{ + struct lpuart_port *sport = dev_get_drvdata(dev); @@ -208,7 +207,8 @@ Signed-off-by: Fugang Duan + serial_lpuart_enable_wakeup(sport, !!irq_wake); + + pinctrl_pm_select_sleep_state(dev); -+ + +- /* Disable Rx DMA to use UART port as wakeup source */ + return 0; +} + @@ -302,7 +302,7 @@ Signed-off-by: Fugang Duan + ~UARTCR5_RDMAS, sport->port.membase + UARTCR5); + } + spin_unlock_irqrestore(&sport->port.lock, flags); -+ } + } + + if (sport->lpuart_dma_tx_use) { + spin_lock_irqsave(&sport->port.lock, flags); @@ -318,7 +318,7 @@ Signed-off-by: Fugang Duan + spin_unlock_irqrestore(&sport->port.lock, flags); + sport->dma_tx_in_progress = false; + dmaengine_terminate_all(sport->dma_tx_chan); - } ++ } + } else if (pm_runtime_active(sport->port.dev)) { + lpuart_disable_clks(sport); + pm_runtime_disable(sport->port.dev); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch index 76a397a4a2..b32f946b01 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch @@ -14,7 +14,7 @@ Signed-off-by: Fugang Duan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2134,11 +2134,12 @@ lpuart32_set_termios(struct uart_port *p +@@ -2154,11 +2154,12 @@ lpuart32_set_termios(struct uart_port *p { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); unsigned long flags; @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan modem = lpuart32_read(&sport->port, UARTMODIR); /* * only support CS8 and CS7, and for CS7 must enable PE. -@@ -2175,7 +2176,9 @@ lpuart32_set_termios(struct uart_port *p +@@ -2195,7 +2196,9 @@ lpuart32_set_termios(struct uart_port *p } if (termios->c_cflag & CSTOPB) @@ -39,7 +39,7 @@ Signed-off-by: Fugang Duan /* parity must be enabled when CS7 to match 8-bits format */ if ((termios->c_cflag & CSIZE) == CS7) -@@ -2246,6 +2249,7 @@ lpuart32_set_termios(struct uart_port *p +@@ -2272,6 +2275,7 @@ lpuart32_set_termios(struct uart_port *p lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE), UARTCTRL); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch index 522d7023ca..cac8eb8d7f 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch @@ -24,7 +24,7 @@ Signed-off-by: Peng Fan --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2617,7 +2617,9 @@ static int __init lpuart32_early_console +@@ -2643,7 +2643,9 @@ static int __init lpuart32_early_console if (!device->port.membase) return -ENODEV; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index 088efc6128..ccb90f4973 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -16,7 +16,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -1270,6 +1270,17 @@ static void dwc3_get_properties(struct d +@@ -1275,6 +1275,17 @@ static void dwc3_get_properties(struct d dwc->maximum_speed = usb_get_maximum_speed(dev); dwc->dr_mode = usb_get_dr_mode(dev); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch b/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch index be6b077e0b..487b0a4283 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch @@ -32,7 +32,7 @@ Reviewed-by: Peter Chen --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -1365,6 +1365,9 @@ static void dwc3_get_properties(struct d +@@ -1370,6 +1370,9 @@ static void dwc3_get_properties(struct d dwc->dis_split_quirk = device_property_read_bool(dev, "snps,dis-split-quirk"); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch b/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch index 194c6cdcfa..dda8e2b1eb 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0010-MLK-22675-usb-dwc3-host-disable-park-mode.patch @@ -54,7 +54,7 @@ Signed-off-by: Li Jun --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -1040,6 +1040,21 @@ static int dwc3_core_init(struct dwc3 *d +@@ -1045,6 +1045,21 @@ static int dwc3_core_init(struct dwc3 *d reg |= DWC3_GUCTL_HSTINAUTORETRY; dwc3_writel(dwc->regs, DWC3_GUCTL, reg); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch index f0fec7d2c4..6429d816ac 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch @@ -98,7 +98,7 @@ Reviewed-by: Jun Li /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -980,6 +1028,10 @@ static int dwc3_core_init(struct dwc3 *d +@@ -985,6 +1033,10 @@ static int dwc3_core_init(struct dwc3 *d dwc3_set_incr_burst_type(dwc); @@ -109,7 +109,7 @@ Reviewed-by: Jun Li usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1933,12 +1985,9 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1938,12 +1990,9 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index 53254dca60..5730adcd64 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 -@@ -3638,6 +3638,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3641,6 +3641,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 -@@ -5415,6 +5415,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5430,6 +5430,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 -@@ -2157,6 +2157,16 @@ int xhci_find_raw_port_number(struct usb +@@ -2162,6 +2162,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 396bf2b70a..7ca50bfb32 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 @@ -32,7 +32,7 @@ Signed-off-by: Peter Chen ret = xhci_handshake(&xhci->op_regs->command, CMD_RESET, 0, timeout_us); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1880,6 +1880,7 @@ struct xhci_hcd { +@@ -1881,6 +1881,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch index effe5997cd..ca80829220 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch @@ -22,7 +22,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -2103,12 +2103,9 @@ static int process_ctrl_td(struct xhci_h +@@ -2106,12 +2106,9 @@ static int process_ctrl_td(struct xhci_h switch (trb_comp_code) { case COMP_SUCCESS: 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 4389780504..7d82cd64ee 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,10 +24,10 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5436,6 +5436,8 @@ void xhci_init_driver(struct hc_driver * - drv->check_bandwidth = over->check_bandwidth; - if (over->reset_bandwidth) +@@ -5453,6 +5453,8 @@ void xhci_init_driver(struct hc_driver * drv->reset_bandwidth = over->reset_bandwidth; + if (over->update_hub_device) + drv->update_hub_device = over->update_hub_device; + if (over->bus_suspend) + drv->bus_suspend = over->bus_suspend; } @@ -35,10 +35,10 @@ Signed-off-by: Peter Chen EXPORT_SYMBOL_GPL(xhci_init_driver); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1923,6 +1923,7 @@ struct xhci_driver_overrides { - int (*start)(struct usb_hcd *hcd); - int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); +@@ -1926,6 +1926,7 @@ struct xhci_driver_overrides { void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); + int (*update_hub_device)(struct usb_hcd *hcd, struct usb_device *hdev, + struct usb_tt *tt, gfp_t mem_flags); + int (*bus_suspend)(struct usb_hcd *hcd); }; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch index 16e4e7e68c..44b2d3343b 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch @@ -20,7 +20,7 @@ Signed-off-by: Li Jun --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4780,7 +4780,8 @@ hub_port_init(struct usb_hub *hub, struc +@@ -4782,7 +4782,8 @@ hub_port_init(struct usb_hub *hub, struc } if (r) { if (r != -ENODEV) diff --git a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch index 8510d2af23..f486134c7c 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch @@ -70,7 +70,7 @@ Signed-off-by: Ran Wang /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -1028,10 +980,6 @@ static int dwc3_core_init(struct dwc3 *d +@@ -1033,10 +985,6 @@ static int dwc3_core_init(struct dwc3 *d dwc3_set_incr_burst_type(dwc); @@ -81,7 +81,7 @@ Signed-off-by: Ran Wang usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1985,9 +1933,12 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1990,9 +1938,12 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { diff --git a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch index 65a0ded842..5697ceedbc 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch @@ -97,7 +97,7 @@ Reviewed-by: Jun Li /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -980,6 +1027,10 @@ static int dwc3_core_init(struct dwc3 *d +@@ -985,6 +1032,10 @@ static int dwc3_core_init(struct dwc3 *d dwc3_set_incr_burst_type(dwc); @@ -108,7 +108,7 @@ Reviewed-by: Jun Li usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -1933,12 +1984,16 @@ static const struct dev_pm_ops dwc3_dev_ +@@ -1938,12 +1989,16 @@ static const struct dev_pm_ops dwc3_dev_ #ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { diff --git a/target/linux/mediatek/mt7622/target.mk b/target/linux/mediatek/mt7622/target.mk index c19bec8bb4..f7598efd56 100644 --- a/target/linux/mediatek/mt7622/target.mk +++ b/target/linux/mediatek/mt7622/target.mk @@ -2,7 +2,7 @@ ARCH:=aarch64 SUBTARGET:=mt7622 BOARDNAME:=MT7622 CPU_TYPE:=cortex-a53 -DEFAULT_PACKAGES += kmod-mt7615e kmod-mt7615-firmware wpad-basic-openssl +DEFAULT_PACKAGES += kmod-mt7615e kmod-mt7615-firmware wpad-openssl KERNELNAME:=Image dtbs define Target/Description diff --git a/target/linux/mediatek/patches-5.4/0308-dts-mt7622-add-snand-support.patch b/target/linux/mediatek/patches-5.4/0308-dts-mt7622-add-snand-support.patch index b287780d6c..9f37e3d82b 100644 --- a/target/linux/mediatek/patches-5.4/0308-dts-mt7622-add-snand-support.patch +++ b/target/linux/mediatek/patches-5.4/0308-dts-mt7622-add-snand-support.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -554,6 +554,19 @@ +@@ -555,6 +555,19 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch b/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch index 84aed89752..f6e437b80d 100644 --- a/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch +++ b/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -716,6 +716,17 @@ +@@ -717,6 +717,17 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch b/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch index 3c5558b606..4fe0e0f5a0 100644 --- a/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch +++ b/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch @@ -281,7 +281,7 @@ Signed-off-by: chuanjia.liu &pio { --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -794,45 +794,41 @@ +@@ -795,45 +795,41 @@ #reset-cells = <1>; }; @@ -344,7 +344,7 @@ Signed-off-by: chuanjia.liu interrupt-map-mask = <0 0 0 7>; interrupt-map = <0 0 0 1 &pcie_intc0 0>, <0 0 0 2 &pcie_intc0 1>, -@@ -844,15 +840,39 @@ +@@ -845,15 +841,39 @@ #interrupt-cells = <1>; }; }; diff --git a/target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch b/target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch index 5beed1e42d..f65a0c76b7 100644 --- a/target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch +++ b/target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch @@ -13,7 +13,7 @@ Ref: https://patchwork.ozlabs.org/project/linux-mtd/patch/20210213151047.11700-1 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2553,6 +2553,9 @@ static const struct flash_info spi_nor_i +@@ -2555,6 +2555,9 @@ static const struct flash_info spi_nor_i .fixups = &w25q256_fixups }, { "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts index 3ca132d0c0..5d08cc7e8d 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts @@ -234,3 +234,16 @@ }; }; /include/ "fsl/p1020si-post.dtsi" + +/* + * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses + * aliases to determine PCI domain numbers, drop aliases so as not to + * change the sysfs path of our wireless netdevs. + */ + +/ { + aliases { + /delete-property/ pci0; + /delete-property/ pci1; + }; +}; diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts index f0fafa1b57..7e988f128c 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts @@ -262,3 +262,17 @@ }; }; /include/ "fsl/p1020si-post.dtsi" + +/* + * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses + * aliases to determine PCI domain numbers, drop aliases so as not to + * change the sysfs path of our wireless netdevs. + */ + +/ { + aliases { + /delete-property/ pci0; + /delete-property/ pci1; + }; +}; + diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts index 40b8014a53..3b78a21920 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts @@ -212,3 +212,17 @@ }; /include/ "fsl/p1010si-post.dtsi" + +/* + * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses + * aliases to determine PCI domain numbers, drop aliases so as not to + * change the sysfs path of our wireless netdevs. + */ + +/ { + aliases { + /delete-property/ pci0; + /delete-property/ pci1; + }; +}; + diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index 29b49a9357..d79a034e9d 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -290,3 +290,16 @@ /delete-node/ crypto@30000; /* Pulled in by p1010si-post */ }; }; + +/* + * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses + * aliases to determine PCI domain numbers, drop aliases so as not to + * change the sysfs path of our wireless netdevs. + */ + +/ { + aliases { + /delete-property/ pci0; + /delete-property/ pci1; + }; +}; diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts index ebaac417eb..5b464869c4 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts @@ -170,3 +170,16 @@ }; /include/ "fsl/p1020si-post.dtsi" + +/* + * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses + * aliases to determine PCI domain numbers, drop aliases so as not to + * change the sysfs path of our wireless netdevs. + */ + +/ { + aliases { + /delete-property/ pci0; + /delete-property/ pci1; + }; +}; diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index ae365ff4a4..aca63353fe 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -40,7 +40,7 @@ define Device/cznic_turris-omnia KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb DEVICE_PACKAGES := \ mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \ - wpad-basic-openssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \ + wpad-openssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \ partx-utils kmod-i2c-mux-pca954x IMAGES := $$(IMAGE_PREFIX)-sysupgrade.img.gz omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata @@ -77,7 +77,7 @@ TARGET_DEVICES += kobol_helios4 define Device/linksys $(Device/NAND-128K) DEVICE_VENDOR := Linksys - DEVICE_PACKAGES := kmod-mwlwifi wpad-basic-openssl + DEVICE_PACKAGES := kmod-mwlwifi wpad-openssl IMAGES += factory.img IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ append-ubi | pad-to $$$$(PAGESIZE) diff --git a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch index e12122bcaa..a44191c066 100644 --- a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch +++ b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch @@ -37,7 +37,7 @@ Signed-off-by: Gregory CLEMENT reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts -@@ -134,7 +134,6 @@ +@@ -137,7 +137,6 @@ status = "okay"; max-link-speed = <2>; reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; diff --git a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch index bd627f1861..f421a1024d 100644 --- a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch +++ b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch @@ -24,7 +24,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts -@@ -132,7 +132,6 @@ +@@ -135,7 +135,6 @@ pinctrl-names = "default"; pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; status = "okay"; diff --git a/target/linux/mvebu/patches-5.4/029-ARM-dts-turris-omnia-enable-HW-buffer-management.patch b/target/linux/mvebu/patches-5.4/029-ARM-dts-turris-omnia-enable-HW-buffer-management.patch index 7a4b511998..4ff0fe1e4c 100644 --- a/target/linux/mvebu/patches-5.4/029-ARM-dts-turris-omnia-enable-HW-buffer-management.patch +++ b/target/linux/mvebu/patches-5.4/029-ARM-dts-turris-omnia-enable-HW-buffer-management.patch @@ -28,7 +28,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -84,12 +84,23 @@ +@@ -90,12 +90,23 @@ }; }; @@ -52,7 +52,7 @@ Signed-off-by: Gregory CLEMENT fixed-link { speed = <1000>; -@@ -103,6 +114,9 @@ +@@ -109,6 +120,9 @@ pinctrl-0 = <&ge1_rgmii_pins>; status = "okay"; phy-mode = "rgmii"; @@ -62,7 +62,7 @@ Signed-off-by: Gregory CLEMENT fixed-link { speed = <1000>; -@@ -115,6 +129,9 @@ +@@ -121,6 +135,9 @@ status = "okay"; phy-mode = "sgmii"; phy = <&phy1>; diff --git a/target/linux/mvebu/patches-5.4/030-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch b/target/linux/mvebu/patches-5.4/030-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch index 99ed07e13b..3c7ec2411b 100644 --- a/target/linux/mvebu/patches-5.4/030-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch +++ b/target/linux/mvebu/patches-5.4/030-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch @@ -27,7 +27,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -129,6 +129,7 @@ +@@ -135,6 +135,7 @@ status = "okay"; phy-mode = "sgmii"; phy = <&phy1>; diff --git a/target/linux/mvebu/patches-5.4/031-ARM-dts-turris-omnia-describe-switch-interrupt.patch b/target/linux/mvebu/patches-5.4/031-ARM-dts-turris-omnia-describe-switch-interrupt.patch index 4bbd80aac4..e4ecbef193 100644 --- a/target/linux/mvebu/patches-5.4/031-ARM-dts-turris-omnia-describe-switch-interrupt.patch +++ b/target/linux/mvebu/patches-5.4/031-ARM-dts-turris-omnia-describe-switch-interrupt.patch @@ -27,7 +27,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -261,13 +261,18 @@ +@@ -267,13 +267,18 @@ /* Switch MV88E6176 at address 0x10 */ switch@10 { @@ -47,7 +47,7 @@ Signed-off-by: Gregory CLEMENT ports { #address-cells = <1>; #size-cells = <0>; -@@ -320,6 +325,11 @@ +@@ -336,6 +341,11 @@ marvell,function = "gpio"; }; diff --git a/target/linux/mvebu/patches-5.4/032-ARM-dts-turris-omnia-add-SFP-node.patch b/target/linux/mvebu/patches-5.4/032-ARM-dts-turris-omnia-add-SFP-node.patch index 2447a4e240..db8d26d038 100644 --- a/target/linux/mvebu/patches-5.4/032-ARM-dts-turris-omnia-add-SFP-node.patch +++ b/target/linux/mvebu/patches-5.4/032-ARM-dts-turris-omnia-add-SFP-node.patch @@ -33,7 +33,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -82,6 +82,24 @@ +@@ -88,6 +88,24 @@ }; }; }; @@ -58,7 +58,7 @@ Signed-off-by: Gregory CLEMENT }; &bm { -@@ -126,10 +144,20 @@ +@@ -132,10 +150,20 @@ /* WAN port */ ð2 { @@ -79,7 +79,7 @@ Signed-off-by: Gregory CLEMENT buffer-manager = <&bm>; bm,pool-long = <2>; bm,pool-short = <3>; -@@ -195,7 +223,7 @@ +@@ -201,7 +229,7 @@ /* routed to PCIe2 connector (CN62A) */ }; diff --git a/target/linux/mvebu/patches-5.4/033-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch b/target/linux/mvebu/patches-5.4/033-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch index 5ceef5dc46..408587c42a 100644 --- a/target/linux/mvebu/patches-5.4/033-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch +++ b/target/linux/mvebu/patches-5.4/033-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch @@ -29,7 +29,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -155,7 +155,7 @@ +@@ -161,7 +161,7 @@ */ status = "okay"; phy-mode = "sgmii"; @@ -38,7 +38,7 @@ Signed-off-by: Gregory CLEMENT phys = <&comphy5 2>; sfp = <&sfp>; buffer-manager = <&bm>; -@@ -278,9 +278,9 @@ +@@ -284,9 +284,9 @@ pinctrl-0 = <&mdio_pins>; status = "okay"; diff --git a/target/linux/mvebu/patches-5.4/034-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch b/target/linux/mvebu/patches-5.4/034-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch index 4283a61341..cc5a747ce7 100644 --- a/target/linux/mvebu/patches-5.4/034-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch +++ b/target/linux/mvebu/patches-5.4/034-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch @@ -21,7 +21,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -31,7 +31,8 @@ +@@ -37,7 +37,8 @@ ranges = #include #include #include -@@ -5796,3 +5797,34 @@ static void nvidia_ion_ahci_fixup(struct +@@ -5819,3 +5820,34 @@ static void nvidia_ion_ahci_fixup(struct pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING; } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup); diff --git a/target/linux/pistachio/patches-5.4/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-5.4/401-mtd-nor-support-mtd-name-from-device-tree.patch index 7d216477db..47774edc6a 100644 --- a/target/linux/pistachio/patches-5.4/401-mtd-nor-support-mtd-name-from-device-tree.patch +++ b/target/linux/pistachio/patches-5.4/401-mtd-nor-support-mtd-name-from-device-tree.patch @@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -4939,6 +4939,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -4941,6 +4941,7 @@ int spi_nor_scan(struct spi_nor *nor, co struct mtd_info *mtd = &nor->mtd; struct device_node *np = spi_nor_get_flash_node(nor); struct spi_nor_flash_parameter *params = &nor->params; @@ -18,7 +18,7 @@ Signed-off-by: Abhimanyu Vishwakarma int ret; int i; -@@ -5001,7 +5002,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -5003,7 +5004,12 @@ int spi_nor_scan(struct spi_nor *nor, co /* Init flash parameters based on flash_info struct and SFDP */ spi_nor_init_params(nor); @@ -34,7 +34,7 @@ Signed-off-by: Abhimanyu Vishwakarma mtd->type = MTD_NORFLASH; --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -834,6 +834,17 @@ out_error: +@@ -836,6 +836,17 @@ out_error: */ static void mtd_set_dev_defaults(struct mtd_info *mtd) { diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 41c790d3ed..b658532958 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -33,6 +33,21 @@ compatible = "mti,cpu-interrupt-controller"; }; + reserved-memory { + #address-cells = <0x1>; + #size-cells = <0x1>; + ranges; + + ramoops@3f00000 { + compatible = "ramoops"; + reg = <0x3f00000 0x80000>; + + record-size = <0x10000>; + console-size = <0x10000>; + ftrace-size = <0x20000>; + }; + }; + aliases { serial0 = &uartlite; }; diff --git a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi index a02d16ba6e..21cfeb2ec1 100644 --- a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi +++ b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi @@ -16,6 +16,7 @@ chosen { bootargs = "console=ttyS0,115200"; + bootargs-override = "console=ttyS0,115200"; }; keys { @@ -117,6 +118,7 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0>; + mediatek,disable-radar-background; }; }; @@ -124,6 +126,13 @@ status = "disabled"; }; +&state_default { + gpio { + groups = "jtag"; + function = "gpio"; + }; +}; + &switch0 { ports { port@1 { diff --git a/target/linux/ramips/dts/mt7621_jcg_q20-lzma-loader.dts b/target/linux/ramips/dts/mt7621_jcg_q20-lzma-loader.dts new file mode 100644 index 0000000000..4628ffdc5c --- /dev/null +++ b/target/linux/ramips/dts/mt7621_jcg_q20-lzma-loader.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_jcg_q20.dts" + +/ { + compatible = "jcg,q20-lzma-loader", "mediatek,mt7621-soc"; + model = "JCG Q20 (lzma-loader)"; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts b/target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts new file mode 100644 index 0000000000..f31325cda9 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_jcg_q20.dtsi" + +/ { + compatible = "jcg,q20-pb-boot", "mediatek,mt7621-soc"; + model = "JCG Q20 (pb-boot)"; +}; + +&nand { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + }; + + partition@80000 { + label = "Nvram"; + reg = <0x80000 0x40000>; + read-only; + }; + + partition@c0000 { + label = "Bdata"; + reg = <0xc0000 0x40000>; + read-only; + }; + + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label = "crash"; + reg = <0x180000 0x40000>; + read-only; + }; + + partition@1c0000 { + label = "crash_log"; + reg = <0x1c0000 0x40000>; + read-only; + }; + + partition@200000 { + label = "kernel"; + reg = <0x200000 0x400000>; + }; + + partition@600000 { + label = "ubi"; + reg = <0x600000 0x7980000>; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index f0e829393c..3183208a85 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -1,56 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "mt7621.dtsi" - -#include -#include +#include "mt7621_jcg_q20.dtsi" / { compatible = "jcg,q20", "mediatek,mt7621-soc"; model = "JCG Q20"; - aliases { - led-boot = &led_status_red; - led-failsafe = &led_status_red; - led-running = &led_status_blue; - led-upgrade = &led_status_blue; - label-mac-device = &gmac0; - }; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - leds { - compatible = "gpio-leds"; - - led_status_red: status_red { - label = "red:status"; - gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; - }; - - led_status_blue: status_blue { - label = "blue:status"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - ubi-concat { compatible = "mtd-concat"; devices = <&ubiconcat0 &ubiconcat1>; @@ -69,8 +24,6 @@ }; &nand { - status = "okay"; - partitions { compatible = "fixed-partitions"; #address-cells = <1>; @@ -130,46 +83,3 @@ */ }; }; - -&pcie { - status = "okay"; -}; - -&pcie1 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0>; - }; -}; - -&gmac0 { - mtd-mac-address = <&factory 0x3fff4>; -}; - -&switch0 { - ports { - port@0 { - status = "okay"; - label = "wan"; - mtd-mac-address = <&factory 0x3fffa>; - }; - - port@1 { - status = "okay"; - label = "lan1"; - }; - - port@4 { - status = "okay"; - label = "lan2"; - }; - }; -}; - -&state_default { - gpio { - groups = "jtag", "wdt"; - function = "gpio"; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dtsi b/target/linux/ramips/dts/mt7621_jcg_q20.dtsi new file mode 100644 index 0000000000..1d0ee4d4eb --- /dev/null +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dtsi @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_blue; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: status_red { + label = "red:status"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + led_status_blue: status_blue { + label = "blue:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&nand { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + mediatek,disable-radar-background; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0x3fff4>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x3fffa>; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@4 { + status = "okay"; + label = "lan2"; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_r6900-v2.dts b/target/linux/ramips/dts/mt7621_netgear_r6900-v2.dts new file mode 100644 index 0000000000..070e59b36a --- /dev/null +++ b/target/linux/ramips/dts/mt7621_netgear_r6900-v2.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "mt7621_netgear_sercomm_bzv.dtsi" + +/ { + compatible = "netgear,r6900-v2", "mediatek,mt7621-soc"; + model = "Netgear R6900 v2"; +}; + +&leds { + guest_wifi { + gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>; + label = "white:guest_wifi"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_r7200.dts b/target/linux/ramips/dts/mt7621_netgear_r7200.dts new file mode 100644 index 0000000000..0ff80830f7 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_netgear_r7200.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "mt7621_netgear_sercomm_bzv.dtsi" + +/ { + compatible = "netgear,r7200", "mediatek,mt7621-soc"; + model = "Netgear R7200"; +}; + +&leds { + guest_wifi { + gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>; + label = "white:guest_wifi"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts new file mode 100644 index 0000000000..30fa8d6417 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "raisecom,msg1500-x-00", "mediatek,mt7621-soc"; + model = "RAISECOM MSG1500 X.00"; + + aliases { + led-boot = &led_usb; + led-failsafe = &led_usb; + led-upgrade = &led_usb; + }; + + leds { + compatible = "gpio-leds"; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0radio"; + }; + + wlan5g { + label = "blue:wlan5g"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1radio"; + }; + + led_usb: usb { + label = "blue:usb"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + trigger-sources = <&ehci_port2>; + linux,default-trigger = "usbport"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "Config"; + reg = <0x80000 0x80000>; + read-only; + }; + + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x40000>; + read-only; + }; + + partition@140000 { + label = "kernel"; + reg = <0x140000 0x400000>; + }; + + partition@540000 { + label = "ubi"; + reg = <0x540000 0x7a40000>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + /* 5 GHz (phy1) does not take the address from calibration data, + but setting it manually here works */ + mtd-mac-address = <&factory 0x4>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan4"; + }; + + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan1"; + }; + + port@4 { + status = "okay"; + label = "wan"; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "jtag", "uart3", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts index b05d83978d..78ab2bc6ce 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -94,6 +94,7 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,disable-radar-background; }; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts index d374fd3dde..b3a97ca97e 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts @@ -81,4 +81,5 @@ mediatek,mtd-eeprom = <&factory 0x20000>; mtd-mac-address = <&eeprom 0x6>; ieee80211-freq-limit = <5000000 6000000>; + mediatek,disable-radar-background; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi index cc5abf09b6..0ab8ed8476 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi @@ -1,23 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "mt7621.dtsi" - -#include -#include +#include "mt7621_xiaomi_mi-router-4a-common.dtsi" / { aliases { - led-boot = &led_status_yellow; - led-failsafe = &led_status_yellow; - led-running = &led_status_blue; - led-upgrade = &led_status_yellow; label-mac-device = &wan; }; - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - leds { compatible = "gpio-leds"; @@ -31,107 +20,16 @@ gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; }; -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - m25p,fast-read; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "Bdata"; - reg = <0x40000 0x10000>; - read-only; - }; - - factory: partition@50000 { - label = "factory"; - reg = <0x50000 0x10000>; - read-only; - }; - - partition@60000 { - label = "crash"; - reg = <0x60000 0x10000>; - read-only; - }; - - partition@70000 { - label = "cfg_bak"; - reg = <0x70000 0x10000>; - read-only; - }; - - partition@80000 { - label = "overlay"; - reg = <0x80000 0x100000>; - read-only; - }; - - firmware: partition@180000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x180000 0xe80000>; - }; - }; - }; +&wifi0 { + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; }; -&pcie { - status = "okay"; -}; - -&pcie0 { - wifi@0,0 { - compatible = "pci14c3,7662"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - -&pcie1 { - wifi@0,0 { - compatible = "pci14c3,7603"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; - ieee80211-freq-limit = <2400000 2500000>; - }; -}; - -&gmac0 { - mtd-mac-address = <&factory 0xe000>; +&wifi1 { + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; }; &switch0 { @@ -153,10 +51,3 @@ }; }; }; - -&state_default { - gpio { - groups = "jtag", "uart2", "uart3", "wdt"; - function = "gpio"; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi new file mode 100644 index 0000000000..3d51125f1c --- /dev/null +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_status_yellow; + led-failsafe = &led_status_yellow; + led-running = &led_status_blue; + led-upgrade = &led_status_yellow; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "Bdata"; + reg = <0x40000 0x10000>; + read-only; + }; + + factory: partition@50000 { + label = "factory"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "crash"; + reg = <0x60000 0x10000>; + read-only; + }; + + partition@70000 { + label = "cfg_bak"; + reg = <0x70000 0x10000>; + read-only; + }; + + partition@80000 { + label = "overlay"; + reg = <0x80000 0x100000>; + read-only; + }; + + firmware: partition@180000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x180000 0xe80000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi0: wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + }; +}; + +&pcie1 { + wifi1: wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&state_default { + gpio { + groups = "jtag", "uart2", "uart3", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts new file mode 100644 index 0000000000..9f4e07f8df --- /dev/null +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_xiaomi_mi-router-4a-common.dtsi" + +/ { + compatible = "xiaomi,mi-router-4a-gigabit-v2", "mediatek,mt7621-soc"; + model = "Xiaomi Mi Router 4A Gigabit Edition v2"; + + aliases { + label-mac-device = &wan; + }; + + leds { + compatible = "gpio-leds"; + + led_status_blue: status_blue { + label = "blue:status"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_status_yellow: status_yellow { + label = "yellow:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + wan_blue { + label = "blue:wan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + wan_yellow { + label = "yellow:wan"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&partitions { + partition@180000 { + // size changed against to the common dtsi + reg = <0x180000 0xe70000>; + }; + + partition@ff0000 { + label = "Config"; + reg = <0xff0000 0x10000>; + read-only; + }; +}; + +&wifi0 { + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; +}; + +&wifi1 { + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; +}; + +&switch0 { + ports { + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + wan: port@3 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi index dfdbcc77d4..589b69dd08 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi @@ -136,12 +136,12 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0>; + mediatek,disable-radar-background; }; }; &gmac0 { - nvmem-cells = <&macaddr_factory_3fff4>; - nvmem-cell-names = "mac-address"; + mtd-mac-address = <&factory 0x3fff4>; }; &switch0 { @@ -164,8 +164,7 @@ port@4 { status = "okay"; label = "wan"; - nvmem-cells = <&macaddr_factory_3fffa>; - nvmem-cell-names = "mac-address"; + mtd-mac-address = <&factory 0x3fffa>; }; }; }; @@ -176,17 +175,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_3fff4: macaddr@3fff4 { - reg = <0x3fff4 0x6>; - }; - - macaddr_factory_3fffa: macaddr@3fffa { - reg = <0x3fffa 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index 9775ec3572..7217e0307a 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -102,6 +102,7 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0>; + mediatek,disable-radar-background; }; }; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 5937970a37..8c2e5b2096 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -22,7 +22,6 @@ ldrplatform-$(CONFIG_TARGET_ramips_mt7621) := mt7621 ldrflashstart-y := 0x1c000000 ldrflashstart-$(CONFIG_TARGET_ramips_mt7621) := 0x1fc00000 -KERNEL_LOADADDR := $(loadaddr-y) LOADER_PLATFORM := $(ldrplatform-y) LOADER_FLASH_START := $(ldrflashstart-y) @@ -160,6 +159,7 @@ endef define Device/Default PROFILES = Default KERNEL := $(KERNEL_DTB) | uImage lzma + KERNEL_LOADADDR := $(loadaddr-y) SOC := $(DEFAULT_SOC) DEVICE_DTS_DIR := ../dts DEVICE_DTS = $$(SOC)_$(1) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 9c85ddc3aa..26bf091a89 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -127,7 +127,7 @@ define Device/alfa-network_quad-e4g DEVICE_VENDOR := ALFA Network DEVICE_MODEL := Quad-E4G DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \ - -wpad-basic-openssl + -wpad-openssl SUPPORTED_DEVICES += quad-e4g endef TARGET_DEVICES += alfa-network_quad-e4g @@ -164,7 +164,7 @@ define Device/asiarf_ap7621-001 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-001 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-openssl endef TARGET_DEVICES += asiarf_ap7621-001 @@ -173,7 +173,7 @@ define Device/asiarf_ap7621-nv1 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-NV1 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-openssl endef TARGET_DEVICES += asiarf_ap7621-nv1 @@ -604,7 +604,7 @@ define Device/gnubee_gb-pc1 $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud One - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-openssl IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc1 @@ -614,7 +614,7 @@ define Device/gnubee_gb-pc2 $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud Two - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-openssl IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc2 @@ -811,6 +811,19 @@ define Device/jcg_q20 endef TARGET_DEVICES += jcg_q20 +define Device/jcg_q20-lzma-loader + $(Device/uimage-lzma-loader) + $(Device/jcg_q20) + DEVICE_MODEL += (lzma-loader) +endef +TARGET_DEVICES += jcg_q20-lzma-loader + +define Device/jcg_q20-pb-boot + $(Device/jcg_q20) + DEVICE_MODEL += (pb-boot) +endef +TARGET_DEVICES += jcg_q20-pb-boot + define Device/jcg_y2 $(Device/dsa-migration) $(Device/uimage-lzma-loader) @@ -929,7 +942,7 @@ define Device/mediatek_ap-mt7621a-v60 IMAGE_SIZE := 7872k DEVICE_VENDOR := Mediatek DEVICE_MODEL := AP-MT7621A-V60 EVB - DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-openssl endef TARGET_DEVICES += mediatek_ap-mt7621a-v60 @@ -939,7 +952,7 @@ define Device/mediatek_mt7621-eval-board IMAGE_SIZE := 15104k DEVICE_VENDOR := MediaTek DEVICE_MODEL := MT7621 EVB - DEVICE_PACKAGES := -wpad-basic-openssl + DEVICE_PACKAGES := -wpad-openssl SUPPORTED_DEVICES += mt7621 endef TARGET_DEVICES += mediatek_mt7621-eval-board @@ -960,7 +973,7 @@ endef define Device/mikrotik_routerboard-750gr3 $(Device/MikroTik) DEVICE_MODEL := RouterBOARD 750Gr3 - DEVICE_PACKAGES += -wpad-basic-openssl + DEVICE_PACKAGES += -wpad-openssl SUPPORTED_DEVICES += mikrotik,rb750gr3 endef TARGET_DEVICES += mikrotik_routerboard-750gr3 @@ -968,14 +981,14 @@ TARGET_DEVICES += mikrotik_routerboard-750gr3 define Device/mikrotik_routerboard-760igs $(Device/MikroTik) DEVICE_MODEL := RouterBOARD 760iGS - DEVICE_PACKAGES += kmod-sfp -wpad-basic-openssl + DEVICE_PACKAGES += kmod-sfp -wpad-openssl endef TARGET_DEVICES += mikrotik_routerboard-760igs define Device/mikrotik_routerboard-m11g $(Device/MikroTik) DEVICE_MODEL := RouterBOARD M11G - DEVICE_PACKAGES := -wpad-basic-openssl + DEVICE_PACKAGES := -wpad-openssl SUPPORTED_DEVICES += mikrotik,rbm11g endef TARGET_DEVICES += mikrotik_routerboard-m11g @@ -983,7 +996,7 @@ TARGET_DEVICES += mikrotik_routerboard-m11g define Device/mikrotik_routerboard-m33g $(Device/MikroTik) DEVICE_MODEL := RouterBOARD M33G - DEVICE_PACKAGES := -wpad-basic-openssl + DEVICE_PACKAGES := -wpad-openssl SUPPORTED_DEVICES += mikrotik,rbm33g endef TARGET_DEVICES += mikrotik_routerboard-m33g @@ -1087,9 +1100,6 @@ define Device/netgear_r6700-v2 DEVICE_ALT0_VENDOR := NETGEAR DEVICE_ALT0_MODEL := Nighthawk AC2400 DEVICE_ALT0_VARIANT := v1 - DEVICE_ALT1_VENDOR := NETGEAR - DEVICE_ALT1_MODEL := R7200 - DEVICE_ALT1_VARIANT := v1 SERCOMM_HWNAME := R6950 SERCOMM_HWID := BZV SERCOMM_HWVER := A001 @@ -1123,6 +1133,31 @@ define Device/netgear_r6850 endef TARGET_DEVICES += netgear_r6850 +define Device/netgear_r6900-v2 + $(Device/netgear_sercomm_nand) + DEVICE_MODEL := R6900 + DEVICE_VARIANT := v2 + SERCOMM_HWNAME := R6950 + SERCOMM_HWID := BZV + SERCOMM_HWVER := A001 + SERCOMM_SWVER := 0x1032 + IMAGE_SIZE := 40960k + DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware +endef +TARGET_DEVICES += netgear_r6900-v2 + +define Device/netgear_r7200 + $(Device/netgear_sercomm_nand) + DEVICE_MODEL := R7200 + SERCOMM_HWNAME := R6950 + SERCOMM_HWID := BZV + SERCOMM_HWVER := A001 + SERCOMM_SWVER := 0x1032 + IMAGE_SIZE := 40960k + DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware +endef +TARGET_DEVICES += netgear_r7200 + define Device/netgear_wac104 $(Device/netgear_sercomm_nand) DEVICE_MODEL := WAC104 @@ -1203,11 +1238,30 @@ define Device/planex_vr500 IMAGE_SIZE := 65216k DEVICE_VENDOR := Planex DEVICE_MODEL := VR500 - DEVICE_PACKAGES := kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-usb3 -wpad-openssl SUPPORTED_DEVICES += vr500 endef TARGET_DEVICES += planex_vr500 +define Device/raisecom_msg1500-x-00 + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 129280k + UBINIZE_OPTS := -E 5 + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + DEVICE_VENDOR := RAISECOM + DEVICE_MODEL := MSG1500 + DEVICE_VARIANT := X.00 + DEVICE_ALT0_VENDOR := Nokia + DEVICE_ALT0_MODEL := A-040W-Q + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \ + kmod-usb-ledtrig-usbport uboot-envtools +endef +TARGET_DEVICES += raisecom_msg1500-x-00 + define Device/samknows_whitebox-v8 $(Device/dsa-migration) IMAGE_SIZE := 16064k @@ -1258,7 +1312,7 @@ define Device/thunder_timecloud IMAGE_SIZE := 16064k DEVICE_VENDOR := Thunder DEVICE_MODEL := Timecloud - DEVICE_PACKAGES := kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-usb3 -wpad-openssl SUPPORTED_DEVICES += timecloud endef TARGET_DEVICES += thunder_timecloud @@ -1367,7 +1421,7 @@ define Device/ubnt_edgerouter_common KERNEL_INITRAMFS := $$(KERNEL) | \ ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES += -wpad-basic-openssl + DEVICE_PACKAGES += -wpad-openssl endef define Device/ubnt_edgerouter-x @@ -1422,7 +1476,7 @@ define Device/unielec_u7621-06-16m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 16M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-openssl SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m endef TARGET_DEVICES += unielec_u7621-06-16m @@ -1434,7 +1488,7 @@ define Device/unielec_u7621-06-64m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 64M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-openssl SUPPORTED_DEVICES += unielec,u7621-06-512m-64m endef TARGET_DEVICES += unielec_u7621-06-64m @@ -1564,6 +1618,17 @@ define Device/xiaomi_mi-router-4a-gigabit endef TARGET_DEVICES += xiaomi_mi-router-4a-gigabit +define Device/xiaomi_mi-router-4a-gigabit-v2 + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 14784k + DEVICE_VENDOR := Xiaomi + DEVICE_MODEL := Mi Router 4A + DEVICE_VARIANT := Gigabit Edition v2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap +endef +TARGET_DEVICES += xiaomi_mi-router-4a-gigabit-v2 + define Device/xiaomi_mi-router-ac2100 $(Device/xiaomi_nand_separate) DEVICE_MODEL := Mi Router AC2100 @@ -1619,7 +1684,7 @@ define Device/xiaoyu_xy-c5 IMAGE_SIZE := 32448k DEVICE_VENDOR := XiaoYu DEVICE_MODEL := XY-C5 - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-openssl endef TARGET_DEVICES += xiaoyu_xy-c5 @@ -1629,7 +1694,7 @@ define Device/xzwifi_creativebox-v1 DEVICE_VENDOR := CreativeBox DEVICE_MODEL := v1 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 -wpad-basic-openssl + kmod-usb3 -wpad-openssl endef TARGET_DEVICES += xzwifi_creativebox-v1 diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 5347c30f2f..c21394547f 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -81,7 +81,9 @@ netgear,wndr3700-v5) ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" ;; netgear,r6700-v2|\ -netgear,r6800) +netgear,r6800|\ +netgear,r6900-v2|\ +netgear,r7200) ucidef_set_led_netdev "wan" "WAN" "white:wan" "wan" ucidef_set_led_netdev "lan1" "LAN1" "white:lan1" "lan1" ucidef_set_led_netdev "lan2" "LAN2" "white:lan2" "lan2" @@ -104,6 +106,9 @@ tplink,re650-v1) ucidef_set_led_netdev "eth_act" "LAN act" "green:eth_act" "lan" "tx rx" ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "lan" "link" ;; +xiaomi,mi-router-4a-gigabit-v2) + ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link" + ;; xiaomi,mi-router-ac2100) ucidef_set_led_netdev "wan-blue" "WAN (blue)" "blue:wan" "wan" ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 6cf0eecf32..dd085a75fe 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -43,13 +43,16 @@ ramips_setup_interfaces() asiarf,ap7621-nv1|\ glinet,gl-mt1300|\ jcg,q20|\ + jcg,q20-lzma-loader|\ + jcg,q20-pb-boot|\ jdcloud,re-sp-01b|\ lenovo,newifi-d1|\ mikrotik,routerboard-m33g|\ xiaomi,mi-router-3g|\ xiaomi,mi-router-3g-v2|\ xiaomi,mi-router-4|\ - xiaomi,mi-router-4a-gigabit) + xiaomi,mi-router-4a-gigabit|\ + xiaomi,mi-router-4a-gigabit-v2) ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" ;; gnubee,gb-pc1) @@ -180,6 +183,11 @@ ramips_setup_macs() wan_mac=$label_mac lan_mac=$(macaddr_add $label_mac 1) ;; + raisecom,msg1500-x-00) + lan_mac=$(mtd_get_mac_ascii Config protest_lan_mac) + wan_mac=$(mtd_get_mac_ascii Config protest_wan_mac) + label_mac=$lan_mac + ;; yuncore,ax820) label_mac=$(mtd_get_mac_binary Factory 0x4) ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 5b0735dbdb..5eafe3dc04 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -40,6 +40,11 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress ;; + raisecom,msg1500-x-00) + [ "$PHYNBR" = "0" ] && \ + macaddr_setbit_la "$(mtd_get_mac_ascii Config protest_lan_mac)" \ + > /sys${DEVPATH}/macaddress + ;; yuncore,ax820) [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index a1c2903bff..f455a11ae9 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -61,6 +61,8 @@ platform_do_upgrade() { h3c,tx1806|\ hiwifi,hc5962|\ jcg,q20|\ + jcg,q20-lzma-loader|\ + jcg,q20-pb-boot|\ linksys,e5600|\ linksys,ea7300-v1|\ linksys,ea7300-v2|\ @@ -72,9 +74,12 @@ platform_do_upgrade() { netgear,r6700-v2|\ netgear,r6800|\ netgear,r6850|\ + netgear,r6900-v2|\ + netgear,r7200|\ netgear,wac104|\ netgear,wac124|\ netis,wf2881|\ + raisecom,msg1500-x-00|\ sercomm,na502|\ xiaomi,mi-router-3g|\ xiaomi,mi-router-3-pro|\ diff --git a/target/linux/ramips/mt7621/config-5.4 b/target/linux/ramips/mt7621/config-5.4 index 78b557c335..bf2ce595c6 100644 --- a/target/linux/ramips/mt7621/config-5.4 +++ b/target/linux/ramips/mt7621/config-5.4 @@ -216,6 +216,19 @@ CONFIG_PINCTRL_SX150X=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_SUPPLY=y +CONFIG_PSTORE=y +# CONFIG_PSTORE_842_COMPRESS is not set +CONFIG_PSTORE_COMPRESS=y +CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" +# CONFIG_PSTORE_CONSOLE is not set +CONFIG_PSTORE_DEFLATE_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y +# CONFIG_PSTORE_LZ4HC_COMPRESS is not set +# CONFIG_PSTORE_LZ4_COMPRESS is not set +# CONFIG_PSTORE_LZO_COMPRESS is not set +# CONFIG_PSTORE_PMSG is not set +CONFIG_PSTORE_RAM=y +# CONFIG_PSTORE_ZSTD_COMPRESS is not set CONFIG_QUEUED_RWLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_RALINK=y @@ -223,6 +236,9 @@ CONFIG_RALINK=y CONFIG_RATIONAL=y CONFIG_RCU_NEED_SEGCBLIST=y CONFIG_RCU_STALL_COMMON=y +CONFIG_REED_SOLOMON=y +CONFIG_REED_SOLOMON_DEC8=y +CONFIG_REED_SOLOMON_ENC8=y CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y CONFIG_REGULATOR=y diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk index c1b850f6c3..1ecc3bc635 100644 --- a/target/linux/ramips/mt7621/target.mk +++ b/target/linux/ramips/mt7621/target.mk @@ -10,7 +10,7 @@ KERNELNAME:=vmlinux vmlinuz # make Kernel/CopyImage use $LINUX_DIR/vmlinuz IMAGES_DIR:=../../.. -DEFAULT_PACKAGES += wpad-basic-openssl +DEFAULT_PACKAGES += wpad-openssl define Target/Description Build firmware images for Ralink MT7621 based boards. diff --git a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch index a6c9127601..32a4d8e651 100644 --- a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch +++ b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c -@@ -2911,6 +2911,18 @@ static const struct usb_device_id uvc_id +@@ -2919,6 +2919,18 @@ static const struct usb_device_id uvc_id .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) }, @@ -34,7 +34,7 @@ Signed-off-by: John Crispin { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) }, --- a/drivers/media/usb/uvc/uvc_status.c +++ b/drivers/media/usb/uvc/uvc_status.c -@@ -223,6 +223,7 @@ static void uvc_status_complete(struct u +@@ -225,6 +225,7 @@ static void uvc_status_complete(struct u if (uvc_event_control(urb, status, len)) /* The URB will be resubmitted in work context. */ return; @@ -42,7 +42,7 @@ Signed-off-by: John Crispin break; } -@@ -271,6 +272,7 @@ int uvc_status_init(struct uvc_device *d +@@ -273,6 +274,7 @@ int uvc_status_init(struct uvc_device *d } pipe = usb_rcvintpipe(dev->udev, ep->desc.bEndpointAddress); @@ -214,7 +214,7 @@ Signed-off-by: John Crispin /* Mark the buffer as done if the EOF marker is set. */ if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) { uvc_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n"); -@@ -1747,6 +1892,8 @@ static int uvc_init_video_isoc(struct uv +@@ -1749,6 +1894,8 @@ static int uvc_init_video_isoc(struct uv if (npackets == 0) return -ENOMEM; @@ -225,10 +225,10 @@ Signed-off-by: John Crispin for_each_uvc_urb(uvc_urb, stream) { --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h -@@ -199,7 +199,9 @@ - #define UVC_QUIRK_RESTORE_CTRLS_ON_INIT 0x00000400 +@@ -200,7 +200,9 @@ #define UVC_QUIRK_FORCE_Y8 0x00000800 #define UVC_QUIRK_FORCE_BPP 0x00001000 + #define UVC_QUIRK_WAKE_AUTOSUSPEND 0x00002000 - +#define UVC_QUIRK_MOTION 0x00001000 +#define UVC_QUIRK_SINGLE_ISO 0x00002000 @@ -236,7 +236,7 @@ Signed-off-by: John Crispin /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED 0x00000001 #define UVC_FMT_FLAG_STREAM 0x00000002 -@@ -666,6 +668,7 @@ struct uvc_device { +@@ -668,6 +670,7 @@ struct uvc_device { u8 *status; struct input_dev *input; char input_phys[64]; diff --git a/target/linux/ramips/patches-5.4/302-spi-nor-add-gd25q512.patch b/target/linux/ramips/patches-5.4/302-spi-nor-add-gd25q512.patch index d5de4e45bc..9311462f1e 100644 --- a/target/linux/ramips/patches-5.4/302-spi-nor-add-gd25q512.patch +++ b/target/linux/ramips/patches-5.4/302-spi-nor-add-gd25q512.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2306,6 +2306,11 @@ static const struct flash_info spi_nor_i +@@ -2308,6 +2308,11 @@ static const struct flash_info spi_nor_i SPI_NOR_4B_OPCODES | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .fixups = &gd25q256_fixups, }, diff --git a/target/linux/rockchip/armv8/config-5.4 b/target/linux/rockchip/armv8/config-5.4 index baa15240d6..9053164809 100644 --- a/target/linux/rockchip/armv8/config-5.4 +++ b/target/linux/rockchip/armv8/config-5.4 @@ -75,7 +75,7 @@ CONFIG_CMA_ALIGNMENT=8 CONFIG_CMA_AREAS=7 # CONFIG_CMA_DEBUG is not set # CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_SIZE_MBYTES=5 +CONFIG_CMA_SIZE_MBYTES=64 # CONFIG_CMA_SIZE_SEL_MAX is not set CONFIG_CMA_SIZE_SEL_MBYTES=y # CONFIG_CMA_SIZE_SEL_MIN is not set diff --git a/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch b/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch index 1abab5e2eb..9046a8df66 100644 --- a/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch +++ b/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch @@ -21,7 +21,7 @@ Signed-off-by: Heiko Stuebner --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts -@@ -684,7 +684,7 @@ +@@ -683,7 +683,7 @@ &usbdrd_dwc3_0 { status = "okay"; diff --git a/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch b/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch index d462899007..f70cbb9e23 100644 --- a/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch +++ b/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch @@ -24,7 +24,7 @@ Signed-off-by: Jonas Karlman --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c -@@ -1371,6 +1371,8 @@ void mmc_power_off(struct mmc_host *host +@@ -1377,6 +1377,8 @@ void mmc_power_off(struct mmc_host *host mmc_pwrseq_power_off(host); diff --git a/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch b/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch index d76563efcf..54b260a51e 100644 --- a/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch +++ b/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts -@@ -101,6 +101,19 @@ +@@ -92,6 +92,19 @@ max-link-speed = <1>; num-lanes = <1>; vpcie3v3-supply = <&vcc3v3_sys>; diff --git a/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch b/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch index a04c14b70a..6bebe5f258 100644 --- a/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch +++ b/target/linux/rockchip/patches-5.4/107-nanopi-r4s-sd-signalling.patch @@ -12,7 +12,7 @@ Signed-off-by: David Bauer --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts -@@ -121,6 +121,11 @@ +@@ -141,6 +141,11 @@ status = "disabled"; }; diff --git a/target/linux/rockchip/patches-5.4/204-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus-LTS.patch b/target/linux/rockchip/patches-5.4/204-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus-LTS.patch index 28c337554d..030ee68084 100644 --- a/target/linux/rockchip/patches-5.4/204-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus-LTS.patch +++ b/target/linux/rockchip/patches-5.4/204-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus-LTS.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-ev +@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-ev dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb diff --git a/target/linux/rockchip/patches-5.4/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch b/target/linux/rockchip/patches-5.4/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch index 3018bd30d6..8c4233f1b6 100644 --- a/target/linux/rockchip/patches-5.4/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch +++ b/target/linux/rockchip/patches-5.4/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch @@ -11,8 +11,6 @@ Signed-off-by: hmz007 3 files changed, 862 insertions(+), 3 deletions(-) create mode 100644 drivers/devfreq/rk3328_dmc.c -diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig -index defe1d438710..5ae0832f046b 100644 --- a/drivers/devfreq/Kconfig +++ b/drivers/devfreq/Kconfig @@ -116,6 +116,18 @@ config ARM_TEGRA20_DEVFREQ @@ -34,11 +32,9 @@ index defe1d438710..5ae0832f046b 100644 config ARM_RK3399_DMC_DEVFREQ tristate "ARM RK3399 DMC DEVFREQ Driver" depends on (ARCH_ROCKCHIP && HAVE_ARM_SMCCC) || \ -diff --git a/drivers/devfreq/Makefile b/drivers/devfreq/Makefile -index 338ae8440db6..ec568406ef50 100644 --- a/drivers/devfreq/Makefile +++ b/drivers/devfreq/Makefile -@@ -9,6 +9,7 @@ obj-$(CONFIG_DEVFREQ_GOV_PASSIVE) += governor_passive.o +@@ -9,6 +9,7 @@ obj-$(CONFIG_DEVFREQ_GOV_PASSIVE) += gov # DEVFREQ Drivers obj-$(CONFIG_ARM_EXYNOS_BUS_DEVFREQ) += exynos-bus.o diff --git a/target/linux/rockchip/patches-5.4/804-clk-rockchip-support-setting-ddr-clock-via-SIP-Version-2-.patch b/target/linux/rockchip/patches-5.4/804-clk-rockchip-support-setting-ddr-clock-via-SIP-Version-2-.patch index 4e688f8eb4..430a4fd5e3 100644 --- a/target/linux/rockchip/patches-5.4/804-clk-rockchip-support-setting-ddr-clock-via-SIP-Version-2-.patch +++ b/target/linux/rockchip/patches-5.4/804-clk-rockchip-support-setting-ddr-clock-via-SIP-Version-2-.patch @@ -15,11 +15,9 @@ Signed-off-by: hmz007 include/soc/rockchip/rockchip_sip.h | 11 +++ 4 files changed, 147 insertions(+), 4 deletions(-) -diff --git a/drivers/clk/rockchip/clk-ddr.c b/drivers/clk/rockchip/clk-ddr.c -index 9273bce4d7b6..555aaf4e758d 100644 --- a/drivers/clk/rockchip/clk-ddr.c +++ b/drivers/clk/rockchip/clk-ddr.c -@@ -87,6 +87,133 @@ static const struct clk_ops rockchip_ddrclk_sip_ops = { +@@ -87,6 +87,133 @@ static const struct clk_ops rockchip_ddr .get_parent = rockchip_ddrclk_get_parent, }; @@ -153,7 +151,7 @@ index 9273bce4d7b6..555aaf4e758d 100644 struct clk *rockchip_clk_register_ddrclk(const char *name, int flags, const char *const *parent_names, u8 num_parents, int mux_offset, -@@ -114,6 +241,9 @@ struct clk *rockchip_clk_register_ddrclk(const char *name, int flags, +@@ -114,6 +241,9 @@ struct clk *rockchip_clk_register_ddrclk case ROCKCHIP_DDRCLK_SIP: init.ops = &rockchip_ddrclk_sip_ops; break; @@ -163,11 +161,9 @@ index 9273bce4d7b6..555aaf4e758d 100644 default: pr_err("%s: unsupported ddrclk type %d\n", __func__, ddr_flag); kfree(ddrclk); -diff --git a/drivers/clk/rockchip/clk-rk3328.c b/drivers/clk/rockchip/clk-rk3328.c -index c186a1985bf4..ac6e6163a232 100644 --- a/drivers/clk/rockchip/clk-rk3328.c +++ b/drivers/clk/rockchip/clk-rk3328.c -@@ -314,9 +314,10 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = { +@@ -314,9 +314,10 @@ static struct rockchip_clk_branch rk3328 RK3328_CLKGATE_CON(14), 1, GFLAGS), /* PD_DDR */ @@ -181,11 +177,9 @@ index c186a1985bf4..ac6e6163a232 100644 GATE(0, "clk_ddrmsch", "clk_ddr", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(18), 6, GFLAGS), GATE(0, "clk_ddrupctl", "clk_ddr", CLK_IGNORE_UNUSED, -diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h -index 2271a84124b0..7405aaf965ec 100644 --- a/drivers/clk/rockchip/clk.h +++ b/drivers/clk/rockchip/clk.h -@@ -362,7 +362,8 @@ struct clk *rockchip_clk_register_mmc(const char *name, +@@ -362,7 +362,8 @@ struct clk *rockchip_clk_register_mmc(co * DDRCLK flags, including method of setting the rate * ROCKCHIP_DDRCLK_SIP: use SIP call to bl31 to change ddrclk rate. */ @@ -195,8 +189,6 @@ index 2271a84124b0..7405aaf965ec 100644 struct clk *rockchip_clk_register_ddrclk(const char *name, int flags, const char *const *parent_names, -diff --git a/include/soc/rockchip/rockchip_sip.h b/include/soc/rockchip/rockchip_sip.h -index c46a9ae2a2ab..fa7e0a2d72cc 100644 --- a/include/soc/rockchip/rockchip_sip.h +++ b/include/soc/rockchip/rockchip_sip.h @@ -16,5 +16,16 @@ diff --git a/target/linux/rockchip/patches-5.4/805-PM-devfreq-rockchip-dfi-add-more-soc-support.patch b/target/linux/rockchip/patches-5.4/805-PM-devfreq-rockchip-dfi-add-more-soc-support.patch index dbf491a287..dee96e82ab 100644 --- a/target/linux/rockchip/patches-5.4/805-PM-devfreq-rockchip-dfi-add-more-soc-support.patch +++ b/target/linux/rockchip/patches-5.4/805-PM-devfreq-rockchip-dfi-add-more-soc-support.patch @@ -8,8 +8,6 @@ Signed-off-by: hmz007 drivers/devfreq/event/rockchip-dfi.c | 554 ++++++++++++++++++++++++--- 1 file changed, 505 insertions(+), 49 deletions(-) -diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c -index 5d1042188727..80be0efdfb9b 100644 --- a/drivers/devfreq/event/rockchip-dfi.c +++ b/drivers/devfreq/event/rockchip-dfi.c @@ -18,25 +18,66 @@ @@ -19,9 +17,8 @@ index 5d1042188727..80be0efdfb9b 100644 -#include - -#define RK3399_DMC_NUM_CH 2 -- +#define PX30_PMUGRF_OS_REG2 0x208 -+ + +#define RK3128_GRF_SOC_CON0 0x140 +#define RK3128_GRF_OS_REG1 0x1cc +#define RK3128_GRF_DFI_WRNUM 0x220 @@ -364,7 +361,7 @@ index 5d1042188727..80be0efdfb9b 100644 /* enable count, use software mode */ writel_relaxed(SOFTWARE_EN, dfi_regs + DDRMON_CTRL); -@@ -100,12 +369,22 @@ static int rockchip_dfi_get_busier_ch(struct devfreq_event_dev *edev) +@@ -100,12 +369,22 @@ static int rockchip_dfi_get_busier_ch(st rockchip_dfi_stop_hardware_counter(edev); /* Find out which channel is busier */ @@ -391,7 +388,7 @@ index 5d1042188727..80be0efdfb9b 100644 if (tmp > max) { busier_ch = i; max = tmp; -@@ -121,7 +400,8 @@ static int rockchip_dfi_disable(struct devfreq_event_dev *edev) +@@ -121,7 +400,8 @@ static int rockchip_dfi_disable(struct d struct rockchip_dfi *info = devfreq_event_get_drvdata(edev); rockchip_dfi_stop_hardware_counter(edev); @@ -401,7 +398,7 @@ index 5d1042188727..80be0efdfb9b 100644 return 0; } -@@ -131,10 +411,13 @@ static int rockchip_dfi_enable(struct devfreq_event_dev *edev) +@@ -131,10 +411,13 @@ static int rockchip_dfi_enable(struct de struct rockchip_dfi *info = devfreq_event_get_drvdata(edev); int ret; @@ -419,7 +416,7 @@ index 5d1042188727..80be0efdfb9b 100644 } rockchip_dfi_start_hardware_counter(edev); -@@ -151,8 +434,11 @@ static int rockchip_dfi_get_event(struct devfreq_event_dev *edev, +@@ -151,8 +434,11 @@ static int rockchip_dfi_get_event(struct { struct rockchip_dfi *info = devfreq_event_get_drvdata(edev); int busier_ch; @@ -431,7 +428,7 @@ index 5d1042188727..80be0efdfb9b 100644 edata->load_count = info->ch_usage[busier_ch].access; edata->total_count = info->ch_usage[busier_ch].total; -@@ -167,23 +453,117 @@ static const struct devfreq_event_ops rockchip_dfi_ops = { +@@ -167,23 +453,117 @@ static const struct devfreq_event_ops ro .set_event = rockchip_dfi_set_event, }; @@ -561,7 +558,7 @@ index 5d1042188727..80be0efdfb9b 100644 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); data->regs = devm_ioremap_resource(&pdev->dev, res); -@@ -203,21 +583,97 @@ static int rockchip_dfi_probe(struct platform_device *pdev) +@@ -203,21 +583,97 @@ static int rockchip_dfi_probe(struct pla if (IS_ERR(data->regmap_pmu)) return PTR_ERR(data->regmap_pmu); } @@ -663,3 +660,4 @@ index 5d1042188727..80be0efdfb9b 100644 + dev_err(dev, "failed to add devfreq-event device\n"); return PTR_ERR(data->edev); } + diff --git a/target/linux/rockchip/patches-5.4/991-arm64-dts-rockchip-add-more-cpu-operating-points-for.patch b/target/linux/rockchip/patches-5.4/991-arm64-dts-rockchip-add-more-cpu-operating-points-for.patch index 818ee4ce1d..a4857b7ac4 100644 --- a/target/linux/rockchip/patches-5.4/991-arm64-dts-rockchip-add-more-cpu-operating-points-for.patch +++ b/target/linux/rockchip/patches-5.4/991-arm64-dts-rockchip-add-more-cpu-operating-points-for.patch @@ -31,7 +31,7 @@ Signed-off-by: Leonidas P. Papadakos + }; + opp-1512000000 { + opp-hz = /bits/ 64 <1512000000>; -+ opp-microvolt = <1400000>; ++ opp-microvolt = <1450000>; + clock-latency-ns = <40000>; + }; + opp-1608000000 { diff --git a/target/linux/sunxi/image/cortexa53.mk b/target/linux/sunxi/image/cortexa53.mk index 3b5e55c793..f783350643 100644 --- a/target/linux/sunxi/image/cortexa53.mk +++ b/target/linux/sunxi/image/cortexa53.mk @@ -39,7 +39,7 @@ define Device/friendlyarm_nanopi-r1s-h5 DEVICE_VENDOR := FriendlyARM DEVICE_MODEL := Nanopi R1S H5 DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-usb-net-rtl8152 \ - kmod-rtl8189es wpad-basic + kmod-rtl8189es wpad-basic-openssl SUPPORTED_DEVICES:=nanopi-r1s-h5 $(Device/sun50i-h5) endef diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk index df780b0a8e..511912d5db 100644 --- a/target/linux/sunxi/image/cortexa7.mk +++ b/target/linux/sunxi/image/cortexa7.mk @@ -81,7 +81,7 @@ define Device/sinovoip_bananapi-m2-berry DEVICE_VENDOR := Sinovoip DEVICE_MODEL := Banana Pi M2 Berry DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi kmod-brcmfmac \ - brcmfmac-firmware-43430-sdio wpad-basic-openssl + cypress-firmware-43430-sdio wpad-basic-openssl SUPPORTED_DEVICES:=lemaker,bananapi-m2-berry SOC := sun8i-v40 endef diff --git a/target/linux/sunxi/patches-5.4/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch b/target/linux/sunxi/patches-5.4/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch index 1ee240afb5..e14311aa64 100644 --- a/target/linux/sunxi/patches-5.4/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch +++ b/target/linux/sunxi/patches-5.4/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch @@ -14,7 +14,7 @@ Signed-off-by: Chukun Pan --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts -@@ -111,6 +111,13 @@ +@@ -112,6 +112,13 @@ &ehci1 { status = "okay"; diff --git a/target/linux/sunxi/patches-5.4/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch b/target/linux/sunxi/patches-5.4/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch index 8281f78e06..4a429c746e 100644 --- a/target/linux/sunxi/patches-5.4/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch +++ b/target/linux/sunxi/patches-5.4/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch @@ -12,7 +12,7 @@ Signed-off-by: Chukun Pan --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts -@@ -21,6 +21,11 @@ +@@ -22,6 +22,11 @@ ethernet0 = &emac; ethernet1 = &rtl8189etv; serial0 = &uart0; @@ -24,7 +24,7 @@ Signed-off-by: Chukun Pan }; chosen { -@@ -30,7 +35,7 @@ +@@ -31,7 +36,7 @@ leds { compatible = "gpio-leds"; diff --git a/target/linux/sunxi/patches-5.4/911-kernel-dma-adjust-default-coherent_pool-to-2MiB.patch b/target/linux/sunxi/patches-5.4/911-kernel-dma-adjust-default-coherent_pool-to-2MiB.patch index d39618c0b2..c870a4f74c 100644 --- a/target/linux/sunxi/patches-5.4/911-kernel-dma-adjust-default-coherent_pool-to-2MiB.patch +++ b/target/linux/sunxi/patches-5.4/911-kernel-dma-adjust-default-coherent_pool-to-2MiB.patch @@ -9,7 +9,7 @@ Subject: [PATCH] kernel: dma: adjust default coherent_pool to 2MiB --- a/kernel/dma/remap.c +++ b/kernel/dma/remap.c -@@ -101,7 +101,7 @@ void dma_common_free_remap(void *cpu_addr, size_t size) +@@ -101,7 +101,7 @@ void dma_common_free_remap(void *cpu_add #ifdef CONFIG_DMA_DIRECT_REMAP static struct gen_pool *atomic_pool __ro_after_init; diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index 88acc7e65a..d1485754ca 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -18,12 +18,12 @@ KERNELNAME:=bzImage include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += alsa-utils partx-utils mkf2fs fdisk e2fsprogs kmod-button-hotplug kmod-usb-hid \ - kmod-e1000e kmod-i40e kmod-igb kmod-igbvf kmod-igc kmod-ixgbe kmod-pcnet32 kmod-tulip \ - kmod-vmxnet3 kmod-r8101 kmod-r8125 kmod-r8168 kmod-8139cp kmod-8139too kmod-tg3 \ - kmod-fs-f2fs kmod-ac97 kmod-sound-hda-core kmod-sound-hda-codec-realtek \ - kmod-sound-hda-codec-via kmod-sound-via82xx kmod-sound-hda-intel kmod-sound-hda-codec-hdmi \ - kmod-sound-i8x0 kmod-usb-audio kmod-usb-net kmod-usb-net-asix kmod-usb-net-asix-ax88179 \ - kmod-usb-net-rtl8150 kmod-usb-net-rtl8152-vendor autocore-x86 automount + kmod-e1000e kmod-i40e-vendor kmod-igb-vendor kmod-igbvf kmod-igc kmod-ixgbe-vendor \ + kmod-ixgbevf-vendor kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-r8101 kmod-r8125 kmod-r8168 \ + kmod-8139cp kmod-8139too kmod-tg3 kmod-fs-f2fs kmod-ac97 kmod-sound-hda-core \ + kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via kmod-sound-via82xx kmod-sound-hda-intel \ + kmod-sound-hda-codec-hdmi kmod-sound-i8x0 kmod-usb-audio kmod-usb-net kmod-usb-net-asix \ + kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 kmod-usb-net-rtl8152-vendor autocore-x86 automount $(eval $(call BuildTarget)) diff --git a/target/linux/x86/files-5.4/drivers/net/ethernet/intel/igc/igc_main.c b/target/linux/x86/files-5.4/drivers/net/ethernet/intel/igc/igc_main.c index f23bcefa96..be8cca61ad 100644 --- a/target/linux/x86/files-5.4/drivers/net/ethernet/intel/igc/igc_main.c +++ b/target/linux/x86/files-5.4/drivers/net/ethernet/intel/igc/igc_main.c @@ -100,7 +100,7 @@ void igc_reset(struct igc_adapter *adapter) netdev_err(dev, "Error on hardware initialization\n"); /* Re-establish EEE setting */ - igc_set_eee_i225(hw, true, true, true); + igc_set_eee_i225(hw, false, false, false); if (!netif_running(adapter->netdev)) igc_power_down_phy_copper_base(&adapter->hw);