diff --git a/config/Config-images.in b/config/Config-images.in index c7b533c7d..2afaf1c0c 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -20,6 +20,7 @@ menu "Target Images" default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips + default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq40xx default TARGET_INITRAMFS_COMPRESSION_NONE depends on TARGET_ROOTFS_INITRAMFS help diff --git a/package/lean/default-settings/Makefile b/package/lean/default-settings/Makefile index 6bfba9d0c..e6753e708 100644 --- a/package/lean/default-settings/Makefile +++ b/package/lean/default-settings/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=default-settings PKG_VERSION:=1.1 -PKG_RELEASE:=61 +PKG_RELEASE:=62 PKG_LICENSE:=GPLv3 PKG_LICENSE_FILES:=LICENSE @@ -21,7 +21,7 @@ define Package/default-settings CATEGORY:=LuCI TITLE:=LuCI support for Default Settings PKGARCH:=all - DEPENDS:=+luci-base +@LUCI_LANG_zh-cn + DEPENDS:=+luci-base +luci +@LUCI_LANG_zh-cn endef define Package/default-settings/description diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index 1c318b3e4..49bf58374 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git -PKG_SOURCE_DATE:=2019-06-16 -PKG_SOURCE_VERSION:=ecf56174da9614a0b3107d33def463eefb4d7785 -PKG_MIRROR_HASH:=e3dd137d69848b8cf2dbc58d70452586dd4178b55977896ea3a9dedaf62c768c +PKG_MIRROR_HASH:=3d58def8e415ceda8aacfd8453813d8bf2a05991c0df0c074744639ab04321ba +PKG_SOURCE_DATE:=2020-05-25 +PKG_SOURCE_VERSION:=66195aee50424cbda0c2d858014e4cc58a2dc029 CMAKE_INSTALL:=1 PKG_LICENSE:=ISC @@ -27,7 +27,7 @@ define Package/libubox SECTION:=libs CATEGORY:=Libraries TITLE:=Basic utility library - ABI_VERSION:=20170601 + ABI_VERSION:=20191228 DEPENDS:= endef diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index 3b0a95598..824e71924 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,16 +5,17 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2018-10-06 -PKG_SOURCE_VERSION:=221ce7e7ff1bd1a0c9995fa9d32f58e865f7207f -PKG_MIRROR_HASH:=e6ab3f009688740eb6d7a1857df59a6ba10ae8ae0fac78ae0fd6672f71c02dce +PKG_SOURCE_DATE:=2020-02-05 +PKG_SOURCE_VERSION:=171469e3138cce191892e20b6fd35b52c9368064 +PKG_MIRROR_HASH:=b4f1a3d70c2685c2aee2724b980b2ff747f8662f74d04d8be1c5a5e950b0e2ef CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:= - PKG_MAINTAINER:=Felix Fietkau +PKG_ASLR_PIE_REGULAR:=1 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/system/ucert/Makefile b/package/system/ucert/Makefile index 5b4c6b12c..950f2b64d 100644 --- a/package/system/ucert/Makefile +++ b/package/system/ucert/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git -PKG_SOURCE_DATE:=2018-09-18 -PKG_SOURCE_VERSION:=e1c722b1b6cbf2527b3178342464e56b97825874 -PKG_MIRROR_HASH:=36dcca7c2d649a6c34a8daaaef4698fbeb808fd6580c6bfb1ca35f4f06825d17 +PKG_SOURCE_DATE:=2020-05-24 +PKG_SOURCE_VERSION:=00b921d80ac0dc47339305d803f865ff43c56d63 +PKG_MIRROR_HASH:=839fda1811a58a495ac7bbc41db75222dd5a15e4d72110ca6acc4cdad56908fe CMAKE_INSTALL:=1 PKG_CHECK_FORMAT_SECURITY:=1 @@ -17,8 +17,6 @@ PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Daniel Golle -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk @@ -47,6 +45,7 @@ define Package/ucert CATEGORY:=Base system DEPENDS:=+usign +libubox TITLE:=OpenWrt certificate verification utility + PROVIDES:=ucert CONFLICTS:=ucert-full VARIANT:=tiny endef diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 0f7ef68f1..8c11f4c57 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uci -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE=2018-08-11 -PKG_SOURCE_VERSION:=4c8b4d6efc8302b508d261573351fffb75bd98c2 -PKG_MIRROR_HASH:=c1f0f565921c71ff9231508c7c249baacad4c3ae1a3fade25c37bcb2bf7a7b5f +PKG_SOURCE_DATE=2020-04-24 +PKG_SOURCE_VERSION:=ec8d3233948603485e1b97384113fac9f1bab5d6 +PKG_MIRROR_HASH:=b3cdc66a8ec4f05a102ce5520a3f8ff69ca4a49930c5bb01065467ef68f0808b PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:= @@ -35,6 +35,7 @@ define Package/libuci CATEGORY:=Libraries TITLE:=C library for the Unified Configuration Interface (UCI) DEPENDS:=+libubox + ABI_VERSION:=20130104 endef define Package/uci diff --git a/package/system/uci/files/lib/config/uci.sh b/package/system/uci/files/lib/config/uci.sh index 78ec27766..1e85ced83 100644 --- a/package/system/uci/files/lib/config/uci.sh +++ b/package/system/uci/files/lib/config/uci.sh @@ -85,6 +85,15 @@ uci_set() { /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set "$PACKAGE.$CONFIG.$OPTION=$VALUE" } +uci_add_list() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local VALUE="$4" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} add_list "$PACKAGE.$CONFIG.$OPTION=$VALUE" +} + uci_get_state() { uci_get "$1" "$2" "$3" "$4" "/var/state" } @@ -108,7 +117,7 @@ uci_add() { local CONFIG="$3" if [ -z "$CONFIG" ]; then - export ${NO_EXPORT:+-n} CONFIG_SECTION="$(/sbin/uci add "$PACKAGE" "$TYPE")" + export ${NO_EXPORT:+-n} CONFIG_SECTION="$(/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} add "$PACKAGE" "$TYPE")" else /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set "$PACKAGE.$CONFIG=$TYPE" export ${NO_EXPORT:+-n} CONFIG_SECTION="$CONFIG" @@ -132,6 +141,15 @@ uci_remove() { /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del "$PACKAGE.$CONFIG${OPTION:+.$OPTION}" } +uci_remove_list() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local VALUE="$4" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del_list "$PACKAGE.$CONFIG.$OPTION=$VALUE" +} + uci_commit() { local PACKAGE="$1" /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit $PACKAGE diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile index e98b75dc2..6cf99f572 100644 --- a/target/linux/ipq40xx/Makefile +++ b/target/linux/ipq40xx/Makefile @@ -8,7 +8,7 @@ CPU_TYPE:=cortex-a7 CPU_SUBTYPE:=neon-vfpv4 SUBTARGETS:=generic -KERNEL_PATCHVER:=4.19 +KERNEL_PATCHVER:=5.4 KERNEL_TESTING_PATCHVER:=5.4 KERNELNAME:=zImage Image dtbs @@ -18,8 +18,6 @@ DEFAULT_PACKAGES += \ kmod-usb-dwc3-qcom \ kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ kmod-ath10k-ct wpad-openssl \ - kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019-ct \ - automount autosamba luci-app-ipsec-vpnd luci-app-cpufreq luci-app-zerotier luci-app-xlnetacc \ - htop fdisk e2fsprogs ethtool + kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019-ct ethtool $(eval $(call BuildTarget)) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 10c61325c..0a128e8cb 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -12,25 +12,15 @@ boardname="${board##*,}" case "$board" in alfa-network,ap120c-ac) - ucidef_set_led_switch "wan" "WAN" "${boardname}:amber:wan" "switch0" "0x20" + ucidef_set_led_netdev "wan" "WAN" "${boardname}:amber:wan" "eth1" ;; asus,rt-ac58u) - ucidef_set_led_switch "wan" "WAN" "${boardname}:blue:wan" "switch0" "0x20" + ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e" ;; -asus,rt-acrh17) - ucidef_set_led_default "status" "STATUS" "${boardname}:blue:status" "1" - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy1tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5g" "phy0tpt" - ucidef_set_led_switch "wan" "WAN(blue)" "${boardname}:blue:wan" "switch0" "0x20" - ucidef_set_led_switch "lan1" "LAN1" "${boardname}:blue:lan1" "switch0" "0x02" - ucidef_set_led_switch "lan2" "LAN2" "${boardname}:blue:lan2" "switch0" "0x04" - ucidef_set_led_switch "lan3" "LAN3" "${boardname}:blue:lan3" "switch0" "0x08" - ucidef_set_led_switch "lan4" "LAN4" "${boardname}:blue:lan4" "switch0" "0x10" - ;; avm,fritzbox-4040) ucidef_set_led_wlan "wlan" "WLAN" "fritz4040:green:wlan" "phy0tpt" "phy1tpt" - ucidef_set_led_switch "wan" "WAN" "fritz4040:green:wan" "switch0" "0x20" + ucidef_set_led_netdev "wan" "WAN" "fritz4040:green:wan" "eth1" ucidef_set_led_switch "lan" "LAN" "fritz4040:green:lan" "switch0" "0x1e" ;; avm,fritzbox-7530 |\ @@ -38,7 +28,7 @@ glinet,gl-b1300) ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wlan" "phy0tpt" ;; engenius,eap1300) - ucidef_set_led_switch "wan" "WAN" "${boardname}:amber:wan" "switch0" "0x20" + ucidef_set_led_netdev "lan" "LAN" "${boardname}:blue:lan" "eth0" ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:yellow:wlan5g" "phy1tpt" ucidef_set_led_default "mesh" "MESH" "${boardname}:blue:mesh" "0" @@ -50,8 +40,8 @@ engenius,eap2200) engenius,ens620ext) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" - ucidef_set_led_switch "lan1" "LAN1" "${boardname}:green:lan1" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "${boardname}:green:lan2" "switch0" "0x20" + ucidef_set_led_netdev "lan1" "LAN1" "${boardname}:green:lan1" "eth0" + ucidef_set_led_netdev "lan2" "LAN2" "${boardname}:green:lan2" "eth1" ;; mobipromo,cm520-79f) ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" @@ -59,8 +49,7 @@ mobipromo,cm520-79f) ucidef_set_led_switch "lan2" "LAN2" "${boardname}:blue:lan2" "switch0" "0x08" ;; netgear,ex6100v2 |\ -netgear,ex6150v2 |\ -netgear,ex6200v2) +netgear,ex6150v2) ucidef_set_led_wlan "wlan2g" "WLAN2G" "ex61x0v2:green:router" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "ex61x0v2:green:client" "phy1tpt" ;; diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index d2ff62137..77a224128 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -17,73 +17,84 @@ ipq40xx_setup_interfaces() alfa-network,ap120c-ac|\ engenius,emr3500|\ engenius,ens620ext) - ucidef_add_switch "switch0" \ - "0t@eth0" "4:lan" "5:wan" - ;; - asus,map-ac2200|\ - cilab,meshpoint-one|\ - openmesh,a42|\ - openmesh,a62) - ucidef_add_switch "switch0" \ - "0t@eth0" "5:lan" "4:wan" - ;; - aruba,ap-303h|\ - asus,rt-acrh17|\ - asus,rt-ac58u|\ - avm,fritzbox-4040|\ - ezviz,cs-w3-wd1200g-eup|\ - linksys,ea6350v3|\ - linksys,ea8300|\ - unielec,u4019-32m) - ucidef_add_switch "switch0" \ - "0t@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" - ;; - avm,fritzrepeater-3000|\ - compex,wpj419|\ - compex,wpj428|\ - engenius,eap1300|\ - engenius,eap2200) - ucidef_add_switch "switch0" \ - "0t@eth0" "4:lan" "5:lan" - ;; - avm,fritzbox-7530) - ucidef_add_switch "switch0" \ - "0t@eth0" "1:lan" "2:lan" "3:lan" "4:lan" + ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; aruba,ap-303|\ aruba,ap-365|\ avm,fritzrepeater-1200|\ dlink,dap-2610 |\ + engenius,eap1300|\ engenius,emd1|\ - meraki,mr33) + meraki,mr33|\ + netgear,ex6100v2|\ + netgear,ex6150v2|\ + zyxel,wre6606) ucidef_set_interface_lan "eth0" ;; - cellc,rtl30vw) + aruba,ap-303h) + ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ - "0t@eth0" "3:lan" "4:lan" + "0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan" ;; - glinet,gl-b1300|\ - qxwlan,e2600ac-c1|\ - qxwlan,e2600ac-c2) + asus,map-ac2200|\ + cilab,meshpoint-one|\ + openmesh,a42|\ + openmesh,a62) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + ;; + asus,rt-ac58u|\ + zyxel,nbg6617) + ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ - "0t@eth0" "3:lan" "4:lan" "5:wan" + "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" + ;; + avm,fritzbox-4040|\ + linksys,ea6350v3|\ + linksys,ea8300) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" + ;; + avm,fritzbox-7530) + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" + ;; + avm,fritzrepeater-3000|\ + compex,wpj419|\ + compex,wpj428|\ + engenius,eap2200) + ucidef_set_interface_lan "eth0 eth1" + ;; + cellc,rtl30vw) + ucidef_set_interface_lan "eth0" + ucidef_add_switch "switch0" \ + "0u@eth0" "3:lan" "4:lan" + ;; + ezviz,cs-w3-wd1200g-eup) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "0u@eth1" "5:wan" + ;; + glinet,gl-b1300) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "3:lan" "4:lan" ;; mobipromo,cm520-79f) ucidef_add_switch "switch0" \ - "0t@eth0" "3:lan:2" "4:lan:1" "5:wan" + "0u@eth0" "3:lan:2" "4:lan:1" + ucidef_set_interface_wan "eth1" ;; - netgear,ex6100v2|\ - netgear,ex6150v2|\ - netgear,ex6200v2|\ - zyxel,wre6606) + qxwlan,e2600ac-c1 |\ + qxwlan,e2600ac-c2) + ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ - "0t@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" + "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan" ;; - p2w,r619ac-128m|\ - p2w,r619ac|\ - zyxel,nbg6617) + unielec,u4019-32m) + ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ - "0t@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan:5" + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" ;; *) echo "Unsupported hardware. Network interfaces not initialized" @@ -102,13 +113,11 @@ ipq40xx_setup_macs() 8dev,habanero-dvk) label_mac=$(mtd_get_mac_binary "ART" 0x1006) ;; - asus,rt-acrh17|\ - asus,rt-ac58u|\ - p2w,r619ac-128m|\ - p2w,r619ac) - lan_mac=$(cat /sys/class/net/eth0/address) - wan_mac=$(macaddr_add "$lan_mac" 1) - label_mac=$lan_mac + asus,rt-ac58u) + CI_UBIPART=UBI_DEV + wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) + lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006) + label_mac=$wan_mac ;; cilab,meshpoint-one) label_mac=$(mtd_get_mac_binary "ART" 0x1006) diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 89b44146e..e41baecf6 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -23,10 +23,6 @@ case "$FIRMWARE" in ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; - asus,rt-acrh17) - CI_UBIPART=UBI_DEV - caldata_extract_ubi "Factory" 0x9000 0x2f20 - ;; avm,fritzrepeater-3000) /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ @@ -56,8 +52,6 @@ case "$FIRMWARE" in glinet,gl-b1300 |\ linksys,ea6350v3 |\ mobipromo,cm520-79f |\ - p2w,r619ac-128m |\ - p2w,r619ac |\ qcom,ap-dk01.1-c1) caldata_extract "ART" 0x1000 0x2f20 ;; @@ -70,7 +64,6 @@ case "$FIRMWARE" in asus,map-ac2200) caldata_extract_ubi "Factory" 0x1000 0x2f20 ;; - asus,rt-acrh17|\ asus,rt-ac58u) CI_UBIPART=UBI_DEV caldata_extract_ubi "Factory" 0x1000 0x2f20 @@ -126,8 +119,7 @@ case "$FIRMWARE" in ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +2) ;; netgear,ex6100v2 |\ - netgear,ex6150v2 |\ - netgear,ex6200v2) + netgear,ex6150v2) caldata_extract "ART" 0x1000 0x2f20 ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0) ;; @@ -148,8 +140,6 @@ case "$FIRMWARE" in glinet,gl-b1300 |\ linksys,ea6350v3 |\ mobipromo,cm520-79f |\ - p2w,r619ac-128m |\ - p2w,r619ac |\ qcom,ap-dk01.1-c1) caldata_extract "ART" 0x5000 0x2f20 ;; @@ -217,8 +207,7 @@ case "$FIRMWARE" in ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +3) ;; netgear,ex6100v2 |\ - netgear,ex6150v2 |\ - netgear,ex6200v2) + netgear,ex6150v2) caldata_extract "ART" 0x5000 0x2f20 ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc) ;; diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/net/21_adjust_network b/target/linux/ipq40xx/base-files/etc/hotplug.d/net/21_adjust_network deleted file mode 100644 index 7aa4f6f72..000000000 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/net/21_adjust_network +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -[ -f /lib/adjust_network.sh ] && { - . /lib/adjust_network.sh - - adjust_eth_queue -} diff --git a/target/linux/ipq40xx/base-files/etc/init.d/adjust_network b/target/linux/ipq40xx/base-files/etc/init.d/adjust_network deleted file mode 100755 index 02af81983..000000000 --- a/target/linux/ipq40xx/base-files/etc/init.d/adjust_network +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=11 -STOP=98 - -adjust_smp_affinity() { - test -f /lib/adjust_network.sh && { - . /lib/adjust_network.sh - - adjust_eth_queue - adjust_edma_smp_affinity - adjust_radio_smp_affinity - } -} - -boot() { - adjust_smp_affinity -} diff --git a/target/linux/ipq40xx/base-files/lib/adjust_network.sh b/target/linux/ipq40xx/base-files/lib/adjust_network.sh deleted file mode 100644 index 99423022c..000000000 --- a/target/linux/ipq40xx/base-files/lib/adjust_network.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -# this scripts is used for adjust cpu's choice of interrupts. -# - -################################################ -# Adjust smp_affinity of edma -# Globals: -# None -# Arguments: -# None -# Returns: -# None -# Remark: -# execute only once on start-up. -################################################ -adjust_edma_smp_affinity() { - grep -q edma_eth_ /proc/interrupts || return 0 - local nr=`cat /proc/cpuinfo | grep processor | wc -l` - local cpu=0 - local tx_irq_num - - for tx_num in `seq 0 1 15` ; do - cpu=`printf "%x" $((1<<((tx_num/4+0)%nr)))` - tx_irq_num=`grep -m1 edma_eth_tx$tx_num /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '` - [ -n "$tx_irq_num" ] && echo $cpu > /proc/irq/$tx_irq_num/smp_affinity - done - - for rx_num in `seq 0 1 7` ; do - cpu=`printf "%x" $((1<<((rx_num/2)%nr)))` - rx_irq_num=`grep -m1 edma_eth_rx$rx_num /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '` - [ -n "$rx_irq_num" ] && echo $cpu > /proc/irq/$rx_irq_num/smp_affinity - done -} - -################################################ -# Adjust smp_affinity of ath10k for 2G and 5G -# Globals: -# None -# Arguments: -# None -# Returns: -# None -# Remark: -# execute only once on start-up. -################################################ -adjust_radio_smp_affinity() { - local irqs="`grep -E 'ath10k' /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`" - local nr=`cat /proc/cpuinfo | grep processor | wc -l` - local idx=2 - - for irq in $irqs; do - cpu=`printf "%x" $((1<<((idx)%nr)))` - echo $cpu > /proc/irq/$irq/smp_affinity - idx=$((idx+1)) - done -} - -################################################ -# Adjust queue of eth -# Globals: -# None -# Arguments: -# None -# Returns: -# None -# Remark: -# Each network reboot needs to be executed. -################################################ -adjust_eth_queue() { - local nr=`cat /proc/cpuinfo | grep processor | wc -l` - local idx=0 - - for epath in /sys/class/net/eth[0-9]*; do - test -e $epath || break - echo $epath | grep -q "\." && continue - eth=`basename $epath` - idx=0 - for exps in /sys/class/net/$eth/queues/rx-[0-9]*/rps_cpus; do - test -e $exps || break - cpu=`printf "%x" $((1<<((idx+1)%nr)))` - idx=$((idx+1)) - echo $cpu > $exps - echo 256 > `dirname $exps`/rps_flow_cnt - done - which ethtool >/dev/null 2>&1 && ethtool -K $eth gro off - done - - echo 1024 > /proc/sys/net/core/rps_sock_flow_entries -} diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 0294ec8cd..4d8113698 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -5,9 +5,11 @@ preinit_set_mac_address() { asus,map-ac2200) base_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) ip link set dev eth0 address $(macaddr_add "$base_mac" +1) + ip link set dev eth1 address $(macaddr_add "$base_mac" +3) ;; ezviz,cs-w3-wd1200g-eup) ip link set dev eth0 address $(mtd_get_mac_binary "ART" 0x6) + ip link set dev eth1 address $(mtd_get_mac_binary "ART" 0x0) ;; engenius,eap2200) base_mac=$(cat /sys/class/net/eth0/address) @@ -16,12 +18,7 @@ preinit_set_mac_address() { linksys,ea8300) base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) ip link set dev eth0 address "${base_mac}" - ;; - asus,rt-acrh17|\ - asus,rt-ac58u) - CI_UBIPART=UBI_DEV - base_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) - ip link set dev eth0 address $(macaddr_add "$base_mac" +1) + ip link set dev eth1 address $(macaddr_add "${base_mac}" 1) ;; meraki,mr33) mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) @@ -30,7 +27,7 @@ preinit_set_mac_address() { zyxel,nbg6617) base_mac=$(cat /sys/class/net/eth0/address) ip link set dev eth0 address $(macaddr_add "$base_mac" +2) - ;; + ip link set dev eth1 address $(macaddr_add "$base_mac" +3) esac } diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 92f6747b4..95a32e9af 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -198,7 +198,6 @@ platform_do_upgrade() { CI_KERNPART="linux" nand_do_upgrade "$1" ;; - asus,rt-acrh17|\ asus,rt-ac58u) local magic=$(get_magic_long "$1") CI_UBIPART="UBI_DEV" @@ -214,9 +213,7 @@ platform_do_upgrade() { CI_UBIPART="ubifs" askey_do_upgrade "$1" ;; - compex,wpj419|\ - p2w,r619ac-128m|\ - p2w,r619ac) + compex,wpj419) nand_do_upgrade "$1" ;; linksys,ea6350v3 |\ diff --git a/target/linux/ipq40xx/config-5.4 b/target/linux/ipq40xx/config-5.4 index d7483927f..33551a95e 100644 --- a/target/linux/ipq40xx/config-5.4 +++ b/target/linux/ipq40xx/config-5.4 @@ -427,19 +427,6 @@ CONFIG_POWER_RESET_MSM=y CONFIG_POWER_SUPPLY=y CONFIG_PPS=y CONFIG_PRINTK_TIME=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_PTP_1588_CLOCK=y CONFIG_QCOM_A53PLL=y CONFIG_QCOM_BAM_DMA=y diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi index 04bba7747..cc70080c9 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi @@ -43,12 +43,6 @@ qcom,wifi_glb_cfg = ; }; - tcsr@194b000 { - compatible = "qcom,tcsr"; - reg = <0x194b000 0x100>; - qcom,usb-hsphy-mode-select = ; - }; - ess_tcsr@1953000 { compatible = "qcom,tcsr"; reg = <0x1953000 0x1000>; @@ -61,14 +55,6 @@ qcom,wifi_noc_memtype_m0_m2 = ; }; - usb2@60f8800 { - status = "okay"; - }; - - usb3@8af8800 { - status = "okay"; - }; - crypto@8e3a000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6200v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6200v2.dts deleted file mode 100644 index c43eb7206..000000000 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6200v2.dts +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2015, The Linux Foundation. All rights reserved. - * Copyright (c) 2018, David Bauer - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -#include "qcom-ipq4018-ex61x0v2.dtsi" -#include -#include - -/ { - model = "Netgear EX6200v2"; - compatible = "netgear,ex6200v2"; -}; - -&usb3_ss_phy { - status = "okay"; -}; - -&usb3_hs_phy { - status = "okay"; -}; - -&usb2_hs_phy { - status = "okay"; -}; - -&wifi0 { - qcom,ath10k-calibration-variant = "Netgear-EX6150v2"; -}; - -&wifi1 { - qcom,ath10k-calibration-variant = "Netgear-EX6150v2"; -}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts deleted file mode 100644 index b51378a7e..000000000 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "qcom-ipq4019-r619ac.dtsi" - -/ { - model = "P&W R619AC 128M"; - compatible = "p2w,r619ac-128m"; - - chosen { - bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs"; - }; -}; - -&rootfs_part1 { - reg = <0x0 0x8000000>; -}; - -/delete-node/ &rootfs_part2; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts deleted file mode 100644 index 31010dd17..000000000 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "qcom-ipq4019-r619ac.dtsi" - -/ { - model = "P&W R619AC"; - compatible = "p2w,r619ac"; - - chosen { - bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs"; - }; -}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi deleted file mode 100644 index 81018dd05..000000000 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi +++ /dev/null @@ -1,322 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "qcom-ipq4019.dtsi" -#include -#include -#include - -/ { - aliases { - led-boot = &led_sys; - led-failsafe = &led_sys; - led-running = &led_sys; - led-upgrade = &led_sys; - label-mac-device = &gmac0; - }; - - soc { - rng@22000 { - status = "okay"; - }; - - mdio@90000 { - status = "okay"; - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - }; - - ess-psgmii@98000 { - status = "okay"; - }; - - tcsr@1949000 { - compatible = "qcom,tcsr"; - reg = <0x1949000 0x100>; - qcom,wifi_glb_cfg = ; - }; - - tcsr@194b000 { - compatible = "qcom,tcsr"; - reg = <0x194b000 0x100>; - qcom,usb-hsphy-mode-select = ; - }; - - ess_tcsr@1953000 { - compatible = "qcom,tcsr"; - reg = <0x1953000 0x1000>; - qcom,ess-interface-select = ; - }; - - tcsr@1957000 { - compatible = "qcom,tcsr"; - reg = <0x1957000 0x100>; - qcom,wifi_noc_memtype_m0_m2 = ; - }; - - usb2@60f8800 { - status = "okay"; - }; - - usb3@8af8800 { - status = "okay"; - }; - - crypto@8e3a000 { - status = "okay"; - }; - - watchdog@b017000 { - status = "okay"; - }; - - ess-switch@c000000 { - status = "okay"; - }; - - edma@c080000 { - status = "okay"; - }; - }; - - leds { - compatible = "gpio-leds"; - pinctrl-0 = <&led_pins>; - pinctrl-names = "default"; - - led_sys: sys { - label = "r619ac:blue:sys"; - gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>; - }; - - wlan2g { - label = "r619ac:blue:wlan2g"; - gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "phy0tpt"; - }; - - wlan5g { - label = "r619ac:blue:wlan5g"; - gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "phy1tpt"; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&blsp_dma { - status = "okay"; -}; - -&blsp1_spi1 { - status = "okay"; - - flash@0 { - reg = <0>; - compatible = "jedec,spi-nor"; - spi-max-frequency = <24000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "SBL1"; - reg = <0x0 0x40000>; - read-only; - }; - - partition@40000 { - label = "MIBIB"; - reg = <0x40000 0x20000>; - read-only; - }; - - partition@60000 { - label = "QSEE"; - reg = <0x60000 0x60000>; - read-only; - }; - - partition@c0000 { - label = "CDT"; - reg = <0xc0000 0x10000>; - read-only; - }; - - partition@d0000 { - label = "DDRPARAMS"; - reg = <0xd0000 0x10000>; - read-only; - }; - - partition@e0000 { - label = "APPSBLENV"; - reg = <0xe0000 0x10000>; - read-only; - }; - - partition@f0000 { - label = "APPSBL"; - reg = <0xf0000 0x80000>; - read-only; - }; - - partition@1 { - label = "Bootloader"; - reg = <0x0 0x170000>; - read-only; - }; - - partition@170000 { - label = "ART"; - reg = <0x170000 0x10000>; - read-only; - }; - - partition@180000 { - label = "unused"; - reg = <0x180000 0xe80000>; - }; - }; - }; -}; - -&blsp1_uart1 { - pinctrl-0 = <&serial_0_pins>; - pinctrl-names = "default"; - status = "okay"; -}; - -&cryptobam { - status = "okay"; -}; - -&nand { - status = "okay"; - - nand@0 { - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - rootfs_part1: partition@0 { - label = "rootfs"; - reg = <0x0 0x4000000>; - }; - - rootfs_part2: partition@4000000 { - label = "unused1"; - reg = <0x4000000 0x4000000>; - }; - }; - }; -}; - -&qpic_bam { - status = "okay"; -}; - -&sdhci { - pinctrl-0 = <&sd_0_pins>; - pinctrl-names = "default"; - vqmmc-supply = <&vqmmc>; - status = "okay"; -}; - -&tlmm { - mdio_pins: mdio_pinmux { - mux_1 { - pins = "gpio6"; - function = "mdio"; - bias-pull-up; - }; - - mux_2 { - pins = "gpio7"; - function = "mdc"; - bias-pull-up; - }; - }; - - sd_0_pins: sd_0_pinmux { - mux_1 { - pins = "gpio23", "gpio24", "gpio25", "gpio26", "gpio28"; - function = "sdio"; - drive-strength = <10>; - }; - - mux_2 { - pins = "gpio27"; - function = "sdio"; - drive-strength = <16>; - }; - }; - - serial_0_pins: serial0-pinmux { - mux { - pins = "gpio16", "gpio17"; - function = "blsp_uart0"; - bias-disable; - }; - }; - - led_pins: led_pinmux { - mux { - pins = "gpio32", "gpio39", "gpio50"; - function = "gpio"; - bias-pull-up; - output-low; - }; - - mux_1 { - pins = "gpio52"; - function = "gpio"; - bias-pull-up; - output-high; - }; - - mux_2 { - pins = "gpio61"; - function = "gpio"; - bias-pull-down; - output-high; - }; - }; -}; - -&usb3_ss_phy { - status = "okay"; -}; - -&usb3_hs_phy { - status = "okay"; -}; - -&usb2_hs_phy { - status = "okay"; -}; - -&vqmmc { - status = "okay"; -}; - -&wifi0 { - status = "okay"; - qcom,ath10k-calibration-variant = "R619AC"; -}; - -&wifi1 { - status = "okay"; - qcom,ath10k-calibration-variant = "R619AC"; -}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-acrh17.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-acrh17.dts deleted file mode 100644 index bb71df8c9..000000000 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-acrh17.dts +++ /dev/null @@ -1,276 +0,0 @@ -/* Copyright (c) 2015, The Linux Foundation. All rights reserved. - * Copyright (C) 2019 X-WRT - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -#include "qcom-ipq4019.dtsi" -#include -#include -#include - -/ { - model = "ASUS RT-ACRH17"; - compatible = "asus,rt-acrh17"; - - memory { - device_type = "memory"; - reg = <0x80000000 0x10000000>; - }; - - aliases { - led-boot = &power; - led-failsafe = &power; - led-running = &power; - led-upgrade = &power; - }; - - chosen { - bootargs-append = " ubi.mtd=UBI_DEV"; - }; - - soc { - rng@22000 { - status = "okay"; - }; - - mdio@90000 { - status = "okay"; - }; - - ess-psgmii@98000 { - status = "okay"; - }; - - tcsr@1949000 { - compatible = "qcom,tcsr"; - reg = <0x1949000 0x100>; - qcom,wifi_glb_cfg = ; - }; - - tcsr@194b000 { - compatible = "qcom,tcsr"; - reg = <0x194b000 0x100>; - qcom,usb-hsphy-mode-select = ; - }; - - ess_tcsr@1953000 { - compatible = "qcom,tcsr"; - reg = <0x1953000 0x1000>; - qcom,ess-interface-select = ; - }; - - tcsr@1957000 { - compatible = "qcom,tcsr"; - reg = <0x1957000 0x100>; - qcom,wifi_noc_memtype_m0_m2 = ; - }; - - usb2@60f8800 { - status = "okay"; - }; - - usb3@8af8800 { - status = "okay"; - }; - - crypto@8e3a000 { - status = "okay"; - }; - - watchdog@b017000 { - status = "okay"; - }; - - ess-switch@c000000 { - status = "okay"; - }; - - edma@c080000 { - status = "okay"; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&tlmm 11 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - power: status { - label = "rt-acrh17:blue:status"; - gpios = <&tlmm 40 GPIO_ACTIVE_LOW>; - }; - - lan1 { - label = "rt-acrh17:blue:lan1"; - gpios = <&tlmm 45 GPIO_ACTIVE_LOW>; - }; - - lan2 { - label = "rt-acrh17:blue:lan2"; - gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; - }; - - lan3 { - label = "rt-acrh17:blue:lan3"; - gpios = <&tlmm 42 GPIO_ACTIVE_LOW>; - }; - - lan4 { - label = "rt-acrh17:blue:lan4"; - gpios = <&tlmm 49 GPIO_ACTIVE_LOW>; - }; - - wan_blue { - label = "rt-acrh17:blue:wan"; - gpios = <&tlmm 61 GPIO_ACTIVE_HIGH>; - }; - - wan_red { - label = "rt-acrh17:red:wan"; - gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>; - }; - - wlan2g { - label = "rt-acrh17:blue:wlan2g"; - gpios = <&tlmm 52 GPIO_ACTIVE_LOW>; - }; - - wlan5g { - label = "rt-acrh17:blue:wlan5g"; - gpios = <&tlmm 54 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&cryptobam { - status = "okay"; -}; - -&blsp_dma { - status = "okay"; -}; - -&qpic_bam { - status = "okay"; -}; - -&nand { - pinctrl-0 = <&nand_pins>; - pinctrl-names = "default"; - status = "okay"; - - nand@0 { - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "Bootloader"; - reg = <0x000000000000 0x000000400000>; - read-only; - }; - partition@400000 { - label = "UBI_DEV"; - reg = <0x000000400000 0x000007C00000>; - }; - }; - }; -}; - -&tlmm { - serial_pins: serial_pinmux { - mux { - pins = "gpio16", "gpio17"; - function = "blsp_uart0"; - bias-disable; - }; - }; - - nand_pins: nand_pins { - pullups { - pins = "gpio53", "gpio58", - "gpio59"; - function = "qpic"; - bias-pull-up; - }; - - pulldowns { - pins = "gpio55", "gpio56", - "gpio57", "gpio60", - "gpio62", "gpio63", "gpio64", - "gpio65", "gpio66", "gpio67", - "gpio69"; - function = "qpic"; - bias-pull-down; - }; - }; -}; - -&pcie0 { - status = "okay"; - perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>; - wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>; - - bridge@0,0 { - reg = <0x00000000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - ranges; - - wifi2: wifi@1,0 { - compatible = "qcom,ath10k"; - status = "okay"; - reg = <0x00010000 0 0 0 0>; - }; - }; -}; - -&wifi0 { - status = "okay"; - qcom,ath10k-calibration-variant = "RT-ACRH17"; -}; - -&blsp1_uart1 { - pinctrl-0 = <&serial_pins>; - pinctrl-names = "default"; - status = "okay"; -}; - -&usb3_ss_phy { - status = "okay"; -}; - -&usb3_hs_phy { - status = "okay"; -}; - -&usb2_hs_phy { - status = "okay"; -}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 18e789fac..5c9c76da5 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -204,24 +204,6 @@ define Device/asus_rt-ac58u endef TARGET_DEVICES += asus_rt-ac58u -define Device/asus_rt-acrh17 - $(call Device/FitImageLzma) - DEVICE_VENDOR := ASUS - DEVICE_MODEL := RT-ACRH17 - SOC := qcom-ipq4019 - BLOCKSIZE := 128k - PAGESIZE := 2048 - DTB_SIZE := 65536 - IMAGE_SIZE := 20439364 - FILESYSTEMS := squashfs - UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC82U') - KERNEL_INITRAMFS := $$(KERNEL) | uImage none - KERNEL_INITRAMFS_SUFFIX := -factory.trx - IMAGES := sysupgrade.bin - DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-asus_rt-acrh17 kmod-usb-ledtrig-usbport -endef -TARGET_DEVICES += asus_rt-acrh17 - define Device/avm_fritzbox-4040 $(call Device/FitImageLzma) DEVICE_VENDOR := AVM @@ -558,18 +540,6 @@ define Device/netgear_ex6150v2 endef TARGET_DEVICES += netgear_ex6150v2 -define Device/netgear_ex6200v2 - $(call Device/DniImage) - DEVICE_DTS_CONFIG := config@4 - NETGEAR_HW_ID := 29765265+16+0+256+2x2+2x2 - DEVICE_VENDOR := Netgear - DEVICE_MODEL := EX6200 - DEVICE_VARIANT := v2 - SOC := qcom-ipq4018 - DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport -endef -TARGET_DEVICES += netgear_ex6200v2 - define Device/openmesh_a42 $(call Device/FitImageLzma) DEVICE_VENDOR := OpenMesh @@ -634,35 +604,6 @@ define Device/qcom_ap-dk04.1-c1 endef TARGET_DEVICES += qcom_ap-dk04.1-c1 -define Device/p2w_r619ac - $(call Device/FitzImage) - $(call Device/UbiFit) - DEVICE_VENDOR := P&W - DEVICE_MODEL := R619AC - SOC := qcom-ipq4019 - DEVICE_DTS_CONFIG := config@10 - BLOCKSIZE := 128k - PAGESIZE := 2048 - IMAGES += nand-factory.bin - IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand - DEVICE_PACKAGES := ipq-wifi-p2w_r619ac -kmod-ath10k-ct -ath10k-firmware-qca4019-ct kmod-ath10k ath10k-firmware-qca4019 lte-modem-p2w-r619ac -endef -TARGET_DEVICES += p2w_r619ac - -define Device/p2w_r619ac-128m - $(call Device/FitzImage) - $(call Device/UbiFit) - DEVICE_VENDOR := P&W - DEVICE_MODEL := R619AC - DEVICE_VARIANT := 128M - SOC := qcom-ipq4019 - DEVICE_DTS_CONFIG := config@10 - BLOCKSIZE := 128k - PAGESIZE := 2048 - DEVICE_PACKAGES := ipq-wifi-p2w_r619ac -kmod-ath10k-ct -ath10k-firmware-qca4019-ct kmod-ath10k ath10k-firmware-qca4019 lte-modem-p2w-r619ac -endef -TARGET_DEVICES += p2w_r619ac-128m - define Device/qxwlan_e2600ac-c1 $(call Device/FitImage) DEVICE_VENDOR := Qxwlan diff --git a/target/linux/ipq40xx/patches-4.19/705-net-add-qualcomm-ar40xx-phy.patch b/target/linux/ipq40xx/patches-4.19/705-net-add-qualcomm-ar40xx-phy.patch index bc75aab08..4247ef10c 100644 --- a/target/linux/ipq40xx/patches-4.19/705-net-add-qualcomm-ar40xx-phy.patch +++ b/target/linux/ipq40xx/patches-4.19/705-net-add-qualcomm-ar40xx-phy.patch @@ -26,7 +26,7 @@ obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o --- /dev/null +++ b/drivers/net/phy/ar40xx.c -@@ -0,0 +1,2122 @@ +@@ -0,0 +1,2090 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * @@ -799,37 +799,6 @@ + return 0; +} + -+static int -+ar40xx_sw_get_port_stats(struct switch_dev *dev, int port, -+ struct switch_port_stats *stats) -+{ -+ struct ar40xx_priv *priv = swdev_to_ar40xx(dev); -+ u32 num_mibs = ARRAY_SIZE(ar40xx_mibs); -+ u64 *mib_stats; -+ int ret = 0; -+ static int last_port = AR40XX_NUM_PORTS - 1; -+ -+ mutex_lock(&priv->mib_lock); -+ -+ /* Avoid unnecessary capture */ -+ if (last_port >= port) { -+ ret = ar40xx_mib_capture(priv); -+ if (ret) -+ goto unlock; -+ } -+ last_port = port; -+ -+ ar40xx_mib_fetch_port_stat(priv, port, false); -+ -+ mib_stats = &priv->mib_stats[port * num_mibs]; -+ /* 15: TXBYTE, 31: RXGOODBYTE */ -+ stats->tx_bytes = mib_stats[15]; -+ stats->rx_bytes = mib_stats[31]; -+unlock: -+ mutex_unlock(&priv->mib_lock); -+ return ret; -+} -+ +static const struct switch_attr ar40xx_sw_attr_globals[] = { + { + .type = SWITCH_TYPE_INT, @@ -1208,7 +1177,6 @@ + /* disable phy internal loopback */ + mdiobus_write(bus, 0x1f, 0x10, 0x6860); + mdiobus_write(bus, 0x1f, 0x0, 0x9040); -+ ar40xx_phy_mmd_write(priv, 0x1f, 7, 0x8076, 0x0670); /* 1000_LED_n */ + + for (phy = 0; phy < AR40XX_NUM_PORTS - 1; phy++) { + /* disable mac loop back */ @@ -1820,7 +1788,6 @@ + .apply_config = ar40xx_sw_hw_apply, + .reset_switch = ar40xx_sw_reset_switch, + .get_port_link = ar40xx_sw_get_port_link, -+ .get_port_stats = ar40xx_sw_get_port_stats, +}; + +/* Start of phy driver support */ diff --git a/target/linux/ipq40xx/patches-4.19/715-essedma-refine-txq-to-be-adaptive-of-cpus-and-netdev.patch b/target/linux/ipq40xx/patches-4.19/715-essedma-refine-txq-to-be-adaptive-of-cpus-and-netdev.patch deleted file mode 100644 index d8d09c142..000000000 --- a/target/linux/ipq40xx/patches-4.19/715-essedma-refine-txq-to-be-adaptive-of-cpus-and-netdev.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet/qualcomm/essedma/edma.c -index 724f355..7a16236 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c -@@ -22,14 +22,6 @@ extern struct net_device *edma_netdev[EDMA_MAX_PORTID_SUPPORTED]; - bool edma_stp_rstp; - u16 edma_ath_eth_type; - --/* edma_skb_priority_offset() -- * get edma skb priority -- */ --static unsigned int edma_skb_priority_offset(struct sk_buff *skb) --{ -- return (skb->priority >> 2) & 1; --} -- - /* edma_alloc_tx_ring() - * Allocate Tx descriptors ring - */ -@@ -1014,13 +1006,14 @@ static inline u16 edma_tpd_available(struct edma_common_info *edma_cinfo, - /* edma_tx_queue_get() - * Get the starting number of the queue - */ --static inline int edma_tx_queue_get(struct edma_adapter *adapter, -+static inline int edma_tx_queue_get(struct edma_common_info *edma_cinfo, struct edma_adapter *adapter, - struct sk_buff *skb, int txq_id) - { - /* skb->priority is used as an index to skb priority table - * and based on packet priority, correspong queue is assigned. -+ * FIXME we just simple use jiffies for time base balance - */ -- return adapter->tx_start_offset[txq_id] + edma_skb_priority_offset(skb); -+ return adapter->tx_start_offset[txq_id] + (smp_processor_id() % edma_cinfo->num_txq_per_core_netdev); - } - - /* edma_tx_update_hw_idx() -@@ -1389,8 +1382,9 @@ netdev_tx_t edma_xmit(struct sk_buff *skb, - } - - /* this will be one of the 4 TX queues exposed to linux kernel */ -- txq_id = skb_get_queue_mapping(skb); -- queue_id = edma_tx_queue_get(adapter, skb, txq_id); -+ /* XXX what if num_online_cpus() > EDMA_CPU_CORES_SUPPORTED */ -+ txq_id = ((jiffies >> 5) % (EDMA_CPU_CORES_SUPPORTED - 1) + smp_processor_id() + 1) % EDMA_CPU_CORES_SUPPORTED; -+ queue_id = edma_tx_queue_get(edma_cinfo, adapter, skb, txq_id); - etdr = edma_cinfo->tpd_ring[queue_id]; - nq = netdev_get_tx_queue(net_dev, txq_id); - -@@ -1871,8 +1865,8 @@ void edma_free_irqs(struct edma_adapter *adapter) - int i, j; - int k = ((edma_cinfo->num_rx_queues == 4) ? 1 : 2); - -- for (i = 0; i < CONFIG_NR_CPUS; i++) { -- for (j = edma_cinfo->edma_percpu_info[i].tx_start; j < (edma_cinfo->edma_percpu_info[i].tx_start + 4); j++) -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) { -+ for (j = edma_cinfo->edma_percpu_info[i].tx_start; j < (edma_cinfo->edma_percpu_info[i].tx_start + edma_cinfo->num_txq_per_core); j++) - free_irq(edma_cinfo->tx_irq[j], &edma_cinfo->edma_percpu_info[i]); - - for (j = edma_cinfo->edma_percpu_info[i].rx_start; j < (edma_cinfo->edma_percpu_info[i].rx_start + k); j++) -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.h b/drivers/net/ethernet/qualcomm/essedma/edma.h -index 015e5f5..abb0bd5 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.h -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.h -@@ -324,6 +324,7 @@ struct edma_common_info { - u32 from_cpu; /* from CPU TPD field */ - u32 num_rxq_per_core; /* Rx queues per core */ - u32 num_txq_per_core; /* Tx queues per core */ -+ u32 num_txq_per_core_netdev; /* Tx queues per core per netdev */ - u16 tx_ring_count; /* Tx ring count */ - u16 rx_ring_count; /* Rx ring*/ - u16 rx_head_buffer_len; /* rx buffer length */ -@@ -331,7 +332,7 @@ struct edma_common_info { - u32 page_mode; /* Jumbo frame supported flag */ - u32 fraglist_mode; /* fraglist supported flag */ - struct edma_hw hw; /* edma hw specific structure */ -- struct edma_per_cpu_queues_info edma_percpu_info[CONFIG_NR_CPUS]; /* per cpu information */ -+ struct edma_per_cpu_queues_info edma_percpu_info[EDMA_CPU_CORES_SUPPORTED]; /* per cpu information */ - spinlock_t stats_lock; /* protect edma stats area for updation */ - struct timer_list edma_stats_timer; - bool is_single_phy; -@@ -401,7 +402,7 @@ struct edma_adapter { - u32 link_state; /* phy link state */ - u32 phy_mdio_addr; /* PHY device address on MII interface */ - u32 poll_required; /* check if link polling is required */ -- u32 tx_start_offset[CONFIG_NR_CPUS]; /* tx queue start */ -+ u32 tx_start_offset[EDMA_CPU_CORES_SUPPORTED]; /* tx queue start */ - u32 default_vlan_tag; /* vlan tag */ - u32 dp_bitmap; - uint8_t phy_id[MII_BUS_ID_SIZE + 3]; -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c -index d53c63b..2d4770c 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c -@@ -719,11 +719,7 @@ static int edma_axi_probe(struct platform_device *pdev) - int i, j, k, err = 0; - int portid_bmp; - int idx = 0, idx_mac = 0; -- -- if (CONFIG_NR_CPUS != EDMA_CPU_CORES_SUPPORTED) { -- dev_err(&pdev->dev, "Invalid CPU Cores\n"); -- return -EINVAL; -- } -+ int netdev_group = 2; - - if ((num_rxq != 4) && (num_rxq != 8)) { - dev_err(&pdev->dev, "Invalid RX queue, edma probe failed\n"); -@@ -747,7 +743,7 @@ static int edma_axi_probe(struct platform_device *pdev) - /* Initialize the netdev array before allocation - * to avoid double free - */ -- for (i = 0 ; i < edma_cinfo->num_gmac ; i++) -+ for (i = 0 ; i < EDMA_MAX_PORTID_SUPPORTED; i++) - edma_netdev[i] = NULL; - - for (i = 0 ; i < edma_cinfo->num_gmac ; i++) { -@@ -768,8 +764,11 @@ static int edma_axi_probe(struct platform_device *pdev) - - /* Fill ring details */ - edma_cinfo->num_tx_queues = EDMA_MAX_TRANSMIT_QUEUE; -- edma_cinfo->num_txq_per_core = (EDMA_MAX_TRANSMIT_QUEUE / 4); -+ edma_cinfo->num_txq_per_core = (EDMA_MAX_TRANSMIT_QUEUE / num_online_cpus()); -+ edma_cinfo->num_txq_per_core_netdev = (EDMA_MAX_TRANSMIT_QUEUE / netdev_group / num_online_cpus()); - edma_cinfo->tx_ring_count = EDMA_TX_RING_SIZE; -+ if (edma_cinfo->num_txq_per_core == 0) -+ edma_cinfo->num_txq_per_core = 1; - - /* Update num rx queues based on module parameter */ - edma_cinfo->num_rx_queues = num_rxq; -@@ -939,6 +938,13 @@ static int edma_axi_probe(struct platform_device *pdev) - idx_mac++; - } - -+ if (edma_cinfo->num_gmac == 1) { -+ netdev_group = 1; -+ edma_cinfo->num_txq_per_core_netdev = (EDMA_MAX_TRANSMIT_QUEUE / netdev_group / num_online_cpus()); -+ } -+ if (edma_cinfo->num_txq_per_core_netdev == 0) -+ edma_cinfo->num_txq_per_core_netdev = 1; -+ - /* Populate the adapter structure register the netdevice */ - for (i = 0; i < edma_cinfo->num_gmac; i++) { - int k, m; -@@ -946,17 +952,16 @@ static int edma_axi_probe(struct platform_device *pdev) - adapter[i] = netdev_priv(edma_netdev[i]); - adapter[i]->netdev = edma_netdev[i]; - adapter[i]->pdev = pdev; -- for (j = 0; j < CONFIG_NR_CPUS; j++) { -- m = i % 2; -- adapter[i]->tx_start_offset[j] = -- ((j << EDMA_TX_CPU_START_SHIFT) + (m << 1)); -+ for (j = 0; j < num_online_cpus() && j < EDMA_CPU_CORES_SUPPORTED; j++) { -+ m = i % netdev_group; -+ adapter[i]->tx_start_offset[j] = j * edma_cinfo->num_txq_per_core + m * edma_cinfo->num_txq_per_core_netdev; - /* Share the queues with available net-devices. - * For instance , with 5 net-devices - * eth0/eth2/eth4 will share q0,q1,q4,q5,q8,q9,q12,q13 - * and eth1/eth3 will get the remaining. - */ - for (k = adapter[i]->tx_start_offset[j]; k < -- (adapter[i]->tx_start_offset[j] + 2); k++) { -+ (adapter[i]->tx_start_offset[j] + edma_cinfo->num_txq_per_core_netdev); k++) { - if (edma_fill_netdev(edma_cinfo, k, i, j)) { - pr_err("Netdev overflow Error\n"); - goto err_register; -@@ -1109,9 +1114,12 @@ static int edma_axi_probe(struct platform_device *pdev) - /* populate per_core_info, do a napi_Add, request 16 TX irqs, - * 8 RX irqs, do a napi enable - */ -- for (i = 0; i < CONFIG_NR_CPUS; i++) { -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) { - u8 rx_start; - -+ tx_mask[i] = (0xFFFF >> (16 - edma_cinfo->num_txq_per_core)) << (i * edma_cinfo->num_txq_per_core); -+ tx_start[i] = i * edma_cinfo->num_txq_per_core; -+ - edma_cinfo->edma_percpu_info[i].napi.state = 0; - - netif_napi_add(edma_netdev[0], -@@ -1131,7 +1139,7 @@ static int edma_axi_probe(struct platform_device *pdev) - - /* Request irq per core */ - for (j = edma_cinfo->edma_percpu_info[i].tx_start; -- j < tx_start[i] + 4; j++) { -+ j < tx_start[i] + edma_cinfo->num_txq_per_core; j++) { - sprintf(&edma_tx_irq[j][0], "edma_eth_tx%d", j); - err = request_irq(edma_cinfo->tx_irq[j], - edma_interrupt, -@@ -1253,7 +1261,7 @@ static int edma_axi_probe(struct platform_device *pdev) - #endif - err_rmap_add_fail: - edma_free_irqs(adapter[0]); -- for (i = 0; i < CONFIG_NR_CPUS; i++) -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) - napi_disable(&edma_cinfo->edma_percpu_info[i].napi); - err_reset: - err_unregister_sysctl_tbl: -@@ -1301,7 +1309,7 @@ static int edma_axi_remove(struct platform_device *pdev) - unregister_netdev(edma_netdev[i]); - - edma_stop_rx_tx(hw); -- for (i = 0; i < CONFIG_NR_CPUS; i++) -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) - napi_disable(&edma_cinfo->edma_percpu_info[i].napi); - - edma_irq_disable(edma_cinfo); diff --git a/target/linux/ipq40xx/patches-4.19/716-essedma-reduce-write-reg.patch b/target/linux/ipq40xx/patches-4.19/716-essedma-reduce-write-reg.patch deleted file mode 100644 index 58b87467d..000000000 --- a/target/linux/ipq40xx/patches-4.19/716-essedma-reduce-write-reg.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet/qualcomm/essedma/edma.c -index fc274c8..e9d12a4 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c -@@ -2075,15 +2075,13 @@ int edma_poll(struct napi_struct *napi, int budget) - int i, work_done = 0; - u16 rx_pending_fill; - -- /* Store the Rx/Tx status by ANDing it with -- * appropriate CPU RX?TX mask -+ /* Store the Tx status by ANDing it with -+ * appropriate CPU TX mask - */ -- edma_read_reg(EDMA_REG_RX_ISR, ®_data); -- edma_percpu_info->rx_status |= reg_data & edma_percpu_info->rx_mask; -- shadow_rx_status = edma_percpu_info->rx_status; - edma_read_reg(EDMA_REG_TX_ISR, ®_data); - edma_percpu_info->tx_status |= reg_data & edma_percpu_info->tx_mask; - shadow_tx_status = edma_percpu_info->tx_status; -+ edma_write_reg(EDMA_REG_TX_ISR, shadow_tx_status); - - /* Every core will have a start, which will be computed - * in probe and stored in edma_percpu_info->tx_start variable. -@@ -2098,6 +2096,14 @@ int edma_poll(struct napi_struct *napi, int budget) - edma_percpu_info->tx_status &= ~(1 << queue_id); - } - -+ /* Store the Rx status by ANDing it with -+ * appropriate CPU RX mask -+ */ -+ edma_read_reg(EDMA_REG_RX_ISR, ®_data); -+ edma_percpu_info->rx_status |= reg_data & edma_percpu_info->rx_mask; -+ shadow_rx_status = edma_percpu_info->rx_status; -+ edma_write_reg(EDMA_REG_RX_ISR, shadow_rx_status); -+ - /* Every core will have a start, which will be computed - * in probe and stored in edma_percpu_info->tx_start variable. - * We will shift the status bit by tx_start to obtain -@@ -2122,15 +2128,6 @@ int edma_poll(struct napi_struct *napi, int budget) - } - } - -- /* Clear the status register, to avoid the interrupts to -- * reoccur.This clearing of interrupt status register is -- * done here as writing to status register only takes place -- * once the producer/consumer index has been updated to -- * reflect that the packet transmission/reception went fine. -- */ -- edma_write_reg(EDMA_REG_RX_ISR, shadow_rx_status); -- edma_write_reg(EDMA_REG_TX_ISR, shadow_tx_status); -- - /* If budget not fully consumed, exit the polling mode */ - if (likely(work_done < budget)) { - napi_complete(napi); diff --git a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch index 8d40b389c..2ec100719 100644 --- a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-4.19/901-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 -@@ -785,11 +785,51 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -785,11 +785,47 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -24,7 +24,6 @@ Signed-off-by: John Crispin + qcom-ipq4018-ens620ext.dtb \ + qcom-ipq4018-ex6100v2.dtb \ + qcom-ipq4018-ex6150v2.dtb \ -+ qcom-ipq4018-ex6200v2.dtb \ + qcom-ipq4018-fritzbox-4040.dtb \ + qcom-ipq4018-jalapeno.dtb \ + qcom-ipq4018-meshpoint-one.dtb \ @@ -45,13 +44,10 @@ Signed-off-by: John Crispin + qcom-ipq4019-ea8300.dtb \ + qcom-ipq4019-habanero-dvk.dtb \ + qcom-ipq4019-map-ac2200.dtb \ -+ qcom-ipq4019-r619ac.dtb \ -+ qcom-ipq4019-r619ac-128m.dtb \ + qcom-ipq4019-e2600ac-c1.dtb \ + qcom-ipq4019-e2600ac-c2.dtb \ + qcom-ipq4019-rtl30vw.dtb \ + qcom-ipq4019-u4019-32m.dtb \ -+ qcom-ipq4019-rt-acrh17.dtb \ + qcom-ipq4019-wpj419.dtb \ + qcom-ipq4028-wpj428.dtb \ + qcom-ipq4029-ap-303.dtb \ diff --git a/target/linux/ipq40xx/patches-4.19/901-essedma-disable-default-vlan-tagging.patch b/target/linux/ipq40xx/patches-4.19/901-essedma-disable-default-vlan-tagging.patch deleted file mode 100644 index ec339c479..000000000 --- a/target/linux/ipq40xx/patches-4.19/901-essedma-disable-default-vlan-tagging.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 42b508d91b7f51b054f383e3aa42089ccab9300d Mon Sep 17 00:00:00 2001 -From: Chen Minqiang -Date: Thu, 15 Mar 2018 05:33:46 +0800 -Subject: [PATCH] essedma: disable default vlan tagging - -The essedma driver has its own unique take on VLAN management -and its configuration. In the original SDK, each VLAN is -assigned one virtual ethernet netdev. - -However, this is non-standard. So, this patch does away -with the default_vlan_tag property the driver is using -and therefore forces the user to use the kernel's vlan -feature. - -This patch also removes the "qcom,poll_required = <1>;" from -the essedma node. - -Signed-off-by: Christian Lamparter -Signed-off-by: Chen Minqiang ---- - arch/arm/boot/dts/qcom-ipq4019.dtsi | 5 ++--- - drivers/net/ethernet/qualcomm/essedma/edma.c | 14 +++++--------- - 2 files changed, 7 insertions(+), 12 deletions(-) - -diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi -index 3c4617f..7c3af8e 100644 ---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi -+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi -@@ -598,8 +598,7 @@ - qcom,page-mode = <0>; - qcom,rx_head_buf_size = <1540>; - qcom,mdio_supported; -- qcom,poll_required = <1>; -- qcom,num_gmac = <2>; -+ qcom,num_gmac = <1>; - interrupts = <0 65 IRQ_TYPE_EDGE_RISING - 0 66 IRQ_TYPE_EDGE_RISING - 0 67 IRQ_TYPE_EDGE_RISING -@@ -637,7 +636,7 @@ - - gmac0: gmac0 { - local-mac-address = [00 00 00 00 00 00]; -- vlan_tag = <1 0x1f>; -+ vlan_tag = <1 0x3f>; - }; - - gmac1: gmac1 { -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet/qualcomm/essedma/edma.c -index 05f9ce9..a3c0d66 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c -@@ -750,13 +750,11 @@ static void edma_rx_complete(struct edma_common_info *edma_cinfo, - edma_receive_checksum(rd, skb); - - /* Process VLAN HW acceleration indication provided by HW */ -- if (unlikely(adapter->default_vlan_tag != rd->rrd4)) { -- vlan = rd->rrd4; -- if (likely(rd->rrd7 & EDMA_RRD_CVLAN)) -- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan); -- else if (rd->rrd1 & EDMA_RRD_SVLAN) -- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan); -- } -+ vlan = rd->rrd4; -+ if (likely(rd->rrd7 & EDMA_RRD_CVLAN)) -+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan); -+ else if (rd->rrd1 & EDMA_RRD_SVLAN) -+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan); - - /* Update rx statistics */ - adapter->stats.rx_packets++; -@@ -1434,8 +1432,6 @@ netdev_tx_t edma_xmit(struct sk_buff *skb, - if (!adapter->edma_cinfo->is_single_phy) { - if (unlikely(skb_vlan_tag_present(skb))) - flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_FLAG; -- else if (adapter->default_vlan_tag) -- flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_DEFAULT_FLAG; - } - - /* Check and mark checksum offload */ --- -2.7.4 - diff --git a/target/linux/ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch b/target/linux/ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch index c69e2eec4..083de038a 100644 --- a/target/linux/ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch +++ b/target/linux/ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -531,6 +531,13 @@ config MDIO_IPQ40XX +@@ -587,6 +587,13 @@ config MDIO_IPQ40XX This driver supports the MDIO interface found in Qualcomm Atheros ipq40xx Soc chip. @@ -16,9 +16,9 @@ config MICREL_KS8995MA --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -62,6 +62,7 @@ obj-y += $(sfp-obj-y) $(sfp-obj-m) - - obj-$(CONFIG_AMD_PHY) += amd.o +@@ -70,6 +70,7 @@ ifdef CONFIG_HWMON + aquantia-objs += aquantia_hwmon.o + endif obj-$(CONFIG_AQUANTIA_PHY) += aquantia.o +obj-$(CONFIG_AR40XX_PHY) += ar40xx.o obj-$(CONFIG_AX88796B_PHY) += ax88796b.o @@ -26,7 +26,7 @@ obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o --- /dev/null +++ b/drivers/net/phy/ar40xx.c -@@ -0,0 +1,2122 @@ +@@ -0,0 +1,2090 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * @@ -799,37 +799,6 @@ + return 0; +} + -+static int -+ar40xx_sw_get_port_stats(struct switch_dev *dev, int port, -+ struct switch_port_stats *stats) -+{ -+ struct ar40xx_priv *priv = swdev_to_ar40xx(dev); -+ u32 num_mibs = ARRAY_SIZE(ar40xx_mibs); -+ u64 *mib_stats; -+ int ret = 0; -+ static int last_port = AR40XX_NUM_PORTS - 1; -+ -+ mutex_lock(&priv->mib_lock); -+ -+ /* Avoid unnecessary capture */ -+ if (last_port >= port) { -+ ret = ar40xx_mib_capture(priv); -+ if (ret) -+ goto unlock; -+ } -+ last_port = port; -+ -+ ar40xx_mib_fetch_port_stat(priv, port, false); -+ -+ mib_stats = &priv->mib_stats[port * num_mibs]; -+ /* 15: TXBYTE, 31: RXGOODBYTE */ -+ stats->tx_bytes = mib_stats[15]; -+ stats->rx_bytes = mib_stats[31]; -+unlock: -+ mutex_unlock(&priv->mib_lock); -+ return ret; -+} -+ +static const struct switch_attr ar40xx_sw_attr_globals[] = { + { + .type = SWITCH_TYPE_INT, @@ -1208,7 +1177,6 @@ + /* disable phy internal loopback */ + mdiobus_write(bus, 0x1f, 0x10, 0x6860); + mdiobus_write(bus, 0x1f, 0x0, 0x9040); -+ ar40xx_phy_mmd_write(priv, 0x1f, 7, 0x8076, 0x0670); /* 1000_LED_n */ + + for (phy = 0; phy < AR40XX_NUM_PORTS - 1; phy++) { + /* disable mac loop back */ @@ -1820,7 +1788,6 @@ + .apply_config = ar40xx_sw_hw_apply, + .reset_switch = ar40xx_sw_reset_switch, + .get_port_link = ar40xx_sw_get_port_link, -+ .get_port_stats = ar40xx_sw_get_port_stats, +}; + +/* Start of phy driver support */ diff --git a/target/linux/ipq40xx/patches-5.4/715-essedma-refine-txq-to-be-adaptive-of-cpus-and-netdev.patch b/target/linux/ipq40xx/patches-5.4/715-essedma-refine-txq-to-be-adaptive-of-cpus-and-netdev.patch deleted file mode 100644 index d8d09c142..000000000 --- a/target/linux/ipq40xx/patches-5.4/715-essedma-refine-txq-to-be-adaptive-of-cpus-and-netdev.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet/qualcomm/essedma/edma.c -index 724f355..7a16236 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c -@@ -22,14 +22,6 @@ extern struct net_device *edma_netdev[EDMA_MAX_PORTID_SUPPORTED]; - bool edma_stp_rstp; - u16 edma_ath_eth_type; - --/* edma_skb_priority_offset() -- * get edma skb priority -- */ --static unsigned int edma_skb_priority_offset(struct sk_buff *skb) --{ -- return (skb->priority >> 2) & 1; --} -- - /* edma_alloc_tx_ring() - * Allocate Tx descriptors ring - */ -@@ -1014,13 +1006,14 @@ static inline u16 edma_tpd_available(struct edma_common_info *edma_cinfo, - /* edma_tx_queue_get() - * Get the starting number of the queue - */ --static inline int edma_tx_queue_get(struct edma_adapter *adapter, -+static inline int edma_tx_queue_get(struct edma_common_info *edma_cinfo, struct edma_adapter *adapter, - struct sk_buff *skb, int txq_id) - { - /* skb->priority is used as an index to skb priority table - * and based on packet priority, correspong queue is assigned. -+ * FIXME we just simple use jiffies for time base balance - */ -- return adapter->tx_start_offset[txq_id] + edma_skb_priority_offset(skb); -+ return adapter->tx_start_offset[txq_id] + (smp_processor_id() % edma_cinfo->num_txq_per_core_netdev); - } - - /* edma_tx_update_hw_idx() -@@ -1389,8 +1382,9 @@ netdev_tx_t edma_xmit(struct sk_buff *skb, - } - - /* this will be one of the 4 TX queues exposed to linux kernel */ -- txq_id = skb_get_queue_mapping(skb); -- queue_id = edma_tx_queue_get(adapter, skb, txq_id); -+ /* XXX what if num_online_cpus() > EDMA_CPU_CORES_SUPPORTED */ -+ txq_id = ((jiffies >> 5) % (EDMA_CPU_CORES_SUPPORTED - 1) + smp_processor_id() + 1) % EDMA_CPU_CORES_SUPPORTED; -+ queue_id = edma_tx_queue_get(edma_cinfo, adapter, skb, txq_id); - etdr = edma_cinfo->tpd_ring[queue_id]; - nq = netdev_get_tx_queue(net_dev, txq_id); - -@@ -1871,8 +1865,8 @@ void edma_free_irqs(struct edma_adapter *adapter) - int i, j; - int k = ((edma_cinfo->num_rx_queues == 4) ? 1 : 2); - -- for (i = 0; i < CONFIG_NR_CPUS; i++) { -- for (j = edma_cinfo->edma_percpu_info[i].tx_start; j < (edma_cinfo->edma_percpu_info[i].tx_start + 4); j++) -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) { -+ for (j = edma_cinfo->edma_percpu_info[i].tx_start; j < (edma_cinfo->edma_percpu_info[i].tx_start + edma_cinfo->num_txq_per_core); j++) - free_irq(edma_cinfo->tx_irq[j], &edma_cinfo->edma_percpu_info[i]); - - for (j = edma_cinfo->edma_percpu_info[i].rx_start; j < (edma_cinfo->edma_percpu_info[i].rx_start + k); j++) -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.h b/drivers/net/ethernet/qualcomm/essedma/edma.h -index 015e5f5..abb0bd5 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.h -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.h -@@ -324,6 +324,7 @@ struct edma_common_info { - u32 from_cpu; /* from CPU TPD field */ - u32 num_rxq_per_core; /* Rx queues per core */ - u32 num_txq_per_core; /* Tx queues per core */ -+ u32 num_txq_per_core_netdev; /* Tx queues per core per netdev */ - u16 tx_ring_count; /* Tx ring count */ - u16 rx_ring_count; /* Rx ring*/ - u16 rx_head_buffer_len; /* rx buffer length */ -@@ -331,7 +332,7 @@ struct edma_common_info { - u32 page_mode; /* Jumbo frame supported flag */ - u32 fraglist_mode; /* fraglist supported flag */ - struct edma_hw hw; /* edma hw specific structure */ -- struct edma_per_cpu_queues_info edma_percpu_info[CONFIG_NR_CPUS]; /* per cpu information */ -+ struct edma_per_cpu_queues_info edma_percpu_info[EDMA_CPU_CORES_SUPPORTED]; /* per cpu information */ - spinlock_t stats_lock; /* protect edma stats area for updation */ - struct timer_list edma_stats_timer; - bool is_single_phy; -@@ -401,7 +402,7 @@ struct edma_adapter { - u32 link_state; /* phy link state */ - u32 phy_mdio_addr; /* PHY device address on MII interface */ - u32 poll_required; /* check if link polling is required */ -- u32 tx_start_offset[CONFIG_NR_CPUS]; /* tx queue start */ -+ u32 tx_start_offset[EDMA_CPU_CORES_SUPPORTED]; /* tx queue start */ - u32 default_vlan_tag; /* vlan tag */ - u32 dp_bitmap; - uint8_t phy_id[MII_BUS_ID_SIZE + 3]; -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c -index d53c63b..2d4770c 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c -@@ -719,11 +719,7 @@ static int edma_axi_probe(struct platform_device *pdev) - int i, j, k, err = 0; - int portid_bmp; - int idx = 0, idx_mac = 0; -- -- if (CONFIG_NR_CPUS != EDMA_CPU_CORES_SUPPORTED) { -- dev_err(&pdev->dev, "Invalid CPU Cores\n"); -- return -EINVAL; -- } -+ int netdev_group = 2; - - if ((num_rxq != 4) && (num_rxq != 8)) { - dev_err(&pdev->dev, "Invalid RX queue, edma probe failed\n"); -@@ -747,7 +743,7 @@ static int edma_axi_probe(struct platform_device *pdev) - /* Initialize the netdev array before allocation - * to avoid double free - */ -- for (i = 0 ; i < edma_cinfo->num_gmac ; i++) -+ for (i = 0 ; i < EDMA_MAX_PORTID_SUPPORTED; i++) - edma_netdev[i] = NULL; - - for (i = 0 ; i < edma_cinfo->num_gmac ; i++) { -@@ -768,8 +764,11 @@ static int edma_axi_probe(struct platform_device *pdev) - - /* Fill ring details */ - edma_cinfo->num_tx_queues = EDMA_MAX_TRANSMIT_QUEUE; -- edma_cinfo->num_txq_per_core = (EDMA_MAX_TRANSMIT_QUEUE / 4); -+ edma_cinfo->num_txq_per_core = (EDMA_MAX_TRANSMIT_QUEUE / num_online_cpus()); -+ edma_cinfo->num_txq_per_core_netdev = (EDMA_MAX_TRANSMIT_QUEUE / netdev_group / num_online_cpus()); - edma_cinfo->tx_ring_count = EDMA_TX_RING_SIZE; -+ if (edma_cinfo->num_txq_per_core == 0) -+ edma_cinfo->num_txq_per_core = 1; - - /* Update num rx queues based on module parameter */ - edma_cinfo->num_rx_queues = num_rxq; -@@ -939,6 +938,13 @@ static int edma_axi_probe(struct platform_device *pdev) - idx_mac++; - } - -+ if (edma_cinfo->num_gmac == 1) { -+ netdev_group = 1; -+ edma_cinfo->num_txq_per_core_netdev = (EDMA_MAX_TRANSMIT_QUEUE / netdev_group / num_online_cpus()); -+ } -+ if (edma_cinfo->num_txq_per_core_netdev == 0) -+ edma_cinfo->num_txq_per_core_netdev = 1; -+ - /* Populate the adapter structure register the netdevice */ - for (i = 0; i < edma_cinfo->num_gmac; i++) { - int k, m; -@@ -946,17 +952,16 @@ static int edma_axi_probe(struct platform_device *pdev) - adapter[i] = netdev_priv(edma_netdev[i]); - adapter[i]->netdev = edma_netdev[i]; - adapter[i]->pdev = pdev; -- for (j = 0; j < CONFIG_NR_CPUS; j++) { -- m = i % 2; -- adapter[i]->tx_start_offset[j] = -- ((j << EDMA_TX_CPU_START_SHIFT) + (m << 1)); -+ for (j = 0; j < num_online_cpus() && j < EDMA_CPU_CORES_SUPPORTED; j++) { -+ m = i % netdev_group; -+ adapter[i]->tx_start_offset[j] = j * edma_cinfo->num_txq_per_core + m * edma_cinfo->num_txq_per_core_netdev; - /* Share the queues with available net-devices. - * For instance , with 5 net-devices - * eth0/eth2/eth4 will share q0,q1,q4,q5,q8,q9,q12,q13 - * and eth1/eth3 will get the remaining. - */ - for (k = adapter[i]->tx_start_offset[j]; k < -- (adapter[i]->tx_start_offset[j] + 2); k++) { -+ (adapter[i]->tx_start_offset[j] + edma_cinfo->num_txq_per_core_netdev); k++) { - if (edma_fill_netdev(edma_cinfo, k, i, j)) { - pr_err("Netdev overflow Error\n"); - goto err_register; -@@ -1109,9 +1114,12 @@ static int edma_axi_probe(struct platform_device *pdev) - /* populate per_core_info, do a napi_Add, request 16 TX irqs, - * 8 RX irqs, do a napi enable - */ -- for (i = 0; i < CONFIG_NR_CPUS; i++) { -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) { - u8 rx_start; - -+ tx_mask[i] = (0xFFFF >> (16 - edma_cinfo->num_txq_per_core)) << (i * edma_cinfo->num_txq_per_core); -+ tx_start[i] = i * edma_cinfo->num_txq_per_core; -+ - edma_cinfo->edma_percpu_info[i].napi.state = 0; - - netif_napi_add(edma_netdev[0], -@@ -1131,7 +1139,7 @@ static int edma_axi_probe(struct platform_device *pdev) - - /* Request irq per core */ - for (j = edma_cinfo->edma_percpu_info[i].tx_start; -- j < tx_start[i] + 4; j++) { -+ j < tx_start[i] + edma_cinfo->num_txq_per_core; j++) { - sprintf(&edma_tx_irq[j][0], "edma_eth_tx%d", j); - err = request_irq(edma_cinfo->tx_irq[j], - edma_interrupt, -@@ -1253,7 +1261,7 @@ static int edma_axi_probe(struct platform_device *pdev) - #endif - err_rmap_add_fail: - edma_free_irqs(adapter[0]); -- for (i = 0; i < CONFIG_NR_CPUS; i++) -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) - napi_disable(&edma_cinfo->edma_percpu_info[i].napi); - err_reset: - err_unregister_sysctl_tbl: -@@ -1301,7 +1309,7 @@ static int edma_axi_remove(struct platform_device *pdev) - unregister_netdev(edma_netdev[i]); - - edma_stop_rx_tx(hw); -- for (i = 0; i < CONFIG_NR_CPUS; i++) -+ for (i = 0; i < num_online_cpus() && i < EDMA_CPU_CORES_SUPPORTED; i++) - napi_disable(&edma_cinfo->edma_percpu_info[i].napi); - - edma_irq_disable(edma_cinfo); diff --git a/target/linux/ipq40xx/patches-5.4/716-essedma-reduce-write-reg.patch b/target/linux/ipq40xx/patches-5.4/716-essedma-reduce-write-reg.patch deleted file mode 100644 index 58b87467d..000000000 --- a/target/linux/ipq40xx/patches-5.4/716-essedma-reduce-write-reg.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet/qualcomm/essedma/edma.c -index fc274c8..e9d12a4 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c -@@ -2075,15 +2075,13 @@ int edma_poll(struct napi_struct *napi, int budget) - int i, work_done = 0; - u16 rx_pending_fill; - -- /* Store the Rx/Tx status by ANDing it with -- * appropriate CPU RX?TX mask -+ /* Store the Tx status by ANDing it with -+ * appropriate CPU TX mask - */ -- edma_read_reg(EDMA_REG_RX_ISR, ®_data); -- edma_percpu_info->rx_status |= reg_data & edma_percpu_info->rx_mask; -- shadow_rx_status = edma_percpu_info->rx_status; - edma_read_reg(EDMA_REG_TX_ISR, ®_data); - edma_percpu_info->tx_status |= reg_data & edma_percpu_info->tx_mask; - shadow_tx_status = edma_percpu_info->tx_status; -+ edma_write_reg(EDMA_REG_TX_ISR, shadow_tx_status); - - /* Every core will have a start, which will be computed - * in probe and stored in edma_percpu_info->tx_start variable. -@@ -2098,6 +2096,14 @@ int edma_poll(struct napi_struct *napi, int budget) - edma_percpu_info->tx_status &= ~(1 << queue_id); - } - -+ /* Store the Rx status by ANDing it with -+ * appropriate CPU RX mask -+ */ -+ edma_read_reg(EDMA_REG_RX_ISR, ®_data); -+ edma_percpu_info->rx_status |= reg_data & edma_percpu_info->rx_mask; -+ shadow_rx_status = edma_percpu_info->rx_status; -+ edma_write_reg(EDMA_REG_RX_ISR, shadow_rx_status); -+ - /* Every core will have a start, which will be computed - * in probe and stored in edma_percpu_info->tx_start variable. - * We will shift the status bit by tx_start to obtain -@@ -2122,15 +2128,6 @@ int edma_poll(struct napi_struct *napi, int budget) - } - } - -- /* Clear the status register, to avoid the interrupts to -- * reoccur.This clearing of interrupt status register is -- * done here as writing to status register only takes place -- * once the producer/consumer index has been updated to -- * reflect that the packet transmission/reception went fine. -- */ -- edma_write_reg(EDMA_REG_RX_ISR, shadow_rx_status); -- edma_write_reg(EDMA_REG_TX_ISR, shadow_tx_status); -- - /* If budget not fully consumed, exit the polling mode */ - if (likely(work_done < budget)) { - napi_complete(napi); diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch index 491be1864..371faa3a0 100644 --- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-5.4/901-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 -@@ -837,11 +837,52 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -837,11 +837,48 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -25,7 +25,6 @@ Signed-off-by: John Crispin + qcom-ipq4018-ens620ext.dtb \ + qcom-ipq4018-ex6100v2.dtb \ + qcom-ipq4018-ex6150v2.dtb \ -+ qcom-ipq4018-ex6200v2.dtb \ + qcom-ipq4018-fritzbox-4040.dtb \ + qcom-ipq4018-jalapeno.dtb \ + qcom-ipq4018-meshpoint-one.dtb \ @@ -45,14 +44,11 @@ Signed-off-by: John Crispin + qcom-ipq4019-fritzrepeater-1200.dtb \ + qcom-ipq4019-fritzrepeater-3000.dtb \ + qcom-ipq4019-map-ac2200.dtb \ -+ qcom-ipq4019-r619ac.dtb \ -+ qcom-ipq4019-r619ac-128m.dtb \ + qcom-ipq4019-e2600ac-c1.dtb \ + qcom-ipq4019-e2600ac-c2.dtb \ + qcom-ipq4019-habanero-dvk.dtb \ + qcom-ipq4019-rtl30vw.dtb \ + qcom-ipq4019-u4019-32m.dtb \ -+ qcom-ipq4019-rt-acrh17.dtb \ + qcom-ipq4019-wpj419.dtb \ + qcom-ipq4028-wpj428.dtb \ + qcom-ipq4029-ap-303.dtb \ diff --git a/target/linux/ipq40xx/patches-5.4/901-essedma-disable-default-vlan-tagging.patch b/target/linux/ipq40xx/patches-5.4/901-essedma-disable-default-vlan-tagging.patch deleted file mode 100644 index ec339c479..000000000 --- a/target/linux/ipq40xx/patches-5.4/901-essedma-disable-default-vlan-tagging.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 42b508d91b7f51b054f383e3aa42089ccab9300d Mon Sep 17 00:00:00 2001 -From: Chen Minqiang -Date: Thu, 15 Mar 2018 05:33:46 +0800 -Subject: [PATCH] essedma: disable default vlan tagging - -The essedma driver has its own unique take on VLAN management -and its configuration. In the original SDK, each VLAN is -assigned one virtual ethernet netdev. - -However, this is non-standard. So, this patch does away -with the default_vlan_tag property the driver is using -and therefore forces the user to use the kernel's vlan -feature. - -This patch also removes the "qcom,poll_required = <1>;" from -the essedma node. - -Signed-off-by: Christian Lamparter -Signed-off-by: Chen Minqiang ---- - arch/arm/boot/dts/qcom-ipq4019.dtsi | 5 ++--- - drivers/net/ethernet/qualcomm/essedma/edma.c | 14 +++++--------- - 2 files changed, 7 insertions(+), 12 deletions(-) - -diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi -index 3c4617f..7c3af8e 100644 ---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi -+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi -@@ -598,8 +598,7 @@ - qcom,page-mode = <0>; - qcom,rx_head_buf_size = <1540>; - qcom,mdio_supported; -- qcom,poll_required = <1>; -- qcom,num_gmac = <2>; -+ qcom,num_gmac = <1>; - interrupts = <0 65 IRQ_TYPE_EDGE_RISING - 0 66 IRQ_TYPE_EDGE_RISING - 0 67 IRQ_TYPE_EDGE_RISING -@@ -637,7 +636,7 @@ - - gmac0: gmac0 { - local-mac-address = [00 00 00 00 00 00]; -- vlan_tag = <1 0x1f>; -+ vlan_tag = <1 0x3f>; - }; - - gmac1: gmac1 { -diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet/qualcomm/essedma/edma.c -index 05f9ce9..a3c0d66 100644 ---- a/drivers/net/ethernet/qualcomm/essedma/edma.c -+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c -@@ -750,13 +750,11 @@ static void edma_rx_complete(struct edma_common_info *edma_cinfo, - edma_receive_checksum(rd, skb); - - /* Process VLAN HW acceleration indication provided by HW */ -- if (unlikely(adapter->default_vlan_tag != rd->rrd4)) { -- vlan = rd->rrd4; -- if (likely(rd->rrd7 & EDMA_RRD_CVLAN)) -- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan); -- else if (rd->rrd1 & EDMA_RRD_SVLAN) -- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan); -- } -+ vlan = rd->rrd4; -+ if (likely(rd->rrd7 & EDMA_RRD_CVLAN)) -+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan); -+ else if (rd->rrd1 & EDMA_RRD_SVLAN) -+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan); - - /* Update rx statistics */ - adapter->stats.rx_packets++; -@@ -1434,8 +1432,6 @@ netdev_tx_t edma_xmit(struct sk_buff *skb, - if (!adapter->edma_cinfo->is_single_phy) { - if (unlikely(skb_vlan_tag_present(skb))) - flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_FLAG; -- else if (adapter->default_vlan_tag) -- flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_DEFAULT_FLAG; - } - - /* Check and mark checksum offload */ --- -2.7.4 - diff --git a/target/linux/ipq40xx/patches-5.4/999-enable-ramoops.patch b/target/linux/ipq40xx/patches-5.4/999-enable-ramoops.patch deleted file mode 100644 index f447216f8..000000000 --- a/target/linux/ipq40xx/patches-5.4/999-enable-ramoops.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi -+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi -@@ -31,6 +31,15 @@ - reg = <0x87e80000 0x180000>; - no-map; - }; -+ -+ ramoops@88000000 { -+ compatible = "ramoops"; -+ reg = <0x88000000 0x100000>; -+ -+ record-size = <0x20000>; -+ console-size = <0x20000>; -+ ftrace-size = <0x60000>; -+ }; - }; - - aliases {