From 3704eb3c3f5063f42d6128160f191b86e2c42437 Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Thu, 9 May 2024 21:11:09 -0300 Subject: [PATCH 01/20] ipq40xx: whw03v2: fix handling of RGB LED The RGB LED should glow green in the 'running' state, but it was glowing cyan because the blue component defaulted to 'on'. Signed-off-by: Rodrigo Balerdi (cherry picked from commit fc62d66c20b9e9f52ed787d2079baab06108b959) Link: https://github.com/openwrt/openwrt/pull/15438 Signed-off-by: Robert Marko --- .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts index e01be0ae4bc946..aba7cb8bea1972 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts @@ -278,7 +278,6 @@ label = "red"; color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <0>; }; @@ -286,7 +285,6 @@ label = "green"; color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <1>; }; @@ -294,7 +292,6 @@ label = "blue"; color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "default-on"; reg = <2>; }; }; From 567af392b6d465a413b698ab6a245c30b7e6458f Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Thu, 9 May 2024 21:15:47 -0300 Subject: [PATCH 02/20] ipq40xx: whw03v2: change LED color for 'running' state to blue Change the RGB indicator LED color for the running state from green to blue. There are various reasons for this change: - In stock firmware, green means internet connection is up, red means it is down, and blue means indeterminate. To track stock behavior as closely as possible, OpenWrt should indicate blue by default. - In the current 23.x OpenWrt releases for this router, the led glows blue all the time -not green- because the bootloader sets it blue and there is an OpenWrt bug that makes it unable to control the LED. The bug is fixed in master, so without this commit there would be an unexpected change of behavior for this device in the next release. - The ports other closely related Linksys devices (such as EA8300 and MR8300) get this right and use blue for the running state. Signed-off-by: Rodrigo Balerdi (cherry picked from commit c2f52e42b1e9f736edd6e4545ebe3435db6605ee) Link: https://github.com/openwrt/openwrt/pull/15438 Signed-off-by: Robert Marko --- .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts index aba7cb8bea1972..ab4dd9de8e80ca 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts @@ -13,7 +13,7 @@ aliases { led-boot = &led_blue; led-failsafe = &led_red; - led-running = &led_green; + led-running = &led_blue; led-upgrade = &led_red; }; From e32782b2df1243183ed057f272f176dc2601cc33 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 11 Dec 2023 13:15:09 +0100 Subject: [PATCH 03/20] mt76: update to Git HEAD (2023-12-11) f63f87cd5b45 wifi: mt76: mt7996: fix shift overflow warning on 32 bit systems Signed-off-by: Felix Fietkau (cherry picked from commit da7b0351fce5dd59b79ea78d34c90c66b8bd6f6e) [rmilecki: it's a no-change for 23.05 as we had that fix backported] --- package/kernel/mt76/Makefile | 6 ++-- ...-fix-shift-overflow-warning-on-32-bi.patch | 34 ------------------- 2 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 762f474ce90754..38a92c953ec621 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-12-08 -PKG_SOURCE_VERSION:=f559adf1849c8af91f5a5eb670f4ed2c24988898 -PKG_MIRROR_HASH:=74dde4478442d5f0edbae918636b40767b0e49181b732d4184feeccd8a8cc328 +PKG_SOURCE_DATE:=2023-12-11 +PKG_SOURCE_VERSION:=f63f87cd5b45c3779293e6062c6b26bdf57e851d +PKG_MIRROR_HASH:=43f1b1fb75dfb4756aa1767983b338bd63154f0f6c45554029e69af49d55b914 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch b/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch deleted file mode 100644 index 5acc9e88a585bc..00000000000000 --- a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f63f87cd5b45c3779293e6062c6b26bdf57e851d Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Sat, 9 Dec 2023 22:44:57 +0100 -Subject: [PATCH] wifi: mt76: mt7996: fix shift overflow warning on 32 bit - systems - -Fix additional shift overflow warning on 32 bit systems for mt7996 mac.c -source. - -Fixes: 95c14207d2a9 ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM") -Signed-off-by: Christian Marangi ---- - mt7996/mac.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - ---- a/mt7996/mac.c -+++ b/mt7996/mac.c -@@ -942,9 +942,13 @@ int mt7996_tx_prepare_skb(struct mt76_de - - txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE); - for (i = 0; i < nbuf; i++) { -- u16 len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len) | -- FIELD_PREP(MT_TXP_DMA_ADDR_H, -- tx_info->buf[i + 1].addr >> 32); -+ u16 len; -+ -+ len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len); -+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT -+ len |= FIELD_PREP(MT_TXP_DMA_ADDR_H, -+ tx_info->buf[i + 1].addr >> 32); -+#endif - - txp->fw.buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr); - txp->fw.len[i] = cpu_to_le16(len); From 4be4d20662403d543256e0a5ef9959180135b383 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 18 Dec 2023 18:54:55 +0100 Subject: [PATCH 04/20] mt76: update to Git HEAD (2023-12-18) bebd9cffc2ae wifi: mt76: mt7921: fix 6GHz disabled by the missing default CLC config Signed-off-by: Felix Fietkau (cherry picked from commit 1a57d758f229a1e8d9085cd4775ebe7e1ec5d9b2) [rmilecki: it's a no-change for 23.05 as we had that fix backported] --- package/kernel/mt76/Makefile | 6 ++-- ...-fix-6GHz-disabled-by-the-missing-de.patch | 31 ------------------- 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 38a92c953ec621..65f6ca1e8edd13 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-12-11 -PKG_SOURCE_VERSION:=f63f87cd5b45c3779293e6062c6b26bdf57e851d -PKG_MIRROR_HASH:=43f1b1fb75dfb4756aa1767983b338bd63154f0f6c45554029e69af49d55b914 +PKG_SOURCE_DATE:=2023-12-18 +PKG_SOURCE_VERSION:=bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b +PKG_MIRROR_HASH:=580261755bc3f251b8bc5f7f610274693c067432187570694d2f2ccab0edb62b PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch deleted file mode 100644 index 3fff9caa3cd15d..00000000000000 --- a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b Mon Sep 17 00:00:00 2001 -From: Ming Yen Hsieh -Date: Mon, 30 Oct 2023 15:17:34 +0800 -Subject: [PATCH] wifi: mt76: mt7921: fix 6GHz disabled by the missing default - CLC config - -No matter CLC is enabled or disabled, the driver should initialize -the default value 0xff for channel configuration of CLC. Otherwise, -the zero value would disable channels. - -Reported-and-tested-by: Ben Greear -Closes: https://lore.kernel.org/all/2fb78387-d226-3193-8ca7-90040561b9ad@candelatech.com/ -Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed") -Signed-off-by: Ming Yen Hsieh -Signed-off-by: Deren Wu -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/5a976ddf1f636b5cb809373501d3cfdc6d8de3e4.1698648737.git.deren.wu@mediatek.com ---- - mt7921/mcu.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/mt7921/mcu.c -+++ b/mt7921/mcu.c -@@ -375,6 +375,7 @@ static int mt7921_load_clc(struct mt792x - int ret, i, len, offset = 0; - u8 *clc_base = NULL, hw_encap = 0; - -+ dev->phy.clc_chan_conf = 0xff; - if (mt7921_disable_clc || - mt76_is_usb(&dev->mt76)) - return 0; From c5ed115104ce35c0c5a6853b50889f8b777a759b Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Sat, 4 May 2024 16:11:00 +0200 Subject: [PATCH 05/20] realtek: Change LLTP register to LLDP These registers control the handling of Link Layer Discovery Protocol (LLDP) packets. This seems to be a typo in the naming. Signed-off-by: Kevin Jilissen (cherry picked from commit 81ab9ef2d166f9914a33d54d4dfd00429511ccb2) --- .../files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c | 4 ++-- .../files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h | 10 +++++----- .../files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c | 4 ++-- .../files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c index adff404fddd430..d93087f5b1aa6c 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c @@ -1678,9 +1678,9 @@ void rtl838x_set_receive_management_action(int port, rma_ctrl_t type, action_typ sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), RTL838X_RMA_PTP_CTRL + ((port >> 4) << 2)); break; - case LLTP: + case LLDP: sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), - RTL838X_RMA_LLTP_CTRL + ((port >> 4) << 2)); + RTL838X_RMA_LLDP_CTRL + ((port >> 4) << 2)); break; default: break; diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h index 24d18d61fafde3..6d29e437afa629 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h @@ -425,7 +425,7 @@ typedef enum { PTP, PTP_UDP, PTP_ETH2, - LLTP, + LLDP, EAPOL, GRATARP, } rma_ctrl_t; @@ -449,10 +449,10 @@ typedef enum { #define RTL930X_RMA_PTP_CTRL (0x9E88) #define RTL931X_RMA_PTP_CTRL (0x8834) -#define RTL838X_RMA_LLTP_CTRL (0x4340) -#define RTL839X_RMA_LLTP_CTRL (0x124C) -#define RTL930X_RMA_LLTP_CTRL (0x9EFC) -#define RTL931X_RMA_LLTP_CTRL (0x8918) +#define RTL838X_RMA_LLDP_CTRL (0x4340) +#define RTL839X_RMA_LLDP_CTRL (0x124C) +#define RTL930X_RMA_LLDP_CTRL (0x9EFC) +#define RTL931X_RMA_LLDP_CTRL (0x8918) #define RTL930X_RMA_EAPOL_CTRL (0x9F08) #define RTL931X_RMA_EAPOL_CTRL (0x8930) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c index ff80a9074edf1e..5889cea6d66736 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c @@ -1814,9 +1814,9 @@ void rtl839x_set_receive_management_action(int port, rma_ctrl_t type, action_typ sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), RTL839X_RMA_PTP_CTRL + ((port >> 4) << 2)); break; - case LLTP: + case LLDP: sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), - RTL839X_RMA_LLTP_CTRL + ((port >> 4) << 2)); + RTL839X_RMA_LLDP_CTRL + ((port >> 4) << 2)); break; default: break; diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c index 3221109c1804ca..0f1852abd07c47 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c @@ -516,8 +516,8 @@ void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_typ case PTP_ETH2: sw_w32_mask(3, value, RTL931X_RMA_PTP_CTRL + (port << 2)); break; - case LLTP: - sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLTP_CTRL + ((port / 10) << 2)); + case LLDP: + sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLDP_CTRL + ((port / 10) << 2)); break; case EAPOL: sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_EAPOL_CTRL + ((port / 10) << 2)); From 5b7240c07056ccdde606cea8e832d76f0d4e8002 Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Sat, 4 May 2024 16:12:20 +0200 Subject: [PATCH 06/20] realtek: Trap LLDP packets to the CPU We should setup the registers for trapping LLDP packets to the CPU. Currently, these packets are forwarded to all ports which is not desired behaviour. Signed-off-by: Kevin Jilissen (cherry picked from commit 5a5c52085a5bd0b1b8bc629f3586c7a93dcb4460) --- .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 063ce9b8c5d0da..6d8b1552459f15 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 @@ -155,6 +155,12 @@ static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv) priv->r->set_receive_management_action(i, BPDU, TRAP2CPU); } +static void rtl83xx_setup_lldp_traps(struct rtl838x_switch_priv *priv) +{ + for (int i = 0; i < priv->cpu_port; i++) + priv->r->set_receive_management_action(i, LLDP, TRAP2CPU); +} + static void rtl83xx_port_set_salrn(struct rtl838x_switch_priv *priv, int port, bool enable) { @@ -207,6 +213,7 @@ static int rtl83xx_setup(struct dsa_switch *ds) rtl83xx_vlan_setup(priv); rtl83xx_setup_bpdu_traps(priv); + rtl83xx_setup_lldp_traps(priv); ds->configure_vlan_while_not_filtering = true; From 447eef2063cce1ad472a07af3e368826158b1da3 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 25 Apr 2024 16:53:55 +0200 Subject: [PATCH 07/20] mpc85xx: convert WS-AP3710i to simpleImage wrapper Convert the Enterasys WS-AP3710i access point to use the simpleImage wrapper. This is necessary, as the bootlaoder does not align the DTB correctly (and does not support altering the FDT loadaddress). Booting images with kernels 5.15 and later can break depending on the alignment on the DTB within the FIT image. Compared with the patch applied to master, this compiles the loader at the changed offset used in OpenWrt master. This is required, as U-Boot loads the uImage at the offset the loader is currently compiled for. Signed-off-by: David Bauer (cherry picked from commit eec18118d02fa5d095cb4035c42187e487d0e68c) --- .../arch/powerpc/boot/dts/ws-ap3710i.dts | 104 +++++++++++++++++- target/linux/mpc85xx/image/p1020.mk | 6 +- target/linux/mpc85xx/p1020/target.mk | 2 +- .../106-powerpc-85xx-ws-ap3710i-support.patch | 30 +++++ ...-powerpc-85xx-add-ws-ap3825i-support.patch | 22 ++-- ...-powerpc-85xx-add-ws-ap3715i-support.patch | 14 +-- .../110-powerpc-85xx-br200-wp-support.patch | 8 +- 7 files changed, 158 insertions(+), 28 deletions(-) diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts index 5d81da46864139..2eb6f6e21ec9bf 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts @@ -9,6 +9,8 @@ compatible = "enterasys,ws-ap3710i"; aliases { + ethernet0 = &enet0; + ethernet1 = &enet2; led-boot = &led_power_green; led-failsafe = &led_power_red; led-running = &led_power_green; @@ -16,6 +18,11 @@ label-mac-device = &enet0; }; + chosen { + bootargs-override = "console=ttyS0,115200"; + stdout-path = &serial0; + }; + memory { device_type = "memory"; }; @@ -74,7 +81,7 @@ #size-cells = <1>; partition@0 { - compatible = "denx,fit"; + compatible = "denx,uimage"; reg = <0x0 0x1d80000>; label = "firmware"; }; @@ -145,6 +152,13 @@ ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; reg = <0 0xffe09000 0 0x1000>; + + /* Filled by U-Boot */ + bus-range = <0x00 0x01>; + dma-ranges = <0x2000000 0x00 0xfff00000 0x00 0xffe00000 + 0x00 0x100000 0x42000000 0x00 0x00 0x00 + 0x00 0x00 0x10000000>; + pcie@0 { ranges = <0x2000000 0x0 0xa0000000 0x2000000 0x0 0xa0000000 @@ -160,6 +174,13 @@ reg = <0 0xffe0a000 0 0x1000>; ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; + + /* Filled by U-Boot */ + bus-range = <0x00 0x01>; + dma-ranges = <0x2000000 0x00 0xfff00000 0x00 + 0xffe00000 0x00 0x100000 0x42000000 + 0x00 0x00 0x00 0x00 0x00 0x10000000>; + pcie@0 { ranges = <0x2000000 0x0 0x80000000 0x2000000 0x0 0x80000000 @@ -174,6 +195,87 @@ }; /include/ "fsl/p1020si-post.dtsi" +/ { + cpus { + PowerPC,P1020@0 { + bus-frequency = <399999996>; + timebase-frequency = <50000000>; + clock-frequency = <799999992>; + d-cache-block-size = <0x20>; + d-cache-size = <0x8000>; + d-cache-sets = <0x80>; + i-cache-block-size = <0x20>; + i-cache-size = <0x8000>; + i-cache-sets = <0x80>; + cpu-release-addr = <0x0 0x0ffff280>; + status = "okay"; + enable-method = "spin-table"; + }; + + PowerPC,P1020@1 { + bus-frequency = <399999996>; + timebase-frequency = <50000000>; + clock-frequency = <799999992>; + d-cache-block-size = <0x20>; + d-cache-size = <0x8000>; + d-cache-sets = <0x80>; + i-cache-block-size = <0x20>; + i-cache-size = <0x8000>; + i-cache-sets = <0x80>; + cpu-release-addr = <0x0 0x0ffff2a0>; + status = "disabled"; + enable-method = "spin-table"; + }; + }; + + memory { + reg = <0x0 0x0 0x0 0x10000000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cpu1-bootpage@ff00000 { + /* Reserve upper 1 MB for second-core-bootpage */ + reg = <0x0 0xff00000 0x0 0x100000>; + }; + }; + + soc@ffe00000 { + bus-frequency = <399999996>; + + serial@4600 { + clock-frequency = <399999996>; + }; + + serial@4500 { + clock-frequency = <399999996>; + }; + + pic@40000 { + clock-frequency = <399999996>; + }; + }; + + localbus@ffe05000 { + bus-frequency = <24999999>; + }; +}; + +&enet0 { + rx-stash-idx = <0x00>; + rx-stash-len = <0x60>; + bd-stash; +}; + +&enet2 { + rx-stash-idx = <0x00>; + rx-stash-len = <0x60>; + bd-stash; +}; + /* * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses * aliases to determine PCI domain numbers, drop aliases so as not to diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index d3d7f93ddda4b4..e5bfabf8ce2450 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -62,7 +62,11 @@ define Device/enterasys_ws-ap3710i DEVICE_VENDOR := Enterasys DEVICE_MODEL := WS-AP3710i BLOCKSIZE := 128k - KERNEL = kernel-bin | lzma | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb + KERNEL_NAME := simpleImage.ws-ap3710i + KERNEL_ENTRY := 0x1000000 + KERNEL_LOADADDR := 0x1000000 + KERNEL = kernel-bin | uImage none + KERNEL_INITRAMFS := kernel-bin | uImage none IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata endef diff --git a/target/linux/mpc85xx/p1020/target.mk b/target/linux/mpc85xx/p1020/target.mk index 8770edb9a9146f..d0d919cb1d9f0c 100644 --- a/target/linux/mpc85xx/p1020/target.mk +++ b/target/linux/mpc85xx/p1020/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=P1020 -KERNEL_IMAGES:=simpleImage.ws-ap3825i +KERNEL_IMAGES:=simpleImage.ws-ap3710i simpleImage.ws-ap3825i define Target/Description Build firmware images for Freescale P1020 based boards. diff --git a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch index 124376ffd9972e..1edc2aa56bd9db 100644 --- a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch @@ -28,3 +28,33 @@ obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -164,6 +164,7 @@ src-plat-$(CONFIG_PPC_POWERNV) += pserie + src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S + src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c + src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S ++src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S + + src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c + +@@ -345,6 +346,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm + image-$(CONFIG_TQM8560) += cuImage.tqm8560 + image-$(CONFIG_KSI8560) += cuImage.ksi8560 + image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 ++image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i + # Board ports in arch/powerpc/platform/86xx/Kconfig + image-$(CONFIG_MVME7100) += dtbImage.mvme7100 + +--- a/arch/powerpc/boot/wrapper ++++ b/arch/powerpc/boot/wrapper +@@ -326,7 +326,8 @@ adder875-redboot) + platformo="$object/fixed-head.o $object/redboot-8xx.o" + binary=y + ;; +-simpleboot-tl-wdr4900-v1) ++simpleboot-tl-wdr4900-v1|\ ++simpleboot-ws-ap3710i) + platformo="$object/fixed-head.o $object/simpleboot.o" + link_address='0x1000000' + binary=y diff --git a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch index b211f3cb3022bf..3f05c906af8390 100644 --- a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch @@ -37,29 +37,23 @@ WS-AP3825i AP. obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile -@@ -164,6 +164,7 @@ src-plat-$(CONFIG_PPC_POWERNV) += pserie - src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S - src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c - src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S -+src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S - - src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c - -@@ -345,6 +346,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm - image-$(CONFIG_TQM8560) += cuImage.tqm8560 +@@ -347,6 +347,7 @@ image-$(CONFIG_TQM8560) += cuImage.tqm image-$(CONFIG_KSI8560) += cuImage.ksi8560 image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 + image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i +image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i # Board ports in arch/powerpc/platform/86xx/Kconfig image-$(CONFIG_MVME7100) += dtbImage.mvme7100 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper -@@ -326,6 +326,7 @@ adder875-redboot) - platformo="$object/fixed-head.o $object/redboot-8xx.o" +@@ -327,7 +327,8 @@ adder875-redboot) binary=y ;; -+simpleboot-ws-ap3825i|\ - simpleboot-tl-wdr4900-v1) + simpleboot-tl-wdr4900-v1|\ +-simpleboot-ws-ap3710i) ++simpleboot-ws-ap3710i|\ ++simpleboot-ws-ap3825i) platformo="$object/fixed-head.o $object/simpleboot.o" link_address='0x1000000' + binary=y diff --git a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch index 8272d9dd2ae3aa..fe9abbb1e2fd82 100644 --- a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch @@ -30,21 +30,21 @@ obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile -@@ -346,6 +346,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm - image-$(CONFIG_TQM8560) += cuImage.tqm8560 +@@ -347,6 +347,7 @@ image-$(CONFIG_TQM8560) += cuImage.tqm image-$(CONFIG_KSI8560) += cuImage.ksi8560 image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 + image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i +image-$(CONFIG_WS_AP3715I) += simpleImage.ws-ap3715i image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i # Board ports in arch/powerpc/platform/86xx/Kconfig image-$(CONFIG_MVME7100) += dtbImage.mvme7100 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper -@@ -326,6 +326,7 @@ adder875-redboot) - platformo="$object/fixed-head.o $object/redboot-8xx.o" - binary=y +@@ -328,6 +328,7 @@ adder875-redboot) ;; + simpleboot-tl-wdr4900-v1|\ + simpleboot-ws-ap3710i|\ +simpleboot-ws-ap3715i|\ - simpleboot-ws-ap3825i|\ - simpleboot-tl-wdr4900-v1) + simpleboot-ws-ap3825i) platformo="$object/fixed-head.o $object/simpleboot.o" + link_address='0x1000000' diff --git a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch index 8d510759dcfca5..ef05df3430371e 100644 --- a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch +++ b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch @@ -35,7 +35,7 @@ src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c +src-plat-$(CONFIG_BR200_WP) += simpleboot.c fixed-head.S src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S - src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S + src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S @@ -345,6 +346,7 @@ image-$(CONFIG_TQM8548) += cuImage.tqm image-$(CONFIG_TQM8555) += cuImage.tqm8555 @@ -43,8 +43,8 @@ image-$(CONFIG_KSI8560) += cuImage.ksi8560 +image-$(CONFIG_BR200_WP) += simpleImage.br200-wp image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 + image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i image-$(CONFIG_WS_AP3715I) += simpleImage.ws-ap3715i - image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -326,6 +326,7 @@ adder875-redboot) @@ -52,6 +52,6 @@ binary=y ;; +simpleboot-br200-wp|\ + simpleboot-tl-wdr4900-v1|\ + simpleboot-ws-ap3710i|\ simpleboot-ws-ap3715i|\ - simpleboot-ws-ap3825i|\ - simpleboot-tl-wdr4900-v1) From 11b00344d11b238ba658d86789be62f04c0ed772 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Thu, 2 May 2024 14:11:04 -0500 Subject: [PATCH 08/20] ipq40xx: Enable NVMEM_U_BOOT_ENV config It's needed to get the MAC addresses for the Engenius EAP1300. Signed-off-by: Corey Minyard Link: https://github.com/openwrt/openwrt/pull/15358 Signed-off-by: Christian Marangi Link: https://github.com/openwrt/openwrt/pull/15402 Signed-off-by: Robert Marko --- target/linux/ipq40xx/config-5.15 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ipq40xx/config-5.15 b/target/linux/ipq40xx/config-5.15 index 4966352271649f..fa0de60172aca2 100644 --- a/target/linux/ipq40xx/config-5.15 +++ b/target/linux/ipq40xx/config-5.15 @@ -310,6 +310,7 @@ CONFIG_NVMEM=y CONFIG_NVMEM_QCOM_QFPROM=y # CONFIG_NVMEM_QCOM_SEC_QFPROM is not set # CONFIG_NVMEM_SPMI_SDAM is not set +CONFIG_NVMEM_U_BOOT_ENV=y CONFIG_NVMEM_SYSFS=y CONFIG_OF=y CONFIG_OF_ADDRESS=y From 89088ba638c0bb2f44adbe31caaeb52c06e4db66 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Wed, 1 May 2024 15:43:16 -0500 Subject: [PATCH 09/20] ipq40xx: convert Engenius EAP1300 to DSA This commit converts the EAP1300 to DSA setup. Signed-off-by: Corey Minyard Link: https://github.com/openwrt/openwrt/pull/15358 Signed-off-by: Christian Marangi Link: https://github.com/openwrt/openwrt/pull/15402 Signed-off-by: Robert Marko --- .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../arch/arm/boot/dts/qcom-ipq4018-eap1300.dts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 5de62f1d7d0f2a..060474b718e62c 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -50,6 +50,7 @@ ipq40xx_setup_interfaces() aruba,ap-365|\ avm,fritzrepeater-1200|\ dlink,dap-2610|\ + engenius,eap1300|\ extreme-networks,ws-ap3915i|\ meraki,mr33|\ meraki,mr74|\ diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts index a8f24aa00e60e3..af9a438e2ed924 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts @@ -215,6 +215,23 @@ status = "okay"; }; +&switch { + status = "okay"; +}; + +&swport5 { + status = "okay"; + label = "lan"; +}; + +&gmac { + status = "okay"; +}; + +&mdio { + status = "okay"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; From 66952b9ff4743459a3bf77216933a43096865cbc Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Fri, 3 May 2024 08:12:38 -0500 Subject: [PATCH 10/20] ipq40xx: Properly set MAC addresses for the EAP1300 The code that was there was just taking whatever was left in the registers, which was just wrong. Set the addresses using the value from the u-boot environment, the same way the OEM firmware does. Signed-off-by: Corey Minyard Link: https://github.com/openwrt/openwrt/pull/15358 Signed-off-by: Christian Marangi Link: https://github.com/openwrt/openwrt/pull/15402 Signed-off-by: Robert Marko --- .../arch/arm/boot/dts/qcom-ipq4018-eap1300.dts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts index af9a438e2ed924..a72cb02ff1104f 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts @@ -194,8 +194,13 @@ reg = <0x190000 0x1dc0000>; }; partition9@1f50000 { + compatible = "u-boot,env"; label = "u-boot-env"; reg = <0x01f50000 0x00010000>; + + macaddr_ubootenv_ethaddr: ethaddr { + #nvmem-cell-cells = <1>; + }; }; partition10@1f60000 { label = "userconfig"; @@ -222,6 +227,8 @@ &swport5 { status = "okay"; label = "lan"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_ubootenv_ethaddr 0>; }; &gmac { @@ -234,14 +241,14 @@ &wifi0 { status = "okay"; - nvmem-cell-names = "pre-calibration"; - nvmem-cells = <&precal_art_1000>; + nvmem-cell-names = "pre-calibration", "mac-address"; + nvmem-cells = <&precal_art_1000>, <&macaddr_ubootenv_ethaddr 1>; qcom,ath10k-calibration-variant = "EnGenius-EAP1300"; }; &wifi1 { status = "okay"; - nvmem-cell-names = "pre-calibration"; - nvmem-cells = <&precal_art_5000>; + nvmem-cell-names = "pre-calibration", "mac-address"; + nvmem-cells = <&precal_art_5000>, <&macaddr_ubootenv_ethaddr 2>; qcom,ath10k-calibration-variant = "EnGenius-EAP1300"; }; From 7a0d5a5c8bda19fc984429d183d14ee0b95a9be6 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Fri, 3 May 2024 08:14:31 -0500 Subject: [PATCH 11/20] ipq40xx: Enable the Engenius EAP1300 Now that DSA is enabled and the MAC addresses are set properly, we can use it. Signed-off-by: Corey Minyard Link: https://github.com/openwrt/openwrt/pull/15358 Signed-off-by: Christian Marangi Link: https://github.com/openwrt/openwrt/pull/15402 Signed-off-by: Robert Marko --- target/linux/ipq40xx/image/generic.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index ff5d5f26aad012..a84031f645e53b 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -455,8 +455,7 @@ define Device/engenius_eap1300 IMAGE_SIZE := 25344k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata endef -# Missing DSA Setup -#TARGET_DEVICES += engenius_eap1300 +TARGET_DEVICES += engenius_eap1300 define Device/engenius_eap2200 $(call Device/FitImage) From fd42798fea6616edd8c7acea804d53dda683014e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 28 Apr 2024 12:58:23 +0200 Subject: [PATCH 12/20] kernel: bump 5.15 to 5.15.156 No manual changes needed. Signed-off-by: Hauke Mehrtens (cherry picked from commit 1fbe41f4899aa05fceeb58100c9353b7d60cccca) --- include/kernel-5.15 | 4 +- ...terate-using-dsa_switch_for_each_use.patch | 4 +- ...opulate-supported_interfaces-and-mac.patch | 18 ++++----- ...t-dsa-mt7530-remove-interface-checks.patch | 18 ++++----- ...rop-use-of-phylink_helper_basex_spee.patch | 2 +- ...nly-indicate-linkmodes-that-can-be-s.patch | 8 ++-- ...-switch-to-use-phylink_get_linkmodes.patch | 12 +++--- ...530-partially-convert-to-phylink_pcs.patch | 38 +++++++++---------- ...ove-autoneg-handling-to-PCS-validati.patch | 6 +-- ...19-net-dsa-mt7530-mark-as-non-legacy.patch | 2 +- ...mt753x-fix-pcs-conversion-regression.patch | 4 +- ...t7530-rework-mt7530_hw_vlan_-add-del.patch | 6 +-- ...et-cpu-port-via-dp-cpu_dp-instead-of.patch | 16 ++++---- ...-add-support-for-in-band-link-status.patch | 14 +++---- ...t-dsa-mt7530-use-external-PCS-driver.patch | 24 ++++++------ ...a-mt7530-refactor-SGMII-PCS-creation.patch | 4 +- ...mt7530-use-unlocked-regmap-accessors.patch | 6 +-- ...se-regmap-to-access-switch-register-.patch | 14 +++---- ...ove-SGMII-PCS-creation-to-mt7530_pro.patch | 6 +-- ...t-dsa-mt7530-introduce-mutex-helpers.patch | 12 +++--- ...ove-p5_intf_modes-function-to-mt7530.patch | 2 +- ...ntroduce-mt7530_probe_common-helper-.patch | 6 +-- ...ntroduce-mt7530_remove_common-helper.patch | 4 +- ...t7530-introduce-separate-MDIO-driver.patch | 14 +++---- ...ntroduce-driver-for-MT7988-built-in-.patch | 20 +++++----- ...-dsa-mt7530-fix-support-for-MT7531BE.patch | 8 ++-- ...etfilter_match_bypass_default_checks.patch | 2 +- ...e-all-MACs-are-powered-down-before-r.patch | 4 +- ...gister-OF-node-for-internal-MDIO-bus.patch | 4 +- ...-fix-10M-100M-speed-on-MT7988-switch.patch | 2 +- target/linux/x86/config-5.15 | 4 +- 31 files changed, 143 insertions(+), 145 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 4a82b9c9b3b432..5436913e0500a1 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .155 -LINUX_KERNEL_HASH-5.15.155 = c85859b86d2e6d1fc91ca1be8b44f24a9b5bb9f86869b04a8665a3a6559126e4 +LINUX_VERSION-5.15 = .156 +LINUX_KERNEL_HASH-5.15.156 = 9f0465d14c93691056f5f94de647601f94f083ad8ce2e5d306564394b13e7778 diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch index 3f7f3282473912..bdb4a8315ac61d 100644 --- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch +++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1243,27 +1243,31 @@ static int +@@ -1404,27 +1404,31 @@ static int mt7530_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *bridge) { @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski } /* Add the all other ports to this port matrix. */ -@@ -1368,24 +1372,28 @@ static void +@@ -1529,24 +1533,28 @@ static void mt7530_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *bridge) { diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch index c3902bb9c5ff0d..3f5b953a2a5a87 100644 --- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch +++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2499,6 +2499,32 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2660,6 +2660,32 @@ mt7531_setup(struct dsa_switch *ds) return 0; } @@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni static bool mt7530_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -2535,6 +2561,37 @@ static bool mt7531_is_rgmii_port(struct +@@ -2696,6 +2722,37 @@ static bool mt7531_is_rgmii_port(struct return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); } @@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -3011,6 +3068,18 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3172,6 +3229,18 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, unsigned long *supported) -@@ -3246,6 +3315,7 @@ static const struct dsa_switch_ops mt753 +@@ -3407,6 +3476,7 @@ static const struct dsa_switch_ops mt753 .port_vlan_del = mt7530_port_vlan_del, .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .phylink_validate = mt753x_phylink_validate, .phylink_mac_link_state = mt753x_phylink_mac_link_state, .phylink_mac_config = mt753x_phylink_mac_config, -@@ -3263,6 +3333,7 @@ static const struct mt753x_info mt753x_t +@@ -3424,6 +3494,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3274,6 +3345,7 @@ static const struct mt753x_info mt753x_t +@@ -3435,6 +3506,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3286,6 +3358,7 @@ static const struct mt753x_info mt753x_t +@@ -3447,6 +3519,7 @@ static const struct mt753x_info mt753x_t .phy_write = mt7531_ind_phy_write, .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, @@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7531_phy_mode_supported, .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, -@@ -3348,6 +3421,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3509,6 +3582,7 @@ mt7530_probe(struct mdio_device *mdiodev */ if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || @@ -155,7 +155,7 @@ Signed-off-by: Paolo Abeni !priv->info->mac_port_get_state || !priv->info->mac_port_config) --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -796,6 +796,8 @@ struct mt753x_info { +@@ -801,6 +801,8 @@ struct mt753x_info { int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val); int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface); int (*cpu_port_config)(struct dsa_switch *ds, int port); diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch index d1d56f5aa8e72d..60634aa0d9c92e 100644 --- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch +++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch @@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2525,37 +2525,6 @@ static void mt7530_mac_port_get_caps(str +@@ -2686,37 +2686,6 @@ static void mt7530_mac_port_get_caps(str } } @@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port) { return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); -@@ -2592,44 +2561,6 @@ static void mt7531_mac_port_get_caps(str +@@ -2753,44 +2722,6 @@ static void mt7531_mac_port_get_caps(str } } @@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -2884,9 +2815,6 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -3045,9 +2976,6 @@ mt753x_phylink_mac_config(struct dsa_swi struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; @@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni switch (port) { case 0 ... 4: /* Internal phy */ if (state->interface != PHY_INTERFACE_MODE_GMII) -@@ -3102,12 +3030,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3263,12 +3191,6 @@ mt753x_phylink_validate(struct dsa_switc __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; struct mt7530_priv *priv = ds->priv; @@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni phylink_set_port_modes(mask); if (state->interface != PHY_INTERFACE_MODE_TRGMII && -@@ -3334,7 +3256,6 @@ static const struct mt753x_info mt753x_t +@@ -3495,7 +3417,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3346,7 +3267,6 @@ static const struct mt753x_info mt753x_t +@@ -3507,7 +3428,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3359,7 +3279,6 @@ static const struct mt753x_info mt753x_t +@@ -3520,7 +3440,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, -@@ -3422,7 +3341,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3583,7 +3502,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || @@ -161,7 +161,7 @@ Signed-off-by: Paolo Abeni return -EINVAL; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -798,8 +798,6 @@ struct mt753x_info { +@@ -803,8 +803,6 @@ struct mt753x_info { int (*cpu_port_config)(struct dsa_switch *ds, int port); void (*mac_port_get_caps)(struct dsa_switch *ds, int port, struct phylink_config *config); diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch index 19b44d35edd8ad..f98cf4c793add5 100644 --- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch +++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3054,11 +3054,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3215,11 +3215,6 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch index 5e55f92fc777f9..a499b8e5b10606 100644 --- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch +++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2632,12 +2632,13 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2793,12 +2793,13 @@ static int mt7531_rgmii_setup(struct mt7 } static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port, @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni phylink_set(supported, 2500baseX_Full); phylink_set(supported, 2500baseT_Full); } -@@ -3010,16 +3011,18 @@ static void mt753x_phylink_get_caps(stru +@@ -3171,16 +3172,18 @@ static void mt753x_phylink_get_caps(stru static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, @@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -3042,12 +3045,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3203,12 +3206,13 @@ mt753x_phylink_validate(struct dsa_switc } /* This switch only supports 1G full-duplex. */ @@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni phylink_set(mask, Asym_Pause); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -799,6 +799,7 @@ struct mt753x_info { +@@ -804,6 +804,7 @@ struct mt753x_info { void (*mac_port_get_caps)(struct dsa_switch *ds, int port, struct phylink_config *config); void (*mac_port_validate)(struct dsa_switch *ds, int port, diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch index ddf368fa1af3f0..b7fc06106038c5 100644 --- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch +++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2631,19 +2631,6 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2792,19 +2792,6 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni static void mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, -@@ -3010,51 +2997,21 @@ static void mt753x_phylink_get_caps(stru +@@ -3171,51 +3158,21 @@ static void mt753x_phylink_get_caps(stru } static void @@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); -@@ -3255,7 +3212,6 @@ static const struct mt753x_info mt753x_t +@@ -3416,7 +3373,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3266,7 +3222,6 @@ static const struct mt753x_info mt753x_t +@@ -3427,7 +3383,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3278,7 +3233,6 @@ static const struct mt753x_info mt753x_t +@@ -3439,7 +3394,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, .mac_pcs_an_restart = mt7531_sgmii_restart_an, -@@ -3340,7 +3294,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3501,7 +3455,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch index 7f69ea2fb4dc0b..7afa5be3d4e1b0 100644 --- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch +++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch @@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni /* String, offset, and register size in bytes if different from 4 bytes */ static const struct mt7530_mib_desc mt7530_mib[] = { MIB_DESC(1, 0x00, "TxDrop"), -@@ -2631,12 +2636,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2792,12 +2797,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni unsigned int val; /* For adjusting speed and duplex of SGMII force mode. */ -@@ -2662,6 +2666,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw +@@ -2823,6 +2827,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw /* MT7531 SGMII 1G force mode can only work in full duplex mode, * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not. @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni */ if ((speed == SPEED_10 || speed == SPEED_100) && duplex != DUPLEX_FULL) -@@ -2737,9 +2744,10 @@ static int mt7531_sgmii_setup_mode_an(st +@@ -2898,9 +2905,10 @@ static int mt7531_sgmii_setup_mode_an(st return 0; } @@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni u32 val; /* Only restart AN when AN is enabled */ -@@ -2796,6 +2804,24 @@ mt753x_mac_config(struct dsa_switch *ds, +@@ -2957,6 +2965,24 @@ mt753x_mac_config(struct dsa_switch *ds, return priv->info->mac_port_config(ds, port, mode, state->interface); } @@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) -@@ -2857,17 +2883,6 @@ unsupported: +@@ -3018,17 +3044,6 @@ unsupported: mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } @@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2877,16 +2892,13 @@ static void mt753x_phylink_mac_link_down +@@ -3038,16 +3053,13 @@ static void mt753x_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni } static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, -@@ -2899,8 +2911,6 @@ static void mt753x_phylink_mac_link_up(s +@@ -3060,8 +3072,6 @@ static void mt753x_phylink_mac_link_up(s struct mt7530_priv *priv = ds->priv; u32 mcr; @@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; /* MT753x MAC works in 1G full duplex mode for all up-clocked -@@ -2978,6 +2988,8 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3139,6 +3149,8 @@ mt7531_cpu_port_config(struct dsa_switch return ret; mt7530_write(priv, MT7530_PMCR_P(port), PMCR_CPU_PORT_SETTING(priv->id)); @@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL, speed, DUPLEX_FULL, true, true); -@@ -3017,16 +3029,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3178,16 +3190,13 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(state->advertising, state->advertising, mask); } @@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni pmsr = mt7530_read(priv, MT7530_PMSR_P(port)); state->link = (pmsr & PMSR_LINK); -@@ -3053,8 +3062,6 @@ mt7530_phylink_mac_link_state(struct dsa +@@ -3214,8 +3223,6 @@ mt7530_phylink_mac_link_state(struct dsa state->pause |= MLO_PAUSE_RX; if (pmsr & PMSR_TX_FC) state->pause |= MLO_PAUSE_TX; @@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni } static int -@@ -3096,32 +3103,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3257,32 +3264,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni if (ret) return ret; -@@ -3134,6 +3158,13 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3295,6 +3319,13 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni return ret; } -@@ -3195,9 +3226,8 @@ static const struct dsa_switch_ops mt753 +@@ -3356,9 +3387,8 @@ static const struct dsa_switch_ops mt753 .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, .phylink_validate = mt753x_phylink_validate, @@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni .phylink_mac_link_down = mt753x_phylink_mac_link_down, .phylink_mac_link_up = mt753x_phylink_mac_link_up, .get_mac_eee = mt753x_get_mac_eee, -@@ -3207,36 +3237,34 @@ static const struct dsa_switch_ops mt753 +@@ -3368,36 +3398,34 @@ static const struct dsa_switch_ops mt753 static const struct mt753x_info mt753x_table[] = { [ID_MT7621] = { .id = ID_MT7621, @@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni }, }; -@@ -3294,7 +3322,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3455,7 +3483,7 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || @@ -325,7 +325,7 @@ Signed-off-by: Paolo Abeni priv->id = priv->info->id; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -768,6 +768,12 @@ static const char *p5_intf_modes(unsigne +@@ -773,6 +773,12 @@ static const char *p5_intf_modes(unsigne struct mt7530_priv; @@ -338,7 +338,7 @@ Signed-off-by: Paolo Abeni /* struct mt753x_info - This is the main data structure for holding the specific * part for each supported device * @sw_setup: Holding the handler to a device initialization -@@ -779,18 +785,14 @@ struct mt7530_priv; +@@ -784,18 +790,14 @@ struct mt7530_priv; * port * @mac_port_validate: Holding the way to set addition validate type for a * certan MAC port @@ -359,7 +359,7 @@ Signed-off-by: Paolo Abeni int (*sw_setup)(struct dsa_switch *ds); int (*phy_read)(struct mt7530_priv *priv, int port, int regnum); int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val); -@@ -801,15 +803,9 @@ struct mt753x_info { +@@ -806,15 +808,9 @@ struct mt753x_info { void (*mac_port_validate)(struct dsa_switch *ds, int port, phy_interface_t interface, unsigned long *supported); @@ -375,7 +375,7 @@ Signed-off-by: Paolo Abeni }; /* struct mt7530_priv - This is the main data structure for holding the state -@@ -851,6 +847,7 @@ struct mt7530_priv { +@@ -856,6 +852,7 @@ struct mt7530_priv { u8 mirror_tx; struct mt7530_port ports[MT7530_NUM_PORTS]; diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch index 565a5d0bc5406f..7731c16c96b4b9 100644 --- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch +++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3008,25 +3008,16 @@ static void mt753x_phylink_get_caps(stru +@@ -3169,25 +3169,16 @@ static void mt753x_phylink_get_caps(stru priv->info->mac_port_get_caps(ds, port, config); } @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni } static void mt7530_pcs_get_state(struct phylink_pcs *pcs, -@@ -3128,12 +3119,14 @@ static void mt7530_pcs_an_restart(struct +@@ -3289,12 +3280,14 @@ static void mt7530_pcs_an_restart(struct } static const struct phylink_pcs_ops mt7530_pcs_ops = { @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni .pcs_get_state = mt7531_pcs_get_state, .pcs_config = mt753x_pcs_config, .pcs_an_restart = mt7531_pcs_an_restart, -@@ -3225,7 +3218,6 @@ static const struct dsa_switch_ops mt753 +@@ -3386,7 +3379,6 @@ static const struct dsa_switch_ops mt753 .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch index da9fe699e3eca6..bd35cb1043ec2c 100644 --- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch +++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3005,6 +3005,12 @@ static void mt753x_phylink_get_caps(stru +@@ -3166,6 +3166,12 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch index eea598a7f4b6a8..cff22b5eaca89e 100644 --- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch +++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3143,9 +3143,16 @@ static int +@@ -3304,9 +3304,16 @@ static int mt753x_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski if (ret) return ret; -@@ -3157,13 +3164,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3318,13 +3325,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch index c0dce51a2a2271..c9f830381e265b 100644 --- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch +++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1589,11 +1589,11 @@ static void +@@ -1750,11 +1750,11 @@ static void mt7530_hw_vlan_add(struct mt7530_priv *priv, struct mt7530_hw_vlan_entry *entry) { @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski /* Validate the entry with independent learning, create egress tag per * VLAN and joining the port as one of the port members. -@@ -1604,22 +1604,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p +@@ -1765,22 +1765,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p /* Decide whether adding tag or not for those outgoing packets from the * port inside the VLAN. @@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski } static void -@@ -1638,11 +1636,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p +@@ -1799,11 +1797,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p return; } diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch index 7a4ee56cf9f9ce..bb36302f24e3df 100644 --- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch +++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1093,6 +1093,7 @@ static int +@@ -1254,6 +1254,7 @@ static int mt7530_port_enable(struct dsa_switch *ds, int port, struct phy_device *phy) { @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1101,7 +1102,11 @@ mt7530_port_enable(struct dsa_switch *ds +@@ -1262,7 +1263,11 @@ mt7530_port_enable(struct dsa_switch *ds * restore the port matrix if the port is the member of a certain * bridge. */ @@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski priv->ports[port].enable = true; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, priv->ports[port].pm); -@@ -1249,7 +1254,8 @@ mt7530_port_bridge_join(struct dsa_switc +@@ -1410,7 +1415,8 @@ mt7530_port_bridge_join(struct dsa_switc struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1326,9 +1332,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ +@@ -1487,9 +1493,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ * the CPU port get out of VLAN filtering mode. */ if (all_user_ports_removed) { @@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT)); } } -@@ -1378,6 +1387,7 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1539,6 +1548,7 @@ mt7530_port_bridge_leave(struct dsa_swit struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1406,8 +1416,8 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1567,8 +1577,8 @@ mt7530_port_bridge_leave(struct dsa_swit */ if (priv->ports[port].enable) mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski /* When a port is removed from the bridge, the port would be set up * back to the default as is at initial boot which is a VLAN-unaware -@@ -1570,6 +1580,9 @@ static int +@@ -1731,6 +1741,9 @@ static int mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, struct netlink_ext_ack *extack) { @@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski if (vlan_filtering) { /* The port is being kept as VLAN-unaware port when bridge is * set up with vlan_filtering not being set, Otherwise, the -@@ -1577,7 +1590,7 @@ mt7530_port_vlan_filtering(struct dsa_sw +@@ -1738,7 +1751,7 @@ mt7530_port_vlan_filtering(struct dsa_sw * for becoming a VLAN-aware port. */ mt7530_port_set_vlan_aware(ds, port); diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch index 7b89dbc20671d1..acb67ab1614be5 100644 --- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch +++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2791,9 +2791,6 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2952,9 +2952,6 @@ mt7531_mac_config(struct dsa_switch *ds, case PHY_INTERFACE_MODE_NA: case PHY_INTERFACE_MODE_1000BASEX: case PHY_INTERFACE_MODE_2500BASEX: @@ -29,7 +29,7 @@ Signed-off-by: David S. Miller return mt7531_sgmii_setup_mode_force(priv, port, interface); default: return -EINVAL; -@@ -2869,13 +2866,6 @@ unsupported: +@@ -3030,13 +3027,6 @@ unsupported: return; } @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; -@@ -3012,6 +3002,9 @@ static void mt753x_phylink_get_caps(stru +@@ -3173,6 +3163,9 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller /* This driver does not make use of the speed, duplex, pause or the * advertisement in its mac_config, so it is safe to mark this driver * as non-legacy. -@@ -3077,6 +3070,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3238,6 +3231,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port)); state->link = !!(status & MT7531_SGMII_LINK_STATUS); @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller if (state->interface == PHY_INTERFACE_MODE_SGMII && (status & MT7531_SGMII_AN_ENABLE)) { val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port)); -@@ -3107,16 +3101,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3268,16 +3262,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -109,7 +109,7 @@ Signed-off-by: David S. Miller } static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, -@@ -3157,6 +3179,8 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3318,6 +3340,8 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; @@ -120,7 +120,7 @@ Signed-off-by: David S. Miller ret = priv->info->sw_setup(ds); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -400,6 +400,7 @@ enum mt7530_vlan_port_acc_frm { +@@ -405,6 +405,7 @@ enum mt7530_vlan_port_acc_frm { #define MT7531_SGMII_LINK_STATUS BIT(18) #define MT7531_SGMII_AN_ENABLE BIT(12) #define MT7531_SGMII_AN_RESTART BIT(9) diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch index b9d3018f1195c4..d8386fc3cbc9bd 100644 --- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch +++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch @@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich #include #include #include -@@ -2643,128 +2644,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2804,128 +2805,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich static int mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2787,11 +2671,11 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2948,11 +2832,11 @@ mt7531_mac_config(struct dsa_switch *ds, phydev = dp->slave->phydev; return mt7531_rgmii_setup(priv, port, interface, phydev); case PHY_INTERFACE_MODE_SGMII: @@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich default: return -EINVAL; } -@@ -2816,11 +2700,11 @@ mt753x_phylink_mac_select_pcs(struct dsa +@@ -2977,11 +2861,11 @@ mt753x_phylink_mac_select_pcs(struct dsa switch (interface) { case PHY_INTERFACE_MODE_TRGMII: @@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich default: return NULL; } -@@ -3061,86 +2945,6 @@ static void mt7530_pcs_get_state(struct +@@ -3222,86 +3106,6 @@ static void mt7530_pcs_get_state(struct state->pause |= MLO_PAUSE_TX; } @@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, phy_interface_t interface, const unsigned long *advertising, -@@ -3160,18 +2964,57 @@ static const struct phylink_pcs_ops mt75 +@@ -3321,18 +3125,57 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich int i, ret; /* Initialise the PCS devices */ -@@ -3179,8 +3022,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3340,8 +3183,6 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; @@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich } ret = priv->info->sw_setup(ds); -@@ -3195,6 +3036,16 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3356,6 +3197,16 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich return ret; } -@@ -3286,7 +3137,7 @@ static const struct mt753x_info mt753x_t +@@ -3447,7 +3298,7 @@ static const struct mt753x_info mt753x_t }, [ID_MT7531] = { .id = ID_MT7531, @@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, -@@ -3394,7 +3245,7 @@ static void +@@ -3555,7 +3406,7 @@ static void mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); @@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich if (!priv) return; -@@ -3413,6 +3264,10 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3574,6 +3425,10 @@ mt7530_remove(struct mdio_device *mdiode mt7530_free_irq(priv); dsa_unregister_switch(priv->ds); @@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich dev_set_drvdata(&mdiodev->dev, NULL); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -391,47 +391,8 @@ enum mt7530_vlan_port_acc_frm { +@@ -396,47 +396,8 @@ enum mt7530_vlan_port_acc_frm { CCR_TX_OCT_CNT_BAD) /* MT7531 SGMII register group */ @@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich /* Register for system reset */ #define MT7530_SYS_CTRL 0x7000 -@@ -730,13 +691,13 @@ struct mt7530_fdb { +@@ -735,13 +696,13 @@ struct mt7530_fdb { * @pm: The matrix used to show all connections with the port. * @pvid: The VLAN specified is to be considered a PVID at ingress. Any * untagged frames will be assigned to the related VLAN. diff --git a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch index 34db4fce0bbaf2..8311aaa0bf7f85 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2996,26 +2996,56 @@ static const struct regmap_bus mt7531_re +@@ -3157,26 +3157,56 @@ static const struct regmap_bus mt7531_re .reg_update_bits = mt7530_regmap_update_bits, }; @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller int i, ret; /* Initialise the PCS devices */ -@@ -3037,15 +3067,11 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3198,15 +3228,11 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch index 04060b48ba4e12..7271f1023b21af 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2969,7 +2969,7 @@ static int mt7530_regmap_read(void *cont +@@ -3130,7 +3130,7 @@ static int mt7530_regmap_read(void *cont { struct mt7530_priv *priv = context; @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller return 0; }; -@@ -2977,23 +2977,25 @@ static int mt7530_regmap_write(void *con +@@ -3138,23 +3138,25 @@ static int mt7530_regmap_write(void *con { struct mt7530_priv *priv = context; @@ -62,7 +62,7 @@ Signed-off-by: David S. Miller }; static int -@@ -3019,6 +3021,9 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -3180,6 +3182,9 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->reg_stride = 4; mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i); mt7531_pcs_config[i]->max_register = 0x17c; diff --git a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch index 48854fd23444fb..2f761c2fad4a24 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller } static void -@@ -2965,22 +2986,6 @@ static const struct phylink_pcs_ops mt75 +@@ -3126,22 +3147,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -156,7 +156,7 @@ Signed-off-by: David S. Miller static void mt7530_mdio_regmap_lock(void *mdio_lock) { -@@ -2993,7 +2998,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc +@@ -3154,7 +3159,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc mutex_unlock(mdio_lock); } @@ -165,7 +165,7 @@ Signed-off-by: David S. Miller .reg_write = mt7530_regmap_write, .reg_read = mt7530_regmap_read, }; -@@ -3026,7 +3031,7 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -3187,7 +3192,7 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock; regmap = devm_regmap_init(priv->dev, @@ -174,7 +174,7 @@ Signed-off-by: David S. Miller mt7531_pcs_config[i]); if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); -@@ -3191,6 +3196,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) +@@ -3352,6 +3357,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) static int mt7530_probe(struct mdio_device *mdiodev) { @@ -182,7 +182,7 @@ Signed-off-by: David S. Miller struct mt7530_priv *priv; struct device_node *dn; -@@ -3270,6 +3276,21 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3431,6 +3437,21 @@ mt7530_probe(struct mdio_device *mdiodev mutex_init(&priv->reg_mutex); dev_set_drvdata(&mdiodev->dev, priv); @@ -206,7 +206,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -774,6 +774,7 @@ struct mt753x_info { +@@ -779,6 +779,7 @@ struct mt753x_info { * @dev: The device pointer * @ds: The pointer to the dsa core structure * @bus: The bus used for the device and built-in PHY @@ -214,7 +214,7 @@ Signed-off-by: David S. Miller * @rstc: The pointer to reset control used by MCM * @core_pwr: The power supplied into the core * @io_pwr: The power supplied into the I/O -@@ -794,6 +795,7 @@ struct mt7530_priv { +@@ -799,6 +800,7 @@ struct mt7530_priv { struct device *dev; struct dsa_switch *ds; struct mii_bus *bus; diff --git a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch index b4bcdd0c9dffb6..16feba1daff2be 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3077,12 +3077,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3238,12 +3238,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -31,7 +31,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -3199,6 +3193,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3360,6 +3354,7 @@ mt7530_probe(struct mdio_device *mdiodev static struct regmap_config *regmap_config; struct mt7530_priv *priv; struct device_node *dn; @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller dn = mdiodev->dev.of_node; -@@ -3291,6 +3286,12 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3452,6 +3447,12 @@ mt7530_probe(struct mdio_device *mdiodev if (IS_ERR(priv->regmap)) return PTR_ERR(priv->regmap); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch index b9507e6d9bb148..dc4b40b824bd54 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch @@ -214,7 +214,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -1162,7 +1162,6 @@ static int +@@ -1323,7 +1323,6 @@ static int mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu) { struct mt7530_priv *priv = ds->priv; @@ -222,7 +222,7 @@ Signed-off-by: David S. Miller int length; u32 val; -@@ -1173,7 +1172,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1334,7 +1333,7 @@ mt7530_port_change_mtu(struct dsa_switch if (!dsa_is_cpu_port(ds, port)) return 0; @@ -231,7 +231,7 @@ Signed-off-by: David S. Miller val = mt7530_mii_read(priv, MT7530_GMACCR); val &= ~MAX_RX_PKT_LEN_MASK; -@@ -1194,7 +1193,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch mt7530_mii_write(priv, MT7530_GMACCR, val); @@ -240,7 +240,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1990,10 +1989,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ +@@ -2151,10 +2150,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ u32 val; int p; @@ -253,7 +253,7 @@ Signed-off-by: David S. Miller for (p = 0; p < MT7530_NUM_PHYS; p++) { if (BIT(p) & val) { -@@ -2029,7 +2028,7 @@ mt7530_irq_bus_lock(struct irq_data *d) +@@ -2190,7 +2189,7 @@ mt7530_irq_bus_lock(struct irq_data *d) { struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); @@ -262,7 +262,7 @@ Signed-off-by: David S. Miller } static void -@@ -2038,7 +2037,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da +@@ -2199,7 +2198,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch index b04a84965b47e1..265cf1fdac4b1c 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch @@ -48,7 +48,7 @@ Signed-off-by: David S. Miller struct mt7530_priv *priv = ds->priv; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -709,24 +709,6 @@ enum p5_interface_select { +@@ -714,24 +714,6 @@ enum p5_interface_select { P5_INTF_SEL_GMAC5_SGMII, }; diff --git a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch index 3f656c7a67ca40..10e2c6a184f54c 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3205,44 +3205,21 @@ static const struct of_device_id mt7530_ +@@ -3366,44 +3366,21 @@ static const struct of_device_id mt7530_ MODULE_DEVICE_TABLE(of, mt7530_of_match); static int @@ -67,7 +67,7 @@ Signed-off-by: David S. Miller if (!priv->info) return -EINVAL; -@@ -3256,23 +3233,53 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3417,23 +3394,53 @@ mt7530_probe(struct mdio_device *mdiodev return -EINVAL; priv->id = priv->info->id; @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(priv->reset)) { -@@ -3281,12 +3288,15 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3442,12 +3449,15 @@ mt7530_probe(struct mdio_device *mdiodev } } diff --git a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch index efbabf668c82e3..4e754b100287e7 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3323,6 +3323,17 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3484,6 +3484,17 @@ mt7530_probe(struct mdio_device *mdiodev } static void @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); -@@ -3341,16 +3352,11 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3502,16 +3513,11 @@ mt7530_remove(struct mdio_device *mdiode dev_err(priv->dev, "Failed to disable io pwr: %d\n", ret); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch index ee944a6fc57cc5..e970ec3804b97a 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch @@ -416,7 +416,7 @@ Signed-off-by: David S. Miller static u32 mt7530_mii_read(struct mt7530_priv *priv, u32 reg) { -@@ -3003,72 +2954,6 @@ static const struct phylink_pcs_ops mt75 +@@ -3164,72 +3115,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -489,7 +489,7 @@ Signed-off-by: David S. Miller static int mt753x_setup(struct dsa_switch *ds) { -@@ -3127,7 +3012,7 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3288,7 +3173,7 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -498,7 +498,7 @@ Signed-off-by: David S. Miller .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, .get_strings = mt7530_get_strings, -@@ -3161,8 +3046,9 @@ static const struct dsa_switch_ops mt753 +@@ -3322,8 +3207,9 @@ static const struct dsa_switch_ops mt753 .get_mac_eee = mt753x_get_mac_eee, .set_mac_eee = mt753x_set_mac_eee, }; @@ -509,7 +509,7 @@ Signed-off-by: David S. Miller [ID_MT7621] = { .id = ID_MT7621, .pcs_ops = &mt7530_pcs_ops, -@@ -3195,16 +3081,9 @@ static const struct mt753x_info mt753x_t +@@ -3356,16 +3242,9 @@ static const struct mt753x_info mt753x_t .mac_port_config = mt7531_mac_config, }, }; @@ -528,7 +528,7 @@ Signed-off-by: David S. Miller mt7530_probe_common(struct mt7530_priv *priv) { struct device *dev = priv->dev; -@@ -3241,88 +3120,9 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3402,88 +3281,9 @@ mt7530_probe_common(struct mt7530_priv * return 0; } @@ -619,7 +619,7 @@ Signed-off-by: David S. Miller mt7530_remove_common(struct mt7530_priv *priv) { if (priv->irq) -@@ -3333,57 +3133,6 @@ mt7530_remove_common(struct mt7530_priv +@@ -3494,57 +3294,6 @@ mt7530_remove_common(struct mt7530_priv mutex_destroy(&priv->reg_mutex); } @@ -679,7 +679,7 @@ Signed-off-by: David S. Miller MODULE_LICENSE("GPL"); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -834,4 +834,10 @@ static inline void INIT_MT7530_DUMMY_POL +@@ -839,4 +839,10 @@ static inline void INIT_MT7530_DUMMY_POL p->reg = reg; } diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch index e6c1b941dd9bbb..3d94295eee3fb7 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch @@ -184,7 +184,7 @@ Signed-off-by: David S. Miller +MODULE_LICENSE("GPL"); --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2037,6 +2037,47 @@ static const struct irq_domain_ops mt753 +@@ -2198,6 +2198,47 @@ static const struct irq_domain_ops mt753 }; static void @@ -232,7 +232,7 @@ Signed-off-by: David S. Miller mt7530_setup_mdio_irq(struct mt7530_priv *priv) { struct dsa_switch *ds = priv->ds; -@@ -2070,8 +2111,15 @@ mt7530_setup_irq(struct mt7530_priv *pri +@@ -2231,8 +2272,15 @@ mt7530_setup_irq(struct mt7530_priv *pri return priv->irq ? : -EINVAL; } @@ -250,7 +250,7 @@ Signed-off-by: David S. Miller if (!priv->irq_domain) { dev_err(dev, "failed to create IRQ domain\n"); return -ENOMEM; -@@ -2566,6 +2614,25 @@ static void mt7531_mac_port_get_caps(str +@@ -2727,6 +2775,25 @@ static void mt7531_mac_port_get_caps(str } } @@ -276,7 +276,7 @@ Signed-off-by: David S. Miller static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -2642,6 +2709,17 @@ static bool mt753x_is_mac_port(u32 port) +@@ -2803,6 +2870,17 @@ static bool mt753x_is_mac_port(u32 port) } static int @@ -294,7 +294,7 @@ Signed-off-by: David S. Miller mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2711,7 +2789,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2872,7 +2950,8 @@ mt753x_phylink_mac_config(struct dsa_swi switch (port) { case 0 ... 4: /* Internal phy */ @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller goto unsupported; break; case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */ -@@ -2789,7 +2868,8 @@ static void mt753x_phylink_mac_link_up(s +@@ -2950,7 +3029,8 @@ static void mt753x_phylink_mac_link_up(s /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ @@ -314,7 +314,7 @@ Signed-off-by: David S. Miller (phy_interface_mode_is_8023z(interface))) { speed = SPEED_1000; duplex = DUPLEX_FULL; -@@ -2869,6 +2949,21 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3030,6 +3110,21 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -336,7 +336,7 @@ Signed-off-by: David S. Miller static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { -@@ -3014,6 +3109,27 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3175,6 +3270,27 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -364,7 +364,7 @@ Signed-off-by: David S. Miller const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, -@@ -3082,6 +3198,17 @@ const struct mt753x_info mt753x_table[] +@@ -3243,6 +3359,17 @@ const struct mt753x_info mt753x_table[] .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, }, @@ -407,7 +407,7 @@ Signed-off-by: David S. Miller MT7531_MIRROR_MASK : MIRROR_MASK) /* Registers for BPDU and PAE frame control*/ -@@ -322,9 +323,8 @@ enum mt7530_vlan_port_acc_frm { +@@ -327,9 +328,8 @@ enum mt7530_vlan_port_acc_frm { MT7531_FORCE_DPX | \ MT7531_FORCE_RX_FC | \ MT7531_FORCE_TX_FC) diff --git a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch index 071680f100d223..49ac8d9780a05a 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch @@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski } --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3076,6 +3076,12 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3237,6 +3237,12 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -768,10 +768,10 @@ struct mt753x_info { +@@ -773,10 +773,10 @@ struct mt753x_info { * registers * @p6_interface Holding the current port 6 interface * @p5_intf_sel: Holding the current port 5 interface select @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski */ struct mt7530_priv { struct device *dev; -@@ -790,7 +790,6 @@ struct mt7530_priv { +@@ -795,7 +795,6 @@ struct mt7530_priv { unsigned int p5_intf_sel; u8 mirror_rx; u8 mirror_tx; @@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_port ports[MT7530_NUM_PORTS]; struct mt753x_pcs pcs[MT7530_NUM_PORTS]; /* protect among processes for registers access*/ -@@ -798,6 +797,7 @@ struct mt7530_priv { +@@ -803,6 +802,7 @@ struct mt7530_priv { int irq; struct irq_domain *irq_domain; u32 irq_enable; diff --git a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch index b17196d3a9007a..8b1e70bd0edebb 100644 --- a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch +++ b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau for (i = sizeof(struct ipt_entry); i < e->target_offset; i += m->u.match_size) { -@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent +@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent compat_uint_t origsize; const struct xt_entry_match *ematch; int ret = 0; diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch index f10fa057d57f21..9ae65b87111346 100644 --- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch +++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch @@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2467,7 +2467,7 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2628,7 +2628,7 @@ mt7531_setup(struct dsa_switch *ds) struct mt7530_priv *priv = ds->priv; struct mt7530_dummy_poll p; u32 val, id; @@ -24,7 +24,7 @@ Signed-off-by: Alexander Couzens /* Reset whole chip through gpio pin or memory-mapped registers for * different type of hardware -@@ -2499,6 +2499,10 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2660,6 +2660,10 @@ mt7531_setup(struct dsa_switch *ds) return -ENODEV; } diff --git a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch index b0c01853350653..06546b79e32313 100644 --- a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch +++ b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch @@ -16,7 +16,7 @@ Signed-off-by: David Bauer --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2174,10 +2174,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr +@@ -2335,10 +2335,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr { struct dsa_switch *ds = priv->ds; struct device *dev = priv->dev; @@ -30,7 +30,7 @@ Signed-off-by: David Bauer bus = devm_mdiobus_alloc(dev); if (!bus) return -ENOMEM; -@@ -2194,7 +2197,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr +@@ -2355,7 +2358,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr if (priv->irq) mt7530_setup_mdio_irq(priv); diff --git a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch index 0f97033db65633..a3e3f1185a8247 100644 --- a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch +++ b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch @@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2877,8 +2877,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -3038,8 +3038,7 @@ static void mt753x_phylink_mac_link_up(s /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ diff --git a/target/linux/x86/config-5.15 b/target/linux/x86/config-5.15 index dc37973ac45a79..253c6de7e41343 100644 --- a/target/linux/x86/config-5.15 +++ b/target/linux/x86/config-5.15 @@ -225,6 +225,7 @@ CONFIG_MICROCODE_INTEL=y CONFIG_MICROCODE_LATE_LOADING=y CONFIG_MIGRATION=y CONFIG_MITIGATION_RFDS=y +CONFIG_MITIGATION_SPECTRE_BHI=y # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MK8 is not set @@ -328,9 +329,6 @@ CONFIG_SG_POOL=y # CONFIG_SMSC_SCH311X_WDT is not set CONFIG_SPARSEMEM_STATIC=y CONFIG_SPARSE_IRQ=y -# CONFIG_SPECTRE_BHI_AUTO is not set -# CONFIG_SPECTRE_BHI_OFF is not set -CONFIG_SPECTRE_BHI_ON=y CONFIG_SPECULATION_MITIGATIONS=y CONFIG_SRCU=y # CONFIG_STATIC_CALL_SELFTEST is not set From 438e593f221fb59f12bfa6252bdf5eaffa4169e1 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 28 Apr 2024 21:35:55 +0200 Subject: [PATCH 13/20] kernel: bump 5.15 to 5.15.157 Removed because they are upstream: generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=d06977b9a4109f8738bb276125eb6a0b772bc433 Removed because they are upstream: generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e719b52d0c56989b0f3475a03a6d64f182c85b56 Manual adapted the following patches: generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch Signed-off-by: Hauke Mehrtens (cherry picked from commit 84d0b0b925997f8c2d1a21a60c79f76d3070ae3e) --- include/kernel-5.15 | 4 +- ...core_get_rate_recalc-in-clk_rate_get.patch | 2 +- ...40-clk-Always-clamp-the-rounded-rate.patch | 2 +- ...clamp-instead-of-open-coding-our-own.patch | 2 +- ...s-set-the-rate-on-clk_set_range_rate.patch | 2 +- ...7-clk-Drop-the-rate-range-on-clk_put.patch | 8 ++-- ...count-uncached-clocks-in-clk_set_rat.patch | 4 +- ...0846-clk-Set-req_rate-on-reparenting.patch | 4 +- ...et_rate_range-if-our-clock-is-orphan.patch | 2 +- ...est-boundaries-in-clk_core_init_rate.patch | 8 ++-- ...nge-clk_core_init_rate_req-prototype.patch | 6 +-- ...k-Introduce-clk_hw_init_rate_request.patch | 2 +- ...missing-clk_core_init_rate_req-calls.patch | 6 +-- ...edundant-clk_core_init_rate_req-call.patch | 2 +- ...__clk_determine_rate-to-clk_core_rou.patch | 6 +-- ...54-clk-Introduce-clk_core_has_parent.patch | 4 +- ...ding-clk_rate_requests-to-the-parent.patch | 12 +++--- ...-Zero-the-clk_rate_request-structure.patch | 2 +- ...the-clock-pointer-in-clk_hw_get_name.patch | 2 +- .../950-0865-clk-Add-clk_get_rate_range.patch | 2 +- ...lk-Add-locking-to-clk_get_rate_range.patch | 2 +- ...uce-tagger-owned-storage-for-private.patch | 12 +++--- ...ocols-connect-to-individual-switches.patch | 10 ++--- ...terate-using-dsa_switch_for_each_use.patch | 4 +- ...opulate-supported_interfaces-and-mac.patch | 18 ++++----- ...t-dsa-mt7530-remove-interface-checks.patch | 18 ++++----- ...rop-use-of-phylink_helper_basex_spee.patch | 2 +- ...nly-indicate-linkmodes-that-can-be-s.patch | 8 ++-- ...-switch-to-use-phylink_get_linkmodes.patch | 12 +++--- ...530-partially-convert-to-phylink_pcs.patch | 38 +++++++++---------- ...ove-autoneg-handling-to-PCS-validati.patch | 6 +-- ...19-net-dsa-mt7530-mark-as-non-legacy.patch | 2 +- ...mt753x-fix-pcs-conversion-regression.patch | 4 +- ...t7530-rework-mt7530_hw_vlan_-add-del.patch | 6 +-- ...et-cpu-port-via-dp-cpu_dp-instead-of.patch | 16 ++++---- ...l_mutex-when-calling-dsa_master_-set.patch | 6 +-- ...t-up-shared-ports-then-non-shared-po.patch | 8 ++-- ...xt-net-dsa-setup-master-before-ports.patch | 10 ++--- ...switch-operations-for-tracking-the-m.patch | 4 +- ...aster-state-events-in-dsa_tree_-setu.patch | 4 +- ...-add-support-for-in-band-link-status.patch | 14 +++---- ...t-dsa-mt7530-use-external-PCS-driver.patch | 24 ++++++------ ...a-mt7530-refactor-SGMII-PCS-creation.patch | 4 +- ...mt7530-use-unlocked-regmap-accessors.patch | 6 +-- ...se-regmap-to-access-switch-register-.patch | 14 +++---- ...ove-SGMII-PCS-creation-to-mt7530_pro.patch | 6 +-- ...t-dsa-mt7530-introduce-mutex-helpers.patch | 28 +++++++------- ...ove-p5_intf_modes-function-to-mt7530.patch | 4 +- ...ntroduce-mt7530_probe_common-helper-.patch | 6 +-- ...ntroduce-mt7530_remove_common-helper.patch | 4 +- ...t7530-introduce-separate-MDIO-driver.patch | 16 ++++---- ...ntroduce-driver-for-MT7988-built-in-.patch | 24 ++++++------ ...-dsa-mt7530-fix-support-for-MT7531BE.patch | 8 ++-- target/linux/generic/config-5.15 | 1 + .../hack-5.15/250-netfilter_depends.patch | 2 +- ...-netfilter-add-xt_FLOWOFFLOAD-target.patch | 9 +++-- .../780-usb-net-MeigLink_modem_support.patch | 4 +- ...ge_allow_receiption_on_disabled_port.patch | 4 +- ...ow_offload-handle-netdevice-events-f.patch | 32 +++++++++------- ...les-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- ...d-knob-for-filtering-rx-tx-BPDU-pack.patch | 2 +- ...e-all-MACs-are-powered-down-before-r.patch | 11 +----- ...gister-OF-node-for-internal-MDIO-bus.patch | 4 +- ...-fix-10M-100M-speed-on-MT7988-switch.patch | 2 +- .../pending-5.15/920-mangle_bootargs.patch | 2 +- ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- ...ootwrapper-disable-uImage-generation.patch | 2 +- ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- 69 files changed, 255 insertions(+), 258 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 5436913e0500a1..3289f828befc94 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .156 -LINUX_KERNEL_HASH-5.15.156 = 9f0465d14c93691056f5f94de647601f94f083ad8ce2e5d306564394b13e7778 +LINUX_VERSION-5.15 = .157 +LINUX_KERNEL_HASH-5.15.157 = aff22351d34d69a16762dcf1fd51fe228da55d4b96b67247bdd598a86cc7a414 diff --git a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch b/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch index 5b69d0cbc16279..3a181e210fc3c8 100644 --- a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch +++ b/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch @@ -18,7 +18,7 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -3145,7 +3145,10 @@ static int clk_rate_get(void *data, u64 +@@ -3235,7 +3235,10 @@ static int clk_rate_get(void *data, u64 { struct clk_core *core = data; diff --git a/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch b/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch index 500aefa59480f3..7bf3a5a3e36b31 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch @@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1360,6 +1360,8 @@ static int clk_core_determine_round_nolo +@@ -1450,6 +1450,8 @@ static int clk_core_determine_round_nolo if (!core) return 0; diff --git a/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch b/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch index 3566dcc31cc2f1..2612e960ed1b4d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch @@ -18,7 +18,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -2400,11 +2400,7 @@ int clk_set_rate_range(struct clk *clk, +@@ -2490,11 +2490,7 @@ int clk_set_rate_range(struct clk *clk, * this corner case when determining the rate */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch b/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch index bdadf135ebdc37..2d9af25a3e8a33 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch @@ -30,7 +30,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -2385,28 +2385,29 @@ int clk_set_rate_range(struct clk *clk, +@@ -2475,28 +2475,29 @@ int clk_set_rate_range(struct clk *clk, goto out; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch b/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch index c1e4769463398d..e37e116f903dad 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch @@ -29,7 +29,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -2344,19 +2344,15 @@ int clk_set_rate_exclusive(struct clk *c +@@ -2434,19 +2434,15 @@ int clk_set_rate_exclusive(struct clk *c } EXPORT_SYMBOL_GPL(clk_set_rate_exclusive); @@ -54,7 +54,7 @@ Signed-off-by: Maxime Ripard if (!clk) return 0; -@@ -2369,8 +2365,6 @@ int clk_set_rate_range(struct clk *clk, +@@ -2459,8 +2455,6 @@ int clk_set_rate_range(struct clk *clk, return -EINVAL; } @@ -63,7 +63,7 @@ Signed-off-by: Maxime Ripard if (clk->exclusive_count) clk_core_rate_unprotect(clk->core); -@@ -2414,6 +2408,28 @@ out: +@@ -2504,6 +2498,28 @@ out: if (clk->exclusive_count) clk_core_rate_protect(clk->core); @@ -92,7 +92,7 @@ Signed-off-by: Maxime Ripard clk_prepare_unlock(); return ret; -@@ -4376,9 +4392,10 @@ void __clk_put(struct clk *clk) +@@ -4466,9 +4482,10 @@ void __clk_put(struct clk *clk) } hlist_del(&clk->clks_node); diff --git a/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch b/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch index e2079c7ccf499a..51079d680285f7 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch @@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -2379,6 +2379,10 @@ static int clk_set_rate_range_nolock(str +@@ -2469,6 +2469,10 @@ static int clk_set_rate_range_nolock(str goto out; } @@ -33,7 +33,7 @@ Signed-off-by: Maxime Ripard /* * Since the boundaries have been changed, let's give the * opportunity to the provider to adjust the clock rate based on -@@ -2396,7 +2400,7 @@ static int clk_set_rate_range_nolock(str +@@ -2486,7 +2490,7 @@ static int clk_set_rate_range_nolock(str * - the determine_rate() callback does not really check for * this corner case when determining the rate */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch b/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch index 4ceb0ac5c245db..4a6272c33728c0 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch @@ -23,7 +23,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1771,6 +1771,23 @@ static void clk_core_update_orphan_statu +@@ -1861,6 +1861,23 @@ static void clk_core_update_orphan_statu clk_core_update_orphan_status(child, is_orphan); } @@ -47,7 +47,7 @@ Signed-off-by: Maxime Ripard static void clk_reparent(struct clk_core *core, struct clk_core *new_parent) { bool was_orphan = core->orphan; -@@ -1795,6 +1812,7 @@ static void clk_reparent(struct clk_core +@@ -1885,6 +1902,7 @@ static void clk_reparent(struct clk_core } core->parent = new_parent; diff --git a/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch b/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch index 39fda5ceb31459..7907b3949ca948 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch @@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -2401,6 +2401,12 @@ static int clk_set_rate_range_nolock(str +@@ -2491,6 +2491,12 @@ static int clk_set_rate_range_nolock(str if (clk->core->flags & CLK_GET_RATE_NOCACHE) rate = clk_core_get_rate_recalc(clk->core); diff --git a/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch b/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch index 0de557f95f5f23..6e329e657638b5 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch @@ -26,7 +26,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1394,6 +1394,8 @@ static void clk_core_init_rate_req(struc +@@ -1484,6 +1484,8 @@ static void clk_core_init_rate_req(struc if (WARN_ON(!core || !req)) return; @@ -35,7 +35,7 @@ Signed-off-by: Maxime Ripard parent = core->parent; if (parent) { req->best_parent_hw = parent->hw; -@@ -1468,7 +1470,6 @@ unsigned long clk_hw_round_rate(struct c +@@ -1558,7 +1560,6 @@ unsigned long clk_hw_round_rate(struct c int ret; struct clk_rate_request req; @@ -43,7 +43,7 @@ Signed-off-by: Maxime Ripard req.rate = rate; ret = clk_core_round_rate_nolock(hw->core, &req); -@@ -1501,7 +1502,6 @@ long clk_round_rate(struct clk *clk, uns +@@ -1591,7 +1592,6 @@ long clk_round_rate(struct clk *clk, uns if (clk->exclusive_count) clk_core_rate_unprotect(clk->core); @@ -51,7 +51,7 @@ Signed-off-by: Maxime Ripard req.rate = rate; ret = clk_core_round_rate_nolock(clk->core, &req); -@@ -2008,8 +2008,6 @@ static struct clk_core *clk_calc_new_rat +@@ -2098,8 +2098,6 @@ static struct clk_core *clk_calc_new_rat struct clk_rate_request req; req.rate = rate; diff --git a/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch b/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch index c13d5bfcb32916..dbe50d62eddf74 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1387,13 +1387,15 @@ static int clk_core_determine_round_nolo +@@ -1477,13 +1477,15 @@ static int clk_core_determine_round_nolo } static void clk_core_init_rate_req(struct clk_core * const core, @@ -36,7 +36,7 @@ Signed-off-by: Maxime Ripard clk_core_get_boundaries(core, &req->min_rate, &req->max_rate); parent = core->parent; -@@ -1421,7 +1423,7 @@ static int clk_core_round_rate_nolock(st +@@ -1511,7 +1513,7 @@ static int clk_core_round_rate_nolock(st return 0; } @@ -45,7 +45,7 @@ Signed-off-by: Maxime Ripard if (clk_core_can_round(core)) return clk_core_determine_round_nolock(core, req); -@@ -2007,9 +2009,7 @@ static struct clk_core *clk_calc_new_rat +@@ -2097,9 +2099,7 @@ static struct clk_core *clk_calc_new_rat if (clk_core_can_round(core)) { struct clk_rate_request req; diff --git a/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch b/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch index d853edc5f1394a..bba2843e8347db 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch @@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1408,6 +1408,26 @@ static void clk_core_init_rate_req(struc +@@ -1498,6 +1498,26 @@ static void clk_core_init_rate_req(struc } } diff --git a/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch b/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch index 272be33449e290..8e86600001167e 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1492,7 +1492,7 @@ unsigned long clk_hw_round_rate(struct c +@@ -1582,7 +1582,7 @@ unsigned long clk_hw_round_rate(struct c int ret; struct clk_rate_request req; @@ -28,7 +28,7 @@ Signed-off-by: Maxime Ripard ret = clk_core_round_rate_nolock(hw->core, &req); if (ret) -@@ -1524,7 +1524,7 @@ long clk_round_rate(struct clk *clk, uns +@@ -1614,7 +1614,7 @@ long clk_round_rate(struct clk *clk, uns if (clk->exclusive_count) clk_core_rate_unprotect(clk->core); @@ -37,7 +37,7 @@ Signed-off-by: Maxime Ripard ret = clk_core_round_rate_nolock(clk->core, &req); -@@ -2228,8 +2228,7 @@ static unsigned long clk_core_req_round_ +@@ -2318,8 +2318,7 @@ static unsigned long clk_core_req_round_ if (cnt < 0) return cnt; diff --git a/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch b/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch index 4e92444f397dbc..93cbc1a8ed4cec 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch @@ -23,7 +23,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1443,8 +1443,6 @@ static int clk_core_round_rate_nolock(st +@@ -1533,8 +1533,6 @@ static int clk_core_round_rate_nolock(st return 0; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch b/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch index 070b7f411ddb3e..ec32920c9305b6 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch @@ -24,7 +24,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -556,6 +556,9 @@ static bool mux_is_better_rate(unsigned +@@ -644,6 +644,9 @@ static bool mux_is_better_rate(unsigned return now <= rate && now > best; } @@ -34,7 +34,7 @@ Signed-off-by: Maxime Ripard int clk_mux_determine_rate_flags(struct clk_hw *hw, struct clk_rate_request *req, unsigned long flags) -@@ -569,8 +572,12 @@ int clk_mux_determine_rate_flags(struct +@@ -657,8 +660,12 @@ int clk_mux_determine_rate_flags(struct if (core->flags & CLK_SET_RATE_NO_REPARENT) { parent = core->parent; if (core->flags & CLK_SET_RATE_PARENT) { @@ -49,7 +49,7 @@ Signed-off-by: Maxime Ripard if (ret) return ret; -@@ -593,7 +600,7 @@ int clk_mux_determine_rate_flags(struct +@@ -681,7 +688,7 @@ int clk_mux_determine_rate_flags(struct if (core->flags & CLK_SET_RATE_PARENT) { parent_req = *req; diff --git a/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch b/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch index caae3618fff503..341ee438351b0c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch @@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -559,6 +559,26 @@ static bool mux_is_better_rate(unsigned +@@ -647,6 +647,26 @@ static bool mux_is_better_rate(unsigned static int clk_core_round_rate_nolock(struct clk_core *core, struct clk_rate_request *req); @@ -47,7 +47,7 @@ Signed-off-by: Maxime Ripard int clk_mux_determine_rate_flags(struct clk_hw *hw, struct clk_rate_request *req, unsigned long flags) -@@ -2582,25 +2602,11 @@ void clk_hw_reparent(struct clk_hw *hw, +@@ -2672,25 +2692,11 @@ void clk_hw_reparent(struct clk_hw *hw, */ bool clk_has_parent(struct clk *clk, struct clk *parent) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch b/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch index 999b38a9a241d8..19179b9244368b 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch @@ -35,7 +35,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -556,6 +556,10 @@ static bool mux_is_better_rate(unsigned +@@ -644,6 +644,10 @@ static bool mux_is_better_rate(unsigned return now <= rate && now > best; } @@ -46,7 +46,7 @@ Signed-off-by: Maxime Ripard static int clk_core_round_rate_nolock(struct clk_core *core, struct clk_rate_request *req); -@@ -579,6 +583,24 @@ static bool clk_core_has_parent(struct c +@@ -667,6 +671,24 @@ static bool clk_core_has_parent(struct c return false; } @@ -71,7 +71,7 @@ Signed-off-by: Maxime Ripard int clk_mux_determine_rate_flags(struct clk_hw *hw, struct clk_rate_request *req, unsigned long flags) -@@ -586,17 +608,19 @@ int clk_mux_determine_rate_flags(struct +@@ -674,17 +696,19 @@ int clk_mux_determine_rate_flags(struct struct clk_core *core = hw->core, *parent, *best_parent = NULL; int i, num_parents, ret; unsigned long best = 0; @@ -92,7 +92,7 @@ Signed-off-by: Maxime Ripard ret = clk_core_round_rate_nolock(parent, &parent_req); if (ret) return ret; -@@ -614,23 +638,29 @@ int clk_mux_determine_rate_flags(struct +@@ -702,23 +726,29 @@ int clk_mux_determine_rate_flags(struct /* find the parent that can provide the fastest rate <= rate */ num_parents = core->num_parents; for (i = 0; i < num_parents; i++) { @@ -126,7 +126,7 @@ Signed-off-by: Maxime Ripard } } -@@ -1463,6 +1493,8 @@ static bool clk_core_can_round(struct cl +@@ -1553,6 +1583,8 @@ static bool clk_core_can_round(struct cl static int clk_core_round_rate_nolock(struct clk_core *core, struct clk_rate_request *req) { @@ -135,7 +135,7 @@ Signed-off-by: Maxime Ripard lockdep_assert_held(&prepare_lock); if (!core) { -@@ -1472,8 +1504,20 @@ static int clk_core_round_rate_nolock(st +@@ -1562,8 +1594,20 @@ static int clk_core_round_rate_nolock(st if (clk_core_can_round(core)) return clk_core_determine_round_nolock(core, req); diff --git a/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch b/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch index ec18c47ba5990e..f30a847b7ae82d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch @@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1452,6 +1452,8 @@ static void clk_core_init_rate_req(struc +@@ -1542,6 +1542,8 @@ static void clk_core_init_rate_req(struc if (WARN_ON(!core || !req)) return; diff --git a/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch b/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch index a066246b607d64..61b478ccba5b9b 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch @@ -18,7 +18,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -280,7 +280,7 @@ EXPORT_SYMBOL_GPL(__clk_get_name); +@@ -368,7 +368,7 @@ EXPORT_SYMBOL_GPL(__clk_get_name); const char *clk_hw_get_name(const struct clk_hw *hw) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch b/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch index e6dd166718f76d..d790531d6982a0 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch @@ -28,7 +28,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -2589,6 +2589,24 @@ int clk_set_max_rate(struct clk *clk, un +@@ -2679,6 +2679,24 @@ int clk_set_max_rate(struct clk *clk, un EXPORT_SYMBOL_GPL(clk_set_max_rate); /** diff --git a/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch b/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch index 5284e83d637834..50951007e0d969 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch @@ -13,7 +13,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -2602,7 +2602,9 @@ void clk_get_rate_range(struct clk *clk, +@@ -2692,7 +2692,9 @@ void clk_get_rate_range(struct clk *clk, if (!clk || !min || !max) return; diff --git a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch index f56a9685895691..8e5c7180424eeb 100644 --- a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch +++ b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch @@ -124,7 +124,7 @@ Signed-off-by: David S. Miller list_del(&dst->list); kfree(dst); } -@@ -805,7 +809,7 @@ static int dsa_switch_setup_tag_protocol +@@ -827,7 +831,7 @@ static int dsa_switch_setup_tag_protocol int port, err; if (tag_ops->proto == dst->default_proto) @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller for (port = 0; port < ds->num_ports; port++) { if (!dsa_is_cpu_port(ds, port)) -@@ -821,6 +825,17 @@ static int dsa_switch_setup_tag_protocol +@@ -843,6 +847,17 @@ static int dsa_switch_setup_tag_protocol } } @@ -151,7 +151,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1132,6 +1147,46 @@ static void dsa_tree_teardown(struct dsa +@@ -1154,6 +1169,46 @@ static void dsa_tree_teardown(struct dsa dst->setup = false; } @@ -198,7 +198,7 @@ Signed-off-by: David S. Miller /* Since the dsa/tagging sysfs device attribute is per master, the assumption * is that all DSA switches within a tree share the same tagger, otherwise * they would have formed disjoint trees (different "dsa,member" values). -@@ -1164,12 +1219,15 @@ int dsa_tree_change_tag_proto(struct dsa +@@ -1186,12 +1241,15 @@ int dsa_tree_change_tag_proto(struct dsa goto out_unlock; } @@ -216,7 +216,7 @@ Signed-off-by: David S. Miller rtnl_unlock(); -@@ -1257,6 +1315,7 @@ static int dsa_port_parse_cpu(struct dsa +@@ -1279,6 +1337,7 @@ static int dsa_port_parse_cpu(struct dsa struct dsa_switch *ds = dp->ds; struct dsa_switch_tree *dst = ds->dst; enum dsa_tag_protocol default_proto; @@ -224,7 +224,7 @@ Signed-off-by: David S. Miller /* Find out which protocol the switch would prefer. */ default_proto = dsa_get_tag_protocol(dp, master); -@@ -1311,6 +1370,12 @@ static int dsa_port_parse_cpu(struct dsa +@@ -1333,6 +1392,12 @@ static int dsa_port_parse_cpu(struct dsa */ dsa_tag_driver_put(tag_ops); } else { diff --git a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch index 0c50ae6fb9de9e..8c81ebc7f50e08 100644 --- a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch +++ b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch @@ -101,7 +101,7 @@ Signed-off-by: David S. Miller list_del(&dst->list); kfree(dst); } -@@ -826,17 +822,29 @@ static int dsa_switch_setup_tag_protocol +@@ -848,17 +844,29 @@ static int dsa_switch_setup_tag_protocol } connect: @@ -132,7 +132,7 @@ Signed-off-by: David S. Miller } static int dsa_switch_setup(struct dsa_switch *ds) -@@ -1156,13 +1164,6 @@ static int dsa_tree_bind_tag_proto(struc +@@ -1178,13 +1186,6 @@ static int dsa_tree_bind_tag_proto(struc dst->tag_ops = tag_ops; @@ -146,7 +146,7 @@ Signed-off-by: David S. Miller /* Notify the switches from this tree about the connection * to the new tagger */ -@@ -1172,16 +1173,14 @@ static int dsa_tree_bind_tag_proto(struc +@@ -1194,16 +1195,14 @@ static int dsa_tree_bind_tag_proto(struc goto out_disconnect; /* Notify the old tagger about the disconnection from this tree */ @@ -167,7 +167,7 @@ Signed-off-by: David S. Miller dst->tag_ops = old_tag_ops; return err; -@@ -1315,7 +1314,6 @@ static int dsa_port_parse_cpu(struct dsa +@@ -1337,7 +1336,6 @@ static int dsa_port_parse_cpu(struct dsa struct dsa_switch *ds = dp->ds; struct dsa_switch_tree *dst = ds->dst; enum dsa_tag_protocol default_proto; @@ -175,7 +175,7 @@ Signed-off-by: David S. Miller /* Find out which protocol the switch would prefer. */ default_proto = dsa_get_tag_protocol(dp, master); -@@ -1370,12 +1368,6 @@ static int dsa_port_parse_cpu(struct dsa +@@ -1392,12 +1390,6 @@ static int dsa_port_parse_cpu(struct dsa */ dsa_tag_driver_put(tag_ops); } else { diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch index bdb4a8315ac61d..f65b0cafa858bf 100644 --- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch +++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1404,27 +1404,31 @@ static int +@@ -1425,27 +1425,31 @@ static int mt7530_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *bridge) { @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski } /* Add the all other ports to this port matrix. */ -@@ -1529,24 +1533,28 @@ static void +@@ -1550,24 +1554,28 @@ static void mt7530_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *bridge) { diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch index 3f5b953a2a5a87..e04bb11e80a6fe 100644 --- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch +++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2660,6 +2660,32 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2687,6 +2687,32 @@ mt7531_setup(struct dsa_switch *ds) return 0; } @@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni static bool mt7530_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -2696,6 +2722,37 @@ static bool mt7531_is_rgmii_port(struct +@@ -2723,6 +2749,37 @@ static bool mt7531_is_rgmii_port(struct return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); } @@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -3172,6 +3229,18 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3199,6 +3256,18 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, unsigned long *supported) -@@ -3407,6 +3476,7 @@ static const struct dsa_switch_ops mt753 +@@ -3435,6 +3504,7 @@ static const struct dsa_switch_ops mt753 .port_vlan_del = mt7530_port_vlan_del, .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .phylink_validate = mt753x_phylink_validate, .phylink_mac_link_state = mt753x_phylink_mac_link_state, .phylink_mac_config = mt753x_phylink_mac_config, -@@ -3424,6 +3494,7 @@ static const struct mt753x_info mt753x_t +@@ -3452,6 +3522,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3435,6 +3506,7 @@ static const struct mt753x_info mt753x_t +@@ -3463,6 +3534,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3447,6 +3519,7 @@ static const struct mt753x_info mt753x_t +@@ -3475,6 +3547,7 @@ static const struct mt753x_info mt753x_t .phy_write = mt7531_ind_phy_write, .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, @@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7531_phy_mode_supported, .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, -@@ -3509,6 +3582,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3537,6 +3610,7 @@ mt7530_probe(struct mdio_device *mdiodev */ if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || @@ -155,7 +155,7 @@ Signed-off-by: Paolo Abeni !priv->info->mac_port_get_state || !priv->info->mac_port_config) --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -801,6 +801,8 @@ struct mt753x_info { +@@ -807,6 +807,8 @@ struct mt753x_info { int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val); int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface); int (*cpu_port_config)(struct dsa_switch *ds, int port); diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch index 60634aa0d9c92e..31be0e7be346df 100644 --- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch +++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch @@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2686,37 +2686,6 @@ static void mt7530_mac_port_get_caps(str +@@ -2713,37 +2713,6 @@ static void mt7530_mac_port_get_caps(str } } @@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port) { return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); -@@ -2753,44 +2722,6 @@ static void mt7531_mac_port_get_caps(str +@@ -2780,44 +2749,6 @@ static void mt7531_mac_port_get_caps(str } } @@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -3045,9 +2976,6 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -3072,9 +3003,6 @@ mt753x_phylink_mac_config(struct dsa_swi struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; @@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni switch (port) { case 0 ... 4: /* Internal phy */ if (state->interface != PHY_INTERFACE_MODE_GMII) -@@ -3263,12 +3191,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3290,12 +3218,6 @@ mt753x_phylink_validate(struct dsa_switc __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; struct mt7530_priv *priv = ds->priv; @@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni phylink_set_port_modes(mask); if (state->interface != PHY_INTERFACE_MODE_TRGMII && -@@ -3495,7 +3417,6 @@ static const struct mt753x_info mt753x_t +@@ -3523,7 +3445,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3507,7 +3428,6 @@ static const struct mt753x_info mt753x_t +@@ -3535,7 +3456,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3520,7 +3440,6 @@ static const struct mt753x_info mt753x_t +@@ -3548,7 +3468,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, -@@ -3583,7 +3502,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3611,7 +3530,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || @@ -161,7 +161,7 @@ Signed-off-by: Paolo Abeni return -EINVAL; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -803,8 +803,6 @@ struct mt753x_info { +@@ -809,8 +809,6 @@ struct mt753x_info { int (*cpu_port_config)(struct dsa_switch *ds, int port); void (*mac_port_get_caps)(struct dsa_switch *ds, int port, struct phylink_config *config); diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch index f98cf4c793add5..2a5d5ae9d909cb 100644 --- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch +++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3215,11 +3215,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3242,11 +3242,6 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch index a499b8e5b10606..ad672312e4835c 100644 --- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch +++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2793,12 +2793,13 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2820,12 +2820,13 @@ static int mt7531_rgmii_setup(struct mt7 } static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port, @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni phylink_set(supported, 2500baseX_Full); phylink_set(supported, 2500baseT_Full); } -@@ -3171,16 +3172,18 @@ static void mt753x_phylink_get_caps(stru +@@ -3198,16 +3199,18 @@ static void mt753x_phylink_get_caps(stru static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, @@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -3203,12 +3206,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3230,12 +3233,13 @@ mt753x_phylink_validate(struct dsa_switc } /* This switch only supports 1G full-duplex. */ @@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni phylink_set(mask, Asym_Pause); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -804,6 +804,7 @@ struct mt753x_info { +@@ -810,6 +810,7 @@ struct mt753x_info { void (*mac_port_get_caps)(struct dsa_switch *ds, int port, struct phylink_config *config); void (*mac_port_validate)(struct dsa_switch *ds, int port, diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch index b7fc06106038c5..8d9802f1ee450e 100644 --- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch +++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2792,19 +2792,6 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2819,19 +2819,6 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni static void mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, -@@ -3171,51 +3158,21 @@ static void mt753x_phylink_get_caps(stru +@@ -3198,51 +3185,21 @@ static void mt753x_phylink_get_caps(stru } static void @@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); -@@ -3416,7 +3373,6 @@ static const struct mt753x_info mt753x_t +@@ -3444,7 +3401,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3427,7 +3383,6 @@ static const struct mt753x_info mt753x_t +@@ -3455,7 +3411,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3439,7 +3394,6 @@ static const struct mt753x_info mt753x_t +@@ -3467,7 +3422,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, .mac_pcs_an_restart = mt7531_sgmii_restart_an, -@@ -3501,7 +3455,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3529,7 +3483,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch index 7afa5be3d4e1b0..149c12c1fb7697 100644 --- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch +++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch @@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni /* String, offset, and register size in bytes if different from 4 bytes */ static const struct mt7530_mib_desc mt7530_mib[] = { MIB_DESC(1, 0x00, "TxDrop"), -@@ -2792,12 +2797,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2819,12 +2824,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni unsigned int val; /* For adjusting speed and duplex of SGMII force mode. */ -@@ -2823,6 +2827,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw +@@ -2850,6 +2854,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw /* MT7531 SGMII 1G force mode can only work in full duplex mode, * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not. @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni */ if ((speed == SPEED_10 || speed == SPEED_100) && duplex != DUPLEX_FULL) -@@ -2898,9 +2905,10 @@ static int mt7531_sgmii_setup_mode_an(st +@@ -2925,9 +2932,10 @@ static int mt7531_sgmii_setup_mode_an(st return 0; } @@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni u32 val; /* Only restart AN when AN is enabled */ -@@ -2957,6 +2965,24 @@ mt753x_mac_config(struct dsa_switch *ds, +@@ -2984,6 +2992,24 @@ mt753x_mac_config(struct dsa_switch *ds, return priv->info->mac_port_config(ds, port, mode, state->interface); } @@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) -@@ -3018,17 +3044,6 @@ unsupported: +@@ -3045,17 +3071,6 @@ unsupported: mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } @@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -3038,16 +3053,13 @@ static void mt753x_phylink_mac_link_down +@@ -3065,16 +3080,13 @@ static void mt753x_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni } static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, -@@ -3060,8 +3072,6 @@ static void mt753x_phylink_mac_link_up(s +@@ -3087,8 +3099,6 @@ static void mt753x_phylink_mac_link_up(s struct mt7530_priv *priv = ds->priv; u32 mcr; @@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; /* MT753x MAC works in 1G full duplex mode for all up-clocked -@@ -3139,6 +3149,8 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3166,6 +3176,8 @@ mt7531_cpu_port_config(struct dsa_switch return ret; mt7530_write(priv, MT7530_PMCR_P(port), PMCR_CPU_PORT_SETTING(priv->id)); @@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL, speed, DUPLEX_FULL, true, true); -@@ -3178,16 +3190,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3205,16 +3217,13 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(state->advertising, state->advertising, mask); } @@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni pmsr = mt7530_read(priv, MT7530_PMSR_P(port)); state->link = (pmsr & PMSR_LINK); -@@ -3214,8 +3223,6 @@ mt7530_phylink_mac_link_state(struct dsa +@@ -3241,8 +3250,6 @@ mt7530_phylink_mac_link_state(struct dsa state->pause |= MLO_PAUSE_RX; if (pmsr & PMSR_TX_FC) state->pause |= MLO_PAUSE_TX; @@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni } static int -@@ -3257,32 +3264,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3284,32 +3291,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni if (ret) return ret; -@@ -3295,6 +3319,13 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3322,6 +3346,13 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni return ret; } -@@ -3356,9 +3387,8 @@ static const struct dsa_switch_ops mt753 +@@ -3384,9 +3415,8 @@ static const struct dsa_switch_ops mt753 .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, .phylink_validate = mt753x_phylink_validate, @@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni .phylink_mac_link_down = mt753x_phylink_mac_link_down, .phylink_mac_link_up = mt753x_phylink_mac_link_up, .get_mac_eee = mt753x_get_mac_eee, -@@ -3368,36 +3398,34 @@ static const struct dsa_switch_ops mt753 +@@ -3396,36 +3426,34 @@ static const struct dsa_switch_ops mt753 static const struct mt753x_info mt753x_table[] = { [ID_MT7621] = { .id = ID_MT7621, @@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni }, }; -@@ -3455,7 +3483,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3483,7 +3511,7 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || @@ -325,7 +325,7 @@ Signed-off-by: Paolo Abeni priv->id = priv->info->id; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -773,6 +773,12 @@ static const char *p5_intf_modes(unsigne +@@ -779,6 +779,12 @@ static const char *p5_intf_modes(unsigne struct mt7530_priv; @@ -338,7 +338,7 @@ Signed-off-by: Paolo Abeni /* struct mt753x_info - This is the main data structure for holding the specific * part for each supported device * @sw_setup: Holding the handler to a device initialization -@@ -784,18 +790,14 @@ struct mt7530_priv; +@@ -790,18 +796,14 @@ struct mt7530_priv; * port * @mac_port_validate: Holding the way to set addition validate type for a * certan MAC port @@ -359,7 +359,7 @@ Signed-off-by: Paolo Abeni int (*sw_setup)(struct dsa_switch *ds); int (*phy_read)(struct mt7530_priv *priv, int port, int regnum); int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val); -@@ -806,15 +808,9 @@ struct mt753x_info { +@@ -812,15 +814,9 @@ struct mt753x_info { void (*mac_port_validate)(struct dsa_switch *ds, int port, phy_interface_t interface, unsigned long *supported); @@ -375,7 +375,7 @@ Signed-off-by: Paolo Abeni }; /* struct mt7530_priv - This is the main data structure for holding the state -@@ -856,6 +852,7 @@ struct mt7530_priv { +@@ -862,6 +858,7 @@ struct mt7530_priv { u8 mirror_tx; struct mt7530_port ports[MT7530_NUM_PORTS]; diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch index 7731c16c96b4b9..6e406ace0d8e54 100644 --- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch +++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3169,25 +3169,16 @@ static void mt753x_phylink_get_caps(stru +@@ -3196,25 +3196,16 @@ static void mt753x_phylink_get_caps(stru priv->info->mac_port_get_caps(ds, port, config); } @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni } static void mt7530_pcs_get_state(struct phylink_pcs *pcs, -@@ -3289,12 +3280,14 @@ static void mt7530_pcs_an_restart(struct +@@ -3316,12 +3307,14 @@ static void mt7530_pcs_an_restart(struct } static const struct phylink_pcs_ops mt7530_pcs_ops = { @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni .pcs_get_state = mt7531_pcs_get_state, .pcs_config = mt753x_pcs_config, .pcs_an_restart = mt7531_pcs_an_restart, -@@ -3386,7 +3379,6 @@ static const struct dsa_switch_ops mt753 +@@ -3414,7 +3407,6 @@ static const struct dsa_switch_ops mt753 .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch index bd35cb1043ec2c..afcfcaba34aa63 100644 --- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch +++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3166,6 +3166,12 @@ static void mt753x_phylink_get_caps(stru +@@ -3193,6 +3193,12 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch index cff22b5eaca89e..bf2938d03b21bb 100644 --- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch +++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3304,9 +3304,16 @@ static int +@@ -3331,9 +3331,16 @@ static int mt753x_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski if (ret) return ret; -@@ -3318,13 +3325,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3345,13 +3352,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch index c9f830381e265b..320b5c1ef9792e 100644 --- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch +++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1750,11 +1750,11 @@ static void +@@ -1771,11 +1771,11 @@ static void mt7530_hw_vlan_add(struct mt7530_priv *priv, struct mt7530_hw_vlan_entry *entry) { @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski /* Validate the entry with independent learning, create egress tag per * VLAN and joining the port as one of the port members. -@@ -1765,22 +1765,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p +@@ -1786,22 +1786,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p /* Decide whether adding tag or not for those outgoing packets from the * port inside the VLAN. @@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski } static void -@@ -1799,11 +1797,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p +@@ -1820,11 +1818,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p return; } diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch index bb36302f24e3df..eef19b4cb53330 100644 --- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch +++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1254,6 +1254,7 @@ static int +@@ -1275,6 +1275,7 @@ static int mt7530_port_enable(struct dsa_switch *ds, int port, struct phy_device *phy) { @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1262,7 +1263,11 @@ mt7530_port_enable(struct dsa_switch *ds +@@ -1283,7 +1284,11 @@ mt7530_port_enable(struct dsa_switch *ds * restore the port matrix if the port is the member of a certain * bridge. */ @@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski priv->ports[port].enable = true; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, priv->ports[port].pm); -@@ -1410,7 +1415,8 @@ mt7530_port_bridge_join(struct dsa_switc +@@ -1431,7 +1436,8 @@ mt7530_port_bridge_join(struct dsa_switc struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1487,9 +1493,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ +@@ -1508,9 +1514,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ * the CPU port get out of VLAN filtering mode. */ if (all_user_ports_removed) { @@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT)); } } -@@ -1539,6 +1548,7 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1560,6 +1569,7 @@ mt7530_port_bridge_leave(struct dsa_swit struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1567,8 +1577,8 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1588,8 +1598,8 @@ mt7530_port_bridge_leave(struct dsa_swit */ if (priv->ports[port].enable) mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski /* When a port is removed from the bridge, the port would be set up * back to the default as is at initial boot which is a VLAN-unaware -@@ -1731,6 +1741,9 @@ static int +@@ -1752,6 +1762,9 @@ static int mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, struct netlink_ext_ack *extack) { @@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski if (vlan_filtering) { /* The port is being kept as VLAN-unaware port when bridge is * set up with vlan_filtering not being set, Otherwise, the -@@ -1738,7 +1751,7 @@ mt7530_port_vlan_filtering(struct dsa_sw +@@ -1759,7 +1772,7 @@ mt7530_port_vlan_filtering(struct dsa_sw * for becoming a VLAN-aware port. */ mt7530_port_set_vlan_aware(ds, port); diff --git a/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch b/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch index e331226fc41d09..dbc28efc949bbb 100644 --- a/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch +++ b/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch @@ -30,7 +30,7 @@ Signed-off-by: David S. Miller --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c -@@ -1034,6 +1034,8 @@ static int dsa_tree_setup_master(struct +@@ -1056,6 +1056,8 @@ static int dsa_tree_setup_master(struct struct dsa_port *dp; int err; @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller list_for_each_entry(dp, &dst->ports, list) { if (dsa_port_is_cpu(dp)) { err = dsa_master_setup(dp->master, dp); -@@ -1042,6 +1044,8 @@ static int dsa_tree_setup_master(struct +@@ -1064,6 +1066,8 @@ static int dsa_tree_setup_master(struct } } @@ -48,7 +48,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1049,9 +1053,13 @@ static void dsa_tree_teardown_master(str +@@ -1071,9 +1075,13 @@ static void dsa_tree_teardown_master(str { struct dsa_port *dp; diff --git a/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch b/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch index e6472c61da67b9..fbb9c94ec14116 100644 --- a/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch +++ b/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch @@ -27,7 +27,7 @@ Signed-off-by: David S. Miller --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c -@@ -999,23 +999,28 @@ static void dsa_tree_teardown_switches(s +@@ -1021,23 +1021,28 @@ static void dsa_tree_teardown_switches(s dsa_switch_teardown(dp->ds); } @@ -66,7 +66,7 @@ Signed-off-by: David S. Miller } } -@@ -1024,7 +1029,21 @@ static int dsa_tree_setup_switches(struc +@@ -1046,7 +1051,21 @@ static int dsa_tree_setup_switches(struc teardown: dsa_tree_teardown_ports(dst); @@ -89,7 +89,7 @@ Signed-off-by: David S. Miller return err; } -@@ -1111,10 +1130,14 @@ static int dsa_tree_setup(struct dsa_swi +@@ -1133,10 +1152,14 @@ static int dsa_tree_setup(struct dsa_swi if (err) goto teardown_cpu_ports; @@ -105,7 +105,7 @@ Signed-off-by: David S. Miller err = dsa_tree_setup_lags(dst); if (err) goto teardown_master; -@@ -1127,8 +1150,9 @@ static int dsa_tree_setup(struct dsa_swi +@@ -1149,8 +1172,9 @@ static int dsa_tree_setup(struct dsa_swi teardown_master: dsa_tree_teardown_master(dst); diff --git a/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch b/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch index 93cad0c98aa080..a46e06ef8b6c2d 100644 --- a/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch +++ b/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c -@@ -545,6 +545,7 @@ static void dsa_port_teardown(struct dsa +@@ -567,6 +567,7 @@ static void dsa_port_teardown(struct dsa struct devlink_port *dlp = &dp->devlink_port; struct dsa_switch *ds = dp->ds; struct dsa_mac_addr *a, *tmp; @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller if (!dp->setup) return; -@@ -566,9 +567,11 @@ static void dsa_port_teardown(struct dsa +@@ -588,9 +589,11 @@ static void dsa_port_teardown(struct dsa dsa_port_link_unregister_of(dp); break; case DSA_PORT_TYPE_USER: @@ -65,7 +65,7 @@ Signed-off-by: David S. Miller } break; } -@@ -1130,17 +1133,17 @@ static int dsa_tree_setup(struct dsa_swi +@@ -1152,17 +1155,17 @@ static int dsa_tree_setup(struct dsa_swi if (err) goto teardown_cpu_ports; @@ -87,7 +87,7 @@ Signed-off-by: David S. Miller dst->setup = true; -@@ -1148,10 +1151,10 @@ static int dsa_tree_setup(struct dsa_swi +@@ -1170,10 +1173,10 @@ static int dsa_tree_setup(struct dsa_swi return 0; @@ -100,7 +100,7 @@ Signed-off-by: David S. Miller teardown_switches: dsa_tree_teardown_switches(dst); teardown_cpu_ports: -@@ -1169,10 +1172,10 @@ static void dsa_tree_teardown(struct dsa +@@ -1191,10 +1194,10 @@ static void dsa_tree_teardown(struct dsa dsa_tree_teardown_lags(dst); diff --git a/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch b/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch index bffdcb28819fbf..15122950ced055 100644 --- a/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch +++ b/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch @@ -68,7 +68,7 @@ Signed-off-by: David S. Miller static inline bool dsa_is_unused_port(struct dsa_switch *ds, int p) { return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_UNUSED; -@@ -949,6 +959,13 @@ struct dsa_switch_ops { +@@ -957,6 +967,13 @@ struct dsa_switch_ops { int (*tag_8021q_vlan_add)(struct dsa_switch *ds, int port, u16 vid, u16 flags); int (*tag_8021q_vlan_del)(struct dsa_switch *ds, int port, u16 vid); @@ -84,7 +84,7 @@ Signed-off-by: David S. Miller #define DSA_DEVLINK_PARAM_DRIVER(_id, _name, _type, _cmodes) \ --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c -@@ -1275,6 +1275,52 @@ out_unlock: +@@ -1297,6 +1297,52 @@ out_unlock: return err; } diff --git a/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch b/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch index 6478d580c01701..c55c5271d4b3e9 100644 --- a/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch +++ b/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller #include "dsa_priv.h" -@@ -1060,9 +1061,18 @@ static int dsa_tree_setup_master(struct +@@ -1082,9 +1083,18 @@ static int dsa_tree_setup_master(struct list_for_each_entry(dp, &dst->ports, list) { if (dsa_port_is_cpu(dp)) { @@ -64,7 +64,7 @@ Signed-off-by: David S. Miller } } -@@ -1077,9 +1087,19 @@ static void dsa_tree_teardown_master(str +@@ -1099,9 +1109,19 @@ static void dsa_tree_teardown_master(str rtnl_lock(); diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch index acb67ab1614be5..7f16b936cde838 100644 --- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch +++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2952,9 +2952,6 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2979,9 +2979,6 @@ mt7531_mac_config(struct dsa_switch *ds, case PHY_INTERFACE_MODE_NA: case PHY_INTERFACE_MODE_1000BASEX: case PHY_INTERFACE_MODE_2500BASEX: @@ -29,7 +29,7 @@ Signed-off-by: David S. Miller return mt7531_sgmii_setup_mode_force(priv, port, interface); default: return -EINVAL; -@@ -3030,13 +3027,6 @@ unsupported: +@@ -3057,13 +3054,6 @@ unsupported: return; } @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; -@@ -3173,6 +3163,9 @@ static void mt753x_phylink_get_caps(stru +@@ -3200,6 +3190,9 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller /* This driver does not make use of the speed, duplex, pause or the * advertisement in its mac_config, so it is safe to mark this driver * as non-legacy. -@@ -3238,6 +3231,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3265,6 +3258,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port)); state->link = !!(status & MT7531_SGMII_LINK_STATUS); @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller if (state->interface == PHY_INTERFACE_MODE_SGMII && (status & MT7531_SGMII_AN_ENABLE)) { val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port)); -@@ -3268,16 +3262,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3295,16 +3289,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -109,7 +109,7 @@ Signed-off-by: David S. Miller } static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, -@@ -3318,6 +3340,8 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3345,6 +3367,8 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; @@ -120,7 +120,7 @@ Signed-off-by: David S. Miller ret = priv->info->sw_setup(ds); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -405,6 +405,7 @@ enum mt7530_vlan_port_acc_frm { +@@ -410,6 +410,7 @@ enum mt7530_vlan_port_acc_frm { #define MT7531_SGMII_LINK_STATUS BIT(18) #define MT7531_SGMII_AN_ENABLE BIT(12) #define MT7531_SGMII_AN_RESTART BIT(9) diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch index d8386fc3cbc9bd..8060ad5afceba6 100644 --- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch +++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch @@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich #include #include #include -@@ -2804,128 +2805,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2831,128 +2832,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich static int mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2948,11 +2832,11 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2975,11 +2859,11 @@ mt7531_mac_config(struct dsa_switch *ds, phydev = dp->slave->phydev; return mt7531_rgmii_setup(priv, port, interface, phydev); case PHY_INTERFACE_MODE_SGMII: @@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich default: return -EINVAL; } -@@ -2977,11 +2861,11 @@ mt753x_phylink_mac_select_pcs(struct dsa +@@ -3004,11 +2888,11 @@ mt753x_phylink_mac_select_pcs(struct dsa switch (interface) { case PHY_INTERFACE_MODE_TRGMII: @@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich default: return NULL; } -@@ -3222,86 +3106,6 @@ static void mt7530_pcs_get_state(struct +@@ -3249,86 +3133,6 @@ static void mt7530_pcs_get_state(struct state->pause |= MLO_PAUSE_TX; } @@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, phy_interface_t interface, const unsigned long *advertising, -@@ -3321,18 +3125,57 @@ static const struct phylink_pcs_ops mt75 +@@ -3348,18 +3152,57 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich int i, ret; /* Initialise the PCS devices */ -@@ -3340,8 +3183,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3367,8 +3210,6 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; @@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich } ret = priv->info->sw_setup(ds); -@@ -3356,6 +3197,16 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3383,6 +3224,16 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich return ret; } -@@ -3447,7 +3298,7 @@ static const struct mt753x_info mt753x_t +@@ -3475,7 +3326,7 @@ static const struct mt753x_info mt753x_t }, [ID_MT7531] = { .id = ID_MT7531, @@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, -@@ -3555,7 +3406,7 @@ static void +@@ -3583,7 +3434,7 @@ static void mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); @@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich if (!priv) return; -@@ -3574,6 +3425,10 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3602,6 +3453,10 @@ mt7530_remove(struct mdio_device *mdiode mt7530_free_irq(priv); dsa_unregister_switch(priv->ds); @@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich dev_set_drvdata(&mdiodev->dev, NULL); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -396,47 +396,8 @@ enum mt7530_vlan_port_acc_frm { +@@ -401,47 +401,8 @@ enum mt7530_vlan_port_acc_frm { CCR_TX_OCT_CNT_BAD) /* MT7531 SGMII register group */ @@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich /* Register for system reset */ #define MT7530_SYS_CTRL 0x7000 -@@ -735,13 +696,13 @@ struct mt7530_fdb { +@@ -741,13 +702,13 @@ struct mt7530_fdb { * @pm: The matrix used to show all connections with the port. * @pvid: The VLAN specified is to be considered a PVID at ingress. Any * untagged frames will be assigned to the related VLAN. diff --git a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch index 8311aaa0bf7f85..62d9c78cca3fd7 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3157,26 +3157,56 @@ static const struct regmap_bus mt7531_re +@@ -3184,26 +3184,56 @@ static const struct regmap_bus mt7531_re .reg_update_bits = mt7530_regmap_update_bits, }; @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller int i, ret; /* Initialise the PCS devices */ -@@ -3198,15 +3228,11 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3225,15 +3255,11 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch index 7271f1023b21af..e9f69a8777abbd 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3130,7 +3130,7 @@ static int mt7530_regmap_read(void *cont +@@ -3157,7 +3157,7 @@ static int mt7530_regmap_read(void *cont { struct mt7530_priv *priv = context; @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller return 0; }; -@@ -3138,23 +3138,25 @@ static int mt7530_regmap_write(void *con +@@ -3165,23 +3165,25 @@ static int mt7530_regmap_write(void *con { struct mt7530_priv *priv = context; @@ -62,7 +62,7 @@ Signed-off-by: David S. Miller }; static int -@@ -3180,6 +3182,9 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -3207,6 +3209,9 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->reg_stride = 4; mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i); mt7531_pcs_config[i]->max_register = 0x17c; diff --git a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch index 2f761c2fad4a24..a2dcc08b026478 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller } static void -@@ -3126,22 +3147,6 @@ static const struct phylink_pcs_ops mt75 +@@ -3153,22 +3174,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -156,7 +156,7 @@ Signed-off-by: David S. Miller static void mt7530_mdio_regmap_lock(void *mdio_lock) { -@@ -3154,7 +3159,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc +@@ -3181,7 +3186,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc mutex_unlock(mdio_lock); } @@ -165,7 +165,7 @@ Signed-off-by: David S. Miller .reg_write = mt7530_regmap_write, .reg_read = mt7530_regmap_read, }; -@@ -3187,7 +3192,7 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -3214,7 +3219,7 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock; regmap = devm_regmap_init(priv->dev, @@ -174,7 +174,7 @@ Signed-off-by: David S. Miller mt7531_pcs_config[i]); if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); -@@ -3352,6 +3357,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) +@@ -3380,6 +3385,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) static int mt7530_probe(struct mdio_device *mdiodev) { @@ -182,7 +182,7 @@ Signed-off-by: David S. Miller struct mt7530_priv *priv; struct device_node *dn; -@@ -3431,6 +3437,21 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3459,6 +3465,21 @@ mt7530_probe(struct mdio_device *mdiodev mutex_init(&priv->reg_mutex); dev_set_drvdata(&mdiodev->dev, priv); @@ -206,7 +206,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -779,6 +779,7 @@ struct mt753x_info { +@@ -785,6 +785,7 @@ struct mt753x_info { * @dev: The device pointer * @ds: The pointer to the dsa core structure * @bus: The bus used for the device and built-in PHY @@ -214,7 +214,7 @@ Signed-off-by: David S. Miller * @rstc: The pointer to reset control used by MCM * @core_pwr: The power supplied into the core * @io_pwr: The power supplied into the I/O -@@ -799,6 +800,7 @@ struct mt7530_priv { +@@ -805,6 +806,7 @@ struct mt7530_priv { struct device *dev; struct dsa_switch *ds; struct mii_bus *bus; diff --git a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch index 16feba1daff2be..abbecd5e402056 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3238,12 +3238,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3265,12 +3265,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -31,7 +31,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -3360,6 +3354,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3388,6 +3382,7 @@ mt7530_probe(struct mdio_device *mdiodev static struct regmap_config *regmap_config; struct mt7530_priv *priv; struct device_node *dn; @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller dn = mdiodev->dev.of_node; -@@ -3452,6 +3447,12 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3480,6 +3475,12 @@ mt7530_probe(struct mdio_device *mdiodev if (IS_ERR(priv->regmap)) return PTR_ERR(priv->regmap); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch index dc4b40b824bd54..ef02d469387d50 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch @@ -114,7 +114,7 @@ Signed-off-by: David S. Miller } static void -@@ -646,14 +650,13 @@ static int +@@ -660,14 +664,13 @@ static int mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad, int regnum) { @@ -130,7 +130,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val, !(val & MT7531_PHY_ACS_ST), 20, 100000); -@@ -686,7 +689,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr +@@ -700,7 +703,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr ret = val & MT7531_MDIO_RW_DATA_MASK; out: @@ -139,7 +139,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -695,14 +698,13 @@ static int +@@ -709,14 +712,13 @@ static int mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad, int regnum, u32 data) { @@ -155,7 +155,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val, !(val & MT7531_PHY_ACS_ST), 20, 100000); -@@ -734,7 +736,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p +@@ -748,7 +750,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p } out: @@ -164,7 +164,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -742,14 +744,13 @@ out: +@@ -756,14 +758,13 @@ out: static int mt7531_ind_c22_phy_read(struct mt7530_priv *priv, int port, int regnum) { @@ -180,7 +180,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val, !(val & MT7531_PHY_ACS_ST), 20, 100000); -@@ -772,7 +773,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr +@@ -786,7 +787,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr ret = val & MT7531_MDIO_RW_DATA_MASK; out: @@ -189,7 +189,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -781,14 +782,13 @@ static int +@@ -795,14 +796,13 @@ static int mt7531_ind_c22_phy_write(struct mt7530_priv *priv, int port, int regnum, u16 data) { @@ -205,7 +205,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, reg, !(reg & MT7531_PHY_ACS_ST), 20, 100000); -@@ -810,7 +810,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p +@@ -824,7 +824,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p } out: @@ -214,7 +214,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -1323,7 +1323,6 @@ static int +@@ -1344,7 +1344,6 @@ static int mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu) { struct mt7530_priv *priv = ds->priv; @@ -222,7 +222,7 @@ Signed-off-by: David S. Miller int length; u32 val; -@@ -1334,7 +1333,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch if (!dsa_is_cpu_port(ds, port)) return 0; @@ -231,7 +231,7 @@ Signed-off-by: David S. Miller val = mt7530_mii_read(priv, MT7530_GMACCR); val &= ~MAX_RX_PKT_LEN_MASK; -@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1376,7 +1375,7 @@ mt7530_port_change_mtu(struct dsa_switch mt7530_mii_write(priv, MT7530_GMACCR, val); @@ -240,7 +240,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2151,10 +2150,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ +@@ -2172,10 +2171,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ u32 val; int p; @@ -253,7 +253,7 @@ Signed-off-by: David S. Miller for (p = 0; p < MT7530_NUM_PHYS; p++) { if (BIT(p) & val) { -@@ -2190,7 +2189,7 @@ mt7530_irq_bus_lock(struct irq_data *d) +@@ -2211,7 +2210,7 @@ mt7530_irq_bus_lock(struct irq_data *d) { struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); @@ -262,7 +262,7 @@ Signed-off-by: David S. Miller } static void -@@ -2199,7 +2198,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da +@@ -2220,7 +2219,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch index 265cf1fdac4b1c..2e1ed2e652a65b 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch @@ -21,7 +21,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -951,6 +951,24 @@ mt7530_set_ageing_time(struct dsa_switch +@@ -965,6 +965,24 @@ mt7530_set_ageing_time(struct dsa_switch return 0; } @@ -48,7 +48,7 @@ Signed-off-by: David S. Miller struct mt7530_priv *priv = ds->priv; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -714,24 +714,6 @@ enum p5_interface_select { +@@ -720,24 +720,6 @@ enum p5_interface_select { P5_INTF_SEL_GMAC5_SGMII, }; diff --git a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch index 10e2c6a184f54c..c9ff26ff2060ea 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3366,44 +3366,21 @@ static const struct of_device_id mt7530_ +@@ -3394,44 +3394,21 @@ static const struct of_device_id mt7530_ MODULE_DEVICE_TABLE(of, mt7530_of_match); static int @@ -67,7 +67,7 @@ Signed-off-by: David S. Miller if (!priv->info) return -EINVAL; -@@ -3417,23 +3394,53 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3445,23 +3422,53 @@ mt7530_probe(struct mdio_device *mdiodev return -EINVAL; priv->id = priv->info->id; @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(priv->reset)) { -@@ -3442,12 +3449,15 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3470,12 +3477,15 @@ mt7530_probe(struct mdio_device *mdiodev } } diff --git a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch index 4e754b100287e7..7c1c80e7bc5665 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3484,6 +3484,17 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3512,6 +3512,17 @@ mt7530_probe(struct mdio_device *mdiodev } static void @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); -@@ -3502,16 +3513,11 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3530,16 +3541,11 @@ mt7530_remove(struct mdio_device *mdiode dev_err(priv->dev, "Failed to disable io pwr: %d\n", ret); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch index e970ec3804b97a..84883147ac1ec2 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch @@ -416,7 +416,7 @@ Signed-off-by: David S. Miller static u32 mt7530_mii_read(struct mt7530_priv *priv, u32 reg) { -@@ -3164,72 +3115,6 @@ static const struct phylink_pcs_ops mt75 +@@ -3191,72 +3142,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -489,7 +489,7 @@ Signed-off-by: David S. Miller static int mt753x_setup(struct dsa_switch *ds) { -@@ -3288,7 +3173,7 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3315,7 +3200,7 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -497,8 +497,8 @@ Signed-off-by: David S. Miller +const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, - .get_strings = mt7530_get_strings, -@@ -3322,8 +3207,9 @@ static const struct dsa_switch_ops mt753 + .preferred_default_local_cpu_port = mt753x_preferred_default_local_cpu_port, +@@ -3350,8 +3235,9 @@ static const struct dsa_switch_ops mt753 .get_mac_eee = mt753x_get_mac_eee, .set_mac_eee = mt753x_set_mac_eee, }; @@ -509,7 +509,7 @@ Signed-off-by: David S. Miller [ID_MT7621] = { .id = ID_MT7621, .pcs_ops = &mt7530_pcs_ops, -@@ -3356,16 +3242,9 @@ static const struct mt753x_info mt753x_t +@@ -3384,16 +3270,9 @@ static const struct mt753x_info mt753x_t .mac_port_config = mt7531_mac_config, }, }; @@ -528,7 +528,7 @@ Signed-off-by: David S. Miller mt7530_probe_common(struct mt7530_priv *priv) { struct device *dev = priv->dev; -@@ -3402,88 +3281,9 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3430,88 +3309,9 @@ mt7530_probe_common(struct mt7530_priv * return 0; } @@ -619,7 +619,7 @@ Signed-off-by: David S. Miller mt7530_remove_common(struct mt7530_priv *priv) { if (priv->irq) -@@ -3494,57 +3294,6 @@ mt7530_remove_common(struct mt7530_priv +@@ -3522,57 +3322,6 @@ mt7530_remove_common(struct mt7530_priv mutex_destroy(&priv->reg_mutex); } @@ -679,7 +679,7 @@ Signed-off-by: David S. Miller MODULE_LICENSE("GPL"); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -839,4 +839,10 @@ static inline void INIT_MT7530_DUMMY_POL +@@ -845,4 +845,10 @@ static inline void INIT_MT7530_DUMMY_POL p->reg = reg; } diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch index 3d94295eee3fb7..c8417091f90676 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch @@ -184,7 +184,7 @@ Signed-off-by: David S. Miller +MODULE_LICENSE("GPL"); --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2198,6 +2198,47 @@ static const struct irq_domain_ops mt753 +@@ -2219,6 +2219,47 @@ static const struct irq_domain_ops mt753 }; static void @@ -232,7 +232,7 @@ Signed-off-by: David S. Miller mt7530_setup_mdio_irq(struct mt7530_priv *priv) { struct dsa_switch *ds = priv->ds; -@@ -2231,8 +2272,15 @@ mt7530_setup_irq(struct mt7530_priv *pri +@@ -2252,8 +2293,15 @@ mt7530_setup_irq(struct mt7530_priv *pri return priv->irq ? : -EINVAL; } @@ -250,7 +250,7 @@ Signed-off-by: David S. Miller if (!priv->irq_domain) { dev_err(dev, "failed to create IRQ domain\n"); return -ENOMEM; -@@ -2727,6 +2775,25 @@ static void mt7531_mac_port_get_caps(str +@@ -2754,6 +2802,25 @@ static void mt7531_mac_port_get_caps(str } } @@ -276,7 +276,7 @@ Signed-off-by: David S. Miller static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -2803,6 +2870,17 @@ static bool mt753x_is_mac_port(u32 port) +@@ -2830,6 +2897,17 @@ static bool mt753x_is_mac_port(u32 port) } static int @@ -294,7 +294,7 @@ Signed-off-by: David S. Miller mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2872,7 +2950,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2899,7 +2977,8 @@ mt753x_phylink_mac_config(struct dsa_swi switch (port) { case 0 ... 4: /* Internal phy */ @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller goto unsupported; break; case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */ -@@ -2950,7 +3029,8 @@ static void mt753x_phylink_mac_link_up(s +@@ -2977,7 +3056,8 @@ static void mt753x_phylink_mac_link_up(s /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ @@ -314,7 +314,7 @@ Signed-off-by: David S. Miller (phy_interface_mode_is_8023z(interface))) { speed = SPEED_1000; duplex = DUPLEX_FULL; -@@ -3030,6 +3110,21 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3057,6 +3137,21 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -336,7 +336,7 @@ Signed-off-by: David S. Miller static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { -@@ -3175,6 +3270,27 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3202,6 +3297,27 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -364,7 +364,7 @@ Signed-off-by: David S. Miller const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, -@@ -3243,6 +3359,17 @@ const struct mt753x_info mt753x_table[] +@@ -3271,6 +3387,17 @@ const struct mt753x_info mt753x_table[] .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, }, @@ -392,9 +392,9 @@ Signed-off-by: David S. Miller }; #define NUM_TRGMII_CTRL 5 -@@ -54,11 +55,11 @@ enum mt753x_id { - #define MT7531_MIRROR_PORT_SET(x) (((x) & MIRROR_MASK) << 16) +@@ -59,11 +60,11 @@ enum mt753x_id { #define MT7531_CPU_PMAP_MASK GENMASK(7, 0) + #define MT7531_CPU_PMAP(x) FIELD_PREP(MT7531_CPU_PMAP_MASK, x) -#define MT753X_MIRROR_REG(id) (((id) == ID_MT7531) ? \ +#define MT753X_MIRROR_REG(id) ((((id) == ID_MT7531) || ((id) == ID_MT7988)) ? \ @@ -407,7 +407,7 @@ Signed-off-by: David S. Miller MT7531_MIRROR_MASK : MIRROR_MASK) /* Registers for BPDU and PAE frame control*/ -@@ -327,9 +328,8 @@ enum mt7530_vlan_port_acc_frm { +@@ -332,9 +333,8 @@ enum mt7530_vlan_port_acc_frm { MT7531_FORCE_DPX | \ MT7531_FORCE_RX_FC | \ MT7531_FORCE_TX_FC) diff --git a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch index 49ac8d9780a05a..26896473198852 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch @@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski } --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3237,6 +3237,12 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3264,6 +3264,12 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -773,10 +773,10 @@ struct mt753x_info { +@@ -779,10 +779,10 @@ struct mt753x_info { * registers * @p6_interface Holding the current port 6 interface * @p5_intf_sel: Holding the current port 5 interface select @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski */ struct mt7530_priv { struct device *dev; -@@ -795,7 +795,6 @@ struct mt7530_priv { +@@ -801,7 +801,6 @@ struct mt7530_priv { unsigned int p5_intf_sel; u8 mirror_rx; u8 mirror_tx; @@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_port ports[MT7530_NUM_PORTS]; struct mt753x_pcs pcs[MT7530_NUM_PORTS]; /* protect among processes for registers access*/ -@@ -803,6 +802,7 @@ struct mt7530_priv { +@@ -809,6 +808,7 @@ struct mt7530_priv { int irq; struct irq_domain *irq_domain; u32 irq_enable; diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 00977650c7ac26..377553433846b5 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -4321,6 +4321,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_DUP_IPV4 is not set # CONFIG_NF_DUP_IPV6 is not set # CONFIG_NF_FLOW_TABLE is not set +# CONFIG_NF_FLOW_TABLE_PROCFS is not set # CONFIG_NF_LOG_ARP is not set # CONFIG_NF_LOG_BRIDGE is not set # CONFIG_NF_LOG_IPV4 is not set diff --git a/target/linux/generic/hack-5.15/250-netfilter_depends.patch b/target/linux/generic/hack-5.15/250-netfilter_depends.patch index d9a2b81d743d8b..1f8af6dbe847c6 100644 --- a/target/linux/generic/hack-5.15/250-netfilter_depends.patch +++ b/target/linux/generic/hack-5.15/250-netfilter_depends.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau depends on NETFILTER_ADVANCED help H.323 is a VoIP signalling protocol from ITU-T. As one of the most -@@ -1105,7 +1104,6 @@ config NETFILTER_XT_TARGET_SECMARK +@@ -1114,7 +1113,6 @@ config NETFILTER_XT_TARGET_SECMARK config NETFILTER_XT_TARGET_TCPMSS tristate '"TCPMSS" target support' diff --git a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch index da603344980cfa..c4be10add8ac11 100644 --- a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch +++ b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch @@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau help This option adds the flow table core infrastructure. -@@ -1010,6 +1009,15 @@ config NETFILTER_XT_TARGET_NOTRACK +@@ -1019,6 +1018,15 @@ config NETFILTER_XT_TARGET_NOTRACK depends on NETFILTER_ADVANCED select NETFILTER_XT_TARGET_CT @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau depends on NETFILTER_ADVANCED --- a/net/netfilter/Makefile +++ b/net/netfilter/Makefile -@@ -143,6 +143,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF +@@ -144,6 +144,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o --- /dev/null +++ b/net/netfilter/xt_FLOWOFFLOAD.c -@@ -0,0 +1,701 @@ +@@ -0,0 +1,702 @@ +/* + * Copyright (C) 2018-2021 Felix Fietkau + * @@ -163,7 +163,8 @@ Signed-off-by: Felix Fietkau + proto = veth->h_vlan_encapsulated_proto; + break; + case htons(ETH_P_PPP_SES): -+ proto = nf_flow_pppoe_proto(skb); ++ if (!nf_flow_pppoe_proto(skb, &proto)) ++ return NF_ACCEPT; + break; + default: + proto = skb->protocol; diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch index 75c2e41fb65330..b4ed6c991010b1 100644 --- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch @@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1152,6 +1157,11 @@ static const struct usb_device_id option +@@ -1156,6 +1161,11 @@ static const struct usb_device_id option { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */ .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) }, @@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support /* Quectel products using Qualcomm vendor ID */ { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)}, { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20), -@@ -1193,6 +1203,11 @@ static const struct usb_device_id option +@@ -1197,6 +1207,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, diff --git a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch index 9968a79699f41a..a64d3021d4b6aa 100644 --- a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch +++ b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -204,6 +204,9 @@ static void __br_handle_local_finish(str +@@ -209,6 +209,9 @@ static void __br_handle_local_finish(str /* note: already called with rcu_read_lock */ static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb) { @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau __br_handle_local_finish(skb); /* return 1 to signal the okfn() was called so it's ok to use the skb */ -@@ -369,6 +372,17 @@ static rx_handler_result_t br_handle_fra +@@ -376,6 +379,17 @@ static rx_handler_result_t br_handle_fra forward: switch (p->state) { diff --git a/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch index 8c755540338321..ba75e4a0f10433 100644 --- a/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch +++ b/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch @@ -10,9 +10,9 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -606,13 +606,41 @@ void nf_flow_table_free(struct nf_flowta - } - EXPORT_SYMBOL_GPL(nf_flow_table_free); +@@ -651,6 +651,23 @@ static struct pernet_operations nf_flow_ + .exit_batch = nf_flow_table_pernet_exit, + }; +static int nf_flow_table_netdev_event(struct notifier_block *this, + unsigned long event, void *ptr) @@ -33,26 +33,30 @@ Signed-off-by: Pablo Neira Ayuso + static int __init nf_flow_table_module_init(void) { -- return nf_flow_table_offload_init(); -+ int ret; -+ -+ ret = nf_flow_table_offload_init(); -+ if (ret) -+ return ret; -+ + int ret; +@@ -663,8 +680,14 @@ static int __init nf_flow_table_module_i + if (ret) + goto out_offload; + + ret = register_netdevice_notifier(&flow_offload_netdev_notifier); + if (ret) -+ nf_flow_table_offload_exit(); ++ goto out_offload_init; + -+ return ret; - } + return 0; + ++out_offload_init: ++ nf_flow_table_offload_exit(); + out_offload: + unregister_pernet_subsys(&nf_flow_table_net_ops); + return ret; +@@ -672,6 +695,7 @@ out_offload: static void __exit nf_flow_table_module_exit(void) { + unregister_netdevice_notifier(&flow_offload_netdev_notifier); nf_flow_table_offload_exit(); + unregister_pernet_subsys(&nf_flow_table_net_ops); } - --- a/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c @@ -455,47 +455,14 @@ static struct nft_expr_type nft_flow_off diff --git a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 2f1b3ed7931618..3037a724bff767 100644 --- a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-5.15/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 -@@ -7803,7 +7803,7 @@ static int nft_register_flowtable_net_ho +@@ -7811,7 +7811,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-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch index bbbebefdd5d9e5..fd1b79cdfe4f3f 100644 --- a/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch +++ b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev) --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -326,6 +326,8 @@ static rx_handler_result_t br_handle_fra +@@ -331,6 +331,8 @@ static rx_handler_result_t br_handle_fra fwd_mask |= p->group_fwd_mask; switch (dest[5]) { case 0x00: /* Bridge Group Address */ diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch index 9ae65b87111346..792135b0d2d4bf 100644 --- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch +++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch @@ -15,16 +15,7 @@ Signed-off-by: Alexander Couzens --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2628,7 +2628,7 @@ mt7531_setup(struct dsa_switch *ds) - struct mt7530_priv *priv = ds->priv; - struct mt7530_dummy_poll p; - u32 val, id; -- int ret; -+ int ret, i; - - /* Reset whole chip through gpio pin or memory-mapped registers for - * different type of hardware -@@ -2660,6 +2660,10 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2680,6 +2680,10 @@ mt7531_setup(struct dsa_switch *ds) return -ENODEV; } diff --git a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch index 06546b79e32313..609e03d964412b 100644 --- a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch +++ b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch @@ -16,7 +16,7 @@ Signed-off-by: David Bauer --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2335,10 +2335,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr +@@ -2356,10 +2356,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr { struct dsa_switch *ds = priv->ds; struct device *dev = priv->dev; @@ -30,7 +30,7 @@ Signed-off-by: David Bauer bus = devm_mdiobus_alloc(dev); if (!bus) return -ENOMEM; -@@ -2355,7 +2358,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr +@@ -2376,7 +2379,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr if (priv->irq) mt7530_setup_mdio_irq(priv); diff --git a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch index a3e3f1185a8247..1697347b53c962 100644 --- a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch +++ b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch @@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3038,8 +3038,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -3065,8 +3065,7 @@ static void mt753x_phylink_mac_link_up(s /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ diff --git a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch index a8c084b98004dc..b127d76e005b9a 100644 --- a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch @@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa +@@ -960,6 +983,7 @@ asmlinkage __visible void __init __no_sa pr_notice("%s", linux_banner); early_security_init(); setup_arch(&command_line); diff --git a/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch index fed46b0986cb78..9c03ef7ec46207 100644 --- a/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -259,7 +259,7 @@ Signed-off-by: Adrian Panella static int kernel_init(void *); extern void init_IRQ(void); -@@ -995,6 +999,18 @@ asmlinkage __visible void __init __no_sa +@@ -997,6 +1001,18 @@ asmlinkage __visible void __init __no_sa pr_notice("Kernel command line: %s\n", saved_command_line); /* parameters may set static keys */ jump_label_init(); diff --git a/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch b/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch index 1af5aefe0bdda1..8eedc27fc1ed75 100644 --- a/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch +++ b/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch @@ -24,7 +24,7 @@ Signed-off-by: David Bauer image-$(CONFIG_EPAPR_BOOT) += zImage.epapr # -@@ -409,15 +408,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits +@@ -410,15 +409,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits $(obj)/vmlinux.strip: vmlinux $(STRIP) -s -R .comment $< -o $@ diff --git a/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch index 1e1355b4804de1..525e28b1892aa2 100644 --- a/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -258,7 +258,7 @@ Signed-off-by: Michael Gray static int kernel_init(void *); extern void init_IRQ(void); -@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa +@@ -995,6 +999,18 @@ asmlinkage __visible void __init __no_sa page_alloc_init(); pr_notice("Kernel command line: %s\n", saved_command_line); diff --git a/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch index b3dafd7b0ce43e..4b51470051a3e4 100644 --- a/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -239,7 +239,7 @@ Signed-off-by: Adrian Panella static int kernel_init(void *); extern void init_IRQ(void); -@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa +@@ -995,6 +999,18 @@ asmlinkage __visible void __init __no_sa page_alloc_init(); pr_notice("Kernel command line: %s\n", saved_command_line); From 01c58a0d2a18ec10c77daaf68244212b5cd77223 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 11 May 2024 19:52:13 +0200 Subject: [PATCH 14/20] kernel: bump 5.15 to 5.15.158 Removed because they are upstream: generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=506ac5538498717fce699feaddb2ed97ae1c3ca7 generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=2f83d3d2cc3c0df89f833cd8c09989187f0c3ce1 Manually adapted: generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch Signed-off-by: Hauke Mehrtens (cherry picked from commit 1fae75ebd968f9cc1f254dbcdf6a16b27c2b3145) --- include/kernel-5.15 | 4 +- .../209-b44-register-adm-switch.patch | 6 +- .../patches-5.15/210-b44_phy_fix.patch | 2 +- ...dd-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch | 4 +- ...-v6.1-05-mm-multi-gen-LRU-groundwork.patch | 2 +- ...ek-mt7622-add-support-for-coherent-D.patch | 30 --------- ...ek-mt7622-introduce-nodes-for-Wirele.patch | 62 ------------------- ..._eth_soc-use-standard-property-for-c.patch | 2 +- ...net-usb-ax88179_178a-add-TSO-feature.patch | 4 +- ...Support-public-address-configuration.patch | 4 +- ...Fix-application-of-sizeof-to-pointer.patch | 2 +- ...Add-a-new-PID-VID-13d3-3567-for-MT79.patch | 2 +- ...Add-a-new-PID-VID-0489-e0c8-for-MT79.patch | 2 +- ...Add-a-new-VID-PID-0e8d-0608-for-MT79.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 18 +++--- .../104-mt7622-add-snor-irq.patch | 2 +- ...dts-mediatek-add-mtk-snfi-for-mt7622.patch | 2 +- ...-dts-mediatek-mt7622-fix-GICv2-range.patch | 2 +- ...2-specify-the-number-of-DMA-requests.patch | 2 +- ...ek-Split-PCIe-node-for-MT2712-and-MT.patch | 4 +- ...s-mediatek-add-mt7622-pcie-slot-node.patch | 4 +- ...ediatek-add-support-for-coherent-DMA.patch | 4 +- target/linux/x86/config-5.15 | 2 +- 23 files changed, 38 insertions(+), 130 deletions(-) delete mode 100644 target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch delete mode 100644 target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 3289f828befc94..71d13ebc5f0287 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .157 -LINUX_KERNEL_HASH-5.15.157 = aff22351d34d69a16762dcf1fd51fe228da55d4b96b67247bdd598a86cc7a414 +LINUX_VERSION-5.15 = .158 +LINUX_KERNEL_HASH-5.15.158 = f9071c83a4fd8b80af026b48cfc1869bfa25883f9148b92b5dc1e1e1e26dd5c6 diff --git a/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch b/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch index 772e905ecb7602..ddf9d0dfb9fbad 100644 --- a/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch +++ b/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch @@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch #include #include -@@ -2245,6 +2247,69 @@ static void b44_adjust_link(struct net_d +@@ -2247,6 +2249,69 @@ static void b44_adjust_link(struct net_d } } @@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch static int b44_register_phy_one(struct b44 *bp) { __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; -@@ -2281,6 +2346,9 @@ static int b44_register_phy_one(struct b +@@ -2283,6 +2348,9 @@ static int b44_register_phy_one(struct b if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) && (sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) { @@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch dev_info(sdev->dev, "could not find PHY at %i, use fixed one\n", bp->phy_addr); -@@ -2475,6 +2543,7 @@ static void b44_remove_one(struct ssb_de +@@ -2477,6 +2545,7 @@ static void b44_remove_one(struct ssb_de unregister_netdev(dev); if (bp->flags & B44_FLAG_EXTERNAL_PHY) b44_unregister_phy_one(bp); diff --git a/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch b/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch index ca7123f2a399c6..9c16da4f572829 100644 --- a/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch +++ b/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch @@ -43,7 +43,7 @@ if (bp->flags & B44_FLAG_EXTERNAL_PHY) return 0; -@@ -2175,6 +2200,8 @@ static int b44_get_invariants(struct b44 +@@ -2177,6 +2202,8 @@ static int b44_get_invariants(struct b44 * valid PHY address. */ bp->phy_addr &= 0x1F; diff --git a/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch b/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch index 2ea2e2497acc75..8e4de36db07c6f 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch @@ -73,7 +73,7 @@ Signed-off-by: Andrew Morton --- a/arch/Kconfig +++ b/arch/Kconfig -@@ -1299,6 +1299,14 @@ config ARCH_HAS_ELFCORE_COMPAT +@@ -1307,6 +1307,14 @@ config ARCH_HAS_ELFCORE_COMPAT config ARCH_HAS_PARANOID_L1D_FLUSH bool @@ -90,7 +90,7 @@ Signed-off-by: Andrew Morton source "scripts/gcc-plugins/Kconfig" --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -85,6 +85,7 @@ config X86 +@@ -86,6 +86,7 @@ config X86 select ARCH_HAS_PMEM_API if X86_64 select ARCH_HAS_PTE_DEVMAP if X86_64 select ARCH_HAS_PTE_SPECIAL diff --git a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch index 85710eb79b8f31..ff4bb4df3e7ea0 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch @@ -552,7 +552,7 @@ Signed-off-by: Andrew Morton --- a/kernel/bounds.c +++ b/kernel/bounds.c @@ -22,6 +22,11 @@ int main(void) - DEFINE(NR_CPUS_BITS, bits_per(CONFIG_NR_CPUS)); + DEFINE(NR_CPUS_BITS, order_base_2(CONFIG_NR_CPUS)); #endif DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t)); +#ifdef CONFIG_LRU_GEN diff --git a/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch b/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch deleted file mode 100644 index 9f2512a1d050aa..00000000000000 --- a/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Felix Fietkau -Date: Mon, 7 Feb 2022 10:27:22 +0100 -Subject: [PATCH] arm64: dts: mediatek: mt7622: add support for coherent - DMA - -It improves performance by eliminating the need for a cache flush on rx and tx - -Signed-off-by: Felix Fietkau ---- - ---- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi -+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -357,7 +357,7 @@ - }; - - cci_control2: slave-if@5000 { -- compatible = "arm,cci-400-ctrl-if"; -+ compatible = "arm,cci-400-ctrl-if", "syscon"; - interface-type = "ace"; - reg = <0x5000 0x1000>; - }; -@@ -938,6 +938,8 @@ - power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>; - mediatek,ethsys = <ðsys>; - mediatek,sgmiisys = <&sgmiisys>; -+ mediatek,cci-control = <&cci_control2>; -+ dma-coherent; - #address-cells = <1>; - #size-cells = <0>; - status = "disabled"; diff --git a/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch b/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch deleted file mode 100644 index 2c6e3fd3cd3eff..00000000000000 --- a/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Felix Fietkau -Date: Sat, 5 Feb 2022 18:36:36 +0100 -Subject: [PATCH] arm64: dts: mediatek: mt7622: introduce nodes for - Wireless Ethernet Dispatch - -Introduce wed0 and wed1 nodes in order to enable offloading forwarding -between ethernet and wireless devices on the mt7622 chipset. - -Signed-off-by: Felix Fietkau ---- - ---- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi -+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -894,6 +894,11 @@ - }; - }; - -+ hifsys: syscon@1af00000 { -+ compatible = "mediatek,mt7622-hifsys", "syscon"; -+ reg = <0 0x1af00000 0 0x70>; -+ }; -+ - ethsys: syscon@1b000000 { - compatible = "mediatek,mt7622-ethsys", - "syscon"; -@@ -912,6 +917,26 @@ - #dma-cells = <1>; - }; - -+ pcie_mirror: pcie-mirror@10000400 { -+ compatible = "mediatek,mt7622-pcie-mirror", -+ "syscon"; -+ reg = <0 0x10000400 0 0x10>; -+ }; -+ -+ wed0: wed@1020a000 { -+ compatible = "mediatek,mt7622-wed", -+ "syscon"; -+ reg = <0 0x1020a000 0 0x1000>; -+ interrupts = ; -+ }; -+ -+ wed1: wed@1020b000 { -+ compatible = "mediatek,mt7622-wed", -+ "syscon"; -+ reg = <0 0x1020b000 0 0x1000>; -+ interrupts = ; -+ }; -+ - eth: ethernet@1b100000 { - compatible = "mediatek,mt7622-eth", - "mediatek,mt2701-eth", -@@ -939,6 +964,9 @@ - mediatek,ethsys = <ðsys>; - mediatek,sgmiisys = <&sgmiisys>; - mediatek,cci-control = <&cci_control2>; -+ mediatek,wed = <&wed0>, <&wed1>; -+ mediatek,pcie-mirror = <&pcie_mirror>; -+ mediatek,hifsys = <&hifsys>; - dma-coherent; - #address-cells = <1>; - #size-cells = <0>; diff --git a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch index 70d46c16cdb7cc..22125a454624fe 100644 --- a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch +++ b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch @@ -13,7 +13,7 @@ Signed-off-by: David S. Miller --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -963,7 +963,7 @@ +@@ -957,7 +957,7 @@ power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>; mediatek,ethsys = <ðsys>; mediatek,sgmiisys = <&sgmiisys>; diff --git a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch index 698e524c3565ef..b2af169b927685 100644 --- a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch +++ b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller ax88179_reset(dev); -@@ -1507,17 +1508,19 @@ ax88179_tx_fixup(struct usbnet *dev, str +@@ -1502,17 +1503,19 @@ ax88179_tx_fixup(struct usbnet *dev, str { u32 tx_hdr1, tx_hdr2; int frame_size = dev->maxpacket; @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller if ((skb_header_cloned(skb) || headroom < 0) && pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) { dev_kfree_skb_any(skb); -@@ -1528,6 +1531,8 @@ ax88179_tx_fixup(struct usbnet *dev, str +@@ -1523,6 +1526,8 @@ ax88179_tx_fixup(struct usbnet *dev, str put_unaligned_le32(tx_hdr1, ptr); put_unaligned_le32(tx_hdr2, ptr + 4); diff --git a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch index 725af4b52cf179..4a63b89f578692 100644 --- a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch +++ b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch @@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -2287,6 +2287,23 @@ struct btmtk_section_map { +@@ -2289,6 +2289,23 @@ struct btmtk_section_map { }; } __packed; @@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann static void btusb_mtk_wmt_recv(struct urb *urb) { struct hci_dev *hdev = urb->context; -@@ -3941,6 +3958,7 @@ static int btusb_probe(struct usb_interf +@@ -3943,6 +3960,7 @@ static int btusb_probe(struct usb_interf hdev->shutdown = btusb_mtk_shutdown; hdev->manufacturer = 70; hdev->cmd_timeout = btusb_mtk_cmd_timeout; diff --git a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch index d72866eabf1490..d21adada975efb 100644 --- a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch +++ b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch @@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -2292,7 +2292,7 @@ static int btusb_set_bdaddr_mtk(struct h +@@ -2294,7 +2294,7 @@ static int btusb_set_bdaddr_mtk(struct h struct sk_buff *skb; long ret; diff --git a/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch b/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch index ebb6cc471768e5..30492ac48da59b 100644 --- a/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch +++ b/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch @@ -58,7 +58,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -476,6 +476,9 @@ static const struct usb_device_id blackl +@@ -478,6 +478,9 @@ static const struct usb_device_id blackl { USB_DEVICE(0x13d3, 0x3564), .driver_info = BTUSB_MEDIATEK | BTUSB_WIDEBAND_SPEECH | BTUSB_VALID_LE_STATES }, diff --git a/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch b/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch index a8c7ca003a9cd8..6bcd81c3b8030a 100644 --- a/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch +++ b/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch @@ -56,7 +56,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -467,6 +467,9 @@ static const struct usb_device_id blackl +@@ -469,6 +469,9 @@ static const struct usb_device_id blackl BTUSB_VALID_LE_STATES }, /* Additional MediaTek MT7921 Bluetooth devices */ diff --git a/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch b/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch index b46e6926d1452e..b6b76f64fcbbfe 100644 --- a/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch +++ b/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch @@ -54,7 +54,7 @@ Signed-off-by: Luiz Augusto von Dentz --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -485,6 +485,9 @@ static const struct usb_device_id blackl +@@ -487,6 +487,9 @@ static const struct usb_device_id blackl { USB_DEVICE(0x0489, 0xe0cd), .driver_info = BTUSB_MEDIATEK | BTUSB_WIDEBAND_SPEECH | BTUSB_VALID_LE_STATES }, diff --git a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 66fd6efed5cecf..6eb72abaa76fc7 100644 --- a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -136,14 +136,14 @@ Signed-off-by: Felix Fietkau /** * eth_type_trans - determine the packet's protocol ID. * @skb: received socket data -@@ -173,6 +185,10 @@ __be16 eth_type_trans(struct sk_buff *sk - } else { - skb->pkt_type = PACKET_OTHERHOST; - } -+ -+ if (eth_check_local_mask(eth->h_dest, dev->dev_addr, -+ dev->local_addr_mask)) -+ skb->gro_skip = 1; - } +@@ -165,6 +177,10 @@ __be16 eth_type_trans(struct sk_buff *sk + + eth_skb_pkt_type(skb, dev); ++ if (unlikely(!ether_addr_equal_64bits(eth->h_dest, dev->dev_addr)) && ++ eth_check_local_mask(eth->h_dest, dev->dev_addr, dev->local_addr_mask)) ++ skb->gro_skip = 1; ++ /* + * Some variants of DSA tagging don't have an ethertype field + * at all, so we check here whether one of those tagging diff --git a/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch b/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch index 79b051147a34ab..88aab4129de16c 100644 --- a/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch +++ b/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -559,6 +559,7 @@ +@@ -556,6 +556,7 @@ compatible = "mediatek,mt7622-nor", "mediatek,mt8173-nor"; reg = <0 0x11014000 0 0xe0>; diff --git a/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch b/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch index 15d267137230e3..56548f3ace4189 100644 --- a/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch +++ b/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch @@ -14,7 +14,7 @@ Signed-off-by: Chuanhong Guo --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -553,6 +553,18 @@ +@@ -550,6 +550,18 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch b/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch index 39a9770d98fddf..8b41000a69c370 100644 --- a/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch +++ b/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch @@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -339,7 +339,7 @@ +@@ -337,7 +337,7 @@ #interrupt-cells = <3>; interrupt-parent = <&gic>; reg = <0 0x10310000 0 0x1000>, diff --git a/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch b/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch index 4fef9aea22d93a..506a65266d0b9e 100644 --- a/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch +++ b/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch @@ -112,7 +112,7 @@ Signed-off-by: Rui Salvaterra --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -942,6 +942,7 @@ +@@ -938,6 +938,7 @@ clock-names = "hsdma"; power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>; #dma-cells = <1>; diff --git a/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch b/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch index dc9dbad2509c25..4ca9f9c724823f 100644 --- a/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch +++ b/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch @@ -21,7 +21,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi -@@ -915,64 +915,67 @@ +@@ -916,64 +916,67 @@ }; }; @@ -194,7 +194,7 @@ Signed-off-by: Matthias Brugger &pio { --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -809,75 +809,83 @@ +@@ -804,75 +804,83 @@ #reset-cells = <1>; }; diff --git a/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch b/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch index bf479ab53b2cc6..d58082aa6f0bbe 100644 --- a/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch +++ b/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -849,6 +849,12 @@ +@@ -844,6 +844,12 @@ #address-cells = <0>; #interrupt-cells = <1>; }; @@ -13,7 +13,7 @@ }; pcie1: pcie@1a145000 { -@@ -887,6 +893,12 @@ +@@ -882,6 +888,12 @@ #address-cells = <0>; #interrupt-cells = <1>; }; diff --git a/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch index 76ee2fc89abdad..a3247f1779ac9f 100644 --- a/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch +++ b/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -837,6 +837,9 @@ +@@ -832,6 +832,9 @@ bus-range = <0x00 0xff>; ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>; status = "disabled"; @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; -@@ -881,6 +884,9 @@ +@@ -876,6 +879,9 @@ bus-range = <0x00 0xff>; ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>; status = "disabled"; diff --git a/target/linux/x86/config-5.15 b/target/linux/x86/config-5.15 index 253c6de7e41343..71a5313b0ec7ba 100644 --- a/target/linux/x86/config-5.15 +++ b/target/linux/x86/config-5.15 @@ -58,6 +58,7 @@ CONFIG_CPU_IBRS_ENTRY=y # CONFIG_SLS is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_CENTAUR=y CONFIG_CPU_SUP_CYRIX_32=y @@ -329,7 +330,6 @@ CONFIG_SG_POOL=y # CONFIG_SMSC_SCH311X_WDT is not set CONFIG_SPARSEMEM_STATIC=y CONFIG_SPARSE_IRQ=y -CONFIG_SPECULATION_MITIGATIONS=y CONFIG_SRCU=y # CONFIG_STATIC_CALL_SELFTEST is not set CONFIG_SYSCTL_EXCEPTION_TRACE=y From a39e47e0c9481318942a5ded7eafff286be4b696 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 16 May 2024 14:06:06 +0200 Subject: [PATCH 15/20] mt76: update to Git HEAD (2024-01-18) 83e3947e2c52 linux-firmware: update firmware for MT7922 WiFi device ddaa8cb6e81a linux-firmware: update firmware for MT7921 WiFi device f83b1601cc10 linux-firmware: update firmware for MT7922 WiFi device 61d334ab0f33 linux-firmware: add firmware for MT7925 a7836e4c8a60 wifi: mt76: disable HW AMSDU when using fixed rate a8571ebbcd95 wifi: mt76: check txs format before getting skb by pid 3d5890e2cab3 wifi: mt76: mt7915: fix error recovery with WED enabled 703c26d01197 wifi: mt76: mt7915: add locking for accessing mapped registers f77188160441 wifi: mt76: mt7915: update mt798x_wmac_adie_patch_7976 Signed-off-by: Felix Fietkau (cherry picked from commit a28cedbdab96be9bee39bb70098a1508c0252a8a) --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 65f6ca1e8edd13..1fea3bd0e91617 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-12-18 -PKG_SOURCE_VERSION:=bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b -PKG_MIRROR_HASH:=580261755bc3f251b8bc5f7f610274693c067432187570694d2f2ccab0edb62b +PKG_SOURCE_DATE:=2024-01-18 +PKG_SOURCE_VERSION:=f77188160441d5f77f08dd517632ae3f60c653b0 +PKG_MIRROR_HASH:=133a5e44624fe1933c893ee0b8ac75a847753f3490c26518c2ed9798f9ef53e0 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From ffd0074694722a919333e0a8283ac58929457af0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 16 May 2024 14:06:12 +0200 Subject: [PATCH 16/20] mt76: update to Git HEAD (2024-02-03) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a9693e1979c2 linux-firmware: add firmware for MT7996 0258dc90e3a1 wifi: mt76: mt7603: fix reading target power from eeprom 3e81173d9e2b wifi: mt76: mt7603: initialize chainmask 786a339bac36 wifi: mt76: mt7996: fix fortify warning bc37a7ebc267 wifi: mt76: mt7996: fix fw loading timeout 027bab6a88a3 wifi: mt76: usb: create a dedicated queue for psd traffic e8909c610c3b wifi: mt76: usb: store usb endpoint in mt76_queue 8b3d96fa4ead wifi: mt76: mt792xu: enable dmashdl support 7864d7ad0ed0 wifi: mt76: mt76x2u: add netgear wdna3100v3 to device table 27c81f7c1480 wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band b7443c63069a wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band bab721a65f5a wifi: mt76: mt7925: fix mcu query command fail 1f0f71ed81e8 wifi: mt76: mt7925: fix wmm queue mapping bcfe2ad966f3 wifi: mt76: mt7925: fix fw download fail f982c3d67a29 wifi: mt76: mt7925: fix WoW failed in encrypted mode 6a72716ec213 wifi: mt76: mt7925: fix the wrong header translation config 50928b7e1359 wifi: mt76: mt7925: add flow to avoid chip bt function fail 762ab4530e8f wifi: mt76: mt7925: add support to set ifs time by mcu command 87deaf82efa4 wifi: mt76: mt7925: update PCIe DMA settings c190c1576522 wifi: mt76: mt7925: support temperature sensor 025d5734caba wifi: mt76: mt7996: check txs format before getting skb by pid 4768bfa2baca wifi: mt76: mt7996: fix TWT issues a65e3eced907 wifi: mt76: mt7996: disable AMSDU for non-data frames d71716d93aee wifi: mt76: mt7996: fix incorrect interpretation of EHT MCS caps f21728f3f4bd wifi: mt76: mt7996: ensure 4-byte alignment for beacon commands 68dad7dacd2a wifi: mt76: mt7996: fix HE beamformer phy cap for station vif 66a28f340cdc wifi: mt76: mt7996: mark GCMP IGTK unsupported b47ad8a7764e wifi: mt76: mt7996: fix efuse reading issue c2fc7dae7b72 wifi: mt76: mt7996: remove TXS queue setting e0f1ed168ed5 wifi: mt76: mt7996: add locking for accessing mapped registers d0cc92c1fd08 wifi: mt76: connac: set correct muar_idx for mt799x chipsets ae0c62279adc wifi: mt76: mt7996: fix HIF_TXD_V2_1 value ecc14276af54 wifi: mt76: mt792x: fix ethtool warning 9827df56b241 wifi: mt76: move wed common utilities in wed.c dccbd2598505 wifi: mt76: mt7925: fix the wrong data type for scan command 9907f4f20261 wifi: mt76: mt792x: add the illegal value check for mtcl table of acpi 1b088a7ac06d wifi: mt76: mt7921e: fix use-after-free in free_irq() f3c5b4820d7f wifi: mt76: mt7925e: fix use-after-free in free_irq() d75eac9f5531 wifi: mt76: mt7921: fix incorrect type conversion for CLC command 7bd5401f5bb1 wifi: mt76: mt792x: fix a potential loading failure of the 6Ghz channel config from ACPI ea55196bc4a0 wifi: mt76: mt792x: update the country list of EU for ACPI SAR 6124ea9135ed wifi: mt76: mt7921: fix the unfinished command of regd_notifier before suspend Signed-off-by: Felix Fietkau (cherry picked from commit 114190d8ae61fb3a7671852fbd7f0ca3279a5625) [rmilecki: add patches/fixes for regressions from this commit] Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 24 +++++++- ...-issue-of-missing-txpwr-settings-fr.patch} | 2 +- ...996-fix-size-of-txpower-MCU-command.patch} | 6 +- ...wifi-mt76-mt7996-fix-fortify-warning.patch | 26 -------- ...fix-uninitialized-variable-in-mt799.patch} | 2 +- ...i-mt76-mt7996-fix-fw-loading-timeout.patch | 38 ------------ ...fix-potential-memory-leakage-when-r.patch} | 4 +- ...-check-for-null-before-dereferencing.patch | 27 +++++++++ ...-check-txs-format-before-getting-skb.patch | 60 ------------------- ...-use-muar-idx-0xe-for-non-mt799x-as-.patch | 25 ++++++++ ...-fix-incorrect-type-conversion-for-C.patch | 38 ------------ 11 files changed, 80 insertions(+), 172 deletions(-) rename package/kernel/mt76/patches/{0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch => 0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch} (94%) rename package/kernel/mt76/patches/{0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch => 0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch} (89%) delete mode 100644 package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch rename package/kernel/mt76/patches/{0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch => 0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch} (94%) delete mode 100644 package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch rename package/kernel/mt76/patches/{0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch => 0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch} (90%) create mode 100644 package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch delete mode 100644 package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch create mode 100644 package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch delete mode 100644 package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 1fea3bd0e91617..4f0fb5f69d046f 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2024-01-18 -PKG_SOURCE_VERSION:=f77188160441d5f77f08dd517632ae3f60c653b0 -PKG_MIRROR_HASH:=133a5e44624fe1933c893ee0b8ac75a847753f3490c26518c2ed9798f9ef53e0 +PKG_SOURCE_DATE:=2024-02-03 +PKG_SOURCE_VERSION:=6124ea9135ed512671933f5520c46842906c78bc +PKG_MIRROR_HASH:=acc326d7b15c9c72b494ed601300be329553f896e65c7f045e6a09327304c34a PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 @@ -323,6 +323,12 @@ define KernelPackage/mt7996e AUTOLOAD:=$(call AutoProbe,mt7996e) endef +define KernelPackage/mt7996-firmware + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7996 firmware + DEPENDS+=+kmod-mt7996e +endef + define KernelPackage/mt7925-common $(KernelPackage/mt76-default) TITLE:=MediaTek MT7925 wireless driver common code @@ -610,6 +616,17 @@ define KernelPackage/mt7922-firmware/install $(1)/lib/firmware/mediatek endef +define KernelPackage/mt7996-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996 + cp \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \ + $(1)/lib/firmware/mediatek/mt7996 +endef + define Package/mt76-test/install mkdir -p $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin @@ -654,5 +671,6 @@ $(eval $(call KernelPackage,mt7921e)) $(eval $(call KernelPackage,mt7925u)) $(eval $(call KernelPackage,mt7925e)) $(eval $(call KernelPackage,mt7996e)) +$(eval $(call KernelPackage,mt7996-firmware)) $(eval $(call KernelPackage,mt76)) $(eval $(call BuildPackage,mt76-test)) diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch b/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch similarity index 94% rename from package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch rename to package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch index 380bdfac38d292..ef7816a1a70c91 100644 --- a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch +++ b/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/mt76_connac_mcu.c +++ b/mt76_connac_mcu.c -@@ -2101,7 +2101,7 @@ mt76_connac_mcu_rate_txpower_band(struct +@@ -2104,7 +2104,7 @@ mt76_connac_mcu_rate_txpower_band(struct int j, msg_len, num_ch; struct sk_buff *skb; diff --git a/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch similarity index 89% rename from package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch rename to package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch index f1d3af80b8621f..f3d824558dc683 100644 --- a/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch +++ b/package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/mt7996/mcu.c +++ b/mt7996/mcu.c -@@ -4456,7 +4456,7 @@ int mt7996_mcu_set_txpower_sku(struct mt +@@ -4464,7 +4464,7 @@ int mt7996_mcu_set_txpower_sku(struct mt u8 band_idx; } __packed req = { .tag = cpu_to_le16(UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL), @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau .power_ctrl_id = UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL, .power_limit_type = TX_POWER_LIMIT_TABLE_RATE, .band_idx = phy->mt76->band_idx, -@@ -4471,7 +4471,7 @@ int mt7996_mcu_set_txpower_sku(struct mt +@@ -4479,7 +4479,7 @@ int mt7996_mcu_set_txpower_sku(struct mt mphy->txpower_cur = tx_power; skb = mt76_mcu_msg_alloc(&dev->mt76, NULL, @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau if (!skb) return -ENOMEM; -@@ -4495,6 +4495,9 @@ int mt7996_mcu_set_txpower_sku(struct mt +@@ -4503,6 +4503,9 @@ int mt7996_mcu_set_txpower_sku(struct mt /* eht */ skb_put_data(skb, &la.eht[0], sizeof(la.eht)); diff --git a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch deleted file mode 100644 index f3cf9c10fa6826..00000000000000 --- a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 786a339bac36d8e53eb8b540e79221d20011ab2a Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Sat, 3 Feb 2024 14:21:58 +0100 -Subject: [PATCH] wifi: mt76: mt7996: fix fortify warning - -Copy cck and ofdm separately in order to avoid __read_overflow2_field -warning. - -Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support") -Signed-off-by: Felix Fietkau ---- - mt7996/mcu.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/mt7996/mcu.c -+++ b/mt7996/mcu.c -@@ -4477,7 +4477,8 @@ int mt7996_mcu_set_txpower_sku(struct mt - - skb_put_data(skb, &req, sizeof(req)); - /* cck and ofdm */ -- skb_put_data(skb, &la.cck, sizeof(la.cck) + sizeof(la.ofdm)); -+ skb_put_data(skb, &la.cck, sizeof(la.cck)); -+ skb_put_data(skb, &la.ofdm, sizeof(la.ofdm)); - /* ht20 */ - skb_put_data(skb, &la.mcs[0], 8); - /* ht40 */ diff --git a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch similarity index 94% rename from package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch rename to package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch index b0b7a78e3c1e06..c121bec97274c0 100644 --- a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch +++ b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/mt7996/mmio.c +++ b/mt7996/mmio.c -@@ -499,7 +499,7 @@ static void mt7996_irq_tasklet(struct ta +@@ -519,7 +519,7 @@ static void mt7996_irq_tasklet(struct ta struct mt7996_dev *dev = from_tasklet(dev, t, mt76.irq_tasklet); struct mtk_wed_device *wed = &dev->mt76.mmio.wed; struct mtk_wed_device *wed_hif2 = &dev->mt76.mmio.wed_hif2; diff --git a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch deleted file mode 100644 index 9c2247b0c2f032..00000000000000 --- a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch +++ /dev/null @@ -1,38 +0,0 @@ -From bc37a7ebc267e400fc4e9886b7197b4b866763d1 Mon Sep 17 00:00:00 2001 -From: Lorenzo Bianconi -Date: Thu, 21 Dec 2023 10:41:18 +0100 -Subject: [PATCH] wifi: mt76: mt7996: fix fw loading timeout - -Fix the following firmware loading error due to a wrong dma register -configuration if wed is disabled. - -[ 8.245881] mt7996e_hif 0001:01:00.0: assign IRQ: got 128 -[ 8.251308] mt7996e_hif 0001:01:00.0: enabling device (0000 -> 0002) -[ 8.257674] mt7996e_hif 0001:01:00.0: enabling bus mastering -[ 8.263488] mt7996e 0000:01:00.0: assign IRQ: got 126 -[ 8.268537] mt7996e 0000:01:00.0: enabling device (0000 -> 0002) -[ 8.274551] mt7996e 0000:01:00.0: enabling bus mastering -[ 28.648773] mt7996e 0000:01:00.0: Message 00000010 (seq 1) timeout -[ 28.654959] mt7996e 0000:01:00.0: Failed to get patch semaphore -[ 29.661033] mt7996e: probe of 0000:01:00.0 failed with error -11 - -Suggested-by: Sujuan Chen" -Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM") -Signed-off-by: Lorenzo Bianconi -Signed-off-by: Felix Fietkau ---- - mt7996/dma.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/mt7996/dma.c -+++ b/mt7996/dma.c -@@ -237,7 +237,8 @@ void mt7996_dma_start(struct mt7996_dev - MT_WFDMA0_GLO_CFG_TX_DMA_EN | - MT_WFDMA0_GLO_CFG_RX_DMA_EN | - MT_WFDMA0_GLO_CFG_OMIT_TX_INFO | -- MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2); -+ MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 | -+ MT_WFDMA0_GLO_CFG_EXT_EN); - - if (dev->hif2) - mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs, diff --git a/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch similarity index 90% rename from package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch rename to package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch index a0d62dc5af96a9..421ace147e74b5 100644 --- a/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch +++ b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/mt7996/mcu.c +++ b/mt7996/mcu.c -@@ -3721,6 +3721,7 @@ int mt7996_mcu_get_temperature(struct mt +@@ -3729,6 +3729,7 @@ int mt7996_mcu_get_temperature(struct mt } __packed * res; struct sk_buff *skb; int ret; @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau ret = mt76_mcu_send_and_get_msg(&phy->dev->mt76, MCU_WM_UNI_CMD(THERMAL), &req, sizeof(req), true, &skb); -@@ -3728,8 +3729,10 @@ int mt7996_mcu_get_temperature(struct mt +@@ -3736,8 +3737,10 @@ int mt7996_mcu_get_temperature(struct mt return ret; res = (void *)skb->data; diff --git a/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch b/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch new file mode 100644 index 00000000000000..a5c6fdb16b15f9 --- /dev/null +++ b/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch @@ -0,0 +1,27 @@ +From 725f531c14597f20645321d8a900796f5a68e135 Mon Sep 17 00:00:00 2001 +From: Muhammad Usama Anjum +Date: Fri, 1 Mar 2024 19:44:06 +0500 +Subject: [PATCH] wifi: mt76: connac: check for null before dereferencing + +The wcid can be NULL. It should be checked for validity before +dereferencing it to avoid crash. + +Fixes: 098428c400ff ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets") +Signed-off-by: Muhammad Usama Anjum +Reviewed-by: AngeloGioacchino Del Regno +Signed-off-by: Felix Fietkau +--- + mt76_connac_mcu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mt76_connac_mcu.c ++++ b/mt76_connac_mcu.c +@@ -283,7 +283,7 @@ __mt76_connac_mcu_alloc_sta_req(struct m + }; + struct sk_buff *skb; + +- if (is_mt799x(dev) && !wcid->sta) ++ if (is_mt799x(dev) && wcid && !wcid->sta) + hdr.muar_idx = 0xe; + + mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo, diff --git a/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch b/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch deleted file mode 100644 index f72c76ec666719..00000000000000 --- a/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 025d5734caba6fa1fd96b57c19c61e42e601815b Mon Sep 17 00:00:00 2001 -From: Peter Chiu -Date: Fri, 26 Jan 2024 17:09:12 +0800 -Subject: [PATCH] wifi: mt76: mt7996: check txs format before getting skb by - pid - -The PPDU TXS does not include the error bit so it cannot use to report -status to mac80211. This patch fixes issue that STA wrongly detects if AP -is still alive. - -Fixes: 2569ea5326e2 ("wifi: mt76: mt7996: enable PPDU-TxS to host") -Signed-off-by: Peter Chiu -Signed-off-by: Shayne Chen -Signed-off-by: Felix Fietkau ---- - mt7996/mac.c | 23 +++++++++++++---------- - 1 file changed, 13 insertions(+), 10 deletions(-) - ---- a/mt7996/mac.c -+++ b/mt7996/mac.c -@@ -1188,25 +1188,28 @@ mt7996_mac_add_txs_skb(struct mt7996_dev - struct ieee80211_tx_info *info; - struct sk_buff_head list; - struct rate_info rate = {}; -- struct sk_buff *skb; -+ struct sk_buff *skb = NULL; - bool cck = false; - u32 txrate, txs, mode, stbc; - - txs = le32_to_cpu(txs_data[0]); - - mt76_tx_status_lock(mdev, &list); -- skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list); - -- if (skb) { -- info = IEEE80211_SKB_CB(skb); -- if (!(txs & MT_TXS0_ACK_ERROR_MASK)) -- info->flags |= IEEE80211_TX_STAT_ACK; -- -- info->status.ampdu_len = 1; -- info->status.ampdu_ack_len = -- !!(info->flags & IEEE80211_TX_STAT_ACK); -+ /* only report MPDU TXS */ -+ if (le32_get_bits(txs_data[0], MT_TXS0_TXS_FORMAT) == 0) { -+ skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list); -+ if (skb) { -+ info = IEEE80211_SKB_CB(skb); -+ if (!(txs & MT_TXS0_ACK_ERROR_MASK)) -+ info->flags |= IEEE80211_TX_STAT_ACK; -+ -+ info->status.ampdu_len = 1; -+ info->status.ampdu_ack_len = -+ !!(info->flags & IEEE80211_TX_STAT_ACK); - -- info->status.rates[0].idx = -1; -+ info->status.rates[0].idx = -1; -+ } - } - - if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) { diff --git a/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch b/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch new file mode 100644 index 00000000000000..6aa47d9c62af66 --- /dev/null +++ b/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch @@ -0,0 +1,25 @@ +From 1e336a8582dce2ef32ddd440d423e9afef961e71 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Wed, 3 Apr 2024 13:01:01 +0200 +Subject: [PATCH] wifi: mt76: connac: use muar idx 0xe for non-mt799x as well + +This is expected by the firmware of older chipsets as well, though it may +not have been as strongly required as on mt799x + +Fixes: 098428c400ff ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets") +Signed-off-by: Felix Fietkau +--- + mt76_connac_mcu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mt76_connac_mcu.c ++++ b/mt76_connac_mcu.c +@@ -283,7 +283,7 @@ __mt76_connac_mcu_alloc_sta_req(struct m + }; + struct sk_buff *skb; + +- if (is_mt799x(dev) && wcid && !wcid->sta) ++ if (wcid && !wcid->sta) + hdr.muar_idx = 0xe; + + mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo, diff --git a/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch b/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch deleted file mode 100644 index a85dfb7f72625a..00000000000000 --- a/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d75eac9f5531e484fbbabf2652922976e15a7a7a Mon Sep 17 00:00:00 2001 -From: Ming Yen Hsieh -Date: Tue, 16 Jan 2024 10:48:54 +0800 -Subject: [PATCH] wifi: mt76: mt7921: fix incorrect type conversion for CLC - command - -clc->len is defined as 32 bits in length, so it must also be -operated on with 32 bits, not 16 bits. - -Fixes: fa6ad88e023d ("wifi: mt76: mt7921: fix country count limitation for CLC") -Signed-off-by: Ming Yen Hsieh -Reported-by: kernel test robot -Closes: https://lore.kernel.org/oe-kbuild-all/202312112104.Zkc3QUHr-lkp@intel.com/ -Signed-off-by: Felix Fietkau ---- - mt7921/mcu.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/mt7921/mcu.c -+++ b/mt7921/mcu.c -@@ -1272,7 +1272,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d - .mtcl_conf = mt792x_acpi_get_mtcl_conf(&dev->phy, alpha2), - }; - int ret, valid_cnt = 0; -- u16 buf_len = 0; -+ u32 buf_len = 0; - u8 *pos; - - if (!clc) -@@ -1283,7 +1283,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d - if (mt76_find_power_limits_node(&dev->mt76)) - req.cap |= CLC_CAP_DTS_EN; - -- buf_len = le16_to_cpu(clc->len) - sizeof(*clc); -+ buf_len = le32_to_cpu(clc->len) - sizeof(*clc); - pos = clc->data; - while (buf_len > 16) { - struct mt7921_clc_rule *rule = (struct mt7921_clc_rule *)pos; From 2568b30285ff8715b45434f050ba4598dba1f34b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 16 May 2024 14:11:24 +0200 Subject: [PATCH 17/20] mt76: backport mt7603 fixes important for its stability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those are required for stable MT7603E & on-SoC MT7628/MT7688 wireless support. After mt76 receiving more testing we may just update codebase and drop those backports. Fixes: https://github.com/openwrt/mt76/issues/865 Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 2 +- ...603-fix-tx-queue-of-loopback-packets.patch | 99 +++++++++++++++++++ ...-add-wpdma-tx-eof-flag-for-PSE-clien.patch | 24 +++++ 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch create mode 100644 package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 4f0fb5f69d046f..22269277da0c4c 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=1 +PKG_RELEASE=2 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch b/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch new file mode 100644 index 00000000000000..56a2aea6f6963a --- /dev/null +++ b/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch @@ -0,0 +1,99 @@ +From e4de3592c4e3baa82142eff583cb5a761f790709 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Tue, 2 Apr 2024 20:14:34 +0200 +Subject: [PATCH] wifi: mt76: mt7603: fix tx queue of loopback packets + +Use the correct WMM AC queue instead of the MGMT one to fix potential issues +with aggregation sequence number tracking. Drop non-bufferable packets. + +Fixes: fca9615f1a43 ("mt76: mt7603: fix up hardware queue index for PS filtered packets") +Signed-off-by: Felix Fietkau +--- + mt7603/dma.c | 46 ++++++++++++++++++++++++++++++++-------------- + 1 file changed, 32 insertions(+), 14 deletions(-) + +--- a/mt7603/dma.c ++++ b/mt7603/dma.c +@@ -4,6 +4,13 @@ + #include "mac.h" + #include "../dma.h" + ++static const u8 wmm_queue_map[] = { ++ [IEEE80211_AC_BK] = 0, ++ [IEEE80211_AC_BE] = 1, ++ [IEEE80211_AC_VI] = 2, ++ [IEEE80211_AC_VO] = 3, ++}; ++ + static void + mt7603_rx_loopback_skb(struct mt7603_dev *dev, struct sk_buff *skb) + { +@@ -22,10 +29,10 @@ mt7603_rx_loopback_skb(struct mt7603_dev + struct ieee80211_sta *sta; + struct mt7603_sta *msta; + struct mt76_wcid *wcid; ++ u8 tid = 0, hwq = 0; + void *priv; + int idx; + u32 val; +- u8 tid = 0; + + if (skb->len < MT_TXD_SIZE + sizeof(struct ieee80211_hdr)) + goto free; +@@ -42,19 +49,36 @@ mt7603_rx_loopback_skb(struct mt7603_dev + goto free; + + priv = msta = container_of(wcid, struct mt7603_sta, wcid); +- val = le32_to_cpu(txd[0]); +- val &= ~(MT_TXD0_P_IDX | MT_TXD0_Q_IDX); +- val |= FIELD_PREP(MT_TXD0_Q_IDX, MT_TX_HW_QUEUE_MGMT); +- txd[0] = cpu_to_le32(val); + + sta = container_of(priv, struct ieee80211_sta, drv_priv); + hdr = (struct ieee80211_hdr *)&skb->data[MT_TXD_SIZE]; +- if (ieee80211_is_data_qos(hdr->frame_control)) ++ ++ hwq = wmm_queue_map[IEEE80211_AC_BE]; ++ if (ieee80211_is_data_qos(hdr->frame_control)) { + tid = *ieee80211_get_qos_ctl(hdr) & +- IEEE80211_QOS_CTL_TAG1D_MASK; +- skb_set_queue_mapping(skb, tid_to_ac[tid]); ++ IEEE80211_QOS_CTL_TAG1D_MASK; ++ u8 qid = tid_to_ac[tid]; ++ hwq = wmm_queue_map[qid]; ++ skb_set_queue_mapping(skb, qid); ++ } else if (ieee80211_is_data(hdr->frame_control)) { ++ skb_set_queue_mapping(skb, IEEE80211_AC_BE); ++ hwq = wmm_queue_map[IEEE80211_AC_BE]; ++ } else { ++ skb_pull(skb, MT_TXD_SIZE); ++ if (!ieee80211_is_bufferable_mmpdu(skb)) ++ goto free; ++ skb_push(skb, MT_TXD_SIZE); ++ skb_set_queue_mapping(skb, MT_TXQ_PSD); ++ hwq = MT_TX_HW_QUEUE_MGMT; ++ } ++ + ieee80211_sta_set_buffered(sta, tid, true); + ++ val = le32_to_cpu(txd[0]); ++ val &= ~(MT_TXD0_P_IDX | MT_TXD0_Q_IDX); ++ val |= FIELD_PREP(MT_TXD0_Q_IDX, hwq); ++ txd[0] = cpu_to_le32(val); ++ + spin_lock_bh(&dev->ps_lock); + __skb_queue_tail(&msta->psq, skb); + if (skb_queue_len(&msta->psq) >= 64) { +@@ -151,12 +175,6 @@ static int mt7603_poll_tx(struct napi_st + + int mt7603_dma_init(struct mt7603_dev *dev) + { +- static const u8 wmm_queue_map[] = { +- [IEEE80211_AC_BK] = 0, +- [IEEE80211_AC_BE] = 1, +- [IEEE80211_AC_VI] = 2, +- [IEEE80211_AC_VO] = 3, +- }; + int ret; + int i; + diff --git a/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch b/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch new file mode 100644 index 00000000000000..31c4de4a0f0d50 --- /dev/null +++ b/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch @@ -0,0 +1,24 @@ +From 446f652c967c11d50d9005e2acec97f8b577bb92 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Wed, 3 Apr 2024 11:11:54 +0200 +Subject: [PATCH] wifi: mt76: mt7603: add wpdma tx eof flag for PSE client + reset + +This flag is needed for the PSE client reset. Fixes watchdog reset issues. + +Fixes: c677dda16523 ("wifi: mt76: mt7603: improve watchdog reset reliablity") +Signed-off-by: Felix Fietkau +--- + mt7603/mac.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/mt7603/mac.c ++++ b/mt7603/mac.c +@@ -1393,6 +1393,7 @@ void mt7603_pse_client_reset(struct mt76 + MT_CLIENT_RESET_TX_R_E_2_S); + + /* Start PSE client TX abort */ ++ mt76_set(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_FORCE_TX_EOF); + mt76_set(dev, addr, MT_CLIENT_RESET_TX_R_E_1); + mt76_poll_msec(dev, addr, MT_CLIENT_RESET_TX_R_E_1_S, + MT_CLIENT_RESET_TX_R_E_1_S, 500); From e61f06c51d11dc5846023cd0fb28322345ca03b3 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 16 May 2024 12:03:19 +0200 Subject: [PATCH 18/20] ipq806x: mr42/mr52: fix PCIe ports All three PCIe ports are reported non working on Meraki MR42/MR52 boards since kernel 6.1 with the issue of PCIe PHY link never coming up thus no WLAN cards are available on the boards. After debugging it seems that PCIe worked on 5.15 and older purely by accident as device DTS was using /delete-property/ perst-gpios; in each of the 3 PCIe nodes but there was no "perst-gpios" property in the SoC DTSI as it was still using the older "perst-gpio" property so it was not getting removed from the device DTS. However, in kernel 6.1 commit ("ARM: dts: qcom-*: replace deprecated perst-gpio with perst-gpios") updated all Qualcomm DTS-es to use the newer "perst-gpios" and thus once ipq806x moved to 6.1 PCIe stopped working as now that property was being dropped from the device DTS. So, since the removal of PERST pins seems to have been wrong from the start lets drop the property removal from MR42/MR52. Fixes: #15408 Link: https://github.com/openwrt/openwrt/pull/15509 Link: https://github.com/openwrt/openwrt/pull/15512 Signed-off-by: Robert Marko --- .../arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi index a8f43591f90535..2e7157533178ec 100644 --- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi +++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi @@ -73,10 +73,6 @@ &pcie0 { status = "okay"; - /delete-property/ pinctrl-0; - /delete-property/ pinctrl-names; - /delete-property/ perst-gpios; - bridge@0,0 { reg = <0x0 0 0 0 0>; #address-cells = <3>; @@ -94,10 +90,6 @@ &pcie1 { status = "okay"; - /delete-property/ pinctrl-0; - /delete-property/ pinctrl-names; - /delete-property/ perst-gpios; - bridge@0,0 { reg = <0x0 0 0 0 0>; #address-cells = <3>; @@ -115,10 +107,6 @@ &pcie2 { status = "okay"; - /delete-property/ pinctrl-0; - /delete-property/ pinctrl-names; - /delete-property/ perst-gpios; - bridge@0,0 { reg = <0x0 0 0 0 0>; #address-cells = <3>; From a9e117e03faa53f17598b548f9a245f2ac3b52c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 18 May 2024 14:56:58 +0200 Subject: [PATCH 19/20] mt76: fix mt7603 compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: mt7603/dma.c: In function 'mt7603_rx_loopback_skb': mt7603/dma.c:60:17: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] Fixes: 2568b30285ff ("mt76: backport mt7603 fixes important for its stability") Fixes: https://github.com/openwrt/openwrt/issues/15510 Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 2 +- ...7603-fix-mixed-declarations-and-code.patch | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 22269277da0c4c..9957c99999fa54 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=2 +PKG_RELEASE=3 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= diff --git a/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch b/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch new file mode 100644 index 00000000000000..92befe4afa5fee --- /dev/null +++ b/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch @@ -0,0 +1,33 @@ +From 513c131c6309712a51502870b041f45b4bd6a6d4 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Fri, 17 May 2024 13:51:22 +0200 +Subject: [PATCH] mt76: mt7603: fix mixed declarations and code + +Move the qid variable declaration further up + +Fixes: b473c0e47f04 ("wifi: mt76: mt7603: fix tx queue of loopback packets") +Signed-off-by: Felix Fietkau +--- + mt7603/dma.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/mt7603/dma.c ++++ b/mt7603/dma.c +@@ -29,7 +29,7 @@ mt7603_rx_loopback_skb(struct mt7603_dev + struct ieee80211_sta *sta; + struct mt7603_sta *msta; + struct mt76_wcid *wcid; +- u8 tid = 0, hwq = 0; ++ u8 qid, tid = 0, hwq = 0; + void *priv; + int idx; + u32 val; +@@ -57,7 +57,7 @@ mt7603_rx_loopback_skb(struct mt7603_dev + if (ieee80211_is_data_qos(hdr->frame_control)) { + tid = *ieee80211_get_qos_ctl(hdr) & + IEEE80211_QOS_CTL_TAG1D_MASK; +- u8 qid = tid_to_ac[tid]; ++ qid = tid_to_ac[tid]; + hwq = wmm_queue_map[qid]; + skb_set_queue_mapping(skb, qid); + } else if (ieee80211_is_data(hdr->frame_control)) { From 09a8f75077117ca2ab880cbf854cf7a2dae0d494 Mon Sep 17 00:00:00 2001 From: Yuu Toriyama Date: Sun, 19 May 2024 07:08:37 +0900 Subject: [PATCH 20/20] wireless-regdb: update to 2024.05.08 Changes: 73529a8 Revert "wireless-regdb: Update and disable 5470-5730MHz band according to TPC requirement for Singapore (SG)" 87941e4 wireless-regdb: Update regulatory rules for Taiwan (TW) on 6GHz 33797ae wireless-regdb: update regulatory database based on preceding changes Signed-off-by: Yuu Toriyama (cherry picked from commit 65c1f0d433e89c794a6d22dbe474666c241f9e7b) --- package/firmware/wireless-regdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile index 431d07c35b8cac..91c54372a209ac 100644 --- a/package/firmware/wireless-regdb/Makefile +++ b/package/firmware/wireless-regdb/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wireless-regdb -PKG_VERSION:=2024.01.23 +PKG_VERSION:=2024.05.08 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/ -PKG_HASH:=c8a61c9acf76fa7eb4239e89f640dee3e87098d9f69b4d3518c9c60fc6d20c55 +PKG_HASH:=9aee1d86ebebb363b714bec941b2820f31e3b7f1a485ddc9fcbd9985c7d3e7c4 PKG_MAINTAINER:=Felix Fietkau