From 6bbb75dfdc1c09e230ebdcf3c6104be9ba8acb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 7 Feb 2024 17:38:11 +0100 Subject: [PATCH 01/23] bmips: dts: move leds dt-bindings include to SoCs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bmips has all the dt-bindings includes inside each SoC .dtsi files, so let's move the new includes there instead of adding them to each board .dts files. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts | 2 -- target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts | 2 -- target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts | 2 -- target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts | 2 -- target/linux/bmips/dts/bcm6318.dtsi | 1 + target/linux/bmips/dts/bcm63268.dtsi | 1 + target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts | 2 -- target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts | 2 -- target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts | 2 -- target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts | 2 -- target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts | 2 -- target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts | 2 -- target/linux/bmips/dts/bcm6328.dtsi | 1 + target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts | 2 -- target/linux/bmips/dts/bcm6358.dtsi | 1 + target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts | 2 -- target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts | 2 -- target/linux/bmips/dts/bcm6362.dtsi | 1 + target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts | 2 -- target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts | 2 -- target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts | 2 -- target/linux/bmips/dts/bcm6368-observa-vh4032n.dts | 2 -- target/linux/bmips/dts/bcm6368.dtsi | 1 + target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts | 2 -- target/linux/bmips/dts/bcm6369-netgear-evg2000.dts | 2 -- 25 files changed, 6 insertions(+), 38 deletions(-) diff --git a/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts b/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts index fed4428405..cb42e0c1f1 100644 --- a/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts +++ b/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm63268.dtsi" / { diff --git a/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts b/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts index cdfd58e609..7ea76bebc3 100644 --- a/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts +++ b/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm63268.dtsi" / { diff --git a/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts b/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts index 375b01b673..05004462e7 100644 --- a/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts +++ b/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm63268.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts index c3c9a9bdf4..c5d2182b78 100644 --- a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts +++ b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6318.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6318.dtsi b/target/linux/bmips/dts/bcm6318.dtsi index 28c656d090..03fb01bc04 100644 --- a/target/linux/bmips/dts/bcm6318.dtsi +++ b/target/linux/bmips/dts/bcm6318.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/target/linux/bmips/dts/bcm63268.dtsi b/target/linux/bmips/dts/bcm63268.dtsi index f9a31d36ef..d1aed29018 100644 --- a/target/linux/bmips/dts/bcm63268.dtsi +++ b/target/linux/bmips/dts/bcm63268.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts b/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts index 755312974d..4c5c607f44 100644 --- a/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts +++ b/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6328.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts b/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts index d5a3452e79..8864a844e4 100644 --- a/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts +++ b/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6328.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts b/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts index 402e54e5df..18be03a248 100644 --- a/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts +++ b/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6328.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts b/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts index 68f10d46a5..e7564f2436 100644 --- a/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts +++ b/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6328.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts b/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts index 8890477f32..56842544cf 100644 --- a/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts +++ b/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6328.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts b/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts index 03a58a6fde..669b0d4818 100644 --- a/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts +++ b/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6328.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6328.dtsi b/target/linux/bmips/dts/bcm6328.dtsi index f45f94f5b8..52f94950a3 100644 --- a/target/linux/bmips/dts/bcm6328.dtsi +++ b/target/linux/bmips/dts/bcm6328.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts index 554ef1993e..6500d54e36 100644 --- a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts +++ b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6358.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6358.dtsi b/target/linux/bmips/dts/bcm6358.dtsi index b56ec698ba..43dc87c71d 100644 --- a/target/linux/bmips/dts/bcm6358.dtsi +++ b/target/linux/bmips/dts/bcm6358.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include / { diff --git a/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts b/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts index 38dcec3e9b..a7498815e3 100644 --- a/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts +++ b/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6362.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts index 94e9aa3d21..0259fdba6c 100644 --- a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts +++ b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6362.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6362.dtsi b/target/linux/bmips/dts/bcm6362.dtsi index e615eaf8b3..1089d89350 100644 --- a/target/linux/bmips/dts/bcm6362.dtsi +++ b/target/linux/bmips/dts/bcm6362.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts b/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts index 8dc37d492f..5951ad854c 100644 --- a/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts +++ b/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6368.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts index e0bac82ff8..647db7afaa 100644 --- a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts +++ b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6368.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts index a0beba2c0c..ba75cb3e5c 100644 --- a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts +++ b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6368.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts b/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts index f9fefaccb8..3268ff146f 100644 --- a/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts +++ b/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6368.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6368.dtsi b/target/linux/bmips/dts/bcm6368.dtsi index 0ac1269166..cf2f5b081b 100644 --- a/target/linux/bmips/dts/bcm6368.dtsi +++ b/target/linux/bmips/dts/bcm6368.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include / { diff --git a/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts b/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts index 1b8b155f26..263a10bf61 100644 --- a/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts +++ b/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6368.dtsi" / { diff --git a/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts b/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts index cf19bb33f4..376f5b6865 100644 --- a/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts +++ b/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "bcm6368.dtsi" / { From e483c247dc75723a32d03b5b1149f7fd61ac8ac6 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 22:32:19 +0000 Subject: [PATCH 02/23] lldpd: Init config read on reload Init script reload with trigger to detect config file update. Reload command added to attempt non-impactful lldpd reload where lldpcli can be used to update config without process restart. Config hash function used to track whether process restart is needed. Signed-off-by: Stephen Howell --- .../network/services/lldpd/files/lldpd.init | 66 ++++++++++++++++--- 1 file changed, 56 insertions(+), 10 deletions(-) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index e1e8ac9fd4..a52e6e0ec4 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -5,11 +5,17 @@ START=90 STOP=01 USE_PROCD=1 +LLDPDBIN=/usr/sbin/lldpd LLDPCLI=/usr/sbin/lldpcli LLDPSOCKET=/var/run/lldpd.socket LLDPD_CONF=/tmp/lldpd.conf LLDPD_CONFS_DIR=/tmp/lldpd.d +LLDPD_RUN=/var/run/lldpd +LLDPD_RESTART_HASH=${LLDPD_RUN}/lldpd.restart_hash + +. "$IPKG_INSTROOT/lib/functions/network.sh" + find_release_info() { [ -s /etc/os-release ] && . /etc/os-release @@ -19,10 +25,27 @@ find_release_info() echo "${PRETTY_NAME:-Unknown OpenWrt release} @ $(cat /proc/sys/kernel/hostname)" } +get_config_restart_hash() { + local var="$1" + local _string _hash v + + config_load 'lldpd' + + config_get v 'config' 'lldp_class'; append _string "$v" "," + config_get v 'config' 'agentxsocket'; append _string "$v" "," + config_get_bool v 'config' 'readonly_mode'; append _string "$v" "," + config_get_bool v 'config' 'enable_lldp' 1; append _string "$v" "," + config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," + config_get_bool v 'config' 'enable_edp'; append _string "$v" "," + config_get_bool v 'config' 'enable_fdp'; append _string "$v" "," + config_get_bool v 'config' 'enable_sonmp'; append _string "$v" "," + + _hash=`echo -n "${_string}" | md5sum | awk '{ print \$1 }'` + export -n "$var=$_hash" +} + write_lldpd_conf() { - . /lib/functions/network.sh - local lldp_description config_load 'lldpd' @@ -60,10 +83,6 @@ write_lldpd_conf() [ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR } -service_triggers() { - procd_add_reload_trigger "lldpd" -} - start_service() { local enable_cdp @@ -85,14 +104,15 @@ start_service() { config_get_bool readonly_mode 'config' 'readonly_mode' 0 config_get agentxsocket 'config' 'agentxsocket' - mkdir -p /var/run/lldp - chown lldp:lldp /var/run/lldp + mkdir -p ${LLDPD_RUN} + chown lldp:lldp ${LLDPD_RUN} # When lldpd starts, it also loads up what we write in this config file write_lldpd_conf procd_open_instance - procd_set_param command /usr/sbin/lldpd -d + procd_set_param command ${LLDPDBIN} + procd_append_param command -d [ $enable_cdp -gt 0 ] && procd_append_param command '-c' [ $enable_fdp -gt 0 ] && procd_append_param command '-f' @@ -102,13 +122,38 @@ start_service() { [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" + # Overwrite default configuration locations processed by lldpcli at start + procd_append_param command -O "$LLDPD_CONF" + + local restart_hash + get_config_restart_hash restart_hash + echo -n "$restart_hash" > $LLDPD_RESTART_HASH + # set auto respawn behavior procd_set_param respawn procd_close_instance } +service_triggers() { + procd_add_config_trigger "config.change" "lldpd" /etc/init.d/lldpd reload +} + reload_service() { running || return 1 + + local running_hash="" + local config_hash="" + + get_config_restart_hash config_hash + if [ -f ${LLDPD_RESTART_HASH} ]; then running_hash=`cat $LLDPD_RESTART_HASH`; fi + + if [ "x$running_hash" != "x$config_hash" ]; then + # Restart LLDPd + # Some parameters can't be configured at runtime + restart + return 0 + fi + $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF pause unconfigure lldp custom-tlv @@ -130,5 +175,6 @@ reload_service() { } stop_service() { - rm -rf /var/run/lldp $LLDPSOCKET + rm -rf ${LLDPD_RUN} $LLDPSOCKET 2>/dev/null } + From 064b4999ad1f37f4c6ccf95a0404007b990ed0ef Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 22:41:22 +0000 Subject: [PATCH 03/23] lldpd: LLDPD binds to only specified interfaces Bind to the configured system interfaces only. Switchport interfaces are no longer ignored and uci interface values for LLDPD are honored. Signed-off-by: Stephen Howell --- .../network/services/lldpd/files/lldpd.init | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index a52e6e0ec4..411fa0c652 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -33,6 +33,7 @@ get_config_restart_hash() { config_get v 'config' 'lldp_class'; append _string "$v" "," config_get v 'config' 'agentxsocket'; append _string "$v" "," + config_get v 'config' 'cid_interface'; append _string "$v" "," config_get_bool v 'config' 'readonly_mode'; append _string "$v" "," config_get_bool v 'config' 'enable_lldp' 1; append _string "$v" "," config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," @@ -44,6 +45,21 @@ get_config_restart_hash() { export -n "$var=$_hash" } +get_config_cid_ifaces() { + local _ifaces + config_get _ifaces 'config' 'cid_interface' + + local _iface _ifnames="" + for _iface in $_ifaces; do + local _ifname="" + if network_get_device _ifname "$_iface" || [ -e "/sys/class/net/$_iface" ]; then + append _ifnames "${_ifname:-$_iface}" "," + fi + done + + export -n "${1}=$_ifnames" +} + write_lldpd_conf() { local lldp_description @@ -122,6 +138,11 @@ start_service() { [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" + # ChassisID interfaces + local ifnames + get_config_cid_ifaces ifnames + [ -n "$ifnames" ] && procd_append_param command -C "$ifnames" + # Overwrite default configuration locations processed by lldpcli at start procd_append_param command -O "$LLDPD_CONF" From ac3ed75309e7db93bf2316eccba8106e3fe8f9fc Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 22:52:10 +0000 Subject: [PATCH 04/23] lldpd: Allow neighbour filtering add filter option to init script. Signed-off-by: Stephen Howell --- package/network/services/lldpd/files/lldpd.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 411fa0c652..48d15a4824 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -34,6 +34,7 @@ get_config_restart_hash() { config_get v 'config' 'lldp_class'; append _string "$v" "," config_get v 'config' 'agentxsocket'; append _string "$v" "," config_get v 'config' 'cid_interface'; append _string "$v" "," + config_get v 'config' 'filter'; append _string "$v" "," config_get_bool v 'config' 'readonly_mode'; append _string "$v" "," config_get_bool v 'config' 'enable_lldp' 1; append _string "$v" "," config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," @@ -109,6 +110,7 @@ start_service() { local lldp_location local readonly_mode local agentxsocket + local filter config_load 'lldpd' config_get_bool enable_cdp 'config' 'enable_cdp' 0 @@ -119,6 +121,7 @@ start_service() { config_get lldp_location 'config' 'lldp_location' config_get_bool readonly_mode 'config' 'readonly_mode' 0 config_get agentxsocket 'config' 'agentxsocket' + config_get filter 'config' 'filter' 15 mkdir -p ${LLDPD_RUN} chown lldp:lldp ${LLDPD_RUN} @@ -137,6 +140,7 @@ start_service() { [ $readonly_mode -gt 0 ] && procd_append_param command '-r' [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" + [ -n "$filter" ] && procd_append_param command -H "$filter" # ChassisID interfaces local ifnames From 058f284b1a802fafafb2cfde522693bd43aeaf4d Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 22:57:18 +0000 Subject: [PATCH 05/23] lldpd: Init adds no-version option add option to disable advertising kernel version Signed-off-by: Stephen Howell --- package/network/services/lldpd/files/lldpd.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 48d15a4824..0456e7875e 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -36,6 +36,7 @@ get_config_restart_hash() { config_get v 'config' 'cid_interface'; append _string "$v" "," config_get v 'config' 'filter'; append _string "$v" "," config_get_bool v 'config' 'readonly_mode'; append _string "$v" "," + config_get_bool v 'config' 'lldp_no_version'; append _string "$v" "," config_get_bool v 'config' 'enable_lldp' 1; append _string "$v" "," config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," config_get_bool v 'config' 'enable_edp'; append _string "$v" "," @@ -108,6 +109,7 @@ start_service() { local enable_edp local lldp_class local lldp_location + local lldp_no_version local readonly_mode local agentxsocket local filter @@ -119,6 +121,7 @@ start_service() { config_get_bool enable_edp 'config' 'enable_edp' 0 config_get lldp_class 'config' 'lldp_class' config_get lldp_location 'config' 'lldp_location' + config_get_bool lldp_no_version 'config' 'lldp_no_version' 0 config_get_bool readonly_mode 'config' 'readonly_mode' 0 config_get agentxsocket 'config' 'agentxsocket' config_get filter 'config' 'filter' 15 @@ -138,6 +141,7 @@ start_service() { [ $enable_sonmp -gt 0 ] && procd_append_param command '-s' [ $enable_edp -gt 0 ] && procd_append_param command '-e' [ $readonly_mode -gt 0 ] && procd_append_param command '-r' + [ $lldp_no_version -gt 0 ] && procd_append_param command '-k' [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" [ -n "$filter" ] && procd_append_param command -H "$filter" From 1753498b01d86b8d63349b01cb04026c07c343d9 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 23:08:08 +0000 Subject: [PATCH 06/23] lldpd: option to disable LLDP-MED inventory TLV add option to disable LLDP-MED inventory TLV transmission Signed-off-by: Stephen Howell --- package/network/services/lldpd/Makefile | 4 ++++ package/network/services/lldpd/files/lldpd.init | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 289adc55c9..9e4ee0727e 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -82,6 +82,10 @@ endif ifneq ($(CONFIG_LLDPD_WITH_SNMP),y) sed -i -e '/agentxsocket/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd endif +ifneq ($(CONFIG_LLDPD_WITH_LLDPMED),y) + sed -i -e 's/CONFIG_LLDPD_WITH_LLDPMED=y/CONFIG_LLDPD_WITH_LLDPMED=n/g' $(1)/etc/init.d/lldpd + sed -i -e '/agentxsocket/d' $(1)/etc/config/lldpd +endif endef define Package/lldpd/conffiles diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 0456e7875e..4eca9ac8f4 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -4,6 +4,8 @@ START=90 STOP=01 +CONFIG_LLDPD_WITH_LLDPMED=y + USE_PROCD=1 LLDPDBIN=/usr/sbin/lldpd LLDPCLI=/usr/sbin/lldpcli @@ -37,6 +39,9 @@ get_config_restart_hash() { config_get v 'config' 'filter'; append _string "$v" "," config_get_bool v 'config' 'readonly_mode'; append _string "$v" "," config_get_bool v 'config' 'lldp_no_version'; append _string "$v" "," + if [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ]; then + config_get_bool v 'config' 'lldpmed_no_inventory'; append _string "$v" "," + fi config_get_bool v 'config' 'enable_lldp' 1; append _string "$v" "," config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," config_get_bool v 'config' 'enable_edp'; append _string "$v" "," @@ -110,6 +115,7 @@ start_service() { local lldp_class local lldp_location local lldp_no_version + local lldpmed_no_inventory local readonly_mode local agentxsocket local filter @@ -122,6 +128,9 @@ start_service() { config_get lldp_class 'config' 'lldp_class' config_get lldp_location 'config' 'lldp_location' config_get_bool lldp_no_version 'config' 'lldp_no_version' 0 + if [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ]; then + config_get_bool lldpmed_no_inventory 'config' 'lldpmed_no_inventory' 0 + fi config_get_bool readonly_mode 'config' 'readonly_mode' 0 config_get agentxsocket 'config' 'agentxsocket' config_get filter 'config' 'filter' 15 @@ -142,6 +151,7 @@ start_service() { [ $enable_edp -gt 0 ] && procd_append_param command '-e' [ $readonly_mode -gt 0 ] && procd_append_param command '-r' [ $lldp_no_version -gt 0 ] && procd_append_param command '-k' + [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ] && [ $lldpmed_no_inventory -gt 0 ] && procd_append_param command '-i' [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" [ -n "$filter" ] && procd_append_param command -H "$filter" From 24176a6bdd8f26040a97960868fd0d9ee968d695 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 23:46:53 +0000 Subject: [PATCH 07/23] lldpd: add LLDP MED options add option to enable LLDP MED fast-start and set fast-start timer Signed-off-by: Stephen Howell --- .../network/services/lldpd/files/lldpd.init | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 4eca9ac8f4..55fbe61fc4 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -94,6 +94,14 @@ write_lldpd_conf() local lldp_syscapabilities config_get lldp_syscapabilities 'config' 'lldp_syscapabilities' + if [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ]; then + local lldpmed_fast_start + config_get_bool lldpmed_fast_start 'config' 'lldpmed_fast_start' 0 + + local lldpmed_fast_start_tx_interval + config_get lldpmed_fast_start_tx_interval 'config' 'lldpmed_fast_start_tx_interval' 0 + fi + # Clear out the config file first echo -n > "$LLDPD_CONF" [ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF" @@ -101,6 +109,14 @@ write_lldpd_conf() [ -n "$lldp_hostname" ] && echo "configure system hostname" "\"$lldp_hostname\"" >> "$LLDPD_CONF" [ -n "$lldp_mgmt_ip" ] && echo "configure system ip management pattern" "\"$lldp_mgmt_ip\"" >> "$LLDPD_CONF" [ -n "$lldp_syscapabilities" ] && echo "configure system capabilities enabled" "\"$lldp_syscapabilities\"" >> "$LLDPD_CONF" + if [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ] && [ $lldpmed_fast_start -gt 0 ]; then + if [ $lldpmed_fast_start_tx_interval -gt 0 ]; then + echo "configure med fast-start tx-interval" "\"$lldpmed_fast_start_tx_interval\"" >> "$LLDPD_CONF" + else + echo "configure med fast-start" "enable" >> "$LLDPD_CONF" + fi + fi + # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR @@ -192,7 +208,7 @@ reload_service() { restart return 0 fi - + $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF pause unconfigure lldp custom-tlv @@ -201,6 +217,11 @@ reload_service() { unconfigure system hostname unconfigure system ip management pattern EOF + if [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ]; then + $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF + unconfigure med fast-start + EOF + fi # Rewrite lldpd.conf # If something changed it should be included by the lldpcli call write_lldpd_conf From c98ee4dbb3db0f064d990941cdd82e872da76946 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 23:49:21 +0000 Subject: [PATCH 08/23] lldpd: add agent-type option add option to set agent-type to control propogation Signed-off-by: Stephen Howell --- package/network/services/lldpd/files/lldpd.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 55fbe61fc4..31dca872cc 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -102,6 +102,9 @@ write_lldpd_conf() config_get lldpmed_fast_start_tx_interval 'config' 'lldpmed_fast_start_tx_interval' 0 fi + local lldp_agenttype + config_get lldp_agenttype 'config' 'lldp_agenttype' 'nearest-bridge' + # Clear out the config file first echo -n > "$LLDPD_CONF" [ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF" @@ -116,6 +119,7 @@ write_lldpd_conf() echo "configure med fast-start" "enable" >> "$LLDPD_CONF" fi fi + [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR From ac771313ebedd2c4bfda8adef47650d45d77c32d Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 16 Dec 2023 23:49:44 +0000 Subject: [PATCH 09/23] lldpd: add portidsubtype option add option portidsubtype to correct port identifiers and descriptions Signed-off-by: Stephen Howell --- package/network/services/lldpd/files/lldpd.init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 31dca872cc..db81f8a9ae 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -105,6 +105,9 @@ write_lldpd_conf() local lldp_agenttype config_get lldp_agenttype 'config' 'lldp_agenttype' 'nearest-bridge' + local lldp_portidsubtype + config_get lldp_portidsubtype 'config' 'lldp_portidsubtype' 'macaddress' + # Clear out the config file first echo -n > "$LLDPD_CONF" [ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF" @@ -120,7 +123,7 @@ write_lldpd_conf() fi fi [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF" - + [ -n "$lldp_portidsubtype" ] && echo "configure lldp portidsubtype" "\"$lldp_portidsubtype\"" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR From 61dbe756d8edc1adcd152920f71d6dce26232662 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sun, 17 Dec 2023 00:17:14 +0000 Subject: [PATCH 10/23] lldpd: allow disabling LLDP protcol add option to allow LLDP disabling while using other supported protocols Signed-off-by: Stephen Howell --- package/network/services/lldpd/files/lldpd.init | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index db81f8a9ae..98e7e97193 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -43,6 +43,7 @@ get_config_restart_hash() { config_get_bool v 'config' 'lldpmed_no_inventory'; append _string "$v" "," fi config_get_bool v 'config' 'enable_lldp' 1; append _string "$v" "," + config_get_bool v 'config' 'force_lldp'; append _string "$v" "," config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," config_get_bool v 'config' 'enable_edp'; append _string "$v" "," config_get_bool v 'config' 'enable_fdp'; append _string "$v" "," @@ -131,6 +132,8 @@ write_lldpd_conf() start_service() { + local enable_lldp + local force_lldp local enable_cdp local enable_fdp local enable_sonmp @@ -144,6 +147,8 @@ start_service() { local filter config_load 'lldpd' + config_get_bool enable_lldp 'config' 'enable_lldp' 1 + config_get_bool force_lldp 'config' 'force_lldp' 0 config_get_bool enable_cdp 'config' 'enable_cdp' 0 config_get_bool enable_fdp 'config' 'enable_fdp' 0 config_get_bool enable_sonmp 'config' 'enable_sonmp' 0 @@ -168,6 +173,15 @@ start_service() { procd_set_param command ${LLDPDBIN} procd_append_param command -d + if [ $enable_lldp -gt 0 ]; then + if [ $force_lldp -gt 0 ]; then + procd_append_param command '-l' + fi + else + # Disable LLDP + procd_append_param command '-ll' + fi + [ $enable_cdp -gt 0 ] && procd_append_param command '-c' [ $enable_fdp -gt 0 ] && procd_append_param command '-f' [ $enable_sonmp -gt 0 ] && procd_append_param command '-s' From b67182008fd124706be0ec3ce67347447554ffd5 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sun, 17 Dec 2023 00:21:12 +0000 Subject: [PATCH 11/23] lldpd: set CDP version and allow forcing CDP on add option to specify CDPv1 or CDPv2 and separately enable or force each Signed-off-by: Stephen Howell --- package/network/services/lldpd/Makefile | 3 +- .../network/services/lldpd/files/lldpd.init | 44 +++++++++++++++++-- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 9e4ee0727e..a83378bcba 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -68,7 +68,8 @@ define Package/lldpd/install $(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd $(INSTALL_CONF) ./files/lldpd.config $(1)/etc/config/lldpd ifneq ($(CONFIG_LLDPD_WITH_CDP),y) - sed -i -e '/cdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd + sed -i -e 's/CONFIG_LLDPD_WITH_CDP=y/CONFIG_LLDPD_WITH_CDP=n/g' $(1)/etc/init.d/lldpd + sed -i -e '/cdp/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_FDP),y) sed -i -e '/fdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 98e7e97193..faf100b198 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -4,6 +4,7 @@ START=90 STOP=01 +CONFIG_LLDPD_WITH_CDP=y CONFIG_LLDPD_WITH_LLDPMED=y USE_PROCD=1 @@ -44,7 +45,12 @@ get_config_restart_hash() { fi config_get_bool v 'config' 'enable_lldp' 1; append _string "$v" "," config_get_bool v 'config' 'force_lldp'; append _string "$v" "," - config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," + if [ "$CONFIG_LLDPD_WITH_CDP" == "y" ]; then + config_get_bool v 'config' 'enable_cdp'; append _string "$v" "," + config_get v 'config' 'cdp_version'; append _string "$v" "," + config_get_bool v 'config' 'force_cdp'; append _string "$v" "," + config_get_bool v 'config' 'force_cdpv2'; append _string "$v" "," + fi config_get_bool v 'config' 'enable_edp'; append _string "$v" "," config_get_bool v 'config' 'enable_fdp'; append _string "$v" "," config_get_bool v 'config' 'enable_sonmp'; append _string "$v" "," @@ -135,6 +141,9 @@ start_service() { local enable_lldp local force_lldp local enable_cdp + local cdp_version + local force_cdp + local force_cdpv2 local enable_fdp local enable_sonmp local enable_edp @@ -149,7 +158,12 @@ start_service() { config_load 'lldpd' config_get_bool enable_lldp 'config' 'enable_lldp' 1 config_get_bool force_lldp 'config' 'force_lldp' 0 - config_get_bool enable_cdp 'config' 'enable_cdp' 0 + if [ "$CONFIG_LLDPD_WITH_CDP" == "y" ]; then + config_get_bool enable_cdp 'config' 'enable_cdp' 0 + config_get cdp_version 'config' 'cdp_version' 'cdpv1v2' + config_get_bool force_cdp 'config' 'force_cdp' 0 + config_get_bool force_cdpv2 'config' 'force_cdpv2' 0 + fi config_get_bool enable_fdp 'config' 'enable_fdp' 0 config_get_bool enable_sonmp 'config' 'enable_sonmp' 0 config_get_bool enable_edp 'config' 'enable_edp' 0 @@ -182,12 +196,34 @@ start_service() { procd_append_param command '-ll' fi - [ $enable_cdp -gt 0 ] && procd_append_param command '-c' + if [ "$CONFIG_LLDPD_WITH_CDP" == "y" ] && [ $enable_cdp -gt 0 ]; then + if [ $cdp_version == "cdpv2" ]; then + if [ $force_cdp -gt 0 ]; then + # CDPv1 disabled, CDPv2 forced + procd_append_param command '-ccccc' + else + # CDPv1 disabled, CDPv2 enabled + procd_append_param command '-cccc' + fi + elif [ $cdp_version == "cdpv1v2" ]; then + if [ $force_cdp -gt 0 ] && [ $force_cdpv2 -gt 0 ]; then + # CDPv1 enabled, CDPv2 forced + procd_append_param command '-ccc' + elif [ $force_cdp -gt 0 ]; then + # CDPv1 forced, CDPv2 enabled + procd_append_param command '-cc' + else + # CDPv1 and CDPv2 enabled + procd_append_param command '-c' + fi + fi + fi + [ $enable_fdp -gt 0 ] && procd_append_param command '-f' [ $enable_sonmp -gt 0 ] && procd_append_param command '-s' [ $enable_edp -gt 0 ] && procd_append_param command '-e' [ $readonly_mode -gt 0 ] && procd_append_param command '-r' - [ $lldp_no_version -gt 0 ] && procd_append_param command '-k' + [ $lldp_no_version -gt 0 ] && procd_append_param commanpackage/network/services/lldpd/Makefile package/network/services/lldpd/files/lldpd.initd '-k' [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ] && [ $lldpmed_no_inventory -gt 0 ] && procd_append_param command '-i' [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" From 1be2088a5247b2cfabe8be991c1e52ddaf780a16 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sun, 17 Dec 2023 00:26:21 +0000 Subject: [PATCH 12/23] lldpd: add option to force FDP on add option to force FDP when no peers detected Signed-off-by: Stephen Howell --- package/network/services/lldpd/Makefile | 3 ++- .../network/services/lldpd/files/lldpd.init | 27 +++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index a83378bcba..4dade4a148 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -72,7 +72,8 @@ ifneq ($(CONFIG_LLDPD_WITH_CDP),y) sed -i -e '/cdp/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_FDP),y) - sed -i -e '/fdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd + sed -i -e 's/CONFIG_LLDPD_WITH_FDP=y/CONFIG_LLDPD_WITH_FDP=n/g' $(1)/etc/init.d/lldpd + sed -i -e '/fdp/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_EDP),y) sed -i -e '/edp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index faf100b198..bd90cea85b 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -5,6 +5,7 @@ START=90 STOP=01 CONFIG_LLDPD_WITH_CDP=y +CONFIG_LLDPD_WITH_FDP=y CONFIG_LLDPD_WITH_LLDPMED=y USE_PROCD=1 @@ -52,7 +53,10 @@ get_config_restart_hash() { config_get_bool v 'config' 'force_cdpv2'; append _string "$v" "," fi config_get_bool v 'config' 'enable_edp'; append _string "$v" "," - config_get_bool v 'config' 'enable_fdp'; append _string "$v" "," + if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ]; then + config_get_bool v 'config' 'enable_fdp'; append _string "$v" "," + config_get_bool v 'config' 'force_fdp'; append _string "$v" "," + fi config_get_bool v 'config' 'enable_sonmp'; append _string "$v" "," _hash=`echo -n "${_string}" | md5sum | awk '{ print \$1 }'` @@ -60,8 +64,7 @@ get_config_restart_hash() { } get_config_cid_ifaces() { - local _ifaces - config_get _ifaces 'config' 'cid_interface' + local _ifacesCONFIG_LLDPD_WITH_FDP local _iface _ifnames="" for _iface in $_ifaces; do @@ -145,6 +148,7 @@ start_service() { local force_cdp local force_cdpv2 local enable_fdp + local force_fdp local enable_sonmp local enable_edp local lldp_class @@ -164,7 +168,10 @@ start_service() { config_get_bool force_cdp 'config' 'force_cdp' 0 config_get_bool force_cdpv2 'config' 'force_cdpv2' 0 fi - config_get_bool enable_fdp 'config' 'enable_fdp' 0 + if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ]; then + config_get_bool enable_fdp 'config' 'enable_fdp' 0 + config_get_bool force_fdp 'config' 'force_fdp' 0 + fi config_get_bool enable_sonmp 'config' 'enable_sonmp' 0 config_get_bool enable_edp 'config' 'enable_edp' 0 config_get lldp_class 'config' 'lldp_class' @@ -219,7 +226,16 @@ start_service() { fi fi - [ $enable_fdp -gt 0 ] && procd_append_param command '-f' + if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ] && [ $enable_fdp -gt 0 ]; then + if [ $force_fdp -gt 0 ]; then + # FDP enbled and forced + procd_append_param command '-ff' + else + # FDP enabled + procd_append_param command '-f' + fi + fi + [ $enable_sonmp -gt 0 ] && procd_append_param command '-s' [ $enable_edp -gt 0 ] && procd_append_param command '-e' [ $readonly_mode -gt 0 ] && procd_append_param command '-r' @@ -278,6 +294,7 @@ reload_service() { $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF unconfigure med fast-start EOF + fi # Rewrite lldpd.conf # If something changed it should be included by the lldpcli call From 4ac134aa78d2b4441b0afd485d1d26dbd53d7276 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sun, 17 Dec 2023 00:28:43 +0000 Subject: [PATCH 13/23] lldpd: add option to force SONMP enabled add option to force SONMP to be enabled even when no peer detected Signed-off-by: Stephen Howell --- package/network/services/lldpd/Makefile | 3 ++- .../network/services/lldpd/files/lldpd.init | 24 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 4dade4a148..02ef2d7520 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -79,7 +79,8 @@ ifneq ($(CONFIG_LLDPD_WITH_EDP),y) sed -i -e '/edp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_SONMP),y) - sed -i -e '/sonmp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd + sed -i -e 's/CONFIG_LLDPD_WITH_SONMP=y/CONFIG_LLDPD_WITH_SONMP=n/g' $(1)/etc/init.d/lldpd + sed -i -e '/sonmp/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_SNMP),y) sed -i -e '/agentxsocket/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index bd90cea85b..8e825e4f87 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -7,6 +7,7 @@ STOP=01 CONFIG_LLDPD_WITH_CDP=y CONFIG_LLDPD_WITH_FDP=y CONFIG_LLDPD_WITH_LLDPMED=y +CONFIG_LLDPD_WITH_SONMP=y USE_PROCD=1 LLDPDBIN=/usr/sbin/lldpd @@ -57,7 +58,10 @@ get_config_restart_hash() { config_get_bool v 'config' 'enable_fdp'; append _string "$v" "," config_get_bool v 'config' 'force_fdp'; append _string "$v" "," fi - config_get_bool v 'config' 'enable_sonmp'; append _string "$v" "," + if [ "$CONFIG_LLDPD_WITH_SONMP" == "y" ]; then + config_get_bool v 'config' 'enable_sonmp'; append _string "$v" "," + config_get_bool v 'config' 'force_sonmp'; append _string "$v" "," + fi _hash=`echo -n "${_string}" | md5sum | awk '{ print \$1 }'` export -n "$var=$_hash" @@ -150,6 +154,7 @@ start_service() { local enable_fdp local force_fdp local enable_sonmp + local force_sonmp local enable_edp local lldp_class local lldp_location @@ -172,7 +177,10 @@ start_service() { config_get_bool enable_fdp 'config' 'enable_fdp' 0 config_get_bool force_fdp 'config' 'force_fdp' 0 fi - config_get_bool enable_sonmp 'config' 'enable_sonmp' 0 + if [ "$CONFIG_LLDPD_WITH_SONMP" == "y" ]; then + config_get_bool enable_sonmp 'config' 'enable_sonmp' 0 + config_get_bool force_sonmp 'config' 'force_sonmp' 0 + fi config_get_bool enable_edp 'config' 'enable_edp' 0 config_get lldp_class 'config' 'lldp_class' config_get lldp_location 'config' 'lldp_location' @@ -236,8 +244,18 @@ start_service() { fi fi - [ $enable_sonmp -gt 0 ] && procd_append_param command '-s' + if [ "$CONFIG_LLDPD_WITH_SONMP" == "y" ] && [ $enable_sonmp -gt 0 ]; then + if [ $force_sonmp -gt 0 ]; then + # SONMP enabled and forced + procd_append_param command '-ss' + else + # SONMP enabled + procd_append_param command '-s' + fi + fi + [ $enable_edp -gt 0 ] && procd_append_param command '-e' + [ $readonly_mode -gt 0 ] && procd_append_param command '-r' [ $lldp_no_version -gt 0 ] && procd_append_param commanpackage/network/services/lldpd/Makefile package/network/services/lldpd/files/lldpd.initd '-k' [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ] && [ $lldpmed_no_inventory -gt 0 ] && procd_append_param command '-i' From 4159acceebeec646fb2ebecdd85561ba140f1ce4 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sun, 17 Dec 2023 00:34:37 +0000 Subject: [PATCH 14/23] lldpd: add option to set system platform add option to override system platform instead of using kernel name Signed-off-by: Stephen Howell --- package/network/services/lldpd/files/lldpd.init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 8e825e4f87..656128ef5d 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -122,6 +122,9 @@ write_lldpd_conf() local lldp_portidsubtype config_get lldp_portidsubtype 'config' 'lldp_portidsubtype' 'macaddress' + local lldp_platform + config_get lldp_platform 'config' 'lldp_platform' "" + # Clear out the config file first echo -n > "$LLDPD_CONF" [ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF" @@ -138,6 +141,7 @@ write_lldpd_conf() fi [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF" [ -n "$lldp_portidsubtype" ] && echo "configure lldp portidsubtype" "\"$lldp_portidsubtype\"" >> "$LLDPD_CONF" + [ -n "$lldp_platform" ] && echo "configure system platform" "\"$lldp_platform\"" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR @@ -307,6 +311,7 @@ reload_service() { unconfigure system description unconfigure system hostname unconfigure system ip management pattern + unconfigure system platform EOF if [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ]; then $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF From a5f715da713304972467612d6934130ce3aa2837 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sun, 17 Dec 2023 00:39:48 +0000 Subject: [PATCH 15/23] lldpd: add option for tx delay and tx hold add option to set LLDP transmit delay, hold timers to set update frequency Signed-off-by: Stephen Howell --- package/network/services/lldpd/files/lldpd.init | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 656128ef5d..b69ec16086 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -125,6 +125,12 @@ write_lldpd_conf() local lldp_platform config_get lldp_platform 'config' 'lldp_platform' "" + local lldp_tx_interval + config_get lldp_tx_interval 'config' 'lldp_tx_interval' 0 + + local lldp_tx_hold + config_get lldp_tx_hold 'config' 'lldp_tx_hold' 0 + # Clear out the config file first echo -n > "$LLDPD_CONF" [ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF" @@ -142,6 +148,8 @@ write_lldpd_conf() [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF" [ -n "$lldp_portidsubtype" ] && echo "configure lldp portidsubtype" "\"$lldp_portidsubtype\"" >> "$LLDPD_CONF" [ -n "$lldp_platform" ] && echo "configure system platform" "\"$lldp_platform\"" >> "$LLDPD_CONF" + [ $lldp_tx_interval -gt 0 ] && echo "configure lldp tx-interval" "$lldp_tx_interval" >> "$LLDPD_CONF" + [ $lldp_tx_hold -gt 0 ] && echo "configure lldp tx-hold" "$lldp_tx_hold" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR From 1b36d44323cdd467980f83318be0837b8a1fd487 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sun, 17 Dec 2023 00:43:09 +0000 Subject: [PATCH 16/23] lldpd: Update Makefile package release increment Makefile package release to reflect changes to init script Signed-off-by: Stephen Howell --- package/network/services/lldpd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 02ef2d7520..fa4143c713 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lldpd PKG_VERSION:=1.0.17 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/lldpd/lldpd/releases/download/$(PKG_VERSION)/ From 8b2d02e48cd2559a52e1cbf04143028e50da6a88 Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 3 Feb 2024 13:51:49 +0000 Subject: [PATCH 17/23] lldpd: only use snmp options when compiled in prevent SNMP options being passed unless lldpd supports them Signed-off-by: Stephen Howell --- package/network/services/lldpd/Makefile | 3 ++- package/network/services/lldpd/files/lldpd.init | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index fa4143c713..bd01077b66 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -83,7 +83,8 @@ ifneq ($(CONFIG_LLDPD_WITH_SONMP),y) sed -i -e '/sonmp/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_SNMP),y) - sed -i -e '/agentxsocket/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd + sed -i -e 's/CONFIG_LLDPD_WITH_SNMP=y/CONFIG_LLDPD_WITH_SNMP=n/g' $(1)/etc/init.d/lldpd + sed -i -e '/agentxsocket/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_LLDPMED),y) sed -i -e 's/CONFIG_LLDPD_WITH_LLDPMED=y/CONFIG_LLDPD_WITH_LLDPMED=n/g' $(1)/etc/init.d/lldpd diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index b69ec16086..98769688ec 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -7,6 +7,7 @@ STOP=01 CONFIG_LLDPD_WITH_CDP=y CONFIG_LLDPD_WITH_FDP=y CONFIG_LLDPD_WITH_LLDPMED=y +CONFIG_LLDPD_WITH_SNMP=y CONFIG_LLDPD_WITH_SONMP=y USE_PROCD=1 @@ -37,7 +38,9 @@ get_config_restart_hash() { config_load 'lldpd' config_get v 'config' 'lldp_class'; append _string "$v" "," - config_get v 'config' 'agentxsocket'; append _string "$v" "," + if [ "$CONFIG_LLDPD_WITH_SNMP" == "y" ]; then + config_get v 'config' 'agentxsocket'; append _string "$v" "," + fi config_get v 'config' 'cid_interface'; append _string "$v" "," config_get v 'config' 'filter'; append _string "$v" "," config_get_bool v 'config' 'readonly_mode'; append _string "$v" "," @@ -201,7 +204,9 @@ start_service() { config_get_bool lldpmed_no_inventory 'config' 'lldpmed_no_inventory' 0 fi config_get_bool readonly_mode 'config' 'readonly_mode' 0 - config_get agentxsocket 'config' 'agentxsocket' + if [ "$CONFIG_LLDPD_WITH_SNMP" == "y" ]; then + config_get agentxsocket 'config' 'agentxsocket' + fi config_get filter 'config' 'filter' 15 mkdir -p ${LLDPD_RUN} @@ -272,7 +277,7 @@ start_service() { [ $lldp_no_version -gt 0 ] && procd_append_param commanpackage/network/services/lldpd/Makefile package/network/services/lldpd/files/lldpd.initd '-k' [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ] && [ $lldpmed_no_inventory -gt 0 ] && procd_append_param command '-i' [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" - [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" + [ "$CONFIG_LLDPD_WITH_SNMP" == "y" ] && [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" [ -n "$filter" ] && procd_append_param command -H "$filter" # ChassisID interfaces From d274867c217cade795537af93ff9b209e472e19c Mon Sep 17 00:00:00 2001 From: Stephen Howell Date: Sat, 3 Feb 2024 14:16:09 +0000 Subject: [PATCH 18/23] lldpd: add option to force EDP allow EDP support if compiled and add force EDP option Signed-off-by: Stephen Howell --- package/network/services/lldpd/Makefile | 3 ++- .../network/services/lldpd/files/lldpd.init | 22 ++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index bd01077b66..1f8d1e546b 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -76,7 +76,8 @@ ifneq ($(CONFIG_LLDPD_WITH_FDP),y) sed -i -e '/fdp/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_EDP),y) - sed -i -e '/edp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd + sed -i -e 's/CONFIG_LLDPD_WITH_EDP=y/CONFIG_LLDPD_WITH_EDP=n/g' $(1)/etc/init.d/lldpd + sed -i -e '/edp/d' $(1)/etc/config/lldpd endif ifneq ($(CONFIG_LLDPD_WITH_SONMP),y) sed -i -e 's/CONFIG_LLDPD_WITH_SONMP=y/CONFIG_LLDPD_WITH_SONMP=n/g' $(1)/etc/init.d/lldpd diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 98769688ec..f90b4a237c 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -5,6 +5,7 @@ START=90 STOP=01 CONFIG_LLDPD_WITH_CDP=y +CONFIG_LLDPD_WITH_EDP=y CONFIG_LLDPD_WITH_FDP=y CONFIG_LLDPD_WITH_LLDPMED=y CONFIG_LLDPD_WITH_SNMP=y @@ -56,7 +57,10 @@ get_config_restart_hash() { config_get_bool v 'config' 'force_cdp'; append _string "$v" "," config_get_bool v 'config' 'force_cdpv2'; append _string "$v" "," fi - config_get_bool v 'config' 'enable_edp'; append _string "$v" "," + if [ "$CONFIG_LLDPD_WITH_EDP" == "y" ]; then + config_get_bool v 'config' 'enable_edp'; append _string "$v" "," + config_get_bool v 'config' 'force_edp'; append _string "$v" "," + fi if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ]; then config_get_bool v 'config' 'enable_fdp'; append _string "$v" "," config_get_bool v 'config' 'force_fdp'; append _string "$v" "," @@ -171,6 +175,7 @@ start_service() { local enable_sonmp local force_sonmp local enable_edp + local force_edp local lldp_class local lldp_location local lldp_no_version @@ -196,7 +201,10 @@ start_service() { config_get_bool enable_sonmp 'config' 'enable_sonmp' 0 config_get_bool force_sonmp 'config' 'force_sonmp' 0 fi - config_get_bool enable_edp 'config' 'enable_edp' 0 + if [ "$CONFIG_LLDPD_WITH_EDP" == "y" ]; then + config_get_bool enable_edp 'config' 'enable_edp' 0 + config_get_bool force_edp 'config' 'force_edp' 0 + fi config_get lldp_class 'config' 'lldp_class' config_get lldp_location 'config' 'lldp_location' config_get_bool lldp_no_version 'config' 'lldp_no_version' 0 @@ -271,7 +279,15 @@ start_service() { fi fi - [ $enable_edp -gt 0 ] && procd_append_param command '-e' + if [ "$CONFIG_LLDPD_WITH_EDP" == "y" ] && [ $enable_edp -gt 0 ]; then + if [ $force_edp -gt 0 ]; then + # EDP enbled and forced + procd_append_param command '-ee' + else + # EDP enbled + procd_append_param command '-e' + fi + fi [ $readonly_mode -gt 0 ] && procd_append_param command '-r' [ $lldp_no_version -gt 0 ] && procd_append_param commanpackage/network/services/lldpd/Makefile package/network/services/lldpd/files/lldpd.initd '-k' From 4a0839b44ede74754f8022ca7fbd31c862ca86c2 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 2 Feb 2024 16:56:39 -0500 Subject: [PATCH 19/23] kernel: bump 6.1 to 6.1.76 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.76 All patches automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia --- include/kernel-6.1 | 4 ++-- .../ath79/patches-6.1/900-unaligned_access_hacks.patch | 2 +- .../950-0111-MMC-added-alternative-MMC-driver.patch | 6 +++--- ...7-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch | 4 ++-- ...panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch | 2 +- ...-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch | 2 +- ...block-Don-t-do-single-sector-reads-during-recove.patch | 2 +- ...drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch | 2 +- ...erial-sc16is7xx-Read-modem-line-state-at-startup.patch | 4 ++-- .../patches-6.1/950-1182-drm-panel-add-panel-dsi.patch | 6 +++--- .../828-v6.4-0003-of-Rename-of_modalias_node.patch | 2 +- .../generic/hack-6.1/410-block-fit-partition-parser.patch | 2 +- target/linux/generic/hack-6.1/901-debloat_sock_diag.patch | 8 ++++---- target/linux/generic/hack-6.1/902-debloat_proc.patch | 2 +- ...ilter-nft_flow_offload-handle-netdevice-events-f.patch | 2 +- ...ilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- ...core-add-optional-threading-for-backlog-processi.patch | 2 +- .../790-bus-mhi-core-add-SBL-state-callback.patch | 2 +- ...-drivers-spi-Add-support-for-dynamic-calibration.patch | 4 ++-- .../patches-6.1/901-arm-add-cmdline-override.patch | 2 +- 20 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/kernel-6.1 b/include/kernel-6.1 index b6c55613b6..4abd9f4310 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .75 -LINUX_KERNEL_HASH-6.1.75 = 6cd19410330c13ec4c18fd28a83d3e40fc12a152815fb7c3e1b0764329093a56 +LINUX_VERSION-6.1 = .76 +LINUX_KERNEL_HASH-6.1.76 = 0580cc0e81ff9aee245f79531d8c1c5c7d711eee227cd4cf52d1ff335727b1fd diff --git a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch index 2235c28fd9..b6f6d63f68 100644 --- a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch @@ -336,7 +336,7 @@ SVN-Revision: 35130 #endif /* _LINUX_TYPES_H */ --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c -@@ -1512,8 +1512,8 @@ struct sk_buff *inet_gro_receive(struct +@@ -1515,8 +1515,8 @@ struct sk_buff *inet_gro_receive(struct if (unlikely(ip_fast_csum((u8 *)iph, 5))) goto out; diff --git a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch index 09402fbc35..476a3caf3c 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch @@ -266,7 +266,7 @@ Signed-off-by: Phil Elwell static inline int mmc_blk_part_switch(struct mmc_card *card, unsigned int part_type); static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, -@@ -3000,6 +3007,8 @@ static int mmc_blk_probe(struct mmc_card +@@ -3040,6 +3047,8 @@ static int mmc_blk_probe(struct mmc_card { struct mmc_blk_data *md; int ret = 0; @@ -275,7 +275,7 @@ Signed-off-by: Phil Elwell /* * Check that the card supports the command class(es) we need. -@@ -3007,7 +3016,16 @@ static int mmc_blk_probe(struct mmc_card +@@ -3047,7 +3056,16 @@ static int mmc_blk_probe(struct mmc_card if (!(card->csd.cmdclass & CCC_BLOCK_READ)) return -ENODEV; @@ -293,7 +293,7 @@ Signed-off-by: Phil Elwell card->complete_wq = alloc_workqueue("mmc_complete", WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); -@@ -3022,6 +3040,17 @@ static int mmc_blk_probe(struct mmc_card +@@ -3062,6 +3080,17 @@ static int mmc_blk_probe(struct mmc_card goto out_free; } diff --git a/target/linux/bcm27xx/patches-6.1/950-0227-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch b/target/linux/bcm27xx/patches-6.1/950-0227-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch index 974a516829..ef96ffe86e 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0227-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0227-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch @@ -32,7 +32,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3675,6 +3675,7 @@ static int spi_set_cs_timing(struct spi_ +@@ -3679,6 +3679,7 @@ static int spi_set_cs_timing(struct spi_ */ int spi_setup(struct spi_device *spi) { @@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell unsigned bad_bits, ugly_bits; int status = 0; -@@ -3695,6 +3696,14 @@ int spi_setup(struct spi_device *spi) +@@ -3699,6 +3700,14 @@ int spi_setup(struct spi_device *spi) (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL))) return -EINVAL; diff --git a/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch b/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch index 3b663351e2..d0eecb7ee8 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch @@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson static const struct display_timing rocktech_rk070er9427_timing = { .pixelclock = { 26400000, 33300000, 46800000 }, .hactive = { 800, 800, 800 }, -@@ -4224,6 +4249,9 @@ static const struct of_device_id platfor +@@ -4226,6 +4251,9 @@ static const struct of_device_id platfor .compatible = "qishenglong,gopher2b-lcd", .data = &qishenglong_gopher2b_lcd, }, { diff --git a/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch b/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch index aa446c3346..fa850a4fd9 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch @@ -46,7 +46,7 @@ Acked-by: Maxime Ripard static const struct drm_display_mode giantplus_gpg482739qs5_mode = { .clock = 9000, .hdisplay = 480, -@@ -4108,6 +4134,9 @@ static const struct of_device_id platfor +@@ -4110,6 +4136,9 @@ static const struct of_device_id platfor .compatible = "friendlyarm,hd702e", .data = &friendlyarm_hd702e, }, { diff --git a/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch b/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch index 0335f00198..8fa58f8327 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c -@@ -1930,7 +1930,7 @@ static void mmc_blk_mq_rw_recovery(struc +@@ -1970,7 +1970,7 @@ static void mmc_blk_mq_rw_recovery(struc return; } diff --git a/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch b/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch index 505121f4cf..93da3ce94d 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch @@ -165,7 +165,7 @@ Signed-off-by: Phil Elwell static const struct drm_display_mode innolux_at070tn92_mode = { .clock = 33333, .hdisplay = 800, -@@ -4144,6 +4176,9 @@ static const struct of_device_id platfor +@@ -4146,6 +4178,9 @@ static const struct of_device_id platfor .compatible = "innolux,at043tn24", .data = &innolux_at043tn24, }, { diff --git a/target/linux/bcm27xx/patches-6.1/950-0791-serial-sc16is7xx-Read-modem-line-state-at-startup.patch b/target/linux/bcm27xx/patches-6.1/950-0791-serial-sc16is7xx-Read-modem-line-state-at-startup.patch index 148134f0a2..291302306c 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0791-serial-sc16is7xx-Read-modem-line-state-at-startup.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0791-serial-sc16is7xx-Read-modem-line-state-at-startup.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -1222,6 +1222,9 @@ static int sc16is7xx_startup(struct uart +@@ -1193,6 +1193,9 @@ static int sc16is7xx_startup(struct uart SC16IS7XX_IER_MSI_BIT; sc16is7xx_port_write(port, SC16IS7XX_IER_REG, val); @@ -24,5 +24,5 @@ Signed-off-by: Phil Elwell + one->old_mctrl = sc16is7xx_get_hwmctrl(port); + /* Enable modem status polling */ - spin_lock_irqsave(&port->lock, flags); + uart_port_lock_irqsave(port, &flags); sc16is7xx_enable_ms(port); diff --git a/target/linux/bcm27xx/patches-6.1/950-1182-drm-panel-add-panel-dsi.patch b/target/linux/bcm27xx/patches-6.1/950-1182-drm-panel-add-panel-dsi.patch index d914ab6d04..9122d73476 100644 --- a/target/linux/bcm27xx/patches-6.1/950-1182-drm-panel-add-panel-dsi.patch +++ b/target/linux/bcm27xx/patches-6.1/950-1182-drm-panel-add-panel-dsi.patch @@ -23,7 +23,7 @@ Signed-off-by: Timon Skerutsch /** * struct panel_desc - Describes a simple panel. -@@ -4660,6 +4661,9 @@ static const struct panel_desc_dsi osd10 +@@ -4662,6 +4663,9 @@ static const struct panel_desc_dsi osd10 .lanes = 4, }; @@ -33,7 +33,7 @@ Signed-off-by: Timon Skerutsch static const struct of_device_id dsi_of_match[] = { { .compatible = "auo,b080uan01", -@@ -4683,14 +4687,118 @@ static const struct of_device_id dsi_of_ +@@ -4685,14 +4689,118 @@ static const struct of_device_id dsi_of_ .compatible = "osddisplays,osd101t2045-53ts", .data = &osd101t2045_53ts }, { @@ -152,7 +152,7 @@ Signed-off-by: Timon Skerutsch const struct of_device_id *id; int err; -@@ -4698,7 +4806,20 @@ static int panel_simple_dsi_probe(struct +@@ -4700,7 +4808,20 @@ static int panel_simple_dsi_probe(struct if (!id) return -ENODEV; diff --git a/target/linux/generic/backport-6.1/828-v6.4-0003-of-Rename-of_modalias_node.patch b/target/linux/generic/backport-6.1/828-v6.4-0003-of-Rename-of_modalias_node.patch index 15af039a16..671556fbaa 100644 --- a/target/linux/generic/backport-6.1/828-v6.4-0003-of-Rename-of_modalias_node.patch +++ b/target/linux/generic/backport-6.1/828-v6.4-0003-of-Rename-of_modalias_node.patch @@ -148,7 +148,7 @@ Signed-off-by: Greg Kroah-Hartman * of_find_node_by_phandle - Find a node given a phandle --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -2326,8 +2326,8 @@ of_register_spi_device(struct spi_contro +@@ -2330,8 +2330,8 @@ of_register_spi_device(struct spi_contro } /* Select device driver */ diff --git a/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch b/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch index 1258f64722..3e45646fdb 100644 --- a/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch +++ b/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch @@ -105,7 +105,7 @@ Subject: [PATCH] kernel: add block fit partition parser /* everything is up and running, commence */ err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL); if (err) -@@ -585,6 +597,11 @@ static bool blk_add_partition(struct gen +@@ -590,6 +602,11 @@ static bool blk_add_partition(struct gen (state->parts[p].flags & ADDPART_FLAG_RAID)) md_autodetect_dev(part->bd_dev); diff --git a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch index ffa6e8ac60..ec71f9af4b 100644 --- a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau obj-$(CONFIG_PROC_FS) += net-procfs.o --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -114,6 +114,7 @@ +@@ -115,6 +115,7 @@ #include #include #include @@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau #include -@@ -145,6 +146,7 @@ +@@ -146,6 +147,7 @@ static DEFINE_MUTEX(proto_list_mutex); static LIST_HEAD(proto_list); @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau static void sock_def_write_space_wfree(struct sock *sk); static void sock_def_write_space(struct sock *sk); -@@ -584,6 +586,18 @@ discard_and_relse: +@@ -585,6 +587,18 @@ discard_and_relse: } EXPORT_SYMBOL(__sk_receive_skb); @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *, u32)); INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *, -@@ -2187,9 +2201,11 @@ static void __sk_free(struct sock *sk) +@@ -2188,9 +2202,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); diff --git a/target/linux/generic/hack-6.1/902-debloat_proc.patch b/target/linux/generic/hack-6.1/902-debloat_proc.patch index 0d844994aa..a90169efc9 100644 --- a/target/linux/generic/hack-6.1/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.1/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -4113,6 +4113,8 @@ static __net_initdata struct pernet_oper +@@ -4114,6 +4114,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-6.1/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/target/linux/generic/pending-6.1/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch index 47c742cff0..a3897a9fd1 100644 --- a/target/linux/generic/pending-6.1/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch +++ b/target/linux/generic/pending-6.1/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch @@ -59,7 +59,7 @@ Signed-off-by: Pablo Neira Ayuso } --- a/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c -@@ -470,47 +470,14 @@ static struct nft_expr_type nft_flow_off +@@ -475,47 +475,14 @@ static struct nft_expr_type nft_flow_off .owner = THIS_MODULE, }; diff --git a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 683df4df83..7b1571ea6e 100644 --- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -7900,7 +7900,7 @@ static int nft_register_flowtable_net_ho +@@ -7904,7 +7904,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch index 944e4d1869..42c8519c90 100644 --- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch +++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_RPS remsd = oldsd->rps_ipi_list; oldsd->rps_ipi_list = NULL; -@@ -11471,6 +11545,7 @@ static int __init net_dev_init(void) +@@ -11480,6 +11554,7 @@ static int __init net_dev_init(void) INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd); spin_lock_init(&sd->defer_lock); diff --git a/target/linux/generic/pending-6.1/790-bus-mhi-core-add-SBL-state-callback.patch b/target/linux/generic/pending-6.1/790-bus-mhi-core-add-SBL-state-callback.patch index 874df43e7c..f239355594 100644 --- a/target/linux/generic/pending-6.1/790-bus-mhi-core-add-SBL-state-callback.patch +++ b/target/linux/generic/pending-6.1/790-bus-mhi-core-add-SBL-state-callback.patch @@ -20,7 +20,7 @@ Signed-off-by: Robert Marko --- a/drivers/bus/mhi/host/main.c +++ b/drivers/bus/mhi/host/main.c -@@ -900,6 +900,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_ +@@ -905,6 +905,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_ switch (event) { case MHI_EE_SBL: st = DEV_ST_TRANSITION_SBL; diff --git a/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch b/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch index 9aeeb78658..b2c9df4386 100644 --- a/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch +++ b/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch @@ -82,7 +82,7 @@ Signed-off-by: SkyLake.Huang static void _spi_transfer_delay_ns(u32 ns) { if (!ns) -@@ -2219,6 +2283,75 @@ void spi_flush_queue(struct spi_controll +@@ -2223,6 +2287,75 @@ void spi_flush_queue(struct spi_controll /*-------------------------------------------------------------------------*/ #if defined(CONFIG_OF) @@ -158,7 +158,7 @@ Signed-off-by: SkyLake.Huang static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, struct device_node *nc) { -@@ -2337,6 +2470,10 @@ of_register_spi_device(struct spi_contro +@@ -2341,6 +2474,10 @@ of_register_spi_device(struct spi_contro if (rc) goto err_out; diff --git a/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch b/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch index 72e4d15009..bfca4b6389 100644 --- a/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch +++ b/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch @@ -37,7 +37,7 @@ * CONFIG_CMDLINE is meant to be a default in case nothing else --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -2236,6 +2236,14 @@ config CMDLINE_FORCE +@@ -2240,6 +2240,14 @@ config CMDLINE_FORCE endchoice From f89904ad78974898ac389f8a1b9d584a7b2bd15b Mon Sep 17 00:00:00 2001 From: John Audia Date: Tue, 6 Feb 2024 16:44:12 -0500 Subject: [PATCH 20/23] kernel: bump 6.1 to 6.1.77 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.77 Removed upstreamed: generic/backport-6.1/707-v6.8-01-net-phy-at803x-fix-passing-the-wrong-reference-for-c.patch[1] generic/backport-6.1/796-v6.8-ipmr-fix-kernel-panic-when-forwarding-mcast-packets.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.77&id=7dc0fefd37dd5fb03fdac6e3e01b1c2291148ccb 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.77&id=d2f1b7fe74afd66298dbb3c7b39e7b62e4df1724 Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia --- include/kernel-6.1 | 4 +- .../patches-6.1/910-mikrotik-rb4xx.patch | 2 +- ...042-drm-Add-chroma-siting-properties.patch | 2 +- .../950-0106-Add-dwc_otg-driver.patch | 2 +- .../950-0872-mfd-Add-rp1-driver.patch | 2 +- ...ix-passing-the-wrong-reference-for-c.patch | 45 ------ ...a8k-convert-to-regmap-read-write-API.patch | 2 +- ...ke-learning-configurable-and-keep-of.patch | 4 +- ...mit-user-ports-access-to-the-first-C.patch | 2 +- ...ve-qca8xxx-hol-fixup-to-separate-fun.patch | 4 +- ...e-dsa_for_each-macro-instead-of-for-.patch | 6 +- ...-panic-when-forwarding-mcast-packets.patch | 152 ------------------ ...net-dsa-qca8k-add-LEDs-basic-support.patch | 2 +- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 28 ++-- ...les-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- ...-qca8k-implement-lag_fdb_add-del-ops.patch | 2 +- ...a8k-enable-flooding-to-both-CPU-port.patch | 2 +- ...k-add-support-for-port_change_master.patch | 4 +- ...enable-assisted-learning-on-CPU-port.patch | 6 +- .../810-pci_disable_common_quirks.patch | 6 +- ...a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch | 2 +- 21 files changed, 42 insertions(+), 239 deletions(-) delete mode 100644 target/linux/generic/backport-6.1/707-v6.8-01-net-phy-at803x-fix-passing-the-wrong-reference-for-c.patch delete mode 100644 target/linux/generic/backport-6.1/796-v6.8-ipmr-fix-kernel-panic-when-forwarding-mcast-packets.patch diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 4abd9f4310..64aa8ea76b 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .76 -LINUX_KERNEL_HASH-6.1.76 = 0580cc0e81ff9aee245f79531d8c1c5c7d711eee227cd4cf52d1ff335727b1fd +LINUX_VERSION-6.1 = .77 +LINUX_KERNEL_HASH-6.1.77 = 3b54ec567716cdfb3618caf38c58a8aab1372cc41c16430633febe9ccdb3f91d diff --git a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch index b61eef0b8a..9a163e70b3 100644 --- a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch +++ b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch @@ -45,7 +45,7 @@ Submitted-by: Christopher Hill --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig -@@ -2208,6 +2208,14 @@ config RAVE_SP_CORE +@@ -2209,6 +2209,14 @@ config RAVE_SP_CORE Select this to get support for the Supervisory Processor device found on several devices in RAVE line of hardware. diff --git a/target/linux/bcm27xx/patches-6.1/950-0042-drm-Add-chroma-siting-properties.patch b/target/linux/bcm27xx/patches-6.1/950-0042-drm-Add-chroma-siting-properties.patch index 7ae221e8a9..4bfb85449a 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0042-drm-Add-chroma-siting-properties.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0042-drm-Add-chroma-siting-properties.patch @@ -106,7 +106,7 @@ Signed-off-by: Dom Cobley * @tests: bitmask of tests to run --- a/include/drm/drm_color_mgmt.h +++ b/include/drm/drm_color_mgmt.h -@@ -93,6 +93,9 @@ int drm_plane_create_color_properties(st +@@ -94,6 +94,9 @@ int drm_plane_create_color_properties(st enum drm_color_encoding default_encoding, enum drm_color_range default_range); diff --git a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch index 635e864f99..02fc0ed49a 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch @@ -1185,7 +1185,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5655,7 +5655,7 @@ static void port_event(struct usb_hub *h +@@ -5669,7 +5669,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-6.1/950-0872-mfd-Add-rp1-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0872-mfd-Add-rp1-driver.patch index dd252cba36..c2044753f9 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0872-mfd-Add-rp1-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0872-mfd-Add-rp1-driver.patch @@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig -@@ -2252,6 +2252,17 @@ config MFD_INTEL_M10_BMC +@@ -2253,6 +2253,17 @@ config MFD_INTEL_M10_BMC additional drivers must be enabled in order to use the functionality of the device. diff --git a/target/linux/generic/backport-6.1/707-v6.8-01-net-phy-at803x-fix-passing-the-wrong-reference-for-c.patch b/target/linux/generic/backport-6.1/707-v6.8-01-net-phy-at803x-fix-passing-the-wrong-reference-for-c.patch deleted file mode 100644 index b206b18052..0000000000 --- a/target/linux/generic/backport-6.1/707-v6.8-01-net-phy-at803x-fix-passing-the-wrong-reference-for-c.patch +++ /dev/null @@ -1,45 +0,0 @@ -From f8fdbf3389f44c7026f16e36cb1f2ff017f7f5b2 Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Fri, 8 Dec 2023 15:51:48 +0100 -Subject: [PATCH 01/13] net: phy: at803x: fix passing the wrong reference for - config_intr - -Fix passing the wrong reference for config_initr on passing the function -pointer, drop the wrong & from at803x_config_intr in the PHY struct. - -Signed-off-by: Christian Marangi -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -2104,7 +2104,7 @@ static struct phy_driver at803x_driver[] - .write_page = at803x_write_page, - .get_features = at803x_get_features, - .read_status = at803x_read_status, -- .config_intr = &at803x_config_intr, -+ .config_intr = at803x_config_intr, - .handle_interrupt = at803x_handle_interrupt, - .get_tunable = at803x_get_tunable, - .set_tunable = at803x_set_tunable, -@@ -2134,7 +2134,7 @@ static struct phy_driver at803x_driver[] - .resume = at803x_resume, - .flags = PHY_POLL_CABLE_TEST, - /* PHY_BASIC_FEATURES */ -- .config_intr = &at803x_config_intr, -+ .config_intr = at803x_config_intr, - .handle_interrupt = at803x_handle_interrupt, - .cable_test_start = at803x_cable_test_start, - .cable_test_get_status = at803x_cable_test_get_status, -@@ -2150,7 +2150,7 @@ static struct phy_driver at803x_driver[] - .resume = at803x_resume, - .flags = PHY_POLL_CABLE_TEST, - /* PHY_BASIC_FEATURES */ -- .config_intr = &at803x_config_intr, -+ .config_intr = at803x_config_intr, - .handle_interrupt = at803x_handle_interrupt, - .cable_test_start = at803x_cable_test_start, - .cable_test_get_status = at803x_cable_test_get_status, diff --git a/target/linux/generic/backport-6.1/778-v6.3-02-net-dsa-qca8k-convert-to-regmap-read-write-API.patch b/target/linux/generic/backport-6.1/778-v6.3-02-net-dsa-qca8k-convert-to-regmap-read-write-API.patch index 0a631a09c1..b8f8071b0a 100644 --- a/target/linux/generic/backport-6.1/778-v6.3-02-net-dsa-qca8k-convert-to-regmap-read-write-API.patch +++ b/target/linux/generic/backport-6.1/778-v6.3-02-net-dsa-qca8k-convert-to-regmap-read-write-API.patch @@ -168,7 +168,7 @@ Signed-off-by: David S. Miller }; static int -@@ -2102,8 +2158,6 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops, +@@ -2112,8 +2168,6 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops, static const struct qca8k_info_ops qca8xxx_ops = { .autocast_mib = qca8k_get_ethtool_stats_eth, diff --git a/target/linux/generic/backport-6.1/780-v6.6-01-net-dsa-qca8k-make-learning-configurable-and-keep-of.patch b/target/linux/generic/backport-6.1/780-v6.6-01-net-dsa-qca8k-make-learning-configurable-and-keep-of.patch index 6e93491a12..d31789370e 100644 --- a/target/linux/generic/backport-6.1/780-v6.6-01-net-dsa-qca8k-make-learning-configurable-and-keep-of.patch +++ b/target/linux/generic/backport-6.1/780-v6.6-01-net-dsa-qca8k-make-learning-configurable-and-keep-of.patch @@ -32,7 +32,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -1894,9 +1894,8 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1905,9 +1905,8 @@ qca8k_setup(struct dsa_switch *ds) if (ret) return ret; @@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni if (ret) return ret; -@@ -2002,6 +2001,8 @@ static const struct dsa_switch_ops qca8k +@@ -2013,6 +2012,8 @@ static const struct dsa_switch_ops qca8k .port_change_mtu = qca8k_port_change_mtu, .port_max_mtu = qca8k_port_max_mtu, .port_stp_state_set = qca8k_port_stp_state_set, diff --git a/target/linux/generic/backport-6.1/780-v6.6-02-net-dsa-qca8k-limit-user-ports-access-to-the-first-C.patch b/target/linux/generic/backport-6.1/780-v6.6-02-net-dsa-qca8k-limit-user-ports-access-to-the-first-C.patch index fdb3a8cdb9..4b457f67de 100644 --- a/target/linux/generic/backport-6.1/780-v6.6-02-net-dsa-qca8k-limit-user-ports-access-to-the-first-C.patch +++ b/target/linux/generic/backport-6.1/780-v6.6-02-net-dsa-qca8k-limit-user-ports-access-to-the-first-C.patch @@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -1874,18 +1874,16 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1885,18 +1885,16 @@ qca8k_setup(struct dsa_switch *ds) if (ret) return ret; diff --git a/target/linux/generic/backport-6.1/780-v6.6-03-net-dsa-qca8k-move-qca8xxx-hol-fixup-to-separate-fun.patch b/target/linux/generic/backport-6.1/780-v6.6-03-net-dsa-qca8k-move-qca8xxx-hol-fixup-to-separate-fun.patch index c789fdf05e..f556628b5b 100644 --- a/target/linux/generic/backport-6.1/780-v6.6-03-net-dsa-qca8k-move-qca8xxx-hol-fixup-to-separate-fun.patch +++ b/target/linux/generic/backport-6.1/780-v6.6-03-net-dsa-qca8k-move-qca8xxx-hol-fixup-to-separate-fun.patch @@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -1784,6 +1784,46 @@ static int qca8k_connect_tag_protocol(st +@@ -1795,6 +1795,46 @@ static int qca8k_connect_tag_protocol(st return 0; } @@ -64,7 +64,7 @@ Signed-off-by: Paolo Abeni static int qca8k_setup(struct dsa_switch *ds) { -@@ -1919,42 +1959,8 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1930,42 +1970,8 @@ qca8k_setup(struct dsa_switch *ds) * missing settings to improve switch stability under load condition. * This problem is limited to qca8337 and other qca8k switch are not affected. */ diff --git a/target/linux/generic/backport-6.1/780-v6.6-04-net-dsa-qca8k-use-dsa_for_each-macro-instead-of-for-.patch b/target/linux/generic/backport-6.1/780-v6.6-04-net-dsa-qca8k-use-dsa_for_each-macro-instead-of-for-.patch index 4f9581235d..faa0142ca9 100644 --- a/target/linux/generic/backport-6.1/780-v6.6-04-net-dsa-qca8k-use-dsa_for_each-macro-instead-of-for-.patch +++ b/target/linux/generic/backport-6.1/780-v6.6-04-net-dsa-qca8k-use-dsa_for_each-macro-instead-of-for-.patch @@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -1828,7 +1828,8 @@ static int +@@ -1839,7 +1839,8 @@ static int qca8k_setup(struct dsa_switch *ds) { struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; @@ -27,7 +27,7 @@ Signed-off-by: Paolo Abeni u32 mask; cpu_port = qca8k_find_cpu_port(ds); -@@ -1879,27 +1880,27 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1890,27 +1891,27 @@ qca8k_setup(struct dsa_switch *ds) dev_warn(priv->dev, "mib init failed"); /* Initial setup of all ports */ @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni } /* Forward all unknown frames to CPU port for Linux processing -@@ -1921,48 +1922,48 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1932,48 +1933,48 @@ qca8k_setup(struct dsa_switch *ds) return ret; /* Setup connection between CPU port & user ports diff --git a/target/linux/generic/backport-6.1/796-v6.8-ipmr-fix-kernel-panic-when-forwarding-mcast-packets.patch b/target/linux/generic/backport-6.1/796-v6.8-ipmr-fix-kernel-panic-when-forwarding-mcast-packets.patch deleted file mode 100644 index 3955690b6a..0000000000 --- a/target/linux/generic/backport-6.1/796-v6.8-ipmr-fix-kernel-panic-when-forwarding-mcast-packets.patch +++ /dev/null @@ -1,152 +0,0 @@ -From e622502c310f1069fd9f41cd38210553115f610a Mon Sep 17 00:00:00 2001 -From: Nicolas Dichtel -Date: Thu, 25 Jan 2024 15:18:47 +0100 -Subject: [PATCH] ipmr: fix kernel panic when forwarding mcast packets - -The stacktrace was: -[ 86.305548] BUG: kernel NULL pointer dereference, address: 0000000000000092 -[ 86.306815] #PF: supervisor read access in kernel mode -[ 86.307717] #PF: error_code(0x0000) - not-present page -[ 86.308624] PGD 0 P4D 0 -[ 86.309091] Oops: 0000 [#1] PREEMPT SMP NOPTI -[ 86.309883] CPU: 2 PID: 3139 Comm: pimd Tainted: G U 6.8.0-6wind-knet #1 -[ 86.311027] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org 04/01/2014 -[ 86.312728] RIP: 0010:ip_mr_forward (/build/work/knet/net/ipv4/ipmr.c:1985) -[ 86.313399] Code: f9 1f 0f 87 85 03 00 00 48 8d 04 5b 48 8d 04 83 49 8d 44 c5 00 48 8b 40 70 48 39 c2 0f 84 d9 00 00 00 49 8b 46 58 48 83 e0 fe <80> b8 92 00 00 00 00 0f 84 55 ff ff ff 49 83 47 38 01 45 85 e4 0f -[ 86.316565] RSP: 0018:ffffad21c0583ae0 EFLAGS: 00010246 -[ 86.317497] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 -[ 86.318596] RDX: ffff9559cb46c000 RSI: 0000000000000000 RDI: 0000000000000000 -[ 86.319627] RBP: ffffad21c0583b30 R08: 0000000000000000 R09: 0000000000000000 -[ 86.320650] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 -[ 86.321672] R13: ffff9559c093a000 R14: ffff9559cc00b800 R15: ffff9559c09c1d80 -[ 86.322873] FS: 00007f85db661980(0000) GS:ffff955a79d00000(0000) knlGS:0000000000000000 -[ 86.324291] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 -[ 86.325314] CR2: 0000000000000092 CR3: 000000002f13a000 CR4: 0000000000350ef0 -[ 86.326589] Call Trace: -[ 86.327036] -[ 86.327434] ? show_regs (/build/work/knet/arch/x86/kernel/dumpstack.c:479) -[ 86.328049] ? __die (/build/work/knet/arch/x86/kernel/dumpstack.c:421 /build/work/knet/arch/x86/kernel/dumpstack.c:434) -[ 86.328508] ? page_fault_oops (/build/work/knet/arch/x86/mm/fault.c:707) -[ 86.329107] ? do_user_addr_fault (/build/work/knet/arch/x86/mm/fault.c:1264) -[ 86.329756] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) -[ 86.330350] ? __irq_work_queue_local (/build/work/knet/kernel/irq_work.c:111 (discriminator 1)) -[ 86.331013] ? exc_page_fault (/build/work/knet/./arch/x86/include/asm/paravirt.h:693 /build/work/knet/arch/x86/mm/fault.c:1515 /build/work/knet/arch/x86/mm/fault.c:1563) -[ 86.331702] ? asm_exc_page_fault (/build/work/knet/./arch/x86/include/asm/idtentry.h:570) -[ 86.332468] ? ip_mr_forward (/build/work/knet/net/ipv4/ipmr.c:1985) -[ 86.333183] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) -[ 86.333920] ipmr_mfc_add (/build/work/knet/./include/linux/rcupdate.h:782 /build/work/knet/net/ipv4/ipmr.c:1009 /build/work/knet/net/ipv4/ipmr.c:1273) -[ 86.334583] ? __pfx_ipmr_hash_cmp (/build/work/knet/net/ipv4/ipmr.c:363) -[ 86.335357] ip_mroute_setsockopt (/build/work/knet/net/ipv4/ipmr.c:1470) -[ 86.336135] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) -[ 86.336854] ? ip_mroute_setsockopt (/build/work/knet/net/ipv4/ipmr.c:1470) -[ 86.337679] do_ip_setsockopt (/build/work/knet/net/ipv4/ip_sockglue.c:944) -[ 86.338408] ? __pfx_unix_stream_read_actor (/build/work/knet/net/unix/af_unix.c:2862) -[ 86.339232] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) -[ 86.339809] ? aa_sk_perm (/build/work/knet/security/apparmor/include/cred.h:153 /build/work/knet/security/apparmor/net.c:181) -[ 86.340342] ip_setsockopt (/build/work/knet/net/ipv4/ip_sockglue.c:1415) -[ 86.340859] raw_setsockopt (/build/work/knet/net/ipv4/raw.c:836) -[ 86.341408] ? security_socket_setsockopt (/build/work/knet/security/security.c:4561 (discriminator 13)) -[ 86.342116] sock_common_setsockopt (/build/work/knet/net/core/sock.c:3716) -[ 86.342747] do_sock_setsockopt (/build/work/knet/net/socket.c:2313) -[ 86.343363] __sys_setsockopt (/build/work/knet/./include/linux/file.h:32 /build/work/knet/net/socket.c:2336) -[ 86.344020] __x64_sys_setsockopt (/build/work/knet/net/socket.c:2340) -[ 86.344766] do_syscall_64 (/build/work/knet/arch/x86/entry/common.c:52 /build/work/knet/arch/x86/entry/common.c:83) -[ 86.345433] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) -[ 86.346161] ? syscall_exit_work (/build/work/knet/./include/linux/audit.h:357 /build/work/knet/kernel/entry/common.c:160) -[ 86.346938] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) -[ 86.347657] ? syscall_exit_to_user_mode (/build/work/knet/kernel/entry/common.c:215) -[ 86.348538] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) -[ 86.349262] ? do_syscall_64 (/build/work/knet/./arch/x86/include/asm/cpufeature.h:171 /build/work/knet/arch/x86/entry/common.c:98) -[ 86.349971] entry_SYSCALL_64_after_hwframe (/build/work/knet/arch/x86/entry/entry_64.S:129) - -The original packet in ipmr_cache_report() may be queued and then forwarded -with ip_mr_forward(). This last function has the assumption that the skb -dst is set. - -After the below commit, the skb dst is dropped by ipv4_pktinfo_prepare(), -which causes the oops. - -Fixes: bb7403655b3c ("ipmr: support IP_PKTINFO on cache report IGMP msg") -Signed-off-by: Nicolas Dichtel -Reviewed-by: Eric Dumazet -Link: https://lore.kernel.org/r/20240125141847.1931933-1-nicolas.dichtel@6wind.com -Signed-off-by: Jakub Kicinski ---- - include/net/ip.h | 2 +- - net/ipv4/ip_sockglue.c | 6 ++++-- - net/ipv4/ipmr.c | 2 +- - net/ipv4/raw.c | 2 +- - net/ipv4/udp.c | 2 +- - 5 files changed, 8 insertions(+), 6 deletions(-) - ---- a/include/net/ip.h -+++ b/include/net/ip.h -@@ -752,7 +752,7 @@ int ip_options_rcv_srr(struct sk_buff *s - * Functions provided by ip_sockglue.c - */ - --void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb); -+void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb, bool drop_dst); - void ip_cmsg_recv_offset(struct msghdr *msg, struct sock *sk, - struct sk_buff *skb, int tlen, int offset); - int ip_cmsg_send(struct sock *sk, struct msghdr *msg, ---- a/net/ipv4/ip_sockglue.c -+++ b/net/ipv4/ip_sockglue.c -@@ -1406,12 +1406,13 @@ e_inval: - * ipv4_pktinfo_prepare - transfer some info from rtable to skb - * @sk: socket - * @skb: buffer -+ * @drop_dst: if true, drops skb dst - * - * To support IP_CMSG_PKTINFO option, we store rt_iif and specific - * destination in skb->cb[] before dst drop. - * This way, receiver doesn't make cache line misses to read rtable. - */ --void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb) -+void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb, bool drop_dst) - { - struct in_pktinfo *pktinfo = PKTINFO_SKB_CB(skb); - bool prepare = (inet_sk(sk)->cmsg_flags & IP_CMSG_PKTINFO) || -@@ -1440,7 +1441,8 @@ void ipv4_pktinfo_prepare(const struct s - pktinfo->ipi_ifindex = 0; - pktinfo->ipi_spec_dst.s_addr = 0; - } -- skb_dst_drop(skb); -+ if (drop_dst) -+ skb_dst_drop(skb); - } - - int ip_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, ---- a/net/ipv4/ipmr.c -+++ b/net/ipv4/ipmr.c -@@ -1073,7 +1073,7 @@ static int ipmr_cache_report(const struc - msg = (struct igmpmsg *)skb_network_header(skb); - msg->im_vif = vifi; - msg->im_vif_hi = vifi >> 8; -- ipv4_pktinfo_prepare(mroute_sk, pkt); -+ ipv4_pktinfo_prepare(mroute_sk, pkt, false); - memcpy(skb->cb, pkt->cb, sizeof(skb->cb)); - /* Add our header */ - igmp = skb_put(skb, sizeof(struct igmphdr)); ---- a/net/ipv4/raw.c -+++ b/net/ipv4/raw.c -@@ -288,7 +288,7 @@ static int raw_rcv_skb(struct sock *sk, - { - /* Charge it to the socket. */ - -- ipv4_pktinfo_prepare(sk, skb); -+ ipv4_pktinfo_prepare(sk, skb, true); - if (sock_queue_rcv_skb(sk, skb) < 0) { - kfree_skb(skb); - return NET_RX_DROP; ---- a/net/ipv4/udp.c -+++ b/net/ipv4/udp.c -@@ -2196,7 +2196,7 @@ static int udp_queue_rcv_one_skb(struct - - udp_csum_pull_header(skb); - -- ipv4_pktinfo_prepare(sk, skb); -+ ipv4_pktinfo_prepare(sk, skb, true); - return __udp_queue_rcv_skb(sk, skb); - - csum_error: diff --git a/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch b/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch index 4bd84223ef..409fe9c7a1 100644 --- a/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch +++ b/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch @@ -71,7 +71,7 @@ Signed-off-by: David S. Miller static void qca8k_split_addr(u32 regaddr, u16 *r1, u16 *r2, u16 *page) -@@ -1840,6 +1841,10 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1851,6 +1852,10 @@ qca8k_setup(struct dsa_switch *ds) if (ret) return ret; diff --git a/target/linux/generic/pending-6.1/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-6.1/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 2bc25eb4fa..b799c6fc9c 100644 --- a/target/linux/generic/pending-6.1/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-6.1/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -275,8 +275,8 @@ Signed-off-by: Steven Barth static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, -@@ -840,6 +966,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl - skb_reset_network_header(skb); +@@ -855,6 +981,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl + memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); + if (tpi->proto == htons(ETH_P_IP) && tunnel->parms.fmrs && @@ -303,7 +303,7 @@ Signed-off-by: Steven Barth __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); -@@ -987,6 +1134,7 @@ static void init_tel_txopt(struct ipv6_t +@@ -1002,6 +1149,7 @@ static void init_tel_txopt(struct ipv6_t opt->ops.opt_nflen = 8; } @@ -311,7 +311,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1278,6 +1426,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str +@@ -1293,6 +1441,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str u8 protocol) { struct ip6_tnl *t = netdev_priv(dev); @@ -319,7 +319,7 @@ Signed-off-by: Steven Barth struct ipv6hdr *ipv6h; const struct iphdr *iph; int encap_limit = -1; -@@ -1377,6 +1526,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str +@@ -1392,6 +1541,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield); @@ -338,7 +338,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1530,6 +1691,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1545,6 +1706,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.link = p->link; t->parms.proto = p->proto; t->parms.fwmark = p->fwmark; @@ -353,7 +353,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); } -@@ -1564,6 +1733,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1579,6 +1748,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -361,7 +361,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1950,6 +2120,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1965,6 +2135,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -377,7 +377,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1987,6 +2166,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -2002,6 +2181,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_FWMARK]) parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); @@ -424,7 +424,7 @@ Signed-off-by: Steven Barth } static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev, -@@ -2070,6 +2289,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2085,6 +2304,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -437,7 +437,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2099,6 +2324,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2114,6 +2339,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -462,7 +462,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2106,6 +2349,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2121,6 +2364,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -472,7 +472,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) || -@@ -2115,9 +2361,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2130,9 +2376,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) || @@ -501,7 +501,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) || -@@ -2157,6 +2421,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2172,6 +2436,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-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 7b1571ea6e..db95e28af3 100644 --- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -7904,7 +7904,7 @@ static int nft_register_flowtable_net_ho +@@ -7908,7 +7908,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-6.1/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch b/target/linux/generic/pending-6.1/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch index b03bb622d3..629b141572 100644 --- a/target/linux/generic/pending-6.1/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch +++ b/target/linux/generic/pending-6.1/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch @@ -16,7 +16,7 @@ Signed-off-by: Christian Marangi --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -2004,6 +2004,8 @@ static const struct dsa_switch_ops qca8k +@@ -2015,6 +2015,8 @@ static const struct dsa_switch_ops qca8k .port_fdb_add = qca8k_port_fdb_add, .port_fdb_del = qca8k_port_fdb_del, .port_fdb_dump = qca8k_port_fdb_dump, diff --git a/target/linux/generic/pending-6.1/711-02-net-dsa-qca8k-enable-flooding-to-both-CPU-port.patch b/target/linux/generic/pending-6.1/711-02-net-dsa-qca8k-enable-flooding-to-both-CPU-port.patch index 8ba89ccfa5..24243468a8 100644 --- a/target/linux/generic/pending-6.1/711-02-net-dsa-qca8k-enable-flooding-to-both-CPU-port.patch +++ b/target/linux/generic/pending-6.1/711-02-net-dsa-qca8k-enable-flooding-to-both-CPU-port.patch @@ -14,7 +14,7 @@ Signed-off-by: Christian Marangi --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -1893,15 +1893,12 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1904,15 +1904,12 @@ qca8k_setup(struct dsa_switch *ds) } } diff --git a/target/linux/generic/pending-6.1/711-03-net-dsa-qca8k-add-support-for-port_change_master.patch b/target/linux/generic/pending-6.1/711-03-net-dsa-qca8k-add-support-for-port_change_master.patch index bf1415b939..8a58e0f76e 100644 --- a/target/linux/generic/pending-6.1/711-03-net-dsa-qca8k-add-support-for-port_change_master.patch +++ b/target/linux/generic/pending-6.1/711-03-net-dsa-qca8k-add-support-for-port_change_master.patch @@ -26,7 +26,7 @@ Signed-off-by: Christian Marangi --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -1730,6 +1730,117 @@ qca8k_get_tag_protocol(struct dsa_switch +@@ -1741,6 +1741,117 @@ qca8k_get_tag_protocol(struct dsa_switch return DSA_TAG_PROTO_QCA; } @@ -144,7 +144,7 @@ Signed-off-by: Christian Marangi static void qca8k_master_change(struct dsa_switch *ds, const struct net_device *master, bool operational) -@@ -2016,8 +2127,9 @@ static const struct dsa_switch_ops qca8k +@@ -2027,8 +2138,9 @@ static const struct dsa_switch_ops qca8k .phylink_mac_link_down = qca8k_phylink_mac_link_down, .phylink_mac_link_up = qca8k_phylink_mac_link_up, .get_phy_flags = qca8k_get_phy_flags, diff --git a/target/linux/generic/pending-6.1/712-net-dsa-qca8k-enable-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-6.1/712-net-dsa-qca8k-enable-assisted-learning-on-CPU-port.patch index 4d0b363c37..23816fe366 100644 --- a/target/linux/generic/pending-6.1/712-net-dsa-qca8k-enable-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-6.1/712-net-dsa-qca8k-enable-assisted-learning-on-CPU-port.patch @@ -20,7 +20,7 @@ Signed-off-by: Christian Marangi --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -2002,6 +2002,12 @@ qca8k_setup(struct dsa_switch *ds) +@@ -2013,6 +2013,12 @@ qca8k_setup(struct dsa_switch *ds) dev_err(priv->dev, "failed enabling QCA header mode on port %d", dp->index); return ret; } @@ -33,7 +33,7 @@ Signed-off-by: Christian Marangi } /* Forward all unknown frames to CPU port for Linux processing */ -@@ -2031,11 +2037,6 @@ qca8k_setup(struct dsa_switch *ds) +@@ -2042,11 +2048,6 @@ qca8k_setup(struct dsa_switch *ds) if (ret) return ret; @@ -45,7 +45,7 @@ Signed-off-by: Christian Marangi /* For port based vlans to work we need to set the * default egress vid */ -@@ -2087,6 +2088,9 @@ qca8k_setup(struct dsa_switch *ds) +@@ -2098,6 +2099,9 @@ qca8k_setup(struct dsa_switch *ds) /* Set max number of LAGs supported */ ds->num_lag_ids = QCA8K_NUM_LAGS; diff --git a/target/linux/generic/pending-6.1/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-6.1/810-pci_disable_common_quirks.patch index 68ac12f996..ba06196f7c 100644 --- a/target/linux/generic/pending-6.1/810-pci_disable_common_quirks.patch +++ b/target/linux/generic/pending-6.1/810-pci_disable_common_quirks.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos /* * The Mellanox Tavor device gives false positive parity errors. Disable * parity error reporting. -@@ -3390,6 +3391,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I +@@ -3393,6 +3394,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); @@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos /* * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. * To work around this, query the size it should be configured to by the -@@ -3415,6 +3418,8 @@ static void quirk_intel_ntb(struct pci_d +@@ -3418,6 +3421,8 @@ static void quirk_intel_ntb(struct pci_d DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); @@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos /* * Some BIOS implementations leave the Intel GPU interrupts enabled, even * though no one is handling them (e.g., if the i915 driver is never -@@ -3453,6 +3458,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN +@@ -3456,6 +3461,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); diff --git a/target/linux/mvebu/patches-6.1/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch b/target/linux/mvebu/patches-6.1/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch index d213404250..47d9e3a263 100644 --- a/target/linux/mvebu/patches-6.1/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch +++ b/target/linux/mvebu/patches-6.1/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch @@ -26,7 +26,7 @@ Cc: Robert Marko --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig -@@ -2221,6 +2221,15 @@ config SGI_MFD_IOC3 +@@ -2222,6 +2222,15 @@ config SGI_MFD_IOC3 If you have an SGI Origin, Octane, or a PCI IOC3 card, then say Y. Otherwise say N. From c47532b1ea7f8459f05a223a71317a1461c6e750 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 8 Feb 2024 00:49:27 +0100 Subject: [PATCH 21/23] kernel-build.mk: add support for compiling only DTS Add support for compiling DTS for the selected target. This can be useful for testing if the DTS correctly compile and doesn't produce any error. This adds a new make target. To compile only DTS use: make target/linux/dtb Signed-off-by: Christian Marangi --- include/image.mk | 10 ++++++---- include/kernel-build.mk | 4 ++++ include/subdir.mk | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/include/image.mk b/include/image.mk index f5ab1d7953..4b6acbe1aa 100644 --- a/include/image.mk +++ b/include/image.mk @@ -582,7 +582,7 @@ define Device/Build/dtb $(KDIR)/image-$(1).dtb: FORCE $(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@) - image_prepare: $(KDIR)/image-$(1).dtb + compile-dtb: $(KDIR)/image-$(1).dtb endif endef @@ -593,7 +593,7 @@ define Device/Build/dtbo $(KDIR)/image-$(1).dtbo: FORCE $(call Image/BuildDTBO,$(strip $(2))/$(strip $(3)).dtso,$$@) - image_prepare: $(KDIR)/image-$(1).dtbo + compile-dtb: $(KDIR)/image-$(1).dtbo endif endef @@ -841,18 +841,20 @@ define BuildImage download: prepare: compile: + compile-dtb: clean: image_prepare: ifeq ($(IB),) - .PHONY: download prepare compile clean image_prepare kernel_prepare install install-images + .PHONY: download prepare compile compile-dtb clean image_prepare kernel_prepare install install-images compile: $(call Build/Compile) clean: $(call Build/Clean) - image_prepare: compile + compile-dtb: + image_prepare: compile compile-dtb mkdir -p $(BIN_DIR) $(KDIR)/tmp rm -rf $(BUILD_DIR)/json_info_files $(call Image/Prepare) diff --git a/include/kernel-build.mk b/include/kernel-build.mk index b9513ec414..c42dae0049 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -156,6 +156,10 @@ define BuildKernel compile: $(LINUX_DIR)/.modules $(MAKE) -C image compile TARGET_BUILD= + dtb: $(STAMP_CONFIGURED) + $(_SINGLE)$(KERNEL_MAKE) scripts_dtc + $(MAKE) -C image compile-dtb TARGET_BUILD= + oldconfig menuconfig nconfig xconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE rm -f $(LINUX_DIR)/.config.prev rm -f $(STAMP_CONFIGURED) diff --git a/include/subdir.mk b/include/subdir.mk index 95009f814e..b4edbf8b96 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -5,6 +5,9 @@ ifeq ($(MAKECMDGOALS),prereq) SUBTARGETS:=prereq PREREQ_ONLY:=1 +# For target/linux related target add dtb to selectively compile dtbs +else ifneq ($(filter target/linux/%,$(MAKECMDGOALS)),) + SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS) dtb else SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS) endif From c4910e9cb37c626ab9f4a47579bc8ec8981cdf4a Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 8 Feb 2024 23:04:55 +0100 Subject: [PATCH 22/23] linux: add dtb makefile target to targets list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add dtb makefile target to targets list to permit correct working of make target/linux/dtb Fixes: c47532b1ea7f ("kernel-buildOnmk: add support for compiling only DTS") Signed-off-by: Christian Marangi --- target/linux/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/Makefile b/target/linux/Makefile index 8eea40ee18..eaf3198222 100644 --- a/target/linux/Makefile +++ b/target/linux/Makefile @@ -7,5 +7,5 @@ include $(INCLUDE_DIR)/target.mk export TARGET_BUILD=1 -prereq clean download prepare compile install oldconfig menuconfig nconfig xconfig update refresh: FORCE +prereq clean download prepare compile install oldconfig menuconfig nconfig xconfig update refresh dtb: FORCE @+$(NO_TRACE_MAKE) -C $(firstword $(wildcard feeds/$(BOARD) $(BOARD))) $@ From c6ed34940d6231a7cfadaea5f1f3ee746d78e41a Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Fri, 9 Feb 2024 01:44:19 +0100 Subject: [PATCH 23/23] ipq40xx: fix dts error in LED color/function conversion Fix DTS error in LED color/function conversion due to a bug in the conversion script. Fixes: a9e0d97e1fc8 ("ipq40xx: convert to new LED color/function format where possible") Signed-off-by: Christian Marangi --- .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts | 1 - .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts | 2 -- 2 files changed, 3 deletions(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts index d965f2724d..6987515720 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts @@ -50,7 +50,6 @@ }; led-2 { - function = LED_FUNCTION_WLAN; function = LED_FUNCTION_WLAN; color = ; gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts index 5604af2ddb..70849d71d6 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts @@ -106,8 +106,6 @@ color = ; function = LED_FUNCTION_STATUS; gpios = <&tlmm 40 GPIO_ACTIVE_LOW>; - function = LED_FUNCTION_STATUS; - color = ; }; led-1 {