From 943c153cdd695904b9b7fe44800fc3546644973e Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 12 Nov 2023 19:14:46 +0100 Subject: [PATCH 1/8] scripts/dump-target-info.pl: add new function to DUMP devices Add new function to dump-targer-info.pl to DUMP devices provided a matching target/subtarget. Example: ./scripts/dump-targer-info.pl devices ipq806x/generic will produce the sorted list of devices defined in the following format: device_id device_name Devices may have alternative names, the script will dump each alternative name in the same line of device_id. Following the pattern: device_id "PRIMARY DEVICE NAME" "ALT0 DEVICE NAME" "ALT1 DEVICE NAME" ... Example: tplink_ad7200 "TP-Link AD7200 v1/v2" "TP-Link Talon AD7200 v1/v2" Signed-off-by: Christian Marangi --- scripts/dump-target-info.pl | 80 ++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/scripts/dump-target-info.pl b/scripts/dump-target-info.pl index 0e4af17fe0..eec06ed6c4 100755 --- a/scripts/dump-target-info.pl +++ b/scripts/dump-target-info.pl @@ -4,7 +4,7 @@ use strict; use warnings; use Cwd; -my (%targets, %architectures, %kernels); +my (%targets, %architectures, %kernels, %devices); $ENV{'TOPDIR'} = Cwd::getcwd(); @@ -56,6 +56,68 @@ sub parse_targetinfo { } } +sub parse_devices { + my ($target_dir, $subtarget) = @_; + + if (open M, "make -C '$target_dir' --no-print-directory DUMP=1 TARGET_BUILD=1 SUBTARGET='$subtarget' V=s |") { + my ($device_profile, $device_name, @device_alt_names, $device_is_alt); + while (defined(my $line = readline M)) { + chomp $line; + + if ($line =~ /^Target-Profile-Name: (.+)$/) { + $device_name = $1; + } + elsif ($line =~ /^Target-Profile: DEVICE_(.+)$/) { + $device_profile = $1; + } + # Logic behind this. + # DUMP duplicate info for each alternative device name and + # the alternative device name are printed first before the + # primary device name + # Alternative device titles always have the full list of + # all the alternative device name. + # The device name pattern for an alternative device name is + # Target-Profile-Name: ALT_NAME (PRIMARY_NAME) + # We compare the detected device name and check if it does + # match the alternative device name pattern with one of + # the alternative device name in Alternative device titles: + # If an alternative device name is detected, + # alternative device is skipped. + elsif ($line =~ /^Alternative device titles:$/) { + while (defined($line = readline M)) { + if ($line =~ /^- (.+)$/) { + if ($device_name =~ /^\Q$1\E \((.+)\)$/) { + $device_is_alt = 1; + last; + } + push @device_alt_names, $1; + } + else { + last; + } + } + } + if ($line =~ /^@\@$/) { + if ($device_name && $device_profile && ! $device_is_alt) { + push @{$devices{$device_profile}}, $device_name; + + if (scalar @device_alt_names) { + foreach my $device_alt_name (sort values @device_alt_names) { + push @{$devices{$device_profile}}, $device_alt_name; + } + } + } + + undef $device_name; + undef $device_profile; + undef $device_is_alt; + @device_alt_names = (); + } + } + close M; + } +} + sub get_targetinfo { foreach my $target_makefile (glob "target/linux/*/Makefile") { my ($target_dir) = $target_makefile =~ m!^(.+)/Makefile$!; @@ -86,6 +148,15 @@ sub get_targetinfo { } } +sub get_devices { + my ($target_subtarget) = @_; + my ($target, $subtarget) = split /\//, $target_subtarget; + + my ($target_dir) = "target/linux/" . $target; + + parse_devices($target_dir, $subtarget) +} + if (@ARGV == 1 && $ARGV[0] eq 'targets') { get_targetinfo(); foreach my $target_name (sort keys %targets) { @@ -104,8 +175,15 @@ elsif (@ARGV == 1 && $ARGV[0] eq 'kernels') { printf "%s %s\n", $target_name, join ' ', @{$kernels{$target_name}}; } } +elsif (@ARGV == 2 && $ARGV[0] eq 'devices') { + get_devices($ARGV[1]); + foreach my $device (sort keys %devices) { + printf "%s \"%s\"\n", $device, join '" "', @{$devices{$device}}; + } +} else { print "Usage: $0 targets\n"; print "Usage: $0 architectures\n"; print "Usage: $0 kernels\n"; + print "Usage: $0 devices \n"; } From a4735359aa6d8238bdbeef75b40e98432ef70f0d Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 13 Nov 2023 02:01:01 +0100 Subject: [PATCH 2/8] github: add release info to BUG template Add release info to BUG template. Having the reported release is an additional info to better bisect the bug and what release is affected. This is also useful in preparation for action that will parse BUG template and add tag and do validations. Signed-off-by: Christian Marangi --- .github/ISSUE_TEMPLATE/bug-report.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index fed2b8de7c..2ec7b7d7d8 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -19,6 +19,15 @@ body: ```. /etc/openwrt_release && echo $DISTRIB_REVISION``` validations: required: true + - type: input + id: release + attributes: + label: OpenWrt release + description: | + The OpenWrt release or commit hash where this bug occurs (use command below). + ```. /etc/openwrt_release && echo $DISTRIB_RELEASE``` + validations: + required: true - type: input id: target attributes: From e3a0476d1bdcbf5692e97135d3e653b4cdd84cda Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 13 Nov 2023 02:09:57 +0100 Subject: [PATCH 3/8] CI: add issue labeller action Add issue labeler action. This action will parse BUG issue from the template and will make validation on the insert data. The action will: - Tag the issue with SNAPSHOT or release based on the provided release - Tag the issue with the reported tag - Tag the issue with the image kind (Official or Self Built) - Validate the reported version exist - Validate the reported release exist - Validate the reported device exist Will also tag the issue with useful tag or flag the issue as invalid. Will also comment the issue with the invalid info provided. Signed-off-by: Christian Marangi --- .github/workflows/issue-labeller.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/issue-labeller.yml diff --git a/.github/workflows/issue-labeller.yml b/.github/workflows/issue-labeller.yml new file mode 100644 index 0000000000..585bd279e0 --- /dev/null +++ b/.github/workflows/issue-labeller.yml @@ -0,0 +1,11 @@ +name: Issue Labeller +on: + issues: + types: [ opened ] + +jobs: + label-component: + name: Validate and Tag Bug Report + permissions: + issues: write + uses: openwrt/actions-shared-workflows/.github/workflows/issue-labeller.yml@main From 17feb04ad4d06460a6d33a13e65dfdd2fdebaada Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 14 Nov 2023 14:51:14 +0100 Subject: [PATCH 4/8] qca-ssdk: disable building ISISC ISISC is the QCA codename for their Atheros switch family including AR237, QCA8337 etc. Since we have qca8k support in OpenWrt, there is no need to have SSDK support for these switches, and boards that also have external switches can just use qca8k. Disable QCA803x PHY support as well, since all of those are supportable via at803x driver. Signed-off-by: Robert Marko --- package/kernel/qca-ssdk/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/kernel/qca-ssdk/Makefile b/package/kernel/qca-ssdk/Makefile index 3770d29e8c..d8c8d6cb16 100644 --- a/package/kernel/qca-ssdk/Makefile +++ b/package/kernel/qca-ssdk/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qca-ssdk -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git PKG_SOURCE_PROTO:=git @@ -45,6 +45,7 @@ MAKE_FLAGS+= \ EXTRA_CFLAGS=-fno-stack-protector -I$(STAGING_DIR)/usr/include \ SoC=$(CONFIG_TARGET_SUBTARGET) \ PTP_FEATURE=disable SWCONFIG_FEATURE=disable \ + ISISC_ENABLE=disable IN_QCA803X_PHY=FALSE \ $(LNX_CONFIG_OPTS) ifeq ($(CONFIG_TARGET_SUBTARGET), "ipq807x") From f3cd4bfb7f697bb885e976627ac2ecbb99e80c60 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Tue, 14 Nov 2023 22:35:31 +0100 Subject: [PATCH 5/8] ipq807x: fix multiple error on ESS switch port define Fix multiple error on ESS switch port define. - Fix wrong switch CPU and WAN bmp define. (many times wan port are actually set in lan mask and lan port in wan mask) - Renumber phyinfo port, use port_id instead of phy_address as it doesn't make sense using that for port enumeration - Drop additional port for devices that have them not connected. Signed-off-by: Christian Marangi --- .../arm64/boot/dts/qcom/ipq8070-cax1800.dts | 21 ++----------------- .../arm64/boot/dts/qcom/ipq8071-ax3600.dtsi | 12 +++++------ .../arm64/boot/dts/qcom/ipq8071-eap102.dts | 8 +++---- .../arch/arm64/boot/dts/qcom/ipq8072-301w.dts | 4 ++-- .../arm64/boot/dts/qcom/ipq8072-ax880.dts | 8 +++---- .../arm64/boot/dts/qcom/ipq8072-ax9000.dts | 10 ++++----- .../arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts | 10 ++++----- .../arch/arm64/boot/dts/qcom/ipq8072-haze.dts | 10 ++++----- .../arm64/boot/dts/qcom/ipq8072-wax218.dts | 4 ++-- .../arm64/boot/dts/qcom/ipq8072-wax620.dts | 4 ++-- .../arm64/boot/dts/qcom/ipq8072-wpq873.dts | 2 +- .../arm64/boot/dts/qcom/ipq8074-nbg7815.dts | 16 +++++++------- .../arm64/boot/dts/qcom/ipq8074-rax120v2.dts | 4 ++-- .../arm64/boot/dts/qcom/ipq8074-wax630.dts | 7 +++---- .../boot/dts/qcom/ipq8074-wxr-5950ax12.dts | 16 +++++++------- 15 files changed, 59 insertions(+), 77 deletions(-) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts index 6dbd0e95f5..622b8662fa 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts @@ -271,28 +271,11 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = ; /* lan port bitmap */ switch_mac_mode = ; /* mac mode for uniphy instance0*/ qcom,port_phyinfo { - port@0 { - port_id = <1>; - phy_address = <0>; - }; - port@1 { - port_id = <2>; - phy_address = <1>; - }; - port@2 { - port_id = <3>; - phy_address = <2>; - }; - port@3 { - port_id = <4>; - phy_address = <3>; - }; - port@4 { + port@5 { port_id = <5>; phy_address = <4>; }; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi index 0494fff0e3..23b9121d5f 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi @@ -235,24 +235,24 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode = ; /* mac mode for uniphy instance0*/ qcom,port_phyinfo { - port@1 { + port@2 { port_id = <2>; phy_address = <1>; }; - port@2 { + port@3 { port_id = <3>; phy_address = <2>; }; - port@3 { + port@4 { port_id = <4>; phy_address = <3>; }; - port@4 { + port@5 { port_id = <5>; phy_address = <4>; }; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts index d76c9a12eb..7067f92968 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts @@ -343,18 +343,18 @@ &switch { status = "okay"; - switch_lan_bmp = ; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = ; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ qcom,port_phyinfo { - port@4 { + port@5 { port_id = <5>; phy_address = <24>; port_mac_sel = "QGMAC_PORT"; }; - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts index 683cf775b3..a7d398ee0f 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts @@ -321,8 +321,8 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ malibu_first_phy_addr = <16>; /* PHY addr of the first malibu PHY */ switch_mac_mode = ; /* mac mode for uniphy instance0*/ switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts index 81affdc3d0..73bc13cf32 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts @@ -325,18 +325,18 @@ &switch { status = "okay"; - switch_lan_bmp = ; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = ; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ qcom,port_phyinfo { - port@4 { + port@5 { port_id = <5>; phy_address = <24>; port_mac_sel = "QGMAC_PORT"; }; - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts index 9e97e4e066..fbf5b41d85 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts @@ -388,23 +388,23 @@ switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ qcom,port_phyinfo { - port@0 { + port@1 { port_id = <1>; phy_address = <0>; }; - port@1 { + port@2 { port_id = <2>; phy_address = <1>; }; - port@2 { + port@3 { port_id = <3>; phy_address = <2>; }; - port@3 { + port@4 { port_id = <4>; phy_address = <3>; }; - port@4 { + port@5 { port_id = <5>; phy_address = <24>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts index e2971103c8..a4548a7783 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts @@ -175,23 +175,23 @@ switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ qcom,port_phyinfo { - port@0 { + port@1 { port_id = <1>; phy_address = <0>; }; - port@1 { + port@2 { port_id = <2>; phy_address = <1>; }; - port@2 { + port@3 { port_id = <3>; phy_address = <2>; }; - port@3 { + port@4 { port_id = <4>; phy_address = <3>; }; - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts index ba22d16c0a..3449964159 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts @@ -193,23 +193,23 @@ switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ qcom,port_phyinfo { - port@0 { + port@1 { port_id = <1>; phy_address = <0>; }; - port@1 { + port@2 { port_id = <2>; phy_address = <1>; }; - port@2 { + port@3 { port_id = <3>; phy_address = <2>; }; - port@3 { + port@4 { port_id = <4>; phy_address = <3>; }; - port@4 { + port@6 { port_id = <6>; phy_address = <8>; compatible = "ethernet-phy-ieee802.3-c45"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts index 9da475c5e7..33a618851c 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts @@ -89,12 +89,12 @@ &switch { status = "okay"; - switch_wan_bmp = ; + switch_lan_bmp = ; switch_mac_mode = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts index c4cc8c0b97..74dae6cbf3 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts @@ -117,12 +117,12 @@ &switch { status = "okay"; - switch_wan_bmp = ; + switch_lan_bmp = ; switch_mac_mode = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts index b9a882f1db..a450fbca25 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts @@ -407,7 +407,7 @@ port_id = <4>; phy_address = <3>; }; - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts index 0931c8ca32..5fb8f3b4de 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts @@ -298,40 +298,40 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; + switch_wan_bmp = ; switch_mac_mode = ; switch_mac_mode1 = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@0 { + port@1 { port_id = <1>; phy_address = <0>; }; - port@1 { + port@2 { port_id = <2>; phy_address = <1>; }; - port@2 { + port@3 { port_id = <3>; phy_address = <2>; }; - port@3 { + port@4 { port_id = <4>; phy_address = <3>; }; - port@4 { + port@5 { port_id = <5>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; }; - port@5 { + port@6 { port_id = <6>; ethernet-phy-ieee802.3-c45; phy_address = <8>; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts index 501b53982c..0a5bbb4c35 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts @@ -195,8 +195,8 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode = ; /* mac mode for uniphy instance0*/ switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts index af06fac3a4..9999f112af 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts @@ -151,18 +151,17 @@ &switch { status = "okay"; - switch_lan_bmp = ; - switch_wan_bmp = ; + switch_lan_bmp = ; switch_mac_mode = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@3 { + port@4 { port_id = <4>; phy_address = <3>; }; - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts index 88ae383117..18386c766c 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts @@ -267,40 +267,40 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; + switch_wan_bmp = ; switch_mac_mode = ; switch_mac_mode1 = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@0 { + port@1 { port_id = <1>; phy_address = <0x18>; }; - port@1 { + port@2 { port_id = <2>; phy_address = <0x19>; }; - port@2 { + port@3 { port_id = <3>; phy_address = <0x1a>; }; - port@3 { + port@4 { port_id = <4>; phy_address = <0x1b>; }; - port@4 { + port@5 { port_id = <5>; ethernet-phy-ieee802.3-c45; phy_address = <0x0>; }; - port@5 { + port@6 { port_id = <6>; ethernet-phy-ieee802.3-c45; phy_address = <0x8>; From 76a981560ae54b93adfc4aa741a4e756489bdd1b Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 15 Nov 2023 11:23:23 +0100 Subject: [PATCH 6/8] ipq807x: fix typo in WAX630 for switch lan bmp In fixing ipq8074 WAX630 dts, there was a typo in the switch lan bmp. Fix it to fix compilarion error. Fixes: f3cd4bfb7f69 ("ipq807x: fix multiple error on ESS switch port define") Signed-off-by: Christian Marangi --- .../files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts index 9999f112af..685e4243dd 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts @@ -151,7 +151,7 @@ &switch { status = "okay"; - switch_lan_bmp = ; + switch_lan_bmp = <(ESS_PORT4 | ESS_PORT6)>; switch_mac_mode = ; switch_mac_mode2 = ; From 6647e6d219d6ac460b04ff6b73931a4ae521df3c Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 15 Nov 2023 17:35:38 +0100 Subject: [PATCH 7/8] qualcommax: fix line endings in ESS dt-bindings It seems that ESS dt-bindings somehow ended up with Windows line endings, this is obviously incorrect, so lets convert it to UNIX endings. Signed-off-by: Robert Marko --- .../include/dt-bindings/net/qcom-ipq-ess.h | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/target/linux/qualcommax/files/include/dt-bindings/net/qcom-ipq-ess.h b/target/linux/qualcommax/files/include/dt-bindings/net/qcom-ipq-ess.h index 5b44620de5..baa7c89564 100644 --- a/target/linux/qualcommax/files/include/dt-bindings/net/qcom-ipq-ess.h +++ b/target/linux/qualcommax/files/include/dt-bindings/net/qcom-ipq-ess.h @@ -1,42 +1,42 @@ -/* SPDX-License-Identifier: GPL-2.0 */ - -#ifndef _DT_BINDINGS_NET_QCOM_IPQ_ESS_H -#define _DT_BINDINGS_NET_QCOM_IPQ_ESS_H - -#define ESS_PORT0 0x1 -#define ESS_PORT1 0x2 -#define ESS_PORT2 0x4 -#define ESS_PORT3 0x8 -#define ESS_PORT4 0x10 -#define ESS_PORT5 0x20 -#define ESS_PORT6 0x40 -#define ESS_PORT7 0x80 - -/* SSDK MAC/UNIPHY modes */ -#define MAC_MODE_PSGMII 0x0 -#define MAC_MODE_PSGMII_RGMII5 0x1 -#define MAC_MODE_SGMII0_RGMII5 0x2 -#define MAC_MODE_SGMII1_RGMII5 0x3 -#define MAC_MODE_PSGMII_RMII0 0x4 -#define MAC_MODE_PSGMII_RMII1 0x5 -#define MAC_MODE_PSGMII_RMII0_RMII1 0x6 -#define MAC_MODE_PSGMII_RGMII4 0x7 -#define MAC_MODE_SGMII0_RGMII4 0x8 -#define MAC_MODE_SGMII1_RGMII4 0x9 -#define MAC_MODE_SGMII4_RGMII4 0xa -#define MAC_MODE_QSGMII 0xb -#define MAC_MODE_SGMII_PLUS 0xc -#define MAC_MODE_USXGMII 0xd -#define MAC_MODE_10GBASE_R 0xe -#define MAC_MODE_SGMII_CHANNEL0 0xf -#define MAC_MODE_SGMII_CHANNEL1 0x10 -#define MAC_MODE_SGMII_CHANNEL4 0x11 -#define MAC_MODE_RGMII 0x12 -#define MAC_MODE_PSGMII_FIBER 0x13 -#define MAC_MODE_SGMII_FIBER 0x14 -#define MAC_MODE_UQXGMII 0x15 -#define MAC_MODE_UDXGMII 0x16 -#define MAC_MODE_UQXGMII_3CHANNELS 0x17 -#define MAC_MODE_DISABLED 0xff - -#endif /* _DT_BINDINGS_NET_QCOM_IPQ_ESS_H */ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DT_BINDINGS_NET_QCOM_IPQ_ESS_H +#define _DT_BINDINGS_NET_QCOM_IPQ_ESS_H + +#define ESS_PORT0 0x1 +#define ESS_PORT1 0x2 +#define ESS_PORT2 0x4 +#define ESS_PORT3 0x8 +#define ESS_PORT4 0x10 +#define ESS_PORT5 0x20 +#define ESS_PORT6 0x40 +#define ESS_PORT7 0x80 + +/* SSDK MAC/UNIPHY modes */ +#define MAC_MODE_PSGMII 0x0 +#define MAC_MODE_PSGMII_RGMII5 0x1 +#define MAC_MODE_SGMII0_RGMII5 0x2 +#define MAC_MODE_SGMII1_RGMII5 0x3 +#define MAC_MODE_PSGMII_RMII0 0x4 +#define MAC_MODE_PSGMII_RMII1 0x5 +#define MAC_MODE_PSGMII_RMII0_RMII1 0x6 +#define MAC_MODE_PSGMII_RGMII4 0x7 +#define MAC_MODE_SGMII0_RGMII4 0x8 +#define MAC_MODE_SGMII1_RGMII4 0x9 +#define MAC_MODE_SGMII4_RGMII4 0xa +#define MAC_MODE_QSGMII 0xb +#define MAC_MODE_SGMII_PLUS 0xc +#define MAC_MODE_USXGMII 0xd +#define MAC_MODE_10GBASE_R 0xe +#define MAC_MODE_SGMII_CHANNEL0 0xf +#define MAC_MODE_SGMII_CHANNEL1 0x10 +#define MAC_MODE_SGMII_CHANNEL4 0x11 +#define MAC_MODE_RGMII 0x12 +#define MAC_MODE_PSGMII_FIBER 0x13 +#define MAC_MODE_SGMII_FIBER 0x14 +#define MAC_MODE_UQXGMII 0x15 +#define MAC_MODE_UDXGMII 0x16 +#define MAC_MODE_UQXGMII_3CHANNELS 0x17 +#define MAC_MODE_DISABLED 0xff + +#endif /* _DT_BINDINGS_NET_QCOM_IPQ_ESS_H */ From af64898c2617babcf27ba2ae8c07dc801c208964 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Sun, 5 Nov 2023 12:23:29 -0700 Subject: [PATCH 8/8] dnsmasq: Invoke new ipcalc with CIDR notation The new rewritten ipcalc.sh understands 3 notations: ipaddr/prefix ... ipaddr/dotted-netmask ... ipaddr dotted-netmask ... meaning that the previous 4th non-standard notation of "ipaddr prefix" will be dropped, alas that's the notation that dnsmasq currently uses. This change has us using the first notation which is the most common. This behavior came in as https://github.com/openwrt/openwrt/commit/eda27e8382f3e5253defab5419e95d4b51f72de3 a long time ago. Signed-off-by: Philip Prindeville --- package/network/services/dnsmasq/Makefile | 2 +- package/network/services/dnsmasq/files/dnsmasq.init | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index e442d0005b..241f3463e2 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_UPSTREAM_VERSION:=2.89 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/ diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index d356a21f81..0c76960236 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -539,8 +539,13 @@ dhcp_add() { # Do not support non-static interfaces for now [ static = "$proto" ] || return 0 + ipaddr="${subnet%%/*}" + prefix_or_netmask="${subnet##*/}" + # Override interface netmask with dhcp config if applicable - config_get netmask "$cfg" netmask "${subnet##*/}" + config_get netmask "$cfg" netmask + + [ -n "$netmask" ] && prefix_or_netmask="$netmask" #check for an already active dhcp server on the interface, unless 'force' is set config_get_bool force "$cfg" force 0 @@ -583,7 +588,7 @@ dhcp_add() { nettag="${networkid:+set:${networkid},}" # make sure the DHCP range is not empty - if [ "$dhcpv4" != "disabled" ] && ipcalc "${subnet%%/*}" "$netmask" "$start" "$limit" ; then + if [ "$dhcpv4" != "disabled" ] && ipcalc "$ipaddr/$prefix_or_netmask" "$start" "$limit" ; then [ "$dynamicdhcpv4" = "0" ] && END="static" xappend "--dhcp-range=$tags$nettag$START,$END,$NETMASK,$leasetime${options:+ $options}"