From e92cf0c46ffe3ac7fca936c18577bfb19eb4ce9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hler?= Date: Mon, 18 Sep 2023 11:55:57 +0200 Subject: [PATCH 01/10] ramips: fix Mercusys MR70X LAN port assignments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bug report in the forum found that the MR70X lists four LAN ports in LuCI while it has only three. This adds the device to the network setup file to fix the issue. Identified-by: Forum User "Lexeyko" Signed-off-by: Andreas Böhler --- target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 11a7c9465a..bd1d394892 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -17,6 +17,7 @@ ramips_setup_interfaces() h3c,tx1806|\ haier,har-20s2u1|\ hiwifi,hc5962|\ + mercusys,mr70x-v1|\ netgear,wax202|\ sim,simax1800t|\ xiaomi,mi-router-3-pro|\ From 3fff6255422c9223fe91ce68dd227ec6942aa688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=B6rner?= Date: Sun, 24 Sep 2023 20:58:13 +0200 Subject: [PATCH 02/10] rtl93xx: fix condition intended to only select internal serdes ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This condition was introduced in commit 51c8f7661244 ("realtek: Improve MAC config handling for all SoCs") to correctly report the speed of the internal serdes ports as 10G, but instead makes all ports read 10G because the or-operator should have been an and-operator. Fixes: #9953 Fixes: 51c8f7661244 ("realtek: Improve MAC config handling for all SoCs") Signed-off-by: Peter Körner [ wrap comment to 72 column and improve commit ref ] Signed-off-by: Christian Marangi (cherry picked from commit 9fb5082e258ac4672dc69636e5eb79f426defac8) --- target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c index 5744c70ea3..6f55f1e892 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c @@ -559,7 +559,7 @@ static int rtl93xx_phylink_mac_link_state(struct dsa_switch *ds, int port, } if (priv->family_id == RTL9310_FAMILY_ID - && (port >= 52 || port <= 55)) { /* Internal serdes */ + && (port >= 52 && port <= 55)) { /* Internal serdes */ state->speed = SPEED_10000; state->link = 1; state->duplex = 1; From 07e4352d80d251069488018d90422791e01ee894 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 4 Oct 2023 13:27:55 +0200 Subject: [PATCH 03/10] CI: push-containers: fix concurrency group Fix concurrency group for push-containers workflow to handle running on different branches. Signed-off-by: Christian Marangi (cherry picked from commit 4c2eab1c27defd154adcd0c4454248112815ffcc) --- .github/workflows/push-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-containers.yml b/.github/workflows/push-containers.yml index 28b07244ef..0cfc22b8be 100644 --- a/.github/workflows/push-containers.yml +++ b/.github/workflows/push-containers.yml @@ -13,7 +13,7 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From 2a457dcd7292d9995f8672bc12d70e8a7267021a Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 4 Oct 2023 13:28:58 +0200 Subject: [PATCH 04/10] CI: push-containers: refresh containers also on modify cmake options Refresh containers also on modify of cmake options in the include file. Signed-off-by: Christian Marangi (cherry picked from commit b40c0b54bde81243974cada51cb9a44736c773b3) --- .github/workflows/push-containers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push-containers.yml b/.github/workflows/push-containers.yml index 0cfc22b8be..e74e7c2216 100644 --- a/.github/workflows/push-containers.yml +++ b/.github/workflows/push-containers.yml @@ -4,6 +4,7 @@ on: push: paths: - 'include/version.mk' + - 'include/cmake.mk' - 'tools/**' - '.github/workflows/build-tools.yml' - '.github/workflows/push-containers.yml' From 130d5056c189454ebeec4fe91bc04da050431238 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 28 Sep 2023 22:55:08 +0200 Subject: [PATCH 05/10] generic: add patch for GPON-ONU-34-20BI quirk Backport patch merged upstream adding quirk for SFP GPON-ONU-34-20BI. Signed-off-by: Christian Marangi (cherry picked from commit 86dadeba482e2ed41f1ccc95fc7739d85a5709c0) --- ...uirk-for-Fiberstone-GPON-ONU-34-20BI.patch | 34 +++++++++++++++++++ .../790-SFP-GE-T-ignore-TX_FAULT.patch | 6 ++-- ...sfp-re-probe-modules-on-DEV_UP-event.patch | 2 +- ...12-net-phy-sfp-add-support-for-SMBus.patch | 2 +- 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 target/linux/generic/backport-5.15/798-net-next-net-sfp-add-quirk-for-Fiberstone-GPON-ONU-34-20BI.patch diff --git a/target/linux/generic/backport-5.15/798-net-next-net-sfp-add-quirk-for-Fiberstone-GPON-ONU-34-20BI.patch b/target/linux/generic/backport-5.15/798-net-next-net-sfp-add-quirk-for-Fiberstone-GPON-ONU-34-20BI.patch new file mode 100644 index 0000000000..d6015a5658 --- /dev/null +++ b/target/linux/generic/backport-5.15/798-net-next-net-sfp-add-quirk-for-Fiberstone-GPON-ONU-34-20BI.patch @@ -0,0 +1,34 @@ +From d387e34fec407f881fdf165b5d7ec128ebff362f Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Tue, 19 Sep 2023 14:47:20 +0200 +Subject: [PATCH] net: sfp: add quirk for Fiberstone GPON-ONU-34-20BI + +Fiberstone GPON-ONU-34-20B can operate at 2500base-X, but report 1.2GBd +NRZ in their EEPROM. + +The module also require the ignore tx fault fixup similar to Huawei MA5671A +as it gets disabled on error messages with serial redirection enabled. + +Signed-off-by: Christian Marangi +Link: https://lore.kernel.org/r/20230919124720.8210-1-ansuelsmth@gmail.com +Signed-off-by: Paolo Abeni +--- + drivers/net/phy/sfp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/phy/sfp.c ++++ b/drivers/net/phy/sfp.c +@@ -368,6 +368,13 @@ static const struct sfp_quirk sfp_quirks + .modes = sfp_quirk_2500basex, + .fixup = sfp_fixup_long_startup, + }, { ++ // Fiberstore GPON-ONU-34-20BI can operate at 2500base-X, but report 1.2GBd ++ // NRZ in their EEPROM ++ .vendor = "FS", ++ .part = "GPON-ONU-34-20BI", ++ .modes = sfp_quirk_2500basex, ++ .fixup = sfp_fixup_ignore_tx_fault, ++ }, { + .vendor = "HALNy", + .part = "HL-GSFP", + .fixup = sfp_fixup_halny_gsfp, diff --git a/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch b/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch index 10af22e52e..e7372b31d1 100644 --- a/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch +++ b/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch @@ -26,7 +26,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -383,6 +383,11 @@ static const struct sfp_quirk sfp_quirks +@@ -390,6 +390,11 @@ static const struct sfp_quirk sfp_quirks .modes = sfp_quirk_2500basex, .fixup = sfp_fixup_ignore_tx_fault, }, { @@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle // Lantech 8330-262D-E can operate at 2500base-X, but // incorrectly report 2500MBd NRZ in their EEPROM .vendor = "Lantech", -@@ -2312,7 +2317,8 @@ static void sfp_sm_main(struct sfp *sfp, +@@ -2319,7 +2324,8 @@ static void sfp_sm_main(struct sfp *sfp, * or t_start_up, so assume there is a fault. */ sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT, @@ -48,7 +48,7 @@ Signed-off-by: Daniel Golle } else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) { init_done: sfp->sm_phy_retries = R_PHY_RETRY; -@@ -2535,10 +2541,12 @@ static void sfp_check_state(struct sfp * +@@ -2542,10 +2548,12 @@ static void sfp_check_state(struct sfp * mutex_lock(&sfp->st_mutex); state = sfp_get_state(sfp); changed = state ^ sfp->state; diff --git a/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch b/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch index 87537a13f5..378563a9e3 100644 --- a/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch +++ b/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch @@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -2153,6 +2153,13 @@ static void sfp_sm_module(struct sfp *sf +@@ -2160,6 +2160,13 @@ static void sfp_sm_module(struct sfp *sf return; } diff --git a/target/linux/realtek/patches-5.15/712-net-phy-sfp-add-support-for-SMBus.patch b/target/linux/realtek/patches-5.15/712-net-phy-sfp-add-support-for-SMBus.patch index 1e203a2925..53ec0fa1da 100644 --- a/target/linux/realtek/patches-5.15/712-net-phy-sfp-add-support-for-SMBus.patch +++ b/target/linux/realtek/patches-5.15/712-net-phy-sfp-add-support-for-SMBus.patch @@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -549,32 +549,72 @@ static int sfp_i2c_write(struct sfp *sfp +@@ -556,32 +556,72 @@ static int sfp_i2c_write(struct sfp *sfp return ret == ARRAY_SIZE(msgs) ? len : 0; } From 76758a8694cab59bd1f9cdba53420fd2ff8bb383 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 2 Oct 2023 22:13:10 +0200 Subject: [PATCH 06/10] yafut: add missing PKG_MIRROR_HASH Add missing PKG_MIRROR_HASH. This is always needed as is used to generate and use a tar instead of git clone and validate the hash of it. Signed-off-by: Christian Marangi (cherry picked from commit a181b9f0f9269525319024f53d83c7efe9da544b) --- package/utils/yafut/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/utils/yafut/Makefile b/package/utils/yafut/Makefile index fe27db97d2..ef16404c33 100644 --- a/package/utils/yafut/Makefile +++ b/package/utils/yafut/Makefile @@ -5,6 +5,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/kempniu/yafut.git +PKG_MIRROR_HASH:=6eece622d1df99ffee1a18d162d36292f32bf2d5e514663a6b61fd82c2ecbcba PKG_SOURCE_DATE:=2023-03-31 PKG_SOURCE_VERSION:=16435e89d449f953712983315e1a89cdb678620d From 5b00873f5d14f623185388251e46850940c50383 Mon Sep 17 00:00:00 2001 From: Uwe Niethammer Date: Sun, 1 Oct 2023 12:26:51 +0200 Subject: [PATCH 07/10] uqmi: added timeout to fix hanging qmi.sh Modems which are using qmi do not reply on the 1st sync but they do on subsequent. So qmi.sh is hanging on the first call. Since 2020 uqmi supports a timeout parameter. Unfortunately qmi.sh didn't make use of this parameter. So qmi.sh is now invoking an early dummy access to unlock the modem Signed-off-by: Uwe Niethammer (cherry picked from commit 32a696f9e419ebec5b166847a16a5a45d030acbd) --- package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 6c5104bccd..eab7f1ea13 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -83,6 +83,8 @@ proto_qmi_setup() { echo "Waiting for SIM initialization" local uninitialized_timeout=0 + # timeout 3s for first call to avoid hanging uqmi + uqmi -d "$device" --get-pin-status -t 3000 > /dev/null 2>&1 while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do [ -e "$device" ] || return 1 if [ "$uninitialized_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then From 83e681e69e846bb1094fb7c6676e6e58334d57ed Mon Sep 17 00:00:00 2001 From: Rudolf Vesely Date: Mon, 2 Oct 2023 06:51:19 +0000 Subject: [PATCH 08/10] rtl83xx: fix STP by trapping BPDUs Fix Spanning Tree Protocol (STP) by changing COPY2CPU which currently makes switch to ignore Bridge Protocol Data Units (BPDUs). Tested on Zyxel GS1900-8, 24 and 48. Signed-off-by: Rudolf Vesely [ improve commit description and add new line in different sections ] Signed-off-by: Christian Marangi (cherry picked from commit 41fcc617f94601072d304f2f68e12cf1dd058707) --- target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c index 6f55f1e892..0af98e4470 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c @@ -152,7 +152,7 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv) static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv) { for (int i = 0; i < priv->cpu_port; i++) - priv->r->set_receive_management_action(i, BPDU, COPY2CPU); + priv->r->set_receive_management_action(i, BPDU, TRAP2CPU); } static void rtl83xx_port_set_salrn(struct rtl838x_switch_priv *priv, From 4cbfbb2edaab71431bce6a228d16e9840b42ae2d Mon Sep 17 00:00:00 2001 From: Tobias Schramm Date: Sat, 23 Sep 2023 13:46:40 +0200 Subject: [PATCH 09/10] realtek: 5.15: rtl93xx: support 2500baseT and 5000baseT on USXGMII links The USXGMII implementation of Realtek switches can not only support 10GbE but also 2.5Gb and 5Gb on top of the usual data rates. Mark those as supported to allow them to be negotiated. This change has been tested on a ZyXEL XGS1250-12 with the following link partners: - NWA50AX Pro (2.5Gb) - RTL8152 USB NIC (2.5Gb) - AQC111 USB NIC (2.5Gb & 5Gb) Gbit and 10GbE has also been tested to still work fine with a variety of devices. Signed-off-by: Tobias Schramm (cherry picked from commit cd56a682326f9de4d77ee3afb99d13d25c478c08) --- .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c index 0af98e4470..063ce9b8c5 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c @@ -429,8 +429,11 @@ static void rtl93xx_phylink_validate(struct dsa_switch *ds, int port, phylink_set(mask, 10000baseCR_Full); } - if (state->interface == PHY_INTERFACE_MODE_USXGMII) + if (state->interface == PHY_INTERFACE_MODE_USXGMII) { + phylink_set(mask, 2500baseT_Full); + phylink_set(mask, 5000baseT_Full); phylink_set(mask, 10000baseT_Full); + } phylink_set(mask, 10baseT_Half); phylink_set(mask, 10baseT_Full); From e26947993f9f443fe58ddbb0534515383aaf5b6f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 7 Oct 2023 12:29:57 +0200 Subject: [PATCH 10/10] toolchain: glibc: Update glibc 2.37 to recent HEAD This adds the following changes: b4f76ecc9e Ignore MAP_VARIABLE in tst-mman-consts.py f5d377c896 __check_pf: Add a cancellation cleanup handler [BZ #20975] 0e3e9dbb0e Document BZ #20975 fix e2974d26ce io: Fix record locking contants on 32 bit arch with 64 bit default time_t (BZ#30477) 3593050c27 io: Fix F_GETLK, F_SETLK, and F_SETLKW for powerpc64 8dcb1a5181 hppa: xfail debug/tst-ssp-1 when have-ssp is yes (gcc-12 and later) 0930ff8eb3 realloc: Limit chunk reuse to only growing requests [BZ #30579] 3f4b4e2cdd elf: _dl_find_object may return 1 during early startup (bug 30515) 260d4b742b nptl: Fix tst-cancel30 on sparc64 58f7431fd7 sparc: Fix la_symbind for bind-now (BZ 23734) 1caf955269 x86: Increase `non_temporal_threshold` to roughly `sizeof_L3 / 4` 80a8c858a5 x86: Fix slight bug in `shared_per_thread` cache size calculation. cc8243fb0b x86: Use `3/4*sizeof(per-thread-L3)` as low bound for NT threshold. f94ff95e93 x86: Fix incorrect scope of setting `shared_per_thread` [BZ# 30745] 0d500bfdc0 hurd: Make exception subcode a long be26b29262 io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64 3d24d1903d elf: Do not run constructors for proxy objects a7e34a6675 elf: Always call destructors in reverse constructor order (bug 30785) bdb594afa5 elf: Remove unused l_text_end field from struct link_map 1a7cbe52c8 elf: Move l_init_called_next to old place of l_text_end in link map b752934602 CVE-2023-4527: Stack read overflow with large TCP responses in no-aaaa mode 6529a7466c (HEAD) getaddrinfo: Fix use after free in getcanonname (CVE-2023-4806) 79310b45af x86/dl-cacheinfo: remove unsused parameter from handle_amd 9d5c6e27ed x86: Fix for cache computation on AMD legacy cpus. 4473d1b87d Fix leak in getaddrinfo introduced by the fix for CVE-2023-4806 [BZ #30843] 94ef701365 Document CVE-2023-4806 and CVE-2023-5156 in NEWS 2dfd8c77b5 i686: Regenerate ulps b4e23c75ae tunables: Terminate if end of input is reached (CVE-2023-4911) Signed-off-by: Hauke Mehrtens (cherry picked from commit e66eed033f9f9d27fc839d81d3a03d4fad1b9b5b) --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index b80cb2678b..18413cd271 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=7c32cb7dd88cf100b0b412163896e30aa2ee671a -PKG_MIRROR_HASH:=92afa3672e4af0c3ba9d360e9aaac60c094a0aad9334ef78a1fd2ee49f5e1b64 +PKG_SOURCE_VERSION:=b4e23c75aea756b4bddc4abcf27a1c6dca8b6bd3 +PKG_MIRROR_HASH:=4d5b3de6ec7b47427700f74fdb529e32083b54a512f6ca86ec824a61092ecdd4 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_CPE_ID:=cpe:/a:gnu:glibc