From a680ac8bcbcff4a583b101e6c5a4c02644555a7b Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sun, 23 Jul 2023 10:14:54 +0800 Subject: [PATCH 1/9] mac80211: limit MT7620 TX power based on eeprom calibration This patch adds basic TX power control for the MT7620 and limits its maximum TX power. This can avoid the link speed decrease caused by chip overheating. Signed-off-by: Shiji Yang --- ...t-MT7620-TX-power-based-on-eeprom-ca.patch | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch diff --git a/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch new file mode 100644 index 0000000000..fd1b3d8bf3 --- /dev/null +++ b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch @@ -0,0 +1,106 @@ +From: Shiji Yang +Date: Sat, 22 Jul 2023 21:56:30 +0800 +Subject: [PATCH] wifi: rt2x00: limit MT7620 TX power based on eeprom + calibration + +In the vendor driver, the current channel power is queried from +EEPROM_TXPOWER_BG1 and EEPROM_TXPOWER_BG2. And then the mixed value +will be written into the low half-word of the TX_ALC_CFG_0 register. +The high half-word of the TX_ALC_CFG_0 is a fixed value 0x2f2f. + +We can't get the accurate TX power. Based on my tests and the new +MediaTek mt76 driver source code, the real TX power is approximately +equal to channel_power + (max) rate_power. Usually max rate_power is +the gain of the OFDM 6M rate, which can be readed from the offset +EEPROM_TXPOWER_BYRATE +1. + +Based on these eeprom values, this patch adds basic TX power control +for the MT7620 and limits its maximum TX power. This can avoid the +link speed decrease caused by chip overheating. rt2800_config_alc() +function has also been renamed to rt2800_config_alc_rt6352() because +it's only used by RT6352(MT7620). + +Notice: +It's still need some work to sync the max channel power to the user +interface. This part is missing from the rt2x00 driver structure. If +we set the power exceed the calibration value, it won't take effect. + +Signed-off-by: Shiji Yang +--- + .../net/wireless/ralink/rt2x00/rt2800lib.c | 49 +++++++++++++------ + 1 file changed, 34 insertions(+), 15 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -3891,28 +3891,47 @@ static void rt2800_config_channel_rf7620 + } + } + +-static void rt2800_config_alc(struct rt2x00_dev *rt2x00dev, ++static void rt2800_config_alc_rt6352(struct rt2x00_dev *rt2x00dev, + struct ieee80211_channel *chan, + int power_level) { +- u16 eeprom, target_power, max_power; ++ u16 eeprom, chan_power, rate_power, target_power; ++ u16 tx_power[2]; ++ s8 *power_group[2]; + u32 mac_sys_ctrl; +- u32 reg; ++ u32 cnt, reg; + u8 bbp; + +- /* hardware unit is 0.5dBm, limited to 23.5dBm */ +- power_level *= 2; +- if (power_level > 0x2f) +- power_level = 0x2f; +- +- max_power = chan->max_power * 2; +- if (max_power > 0x2f) +- max_power = 0x2f; ++ /* get per channel power, 2 channels in total, unit is 0.5dBm */ ++ power_level = (power_level - 3) * 2; ++ /* ++ * We can't get the accurate TX power. Based on some tests, the real ++ * TX power is approximately equal to channel_power + (max)rate_power. ++ * Usually max rate_power is the gain of the OFDM 6M rate. The antenna ++ * gain and externel PA gain are not included as we are unable to ++ * obtain these values. ++ */ ++ rate_power = rt2800_eeprom_read_from_array(rt2x00dev, ++ EEPROM_TXPOWER_BYRATE, 1) & 0x3f; ++ power_level -= rate_power; ++ if (power_level < 1) ++ power_level = 1; ++ if (power_level > chan->max_power * 2) ++ power_level = chan->max_power * 2; ++ ++ power_group[0] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG1); ++ power_group[1] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG2); ++ for (cnt = 0; cnt < 2; cnt++) { ++ chan_power = power_group[cnt][rt2x00dev->rf_channel - 1]; ++ if (chan_power >= 0x20 || chan_power == 0) ++ chan_power = 0x10; ++ tx_power[cnt] = power_level < chan_power ? power_level : chan_power; ++ } + + reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_0); +- rt2x00_set_field32(®, TX_ALC_CFG_0_CH_INIT_0, power_level); +- rt2x00_set_field32(®, TX_ALC_CFG_0_CH_INIT_1, power_level); +- rt2x00_set_field32(®, TX_ALC_CFG_0_LIMIT_0, max_power); +- rt2x00_set_field32(®, TX_ALC_CFG_0_LIMIT_1, max_power); ++ rt2x00_set_field32(®, TX_ALC_CFG_0_CH_INIT_0, tx_power[0]); ++ rt2x00_set_field32(®, TX_ALC_CFG_0_CH_INIT_1, tx_power[1]); ++ rt2x00_set_field32(®, TX_ALC_CFG_0_LIMIT_0, 0x2f); ++ rt2x00_set_field32(®, TX_ALC_CFG_0_LIMIT_1, 0x2f); + + eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1); + if (rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_INTERNAL_TX_ALC)) { +@@ -5321,7 +5340,7 @@ static void rt2800_config_txpower_rt6352 + rt2x00_set_field32(&pwreg, TX_PWR_CFG_9B_STBC_MCS7, t); + rt2800_register_write(rt2x00dev, TX_PWR_CFG_9, pwreg); + +- rt2800_config_alc(rt2x00dev, chan, power_level); ++ rt2800_config_alc_rt6352(rt2x00dev, chan, power_level); + + /* TODO: temperature compensation code! */ + } From 8912e386e3c3876255ad3b70ccf281bad64ddb4a Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 23 Jul 2023 14:26:13 +0200 Subject: [PATCH 2/9] bcm27xx: update dwc_otc driver with new kthread_complete_and_exit name Kernel 6.1 renamed and moved complete_and_exit to kthread_complete_and_exit. This was just a rename and nothing is changed implementation wise. Update to the new symbol name to fix compilation error. Signed-off-by: Christian Marangi --- .../linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch index 6980592085..a3d861ec2f 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch @@ -4574,7 +4574,7 @@ Signed-off-by: Jonathan Bell + usb_gadget_unregister_driver(&fsg_driver); + + /* Let the unbind and cleanup routines know the thread has exited */ -+ complete_and_exit(&fsg->thread_notifier, 0); ++ kthread_complete_and_exit(&fsg->thread_notifier, 0); +} + + From 9a5b1af670185f07a797920f861a6033e61c5c61 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 23 Jul 2023 14:41:35 +0200 Subject: [PATCH 3/9] rtl8812au-ct: fix compilation error with kernel 6.1 Kernel 6.1 have renamed complete_and_exit to kthread_complete_and_exit. This was just a rename and nothing is changed implementation wise. Fix compilation error by using the new symbol name. Fix compilation error: In file included from /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/include/osdep_service.h:41, from /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:32, from /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c:22: /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c: In function 'rtw_cmd_thread': /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/include/osdep_service_linux.h:166:23: error: implicit declaration of function 'complete_and_exit' [-Werror=implicit-function-declaration] 166 | #define thread_exit() complete_and_exit(NULL, 0) | ^~~~~~~~~~~~~~~~~ /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c:706:9: note: in expansion of macro 'thread_exit' 706 | thread_exit(); | ^~~~~~~~~~~ /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c:708:1: error: control reaches end of non-void function [-Werror=return-type] 708 | } | ^ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi --- .../rtl8812au-ct/patches/005-kernel-6.1.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 package/kernel/rtl8812au-ct/patches/005-kernel-6.1.patch diff --git a/package/kernel/rtl8812au-ct/patches/005-kernel-6.1.patch b/package/kernel/rtl8812au-ct/patches/005-kernel-6.1.patch new file mode 100644 index 0000000000..98aa678491 --- /dev/null +++ b/package/kernel/rtl8812au-ct/patches/005-kernel-6.1.patch @@ -0,0 +1,14 @@ +--- a/include/osdep_service_linux.h ++++ b/include/osdep_service_linux.h +@@ -163,7 +163,11 @@ typedef void* _thread_hdl_; + typedef int thread_return; + typedef void* thread_context; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) ++#define thread_exit() kthread_complete_and_exit(NULL, 0) ++#else + #define thread_exit() complete_and_exit(NULL, 0) ++#endif + + typedef void timer_hdl_return; + typedef void* timer_hdl_context; From 79fd3e62b4910731c13692b2daa2083e0f95c023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sun, 23 Jul 2023 22:41:18 +0200 Subject: [PATCH 4/9] bcm53xx: add BCM53573 Ethernet fix sent upstream for v6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems that DSA-based b53 driver never worked with BCM53573 SoCs and BCM53125. In case of swconfig-based b53 this fixes a regression. Switching bgmac from using mdiobus_register() to of_mdiobus_register() resulted in MDIO device (BCM53125) having of_node set (see of_mdiobus_register_phy()). That made downstream b53 driver read invalid data from DT and broke Ethernet support. Signed-off-by: Rafał Miłecki --- ...M53573-Fix-Tenda-AC9-switch-CPU-port.patch | 28 +++++++++++++++++++ ...M53573-Fix-Tenda-AC9-switch-CPU-port.patch | 28 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch create mode 100644 target/linux/bcm53xx/patches-6.1/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch diff --git a/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch b/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch new file mode 100644 index 0000000000..7a35dcad81 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch @@ -0,0 +1,28 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 19:48:13 +0200 +Subject: [PATCH 1/3] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Primary Ethernet interface is connected to the port 8 (not 5). + +Fixes: 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports") +Signed-off-by: Rafał Miłecki +--- + arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -135,8 +135,8 @@ + label = "lan4"; + }; + +- port@5 { +- reg = <5>; ++ port@8 { ++ reg = <8>; + label = "cpu"; + ethernet = <&gmac0>; + }; diff --git a/target/linux/bcm53xx/patches-6.1/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch b/target/linux/bcm53xx/patches-6.1/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch new file mode 100644 index 0000000000..7a35dcad81 --- /dev/null +++ b/target/linux/bcm53xx/patches-6.1/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch @@ -0,0 +1,28 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 19:48:13 +0200 +Subject: [PATCH 1/3] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Primary Ethernet interface is connected to the port 8 (not 5). + +Fixes: 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports") +Signed-off-by: Rafał Miłecki +--- + arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -135,8 +135,8 @@ + label = "lan4"; + }; + +- port@5 { +- reg = <5>; ++ port@8 { ++ reg = <8>; + label = "cpu"; + ethernet = <&gmac0>; + }; From cd2b74e01e8d5f5b80b82db1cb204c13ed99dd58 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 24 Jul 2023 13:17:44 +0200 Subject: [PATCH 5/9] ramips: mt7621: disable highmem support and remove highmem offset patch On MT7621 it was observed, that enabling highmem support causes a significant performance drop, as documented in: https://github.com/openwrt/openwrt/issues/13151 By adjusting the highmem start offset, we avoid leaving any RAM unaddressable, even on devices with 512 MB Fixes: https://github.com/openwrt/openwrt/issues/13151 Signed-off-by: Felix Fietkau --- target/linux/ramips/mt7621/config-5.15 | 3 --- .../120-highmem-start-offset.patch | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 target/linux/ramips/patches-5.15/120-highmem-start-offset.patch diff --git a/target/linux/ramips/mt7621/config-5.15 b/target/linux/ramips/mt7621/config-5.15 index b366dac723..05e4c1ce87 100644 --- a/target/linux/ramips/mt7621/config-5.15 +++ b/target/linux/ramips/mt7621/config-5.15 @@ -7,7 +7,6 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_AT803X_PHY=y CONFIG_BLK_MQ_PCI=y CONFIG_BOARD_SCACHE=y -CONFIG_BOUNCE=y CONFIG_CEVT_R4K=y CONFIG_CLKSRC_MIPS_GIC=y CONFIG_CLK_MT7621=y @@ -91,7 +90,6 @@ CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -CONFIG_HIGHMEM=y CONFIG_I2C=y CONFIG_I2C_ALGOBIT=y CONFIG_I2C_BOARDINFO=y @@ -106,7 +104,6 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y -CONFIG_KMAP_LOCAL=y CONFIG_LED_TRIGGER_PHY=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y diff --git a/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch b/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch new file mode 100644 index 0000000000..629c7bfa5c --- /dev/null +++ b/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch @@ -0,0 +1,19 @@ +From: Felix Fietkau +Date: Mon Jul 24 13:29:13 CEST 2023 +Subject: [PATCH] mips: ralink: increase highmem start + +Increase highmem start address in order to support devices with 512 MB memory +and MT7621 SoC + +Signed-off-by: Felix Fietkau +--- +--- a/arch/mips/include/asm/mach-ralink/spaces.h ++++ b/arch/mips/include/asm/mach-ralink/spaces.h +@@ -5,6 +5,7 @@ + #define PCI_IOBASE _AC(0xa0000000, UL) + #define PCI_IOSIZE SZ_16M + #define IO_SPACE_LIMIT (PCI_IOSIZE - 1) ++#define HIGHMEM_START _AC(0x24000000, UL) + + #include + #endif From a110de8152df46a1e2adf7010ba75fb3b1236cd8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 24 Jul 2023 14:43:03 +0200 Subject: [PATCH 6/9] kernel: drop mips highmem offset start overrides The maximum offset that can be supported is 0x20000000 Do not override it to to something bigger than that on MT7621, as that could cause issues based on the fixed memory mappings. This makes the last 64 MB RAM unusable on MT7621 devices with 512 MB but avoids incurring a heavy performance hit Fixes: cd2b74e01e8d ("ramips: mt7621: disable highmem support and remove highmem offset patch") Signed-off-by: Felix Fietkau --- .../307-mips_highmem_offset.patch | 19 ------------------- .../pending-6.1/307-mips_highmem_offset.patch | 19 ------------------- .../120-highmem-start-offset.patch | 19 ------------------- 3 files changed, 57 deletions(-) delete mode 100644 target/linux/generic/pending-5.15/307-mips_highmem_offset.patch delete mode 100644 target/linux/generic/pending-6.1/307-mips_highmem_offset.patch delete mode 100644 target/linux/ramips/patches-5.15/120-highmem-start-offset.patch diff --git a/target/linux/generic/pending-5.15/307-mips_highmem_offset.patch b/target/linux/generic/pending-5.15/307-mips_highmem_offset.patch deleted file mode 100644 index 0529b0c5c8..0000000000 --- a/target/linux/generic/pending-5.15/307-mips_highmem_offset.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Subject: kernel: adjust mips highmem offset to avoid the need for -mlong-calls on systems with >256M RAM - -Signed-off-by: Felix Fietkau ---- - arch/mips/include/asm/mach-generic/spaces.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/include/asm/mach-generic/spaces.h -+++ b/arch/mips/include/asm/mach-generic/spaces.h -@@ -46,7 +46,7 @@ - * Memory above this physical address will be considered highmem. - */ - #ifndef HIGHMEM_START --#define HIGHMEM_START _AC(0x20000000, UL) -+#define HIGHMEM_START _AC(0x10000000, UL) - #endif - - #endif /* CONFIG_32BIT */ diff --git a/target/linux/generic/pending-6.1/307-mips_highmem_offset.patch b/target/linux/generic/pending-6.1/307-mips_highmem_offset.patch deleted file mode 100644 index 0529b0c5c8..0000000000 --- a/target/linux/generic/pending-6.1/307-mips_highmem_offset.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Subject: kernel: adjust mips highmem offset to avoid the need for -mlong-calls on systems with >256M RAM - -Signed-off-by: Felix Fietkau ---- - arch/mips/include/asm/mach-generic/spaces.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/include/asm/mach-generic/spaces.h -+++ b/arch/mips/include/asm/mach-generic/spaces.h -@@ -46,7 +46,7 @@ - * Memory above this physical address will be considered highmem. - */ - #ifndef HIGHMEM_START --#define HIGHMEM_START _AC(0x20000000, UL) -+#define HIGHMEM_START _AC(0x10000000, UL) - #endif - - #endif /* CONFIG_32BIT */ diff --git a/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch b/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch deleted file mode 100644 index 629c7bfa5c..0000000000 --- a/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Date: Mon Jul 24 13:29:13 CEST 2023 -Subject: [PATCH] mips: ralink: increase highmem start - -Increase highmem start address in order to support devices with 512 MB memory -and MT7621 SoC - -Signed-off-by: Felix Fietkau ---- ---- a/arch/mips/include/asm/mach-ralink/spaces.h -+++ b/arch/mips/include/asm/mach-ralink/spaces.h -@@ -5,6 +5,7 @@ - #define PCI_IOBASE _AC(0xa0000000, UL) - #define PCI_IOSIZE SZ_16M - #define IO_SPACE_LIMIT (PCI_IOSIZE - 1) -+#define HIGHMEM_START _AC(0x24000000, UL) - - #include - #endif From fec22f8375b4700b331fe8de5dbc511f44057d7f Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 20 Jul 2023 05:51:10 -0400 Subject: [PATCH 7/9] kernel: bump 6.1 to 6.1.39 Removed upstreamed: generic/backport-6.1/803-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch[1] generic/pending-6.1/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch[2] bcm27xx/patches-6.1/950-0034-drm-bridge-Introduce-pre_enable_upstream_first-to-al.patch[3] bcm27xx/patches-6.1/950-0439-nvmem-Use-NVMEM_DEVID_AUTO.patch[4] bcm4908/patches-6.1/040-mtd-parsers-refer-to-ARCH_BCMBCA-instead-of-ARCH_BCM.patch[5] bcm53xx/patches-6.1/031-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch[6] bcm53xx/patches-6.1/031-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch[7] mediatek/patches-6.1/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch[8] qualcommax/patches-6.1/0008-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch[9] Manually rebased: bcm27xx/patches-6.1/950-0035-drm-panel-Add-prepare_upstream_first-flag-to-drm_pan.patch bcm27xx/patches-6.1/950-0404-drm-panel-panel-ilitek9881c-Add-prepare_upstream_fir.patch bcm27xx/patches-6.1/950-0699-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=ab0bd172d6289310a05a0cd15e1432e828d386ae 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=6df680709d901346831ef8f221cc90a42062c526 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=5044e5f2511c9afdf9880d2bb6b9d37dfc345dac 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=e27948f329f7e02591ed1feb9a7710c2ccf89a83 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=ad2928e7f3f6120a0bd18aa1056b3b24068027c5 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=2b55a985727833f37c39911f34096b3fdf2a367d 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=90d4c487cd658b51212eb65ae804ab11af193672 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=7e3ee25e8c7c7be1eacdfc6d9f5f0e550a2af241 9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.39&id=b20854ef6c4955be3310975a72f02d92cb01d6d4 Build system: x86/64 Build-tested: x86/64 Run-tested: x86/64 Co-authored-by: Hauke Mehrtens Co-authored-by: Christian Marangi Signed-off-by: John Audia [ rebase bcm27xx and mediatek patches, refresh commit description ] Signed-off-by: Hauke Mehrtens [ minor fixup to bcm27xx patches, refresh commit description ] Signed-off-by: Christian Marangi --- include/kernel-6.1 | 4 +- ...duce-pre_enable_upstream_first-to-al.patch | 308 ------------------ ...epare_upstream_first-flag-to-drm_pan.patch | 39 +-- ...Set-base-to-0-give-expected-gpio-num.patch | 4 +- ...111-MMC-added-alternative-MMC-driver.patch | 6 +- ...trl-bcm2835-Remove-gpiochip-on-error.patch | 2 +- ...vchiq_arm-Add-36-bit-address-support.patch | 10 +- ...q_arm-Usa-a-DMA-pool-for-small-bulks.patch | 2 +- ...2835-Only-return-non-GPIOs-to-inputs.patch | 4 +- ...ilitek9881c-Add-prepare_upstream_fir.patch | 6 +- .../950-0439-nvmem-Use-NVMEM_DEVID_AUTO.patch | 27 -- ...ci_sync-Add-fallback-bd-address-prop.patch | 14 +- ...bcm2835-Workaround-for-edge-IRQ-loss.patch | 4 +- ...r-to-ARCH_BCMBCA-instead-of-ARCH_BCM.patch | 36 -- ...-Relicense-Rafa-s-code-to-the-GPL-2..patch | 2 +- ...X-Drop-clock-names-from-the-SPI-node.patch | 32 -- ...BCM5301X-fix-duplex-full-full-duplex.patch | 44 --- ...3-10-UPSTREAM-mm-add-vma_has_recency.patch | 2 +- ...dev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch | 35 -- .../generic/hack-6.1/204-module_strip.patch | 12 +- .../780-usb-net-MeigLink_modem_support.patch | 2 +- .../generic/hack-6.1/902-debloat_proc.patch | 2 +- ...ck-usage-in-jffs2_build_xattr_subsys.patch | 121 ------- ...d-knob-for-filtering-rx-tx-BPDU-pack.patch | 2 +- ...freq-mediatek-Add-support-for-MT7988.patch | 6 +- ...-correct-voltages-for-MT7622-and-MT7.patch | 53 --- ...eset-support-resetting-multiple-bits.patch | 59 ---- ...om-Add-support-for-IPQ8074-Gen3-port.patch | 2 +- ...sable-TRIM-on-Micron-MTFC4GACAJCN-1M.patch | 2 +- ...isable-TRIM-on-Kingston-EMMC04G-M627.patch | 2 +- 30 files changed, 65 insertions(+), 779 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0034-drm-bridge-Introduce-pre_enable_upstream_first-to-al.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0439-nvmem-Use-NVMEM_DEVID_AUTO.patch delete mode 100644 target/linux/bcm4908/patches-6.1/040-mtd-parsers-refer-to-ARCH_BCMBCA-instead-of-ARCH_BCM.patch delete mode 100644 target/linux/bcm53xx/patches-6.1/031-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch delete mode 100644 target/linux/bcm53xx/patches-6.1/031-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch delete mode 100644 target/linux/generic/backport-6.1/803-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch delete mode 100644 target/linux/generic/pending-6.1/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch delete mode 100644 target/linux/mediatek/patches-6.1/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch delete mode 100644 target/linux/qualcommax/patches-6.1/0008-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch diff --git a/include/kernel-6.1 b/include/kernel-6.1 index f844ef1c29..2efadcefc0 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .38 -LINUX_KERNEL_HASH-6.1.38 = f9a4f91b609f7d332a5f2be01ab86336fa00149fae6bdc19f16fa19f78802d43 \ No newline at end of file +LINUX_VERSION-6.1 = .39 +LINUX_KERNEL_HASH-6.1.39 = 4cddee22fdf657138a06af653492f67cd3a4762c04a34725534bd200d99085b8 \ No newline at end of file diff --git a/target/linux/bcm27xx/patches-6.1/950-0034-drm-bridge-Introduce-pre_enable_upstream_first-to-al.patch b/target/linux/bcm27xx/patches-6.1/950-0034-drm-bridge-Introduce-pre_enable_upstream_first-to-al.patch deleted file mode 100644 index bab4ed9b90..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0034-drm-bridge-Introduce-pre_enable_upstream_first-to-al.patch +++ /dev/null @@ -1,308 +0,0 @@ -From 5365030a003a6cb0c336202256341e4bc9d65d52 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Thu, 16 Dec 2021 15:25:35 +0000 -Subject: [PATCH] drm/bridge: Introduce pre_enable_upstream_first to - alter bridge init order - -DSI sink devices typically want the DSI host powered up and configured -before they are powered up. pre_enable is the place this would normally -happen, but they are called in reverse order from panel/connector towards -the encoder, which is the "wrong" order. - -Add a new flag pre_enable_upstream_first that any bridge can set -to swap the order of pre_enable (and post_disable) for that and the -immediately upstream bridge. -Should the immediately upstream bridge also set the -pre_enable_upstream_first flag, the bridge upstream of that will be called -before either of those which requested pre_enable_upstream_first. - -eg: -- Panel -- Bridge 1 -- Bridge 2 pre_enable_upstream_first -- Bridge 3 -- Bridge 4 pre_enable_upstream_first -- Bridge 5 pre_enable_upstream_first -- Bridge 6 -- Encoder -Would result in pre_enable's being called as Panel, Bridge 1, Bridge 3, -Bridge 2, Bridge 6, Bridge 5, Bridge 4, Encoder. - -Signed-off-by: Dave Stevenson ---- - drivers/gpu/drm/drm_bridge.c | 177 +++++++++++++++++++++++++---------- - include/drm/drm_bridge.h | 8 ++ - 2 files changed, 137 insertions(+), 48 deletions(-) - ---- a/drivers/gpu/drm/drm_bridge.c -+++ b/drivers/gpu/drm/drm_bridge.c -@@ -547,20 +547,15 @@ EXPORT_SYMBOL(drm_bridge_chain_disable); - * encoder chain, starting from the first bridge to the last. These are called - * after completing the encoder's prepare op. - * -+ * If a bridge sets @pre_enable_upstream_first, then the @post_disable for that -+ * bridge will be called before the previous one to reverse the @pre_enable -+ * calling direction. -+ * - * Note: the bridge passed should be the one closest to the encoder - */ - void drm_bridge_chain_post_disable(struct drm_bridge *bridge) - { -- struct drm_encoder *encoder; -- -- if (!bridge) -- return; -- -- encoder = bridge->encoder; -- list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) { -- if (bridge->funcs->post_disable) -- bridge->funcs->post_disable(bridge); -- } -+ drm_atomic_bridge_chain_post_disable(bridge, NULL); - } - EXPORT_SYMBOL(drm_bridge_chain_post_disable); - -@@ -602,24 +597,14 @@ EXPORT_SYMBOL(drm_bridge_chain_mode_set) - * chain, starting from the last bridge to the first. These are called - * before calling the encoder's commit op. - * -+ * If a bridge sets @pre_enable_upstream_first, then the @pre_enable for the -+ * previous bridge will be called before @pre_enable of this bridge. -+ * - * Note: the bridge passed should be the one closest to the encoder - */ - void drm_bridge_chain_pre_enable(struct drm_bridge *bridge) - { -- struct drm_encoder *encoder; -- struct drm_bridge *iter; -- -- if (!bridge) -- return; -- -- encoder = bridge->encoder; -- list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { -- if (iter->funcs->pre_enable) -- iter->funcs->pre_enable(iter); -- -- if (iter == bridge) -- break; -- } -+ drm_atomic_bridge_chain_pre_enable(bridge, NULL); - } - EXPORT_SYMBOL(drm_bridge_chain_pre_enable); - -@@ -691,6 +676,25 @@ void drm_atomic_bridge_chain_disable(str - } - EXPORT_SYMBOL(drm_atomic_bridge_chain_disable); - -+static void drm_atomic_bridge_call_post_disable(struct drm_bridge *bridge, -+ struct drm_atomic_state *old_state) -+{ -+ if (old_state && bridge->funcs->atomic_post_disable) { -+ struct drm_bridge_state *old_bridge_state; -+ -+ old_bridge_state = -+ drm_atomic_get_old_bridge_state(old_state, -+ bridge); -+ if (WARN_ON(!old_bridge_state)) -+ return; -+ -+ bridge->funcs->atomic_post_disable(bridge, -+ old_bridge_state); -+ } else if (bridge->funcs->post_disable) { -+ bridge->funcs->post_disable(bridge); -+ } -+} -+ - /** - * drm_atomic_bridge_chain_post_disable - cleans up after disabling all bridges - * in the encoder chain -@@ -701,6 +705,9 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_di - * &drm_bridge_funcs.post_disable) op for all the bridges in the encoder chain, - * starting from the first bridge to the last. These are called after completing - * &drm_encoder_helper_funcs.atomic_disable -+ * If a bridge sets @pre_enable_upstream_first, then the @post_disable for that -+ * bridge will be called before the previous one to reverse the @pre_enable -+ * calling direction. - * - * Note: the bridge passed should be the one closest to the encoder - */ -@@ -708,30 +715,75 @@ void drm_atomic_bridge_chain_post_disabl - struct drm_atomic_state *old_state) - { - struct drm_encoder *encoder; -+ struct drm_bridge *next, *limit; - - if (!bridge) - return; - - encoder = bridge->encoder; -+ - list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) { -- if (bridge->funcs->atomic_post_disable) { -- struct drm_bridge_state *old_bridge_state; -+ limit = NULL; - -- old_bridge_state = -- drm_atomic_get_old_bridge_state(old_state, -- bridge); -- if (WARN_ON(!old_bridge_state)) -- return; -+ if (!list_is_last(&bridge->chain_node, &encoder->bridge_chain)) { -+ next = list_next_entry(bridge, chain_node); - -- bridge->funcs->atomic_post_disable(bridge, -- old_bridge_state); -- } else if (bridge->funcs->post_disable) { -- bridge->funcs->post_disable(bridge); -+ if (next->pre_enable_upstream_first) { -+ /* Downstream bridge had requested that upstream -+ * was enabled first, so disabled last -+ */ -+ limit = next; -+ -+ /* Find the next bridge that has NOT requested -+ * upstream to be enabled first / disabled last -+ */ -+ list_for_each_entry_from(next, &encoder->bridge_chain, -+ chain_node) { -+ if (next->pre_enable_upstream_first) { -+ next = list_prev_entry(next, chain_node); -+ limit = next; -+ break; -+ } -+ } -+ -+ /* Call these bridges in reverse order */ -+ list_for_each_entry_from_reverse(next, &encoder->bridge_chain, -+ chain_node) { -+ if (next == bridge) -+ break; -+ -+ drm_atomic_bridge_call_post_disable(next, -+ old_state); -+ } -+ } - } -+ -+ drm_atomic_bridge_call_post_disable(bridge, old_state); -+ -+ if (limit) -+ bridge = limit; - } - } - EXPORT_SYMBOL(drm_atomic_bridge_chain_post_disable); - -+static void drm_atomic_bridge_call_pre_enable(struct drm_bridge *bridge, -+ struct drm_atomic_state *old_state) -+{ -+ if (old_state && bridge->funcs->atomic_pre_enable) { -+ struct drm_bridge_state *old_bridge_state; -+ -+ old_bridge_state = -+ drm_atomic_get_old_bridge_state(old_state, -+ bridge); -+ if (WARN_ON(!old_bridge_state)) -+ return; -+ -+ bridge->funcs->atomic_pre_enable(bridge, old_bridge_state); -+ } else if (bridge->funcs->pre_enable) { -+ bridge->funcs->pre_enable(bridge); -+ } -+} -+ - /** - * drm_atomic_bridge_chain_pre_enable - prepares for enabling all bridges in - * the encoder chain -@@ -743,33 +795,62 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_po - * starting from the last bridge to the first. These are called before calling - * &drm_encoder_helper_funcs.atomic_enable - * -+ * If a bridge sets @pre_enable_upstream_first, then the pre_enable for the -+ * upstream bridge will be called before pre_enable of this bridge. -+ * - * Note: the bridge passed should be the one closest to the encoder - */ - void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge, - struct drm_atomic_state *old_state) - { - struct drm_encoder *encoder; -- struct drm_bridge *iter; -+ struct drm_bridge *iter, *next, *limit; - - if (!bridge) - return; - - encoder = bridge->encoder; -- list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { -- if (iter->funcs->atomic_pre_enable) { -- struct drm_bridge_state *old_bridge_state; - -- old_bridge_state = -- drm_atomic_get_old_bridge_state(old_state, -- iter); -- if (WARN_ON(!old_bridge_state)) -- return; -+ list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { -+ if (iter->pre_enable_upstream_first) { -+ next = iter; -+ limit = bridge; -+ list_for_each_entry_from_reverse(next, -+ &encoder->bridge_chain, -+ chain_node) { -+ if (next == bridge) -+ break; -+ -+ if (!next->pre_enable_upstream_first) { -+ /* Found first bridge that does NOT -+ * request upstream to be enabled first -+ */ -+ limit = list_prev_entry(next, chain_node); -+ break; -+ } -+ } -+ -+ list_for_each_entry_from(next, &encoder->bridge_chain, chain_node) { -+ /* Call requested upstream bridge pre_enable -+ * in order. -+ */ -+ if (next == iter) -+ /* At the first bridgge to request upstream -+ * bridges called first. -+ */ -+ break; - -- iter->funcs->atomic_pre_enable(iter, old_bridge_state); -- } else if (iter->funcs->pre_enable) { -- iter->funcs->pre_enable(iter); -+ drm_atomic_bridge_call_pre_enable(next, old_state); -+ } - } - -+ drm_atomic_bridge_call_pre_enable(iter, old_state); -+ -+ if (iter->pre_enable_upstream_first) -+ /* Jump all bridges that we have already pre_enabled -+ */ -+ iter = limit; -+ - if (iter == bridge) - break; - } ---- a/include/drm/drm_bridge.h -+++ b/include/drm/drm_bridge.h -@@ -769,6 +769,14 @@ struct drm_bridge { - */ - bool interlace_allowed; - /** -+ * @pre_enable_upstream_first: The bridge requires that the upstream -+ * bridge @pre_enable function is called before its @pre_enable, -+ * and conversely for post_disable. This is most frequently a -+ * requirement for DSI devices which need the host to be initialised -+ * before the peripheral. -+ */ -+ bool pre_enable_upstream_first; -+ /** - * @ddc: Associated I2C adapter for DDC access, if any. - */ - struct i2c_adapter *ddc; diff --git a/target/linux/bcm27xx/patches-6.1/950-0035-drm-panel-Add-prepare_upstream_first-flag-to-drm_pan.patch b/target/linux/bcm27xx/patches-6.1/950-0035-drm-panel-Add-prepare_upstream_first-flag-to-drm_pan.patch index 6ca65ab3f3..1e54e61301 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0035-drm-panel-Add-prepare_upstream_first-flag-to-drm_pan.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0035-drm-panel-Add-prepare_upstream_first-flag-to-drm_pan.patch @@ -1,32 +1,33 @@ -From 9ac3eedd8cda7d5f2429edc0bdba137c35e07157 Mon Sep 17 00:00:00 2001 +From 5ea6b17027810ffbdb5bea7d0a2b1d312dd1021c Mon Sep 17 00:00:00 2001 From: Dave Stevenson -Date: Wed, 23 Feb 2022 15:36:56 +0000 -Subject: [PATCH] drm/panel: Add prepare_upstream_first flag to - drm_panel +Date: Mon, 5 Dec 2022 17:33:27 +0000 +Subject: [PATCH] drm/panel: Add prepare_prev_first flag to drm_panel -Mapping to the drm_bridge flag pre_enable_upstream_first, -add a new flag prepare_upstream_first to drm_panel to allow +Mapping to the drm_bridge flag pre_enable_prev_first, +add a new flag prepare_prev_first to drm_panel to allow the panel driver to request that the upstream bridge should be pre_enabled before the panel prepare. Signed-off-by: Dave Stevenson +Reviewed-by: Dmitry Baryshkov +Link: https://lore.kernel.org/r/20221205173328.1395350-6-dave.stevenson@raspberrypi.com +Signed-off-by: Maxime Ripard --- - drivers/gpu/drm/bridge/panel.c | 3 +++ + drivers/gpu/drm/bridge/panel.c | 2 ++ include/drm/drm_panel.h | 10 ++++++++++ - 2 files changed, 13 insertions(+) + 2 files changed, 12 insertions(+) --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c -@@ -258,6 +258,9 @@ struct drm_bridge *drm_panel_bridge_add_ - panel_bridge->bridge.ops = DRM_BRIDGE_OP_MODES; - panel_bridge->bridge.type = connector_type; +@@ -368,6 +368,8 @@ struct drm_bridge *devm_drm_panel_bridge + devres_free(ptr); + } -+ panel_bridge->bridge.pre_enable_upstream_first = -+ panel->prepare_upstream_first; ++ bridge->pre_enable_prev_first = panel->prepare_prev_first; + - drm_bridge_add(&panel_bridge->bridge); - - return &panel_bridge->bridge; + return bridge; + } + EXPORT_SYMBOL(devm_drm_panel_bridge_add_typed); --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -196,6 +196,16 @@ struct drm_panel { @@ -35,14 +36,14 @@ Signed-off-by: Dave Stevenson struct list_head list; + + /** -+ * @prepare_upstream_first: ++ * @prepare_prev_first: + * -+ * The upstream controller should be prepared first, before the prepare ++ * The previous controller should be prepared first, before the prepare + * for the panel is called. This is largely required for DSI panels + * where the DSI host controller should be initialised to LP-11 before + * the panel is powered up. + */ -+ bool prepare_upstream_first; ++ bool prepare_prev_first; }; void drm_panel_init(struct drm_panel *panel, struct device *dev, diff --git a/target/linux/bcm27xx/patches-6.1/950-0104-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch b/target/linux/bcm27xx/patches-6.1/950-0104-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch index b988136486..5ef7bf624b 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0104-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0104-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch @@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -393,7 +393,7 @@ static const struct gpio_chip bcm2835_gp +@@ -391,7 +391,7 @@ static const struct gpio_chip bcm2835_gp .get = bcm2835_gpio_get, .set = bcm2835_gpio_set, .set_config = gpiochip_generic_config, @@ -29,7 +29,7 @@ Signed-off-by: Phil Elwell .ngpio = BCM2835_NUM_GPIOS, .can_sleep = false, .of_gpio_ranges_fallback = bcm2835_of_gpio_ranges_fallback, -@@ -410,7 +410,7 @@ static const struct gpio_chip bcm2711_gp +@@ -408,7 +408,7 @@ static const struct gpio_chip bcm2711_gp .get = bcm2835_gpio_get, .set = bcm2835_gpio_set, .set_config = gpiochip_generic_config, diff --git a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch index 0e14805d5b..ace12078da 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch @@ -325,7 +325,7 @@ Signed-off-by: Phil Elwell } --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h -@@ -106,6 +106,14 @@ static const struct mmc_fixup __maybe_un +@@ -129,6 +129,14 @@ static const struct mmc_fixup __maybe_un MMC_FIXUP(CID_NAME_ANY, CID_MANFID_SANDISK_SD, 0x5344, add_quirk_sd, MMC_QUIRK_BROKEN_SD_DISCARD), @@ -2007,9 +2007,9 @@ Signed-off-by: Phil Elwell sdhci_dumpregs(host); --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h -@@ -295,6 +295,8 @@ struct mmc_card { - #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ +@@ -296,6 +296,8 @@ struct mmc_card { #define MMC_QUIRK_BROKEN_SD_DISCARD (1<<14) /* Disable broken SD discard support */ + #define MMC_QUIRK_BROKEN_SD_CACHE (1<<15) /* Disable broken SD cache support */ +#define MMC_QUIRK_ERASE_BROKEN (1<<31) /* Skip erase */ + diff --git a/target/linux/bcm27xx/patches-6.1/950-0218-pinctrl-bcm2835-Remove-gpiochip-on-error.patch b/target/linux/bcm27xx/patches-6.1/950-0218-pinctrl-bcm2835-Remove-gpiochip-on-error.patch index 1c4dd22402..d44742982c 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0218-pinctrl-bcm2835-Remove-gpiochip-on-error.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0218-pinctrl-bcm2835-Remove-gpiochip-on-error.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -1357,7 +1357,7 @@ static int bcm2835_pinctrl_probe(struct +@@ -1355,7 +1355,7 @@ static int bcm2835_pinctrl_probe(struct girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_level_irq; diff --git a/target/linux/bcm27xx/patches-6.1/950-0328-staging-vchiq_arm-Add-36-bit-address-support.patch b/target/linux/bcm27xx/patches-6.1/950-0328-staging-vchiq_arm-Add-36-bit-address-support.patch index 5ecd2d357d..a9e9991d1a 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0328-staging-vchiq_arm-Add-36-bit-address-support.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0328-staging-vchiq_arm-Add-36-bit-address-support.patch @@ -158,14 +158,14 @@ Signed-off-by: Phil Elwell pagelistinfo->scatterlist_mapped = 0; @@ -468,6 +515,7 @@ free_pagelist(struct vchiq_instance *ins - int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state) + static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state) { struct device *dev = &pdev->dev; + struct device *dma_dev = NULL; struct vchiq_drvdata *drvdata = platform_get_drvdata(pdev); struct rpi_firmware *fw = drvdata->fw; struct vchiq_slot_zero *vchiq_slot_zero; -@@ -489,6 +537,24 @@ int vchiq_platform_init(struct platform_ +@@ -489,6 +537,24 @@ static int vchiq_platform_init(struct pl g_cache_line_size = drvdata->cache_line_size; g_fragments_size = 2 * g_cache_line_size; @@ -190,7 +190,7 @@ Signed-off-by: Phil Elwell /* Allocate space for the channels in coherent memory */ slot_mem_size = PAGE_ALIGN(TOTAL_SLOTS * VCHIQ_SLOT_SIZE); frag_mem_size = PAGE_ALIGN(g_fragments_size * MAX_FRAGMENTS); -@@ -501,13 +567,14 @@ int vchiq_platform_init(struct platform_ +@@ -501,13 +567,14 @@ static int vchiq_platform_init(struct pl } WARN_ON(((unsigned long)slot_mem & (PAGE_SIZE - 1)) != 0); @@ -206,7 +206,7 @@ Signed-off-by: Phil Elwell vchiq_slot_zero->platform_data[VCHIQ_PLATFORM_FRAGMENTS_COUNT_IDX] = MAX_FRAGMENTS; -@@ -541,7 +608,6 @@ int vchiq_platform_init(struct platform_ +@@ -541,7 +608,6 @@ static int vchiq_platform_init(struct pl } /* Send the base address of the slots to VideoCore */ @@ -214,7 +214,7 @@ Signed-off-by: Phil Elwell err = rpi_firmware_property(fw, RPI_FIRMWARE_VCHIQ_INIT, &channelbase, sizeof(channelbase)); if (err || channelbase) { -@@ -549,6 +615,8 @@ int vchiq_platform_init(struct platform_ +@@ -549,6 +615,8 @@ static int vchiq_platform_init(struct pl return err ? : -ENXIO; } diff --git a/target/linux/bcm27xx/patches-6.1/950-0330-staging-vchiq_arm-Usa-a-DMA-pool-for-small-bulks.patch b/target/linux/bcm27xx/patches-6.1/950-0330-staging-vchiq_arm-Usa-a-DMA-pool-for-small-bulks.patch index b4f99d04ca..0f0f247480 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0330-staging-vchiq_arm-Usa-a-DMA-pool-for-small-bulks.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0330-staging-vchiq_arm-Usa-a-DMA-pool-for-small-bulks.patch @@ -102,7 +102,7 @@ Signed-off-by: Oliver Gjoneski pagelistinfo->dma_dir = (type == PAGELIST_WRITE) ? DMA_TO_DEVICE : DMA_FROM_DEVICE; pagelistinfo->num_pages = num_pages; -@@ -616,6 +634,13 @@ int vchiq_platform_init(struct platform_ +@@ -616,6 +634,13 @@ static int vchiq_platform_init(struct pl } g_dma_dev = dma_dev ?: dev; diff --git a/target/linux/bcm27xx/patches-6.1/950-0402-pinctrl-bcm2835-Only-return-non-GPIOs-to-inputs.patch b/target/linux/bcm27xx/patches-6.1/950-0402-pinctrl-bcm2835-Only-return-non-GPIOs-to-inputs.patch index 449406193a..bd199b76e2 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0402-pinctrl-bcm2835-Only-return-non-GPIOs-to-inputs.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0402-pinctrl-bcm2835-Only-return-non-GPIOs-to-inputs.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -928,9 +928,12 @@ static int bcm2835_pmx_free(struct pinct +@@ -926,9 +926,12 @@ static int bcm2835_pmx_free(struct pinct unsigned offset) { struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); @@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell return 0; } -@@ -972,10 +975,7 @@ static void bcm2835_pmx_gpio_disable_fre +@@ -970,10 +973,7 @@ static void bcm2835_pmx_gpio_disable_fre struct pinctrl_gpio_range *range, unsigned offset) { diff --git a/target/linux/bcm27xx/patches-6.1/950-0404-drm-panel-panel-ilitek9881c-Add-prepare_upstream_fir.patch b/target/linux/bcm27xx/patches-6.1/950-0404-drm-panel-panel-ilitek9881c-Add-prepare_upstream_fir.patch index 53373f6b5c..ce66c7d2ee 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0404-drm-panel-panel-ilitek9881c-Add-prepare_upstream_fir.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0404-drm-panel-panel-ilitek9881c-Add-prepare_upstream_fir.patch @@ -2,12 +2,12 @@ From 942d55434af46aebe8f5508995807253a6b235b3 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 31 Mar 2022 12:05:04 +0100 Subject: [PATCH] drm/panel: panel-ilitek9881c: Add - prepare_upstream_first flag + prepare_prev_first flag The panel sends MIPI DCS commands during prepare and is expecting the bus to remain in LP-11 state in-between. -Set the prepare_upstream_first flag so that the upstream DSI host +Set the prepare_prev_first flag so that the upstream DSI host is prepared / pre_enabled first, and therefore the bus is in a defined state. @@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson ctx->dsi = dsi; ctx->desc = of_device_get_match_data(&dsi->dev); -+ ctx->panel.prepare_upstream_first = true; ++ ctx->panel.prepare_prev_first = true; drm_panel_init(&ctx->panel, &dsi->dev, &ili9881c_funcs, DRM_MODE_CONNECTOR_DSI); diff --git a/target/linux/bcm27xx/patches-6.1/950-0439-nvmem-Use-NVMEM_DEVID_AUTO.patch b/target/linux/bcm27xx/patches-6.1/950-0439-nvmem-Use-NVMEM_DEVID_AUTO.patch deleted file mode 100644 index 1758d3e162..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0439-nvmem-Use-NVMEM_DEVID_AUTO.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 10fcafcad54e1d055b6b67881a5b52b95dbd2da3 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 7 Oct 2022 10:38:31 +0100 -Subject: [PATCH] nvmem: Use NVMEM_DEVID_AUTO - -It is reasonable to declare multiple nvmem blocks. Unless a unique 'id' -is passed in for each block there may be name clashes. - -Avoid this by using the magic token NVMEM_DEVID_AUTO. - -Fixes: 5a3fa75a4d9cb ("nvmem: Add driver to expose reserved memory as nvmem") - -Signed-off-by: Phil Elwell ---- - drivers/nvmem/rmem.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/nvmem/rmem.c -+++ b/drivers/nvmem/rmem.c -@@ -71,6 +71,7 @@ static int rmem_probe(struct platform_de - config.dev = dev; - config.priv = priv; - config.name = "rmem"; -+ config.id = NVMEM_DEVID_AUTO; - config.size = mem->size; - config.reg_read = rmem_read; - diff --git a/target/linux/bcm27xx/patches-6.1/950-0699-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch b/target/linux/bcm27xx/patches-6.1/950-0699-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch index 6fd82ce011..fd84781729 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0699-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0699-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch @@ -31,11 +31,11 @@ Signed-off-by: Phil Elwell @@ -4568,7 +4569,9 @@ static int hci_dev_setup_sync(struct hci if (!ret) { - if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks)) { -- if (!bacmp(&hdev->public_addr, BDADDR_ANY)) -+ if (!bacmp(&hdev->public_addr, BDADDR_ANY) && -+ (invalid_bdaddr || -+ !fwnode_property_present(fwnode, "fallback-bd-address"))) - hci_dev_get_bd_addr_from_property(hdev); + if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) && +- !bacmp(&hdev->public_addr, BDADDR_ANY)) ++ !bacmp(&hdev->public_addr, BDADDR_ANY) && ++ (invalid_bdaddr || ++ !fwnode_property_present(fwnode, "fallback-bd-address"))) + hci_dev_get_bd_addr_from_property(hdev); - if (bacmp(&hdev->public_addr, BDADDR_ANY) && + if ((invalid_bdaddr || diff --git a/target/linux/bcm27xx/patches-6.1/950-0704-pinctrl-bcm2835-Workaround-for-edge-IRQ-loss.patch b/target/linux/bcm27xx/patches-6.1/950-0704-pinctrl-bcm2835-Workaround-for-edge-IRQ-loss.patch index 65345f480e..16028b897c 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0704-pinctrl-bcm2835-Workaround-for-edge-IRQ-loss.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0704-pinctrl-bcm2835-Workaround-for-edge-IRQ-loss.patch @@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -422,15 +422,32 @@ static void bcm2835_gpio_irq_handle_bank +@@ -420,15 +420,32 @@ static void bcm2835_gpio_irq_handle_bank unsigned long events; unsigned offset; unsigned gpio; @@ -52,7 +52,7 @@ Signed-off-by: Phil Elwell } static void bcm2835_gpio_irq_handler(struct irq_desc *desc) -@@ -670,11 +687,7 @@ static int bcm2835_gpio_irq_set_type(str +@@ -668,11 +685,7 @@ static int bcm2835_gpio_irq_set_type(str static void bcm2835_gpio_irq_ack(struct irq_data *data) { diff --git a/target/linux/bcm4908/patches-6.1/040-mtd-parsers-refer-to-ARCH_BCMBCA-instead-of-ARCH_BCM.patch b/target/linux/bcm4908/patches-6.1/040-mtd-parsers-refer-to-ARCH_BCMBCA-instead-of-ARCH_BCM.patch deleted file mode 100644 index ff56aacc7c..0000000000 --- a/target/linux/bcm4908/patches-6.1/040-mtd-parsers-refer-to-ARCH_BCMBCA-instead-of-ARCH_BCM.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 085679b15b5af65f9610f619afde41da0f966194 Mon Sep 17 00:00:00 2001 -From: Lukas Bulwahn -Date: Wed, 16 Nov 2022 13:49:32 +0100 -Subject: [PATCH] mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908 - -Commit dd5c672d7ca9 ("arm64: bcmbca: Merge ARCH_BCM4908 to ARCH_BCMBCA") -removes config ARCH_BCM4908 as config ARCH_BCMBCA has the same intent. - -Probably due to concurrent development, commit 002181f5b150 ("mtd: parsers: -add Broadcom's U-Boot parser") introduces 'Broadcom's U-Boot partition -parser' that depends on ARCH_BCM4908, but this use was not visible during -the config refactoring from the commit above. Hence, these two changes -create a reference to a non-existing config symbol. - -Adjust the MTD_BRCM_U_BOOT definition to refer to ARCH_BCMBCA instead of -ARCH_BCM4908 to remove the reference to the non-existing config symbol -ARCH_BCM4908. - -Signed-off-by: Lukas Bulwahn -Signed-off-by: Miquel Raynal -Link: https://lore.kernel.org/linux-mtd/20221116124932.4748-1-lukas.bulwahn@gmail.com ---- - drivers/mtd/parsers/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/mtd/parsers/Kconfig -+++ b/drivers/mtd/parsers/Kconfig -@@ -22,7 +22,7 @@ config MTD_BCM63XX_PARTS - - config MTD_BRCM_U_BOOT - tristate "Broadcom's U-Boot partition parser" -- depends on ARCH_BCM4908 || COMPILE_TEST -+ depends on ARCH_BCMBCA || COMPILE_TEST - help - Broadcom uses a custom way of storing U-Boot environment variables. - They are placed inside U-Boot partition itself at unspecified offset. diff --git a/target/linux/bcm53xx/patches-6.1/031-v6.5-0001-ARM-dts-BCM5301X-Relicense-Rafa-s-code-to-the-GPL-2..patch b/target/linux/bcm53xx/patches-6.1/031-v6.5-0001-ARM-dts-BCM5301X-Relicense-Rafa-s-code-to-the-GPL-2..patch index 43a9d0aa1b..4744e6d5b1 100644 --- a/target/linux/bcm53xx/patches-6.1/031-v6.5-0001-ARM-dts-BCM5301X-Relicense-Rafa-s-code-to-the-GPL-2..patch +++ b/target/linux/bcm53xx/patches-6.1/031-v6.5-0001-ARM-dts-BCM5301X-Relicense-Rafa-s-code-to-the-GPL-2..patch @@ -460,7 +460,7 @@ Signed-off-by: Florian Fainelli }; }; -@@ -558,24 +390,4 @@ +@@ -557,24 +389,4 @@ }; }; }; diff --git a/target/linux/bcm53xx/patches-6.1/031-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch b/target/linux/bcm53xx/patches-6.1/031-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch deleted file mode 100644 index 4065db8366..0000000000 --- a/target/linux/bcm53xx/patches-6.1/031-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d3c8e2c5757153bbfad70019ec1decbca86f3def Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 3 May 2023 14:28:30 +0200 -Subject: [PATCH] ARM: dts: BCM5301X: Drop "clock-names" from the SPI node -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -There is no such property in the SPI controller binding documentation. -Also Linux driver doesn't look for it. - -This fixes: -arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: spi@18029200: Unevaluated properties are not allowed ('clock-names' was unexpected) - From schema: Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.yaml - -Signed-off-by: Rafał Miłecki -Link: https://lore.kernel.org/r/20230503122830.3200-1-zajec5@gmail.com -Signed-off-by: Florian Fainelli ---- - arch/arm/boot/dts/bcm5301x.dtsi | 1 - - 1 file changed, 1 deletion(-) - ---- a/arch/arm/boot/dts/bcm5301x.dtsi -+++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -335,7 +335,6 @@ - "spi_lr_session_done", - "spi_lr_overread"; - clocks = <&iprocmed>; -- clock-names = "iprocmed"; - num-cs = <2>; - #address-cells = <1>; - #size-cells = <0>; diff --git a/target/linux/bcm53xx/patches-6.1/031-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch b/target/linux/bcm53xx/patches-6.1/031-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch deleted file mode 100644 index 805dcf54eb..0000000000 --- a/target/linux/bcm53xx/patches-6.1/031-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch +++ /dev/null @@ -1,44 +0,0 @@ -From fd274b733bfdde3ca72f0fa2a37f032f3a8c402c Mon Sep 17 00:00:00 2001 -From: Christian Lamparter -Date: Thu, 8 Jun 2023 17:36:29 +0200 -Subject: [PATCH] ARM: dts: BCM5301X: fix duplex-full => full-duplex - -this typo was found by the dtbs_check -| ports:port@5:fixed-link: 'oneOf' conditional failed, -| {'speed': [[1000]], 'duplex-full': True} is not of type 'array' -| 'duplex-full' does not match any of the regexes: 'pinctrl-[0-]..." - -this should have been full-duplex; - -Fixes: 935327a73553 ("ARM: dts: BCM5301X: Add DT for Meraki MR26") -Fixes: ec88a9c344d9 ("ARM: BCM5301X: Add DT for Meraki MR32") -Signed-off-by: Christian Lamparter -Link: https://lore.kernel.org/r/50522f45566951a9eabd22820647924cc6b4a264.1686238550.git.chunkeey@gmail.com -Signed-off-by: Florian Fainelli ---- - arch/arm/boot/dts/bcm53015-meraki-mr26.dts | 2 +- - arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/arch/arm/boot/dts/bcm53015-meraki-mr26.dts -+++ b/arch/arm/boot/dts/bcm53015-meraki-mr26.dts -@@ -121,7 +121,7 @@ - - fixed-link { - speed = <1000>; -- duplex-full; -+ full-duplex; - }; - }; - }; ---- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts -+++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts -@@ -182,7 +182,7 @@ - - fixed-link { - speed = <1000>; -- duplex-full; -+ full-duplex; - }; - }; - }; diff --git a/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch b/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch index 6907862905..8fd5564d00 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch @@ -87,7 +87,7 @@ Signed-off-by: T.J. Mercier mark_page_accessed(page); } rss[mm_counter(page)]--; -@@ -5182,8 +5181,8 @@ static inline void mm_account_fault(stru +@@ -5189,8 +5188,8 @@ static inline void mm_account_fault(stru #ifdef CONFIG_LRU_GEN static void lru_gen_enter_fault(struct vm_area_struct *vma) { diff --git a/target/linux/generic/backport-6.1/803-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch b/target/linux/generic/backport-6.1/803-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch deleted file mode 100644 index 3385023168..0000000000 --- a/target/linux/generic/backport-6.1/803-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cee4bd16c3195a701be683f7da9e88c6e11acb73 Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Wed, 19 Apr 2023 23:07:39 +0200 -Subject: [PATCH 1/5] leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on - dev rename - -Dev can be renamed also while up for supported device. We currently -wrongly clear the NETDEV_LED_MODE_LINKUP flag on NETDEV_CHANGENAME -event. - -Fix this by rechecking if the carrier is ok on NETDEV_CHANGENAME and -correctly set the NETDEV_LED_MODE_LINKUP bit. - -Fixes: 5f820ed52371 ("leds: trigger: netdev: fix handling on interface rename") -Cc: stable@vger.kernel.org # v5.5+ -Signed-off-by: Christian Marangi -Reviewed-by: Andrew Lunn -Signed-off-by: Lee Jones -Link: https://lore.kernel.org/r/20230419210743.3594-2-ansuelsmth@gmail.com ---- - drivers/leds/trigger/ledtrig-netdev.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/leds/trigger/ledtrig-netdev.c -+++ b/drivers/leds/trigger/ledtrig-netdev.c -@@ -318,6 +318,9 @@ static int netdev_trig_notify(struct not - clear_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode); - switch (evt) { - case NETDEV_CHANGENAME: -+ if (netif_carrier_ok(dev)) -+ set_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode); -+ fallthrough; - case NETDEV_REGISTER: - if (trigger_data->net_dev) - dev_put(trigger_data->net_dev); diff --git a/target/linux/generic/hack-6.1/204-module_strip.patch b/target/linux/generic/hack-6.1/204-module_strip.patch index f0949d32fd..71ee62ece8 100644 --- a/target/linux/generic/hack-6.1/204-module_strip.patch +++ b/target/linux/generic/hack-6.1/204-module_strip.patch @@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -1817,7 +1817,9 @@ static void read_symbols(const char *mod +@@ -1781,7 +1781,9 @@ static void read_symbols(const char *mod symname = remove_dot(info.strtab + sym->st_name); handle_symbol(mod, &info, sym, symname); @@ -151,7 +151,7 @@ Signed-off-by: Felix Fietkau } for (sym = info.symtab_start; sym < info.symtab_stop; sym++) { -@@ -1980,8 +1982,10 @@ static void add_header(struct buffer *b, +@@ -1944,8 +1946,10 @@ static void add_header(struct buffer *b, buf_printf(b, "BUILD_SALT;\n"); buf_printf(b, "BUILD_LTO_INFO;\n"); buf_printf(b, "\n"); @@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n"); -@@ -1995,8 +1999,10 @@ static void add_header(struct buffer *b, +@@ -1959,8 +1963,10 @@ static void add_header(struct buffer *b, buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n"); buf_printf(b, "};\n"); @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n" -@@ -2004,8 +2010,10 @@ static void add_header(struct buffer *b, +@@ -1968,8 +1974,10 @@ static void add_header(struct buffer *b, "MODULE_INFO(retpoline, \"Y\");\n" "#endif\n"); @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau if (strstarts(mod->name, "tools/testing")) buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n"); -@@ -2101,11 +2109,13 @@ static void add_depends(struct buffer *b +@@ -2065,11 +2073,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -198,7 +198,7 @@ Signed-off-by: Felix Fietkau } static void write_buf(struct buffer *b, const char *fname) -@@ -2191,7 +2201,9 @@ static void write_mod_c_file(struct modu +@@ -2155,7 +2165,9 @@ static void write_mod_c_file(struct modu add_exported_symbols(&buf, mod); add_versions(&buf, mod); add_depends(&buf, mod); diff --git a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch index 7257f7010b..64241c4801 100644 --- a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch @@ -29,7 +29,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1173,6 +1175,11 @@ static const struct usb_device_id option +@@ -1177,6 +1179,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/hack-6.1/902-debloat_proc.patch b/target/linux/generic/hack-6.1/902-debloat_proc.patch index 5722ac97b1..b035f04ba2 100644 --- a/target/linux/generic/hack-6.1/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.1/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -4082,6 +4082,8 @@ static __net_initdata struct pernet_oper +@@ -4093,6 +4093,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-6.1/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch b/target/linux/generic/pending-6.1/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch deleted file mode 100644 index e5a86dd29f..0000000000 --- a/target/linux/generic/pending-6.1/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch +++ /dev/null @@ -1,121 +0,0 @@ -From eee53f6eb7561f516b9c4bac829ce31c48096130 Mon Sep 17 00:00:00 2001 -From: Fabian Frederick -Date: Tue, 9 May 2017 22:30:03 +0200 -Subject: [PATCH] jffs2: reduce stack usage in jffs2_build_xattr_subsystem() - -Use kcalloc() for allocation/flush of 128 pointers table to -reduce stack usage. - -Function now returns -ENOMEM or 0 on success. - -stackusage -Before: -./fs/jffs2/xattr.c:775 jffs2_build_xattr_subsystem 1208 -dynamic,bounded - -After: -./fs/jffs2/xattr.c:775 jffs2_build_xattr_subsystem 192 -dynamic,bounded - -Also update definition when CONFIG_JFFS2_FS_XATTR is not enabled - -Tested with an MTD mount point and some user set/getfattr. - -Many current target on OpenWRT also suffer from a compilation warning -(that become an error with CONFIG_WERROR) with the following output: - -fs/jffs2/xattr.c: In function 'jffs2_build_xattr_subsystem': -fs/jffs2/xattr.c:887:1: error: the frame size of 1088 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] - 887 | } - | ^ - -Using dynamic allocation fix this compilation warning. - -Fixes: c9f700f840bd ("[JFFS2][XATTR] using 'delete marker' for xdatum/xref deletion") -Reported-by: Tim Gardner -Reported-by: kernel test robot -Reported-by: Ron Economos -Reported-by: Nathan Chancellor -Reviewed-by: Nick Desaulniers -Signed-off-by: Fabian Frederick -Signed-off-by: Christian Marangi -Cc: stable@vger.kernel.org ---- - fs/jffs2/build.c | 5 ++++- - fs/jffs2/xattr.c | 13 +++++++++---- - fs/jffs2/xattr.h | 4 ++-- - 3 files changed, 15 insertions(+), 7 deletions(-) - ---- a/fs/jffs2/build.c -+++ b/fs/jffs2/build.c -@@ -211,7 +211,10 @@ static int jffs2_build_filesystem(struct - ic->scan_dents = NULL; - cond_resched(); - } -- jffs2_build_xattr_subsystem(c); -+ ret = jffs2_build_xattr_subsystem(c); -+ if (ret) -+ goto exit; -+ - c->flags &= ~JFFS2_SB_FLAG_BUILDING; - - dbg_fsbuild("FS build complete\n"); ---- a/fs/jffs2/xattr.c -+++ b/fs/jffs2/xattr.c -@@ -772,10 +772,10 @@ void jffs2_clear_xattr_subsystem(struct - } - - #define XREF_TMPHASH_SIZE (128) --void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) -+int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) - { - struct jffs2_xattr_ref *ref, *_ref; -- struct jffs2_xattr_ref *xref_tmphash[XREF_TMPHASH_SIZE]; -+ struct jffs2_xattr_ref **xref_tmphash; - struct jffs2_xattr_datum *xd, *_xd; - struct jffs2_inode_cache *ic; - struct jffs2_raw_node_ref *raw; -@@ -784,9 +784,12 @@ void jffs2_build_xattr_subsystem(struct - - BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING)); - -+ xref_tmphash = kcalloc(XREF_TMPHASH_SIZE, -+ sizeof(struct jffs2_xattr_ref *), GFP_KERNEL); -+ if (!xref_tmphash) -+ return -ENOMEM; -+ - /* Phase.1 : Merge same xref */ -- for (i=0; i < XREF_TMPHASH_SIZE; i++) -- xref_tmphash[i] = NULL; - for (ref=c->xref_temp; ref; ref=_ref) { - struct jffs2_xattr_ref *tmp; - -@@ -884,6 +887,8 @@ void jffs2_build_xattr_subsystem(struct - "%u of xref (%u dead, %u orphan) found.\n", - xdatum_count, xdatum_unchecked_count, xdatum_orphan_count, - xref_count, xref_dead_count, xref_orphan_count); -+ kfree(xref_tmphash); -+ return 0; - } - - struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c, ---- a/fs/jffs2/xattr.h -+++ b/fs/jffs2/xattr.h -@@ -71,7 +71,7 @@ static inline int is_xattr_ref_dead(stru - #ifdef CONFIG_JFFS2_FS_XATTR - - extern void jffs2_init_xattr_subsystem(struct jffs2_sb_info *c); --extern void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c); -+extern int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c); - extern void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c); - - extern struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c, -@@ -103,7 +103,7 @@ extern ssize_t jffs2_listxattr(struct de - #else - - #define jffs2_init_xattr_subsystem(c) --#define jffs2_build_xattr_subsystem(c) -+#define jffs2_build_xattr_subsystem(c) (0) - #define jffs2_clear_xattr_subsystem(c) - - #define jffs2_xattr_do_crccheck_inode(c, ic) diff --git a/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch index 7eb3d8653f..4c09ed6b50 100644 --- a/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch +++ b/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch @@ -161,7 +161,7 @@ Signed-off-by: Felix Fietkau struct rtnl_link { rtnl_doit_func doit; -@@ -4817,7 +4817,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu +@@ -4823,7 +4823,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu brport_nla_put_flag(skb, flags, mask, IFLA_BRPORT_MCAST_FLOOD, BR_MCAST_FLOOD) || brport_nla_put_flag(skb, flags, mask, diff --git a/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch b/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch index 6acd3d607f..49cd62d0ae 100644 --- a/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch +++ b/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch @@ -15,7 +15,7 @@ Signed-off-by: Sam Shih --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c -@@ -702,6 +702,15 @@ static const struct mtk_cpufreq_platform +@@ -709,6 +709,15 @@ static const struct mtk_cpufreq_platform .ccifreq_supported = false, }; @@ -31,10 +31,10 @@ Signed-off-by: Sam Shih static const struct mtk_cpufreq_platform_data mt8183_platform_data = { .min_volt_shift = 100000, .max_volt_shift = 200000, -@@ -735,6 +744,7 @@ static const struct of_device_id mtk_cpu +@@ -742,6 +751,7 @@ static const struct of_device_id mtk_cpu { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, - { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, + { .compatible = "mediatek,mt7623", .data = &mt7623_platform_data }, + { .compatible = "mediatek,mt7988", .data = &mt7988_platform_data }, { .compatible = "mediatek,mt8167", .data = &mt8516_platform_data }, { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, diff --git a/target/linux/mediatek/patches-6.1/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch b/target/linux/mediatek/patches-6.1/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch deleted file mode 100644 index 6ab05b897c..0000000000 --- a/target/linux/mediatek/patches-6.1/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch +++ /dev/null @@ -1,53 +0,0 @@ -From e7697814c142c99f470c3458d49e41b25a575f23 Mon Sep 17 00:00:00 2001 -From: Daniel Golle -Date: Fri, 26 May 2023 10:31:40 +0100 -Subject: [PATCH] cpufreq: mediatek: correct voltages for MT7622 and MT7623 - -The MT6380 regulator typically used together with MT7622 does not -support the current maximum processor and SRAM voltage in the cpufreq -driver (1360000uV). -For MT7622 limit processor and SRAM supply voltages to 1350000uV to -avoid having the tracking algorithm request unsupported voltages from -the regulator. - -On MT7623 there is no separate SRAM supply and the maximum voltage used -is 1300000uV. Create dedicated platform data for MT7623 to cover that -case as well. - -Fixes: 0883426fd07e3 ("cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623") -Suggested-by: Jia-wei Chang -Signed-off-by: Daniel Golle ---- - drivers/cpufreq/mediatek-cpufreq.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - ---- a/drivers/cpufreq/mediatek-cpufreq.c -+++ b/drivers/cpufreq/mediatek-cpufreq.c -@@ -696,9 +696,16 @@ static const struct mtk_cpufreq_platform - static const struct mtk_cpufreq_platform_data mt7622_platform_data = { - .min_volt_shift = 100000, - .max_volt_shift = 200000, -- .proc_max_volt = 1360000, -+ .proc_max_volt = 1350000, - .sram_min_volt = 0, -- .sram_max_volt = 1360000, -+ .sram_max_volt = 1350000, -+ .ccifreq_supported = false, -+}; -+ -+static const struct mtk_cpufreq_platform_data mt7623_platform_data = { -+ .min_volt_shift = 100000, -+ .max_volt_shift = 200000, -+ .proc_max_volt = 1300000, - .ccifreq_supported = false, - }; - -@@ -743,7 +750,7 @@ static const struct of_device_id mtk_cpu - { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data }, - { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, - { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, -- { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, -+ { .compatible = "mediatek,mt7623", .data = &mt7623_platform_data }, - { .compatible = "mediatek,mt7988", .data = &mt7988_platform_data }, - { .compatible = "mediatek,mt8167", .data = &mt8516_platform_data }, - { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, diff --git a/target/linux/qualcommax/patches-6.1/0008-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch b/target/linux/qualcommax/patches-6.1/0008-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch deleted file mode 100644 index e0725a6612..0000000000 --- a/target/linux/qualcommax/patches-6.1/0008-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 813ba3e427671ba3ff35c825087b03f0ad91cf02 Mon Sep 17 00:00:00 2001 -From: Robert Marko -Date: Mon, 7 Nov 2022 14:28:59 +0100 -Subject: [PATCH] clk: qcom: reset: support resetting multiple bits - -This patch adds the support for giving the complete bitmask -in reset structure and reset operation will use this bitmask -for all reset operations. - -Currently, reset structure only takes a single bit for each reset -and then calculates the bitmask by using the BIT() macro. - -However, this is not sufficient anymore for newer SoC-s like IPQ8074, -IPQ6018 and more, since their networking resets require multiple bits -to be asserted in order to properly reset the HW block completely. - -So, in order to allow asserting multiple bits add "bitmask" field to -qcom_reset_map, and then use that bitmask value if its populated in the -driver, if its not populated, then we just default to existing behaviour -and calculate the bitmask on the fly. - -Signed-off-by: Robert Marko -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/20221107132901.489240-1-robimarko@gmail.com ---- - drivers/clk/qcom/reset.c | 4 ++-- - drivers/clk/qcom/reset.h | 1 + - 2 files changed, 3 insertions(+), 2 deletions(-) - ---- a/drivers/clk/qcom/reset.c -+++ b/drivers/clk/qcom/reset.c -@@ -30,7 +30,7 @@ qcom_reset_assert(struct reset_controlle - - rst = to_qcom_reset_controller(rcdev); - map = &rst->reset_map[id]; -- mask = BIT(map->bit); -+ mask = map->bitmask ? map->bitmask : BIT(map->bit); - - return regmap_update_bits(rst->regmap, map->reg, mask, mask); - } -@@ -44,7 +44,7 @@ qcom_reset_deassert(struct reset_control - - rst = to_qcom_reset_controller(rcdev); - map = &rst->reset_map[id]; -- mask = BIT(map->bit); -+ mask = map->bitmask ? map->bitmask : BIT(map->bit); - - return regmap_update_bits(rst->regmap, map->reg, mask, 0); - } ---- a/drivers/clk/qcom/reset.h -+++ b/drivers/clk/qcom/reset.h -@@ -12,6 +12,7 @@ struct qcom_reset_map { - unsigned int reg; - u8 bit; - u8 udelay; -+ u32 bitmask; - }; - - struct regmap; diff --git a/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch b/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch index 60caee46ca..3d5c2182e9 100644 --- a/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch +++ b/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch @@ -16,7 +16,7 @@ Signed-off-by: Bjorn Helgaas --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -1745,6 +1745,7 @@ static const struct of_device_id qcom_pc +@@ -1762,6 +1762,7 @@ static const struct of_device_id qcom_pc { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, diff --git a/target/linux/qualcommax/patches-6.1/0132-mmc-core-disable-TRIM-on-Micron-MTFC4GACAJCN-1M.patch b/target/linux/qualcommax/patches-6.1/0132-mmc-core-disable-TRIM-on-Micron-MTFC4GACAJCN-1M.patch index 8c2e59eeb4..0da71f1b09 100644 --- a/target/linux/qualcommax/patches-6.1/0132-mmc-core-disable-TRIM-on-Micron-MTFC4GACAJCN-1M.patch +++ b/target/linux/qualcommax/patches-6.1/0132-mmc-core-disable-TRIM-on-Micron-MTFC4GACAJCN-1M.patch @@ -20,7 +20,7 @@ Signed-off-by: Robert Marko --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h -@@ -101,6 +101,13 @@ static const struct mmc_fixup __maybe_un +@@ -124,6 +124,13 @@ static const struct mmc_fixup __maybe_un MMC_QUIRK_TRIM_BROKEN), /* diff --git a/target/linux/qualcommax/patches-6.1/0133-mmc-core-disable-TRIM-on-Kingston-EMMC04G-M627.patch b/target/linux/qualcommax/patches-6.1/0133-mmc-core-disable-TRIM-on-Kingston-EMMC04G-M627.patch index ac7af52a74..cc6f29e38e 100644 --- a/target/linux/qualcommax/patches-6.1/0133-mmc-core-disable-TRIM-on-Kingston-EMMC04G-M627.patch +++ b/target/linux/qualcommax/patches-6.1/0133-mmc-core-disable-TRIM-on-Kingston-EMMC04G-M627.patch @@ -22,7 +22,7 @@ Signed-off-by: Robert Marko --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h -@@ -108,6 +108,13 @@ static const struct mmc_fixup __maybe_un +@@ -131,6 +131,13 @@ static const struct mmc_fixup __maybe_un MMC_QUIRK_TRIM_BROKEN), /* From d91f38a99e37b3aa45889f21e9522ac443f2662b Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 23 Jul 2023 11:00:55 -0400 Subject: [PATCH 8/9] kernel: bump 6.1 to 6.1.40 Removed upstreamed: generic/backport-6.1/701-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch[1] generic/pending-6.1/160-workqueue-fix-enum-type-for-gcc-13.patch[2] qualcommax/patches-6.1/0022-v6.5-soc-qcom-mdt_loader-Fix-unconditional-call-to-scm_pa.patch[3] Manually rebased: bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.40&id=685b57a1221c38ec8b456f968264d2496715820c 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.40&id=2d57a1590f4d8c516f5aaf8fd5bb4f52d67275d8 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.40&id=33f8dff6e1cbba5c2ec85fa5649c0a759a7e685c Build system: x86/64, filogic/xiaomi_redmi-router-ax6000-ubootmod Build-tested: x86/64, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: x86/64 Signed-off-by: John Audia --- include/kernel-6.1 | 4 +- ...rs-remove-legacy_cursor_update-hacks.patch | 6 +- ...ore-event-ring-segment-table-entries.patch | 4 +- ...-Add-a-timing-for-the-Raspberry-Pi-7.patch | 4 +- ...-quirks-add-link-TRB-quirk-for-VL805.patch | 8 +- ...usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch | 10 +-- ...nel-simple-add-Geekworm-MZP280-Panel.patch | 2 +- ...uirk-for-Superspeed-bulk-OUT-transfe.patch | 10 +-- ...9-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch | 10 +-- ...Constify-the-old-new-state-accessors.patch | 12 +-- ...mple-Add-Innolux-AT056tN53V1-5.6-VGA.patch | 4 +- ...al-8250-Add-NOMSI-bug-for-bcm2835aux.patch | 4 +- ...support-for-performing-fake-doorbell.patch | 8 +- ...ne-turning-IRQs-off-to-avoid-SoC-han.patch | 45 ----------- ...prove-mdio-master-read-write-by-usin.patch | 6 +- ...a8k-move-qca8k_port_to_phy-to-header.patch | 2 +- ...net-dsa-qca8k-add-LEDs-basic-support.patch | 2 +- ...0-workqueue-fix-enum-type-for-gcc-13.patch | 44 ----------- .../patches-6.1/410-bt-mtk-serial-fix.patch | 2 +- ...om-Add-support-for-IPQ8074-Gen3-port.patch | 2 +- ...der-Fix-unconditional-call-to-scm_pa.patch | 77 ------------------- 21 files changed, 50 insertions(+), 216 deletions(-) delete mode 100644 target/linux/generic/backport-6.1/701-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch delete mode 100644 target/linux/generic/pending-6.1/160-workqueue-fix-enum-type-for-gcc-13.patch delete mode 100644 target/linux/qualcommax/patches-6.1/0022-v6.5-soc-qcom-mdt_loader-Fix-unconditional-call-to-scm_pa.patch diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 2efadcefc0..634e558f3c 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .39 -LINUX_KERNEL_HASH-6.1.39 = 4cddee22fdf657138a06af653492f67cd3a4762c04a34725534bd200d99085b8 \ No newline at end of file +LINUX_VERSION-6.1 = .40 +LINUX_KERNEL_HASH-6.1.40 = 43eafc2197a07dcdcff7a7ef79ac7502061f7c564744e51626bf5fa2e22587f0 \ No newline at end of file diff --git a/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch b/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch index 520d6fa7eb..8bcbb0db27 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch @@ -59,7 +59,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c -@@ -1608,13 +1608,6 @@ drm_atomic_helper_wait_for_vblanks(struc +@@ -1617,13 +1617,6 @@ drm_atomic_helper_wait_for_vblanks(struc int i, ret; unsigned int crtc_mask = 0; @@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { if (!new_crtc_state->active) continue; -@@ -2264,12 +2257,6 @@ int drm_atomic_helper_setup_commit(struc +@@ -2273,12 +2266,6 @@ int drm_atomic_helper_setup_commit(struc complete_all(&commit->flip_done); continue; } @@ -88,7 +88,7 @@ Signed-off-by: Maxime Ripard commit->event = kzalloc(sizeof(*commit->event), --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c -@@ -7766,6 +7766,19 @@ static int intel_atomic_commit(struct dr +@@ -7765,6 +7765,19 @@ static int intel_atomic_commit(struct dr state->base.legacy_cursor_update = false; } diff --git a/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch index c624dfb8da..cf92e9e900 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c -@@ -2501,9 +2501,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2522,9 +2522,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, * Event ring setup: Allocate a normal ring, but also setup * the event ring segment table (ERST). Section 4.9.3. */ @@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell if (!xhci->event_ring) goto fail; if (xhci_check_trb_in_td_math(xhci) < 0) -@@ -2516,7 +2518,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2537,7 +2539,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, /* set ERST count with the number of entries in the segment table */ val = readl(&xhci->ir_set->erst_size); val &= ERST_SIZE_MASK; diff --git a/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch b/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch index aa7bfe130b..4ce71a86aa 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0332-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch @@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c -@@ -3188,6 +3188,31 @@ static const struct panel_desc qishenglo +@@ -3190,6 +3190,31 @@ static const struct panel_desc qishenglo .connector_type = DRM_MODE_CONNECTOR_DPI, }; @@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson static const struct display_timing rocktech_rk070er9427_timing = { .pixelclock = { 26400000, 33300000, 46800000 }, .hactive = { 800, 800, 800 }, -@@ -4219,6 +4244,9 @@ static const struct of_device_id platfor +@@ -4221,6 +4246,9 @@ static const struct of_device_id platfor .compatible = "qishenglong,gopher2b-lcd", .data = &qishenglong_gopher2b_lcd, }, { diff --git a/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 10a068df53..b90f9f7d8b 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -50,11 +50,11 @@ Signed-off-by: Jonathan Bell addr = xhci_trb_virt_to_dma(new_seg, new_deq); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1899,6 +1899,7 @@ struct xhci_hcd { - #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(42) - #define XHCI_SUSPEND_RESUME_CLKS BIT_ULL(43) +@@ -1901,6 +1901,7 @@ struct xhci_hcd { #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) -+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(45) + #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) + #define XHCI_ZHAOXIN_HOST BIT_ULL(46) ++#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch index 22dc08ff98..df2cc5d79b 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch @@ -63,11 +63,11 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1901,6 +1901,7 @@ struct xhci_hcd { - #define XHCI_SUSPEND_RESUME_CLKS BIT_ULL(43) - #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) - #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(45) -+#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(46) +@@ -1903,6 +1903,7 @@ struct xhci_hcd { + #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) + #define XHCI_ZHAOXIN_HOST BIT_ULL(46) + #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) ++#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch b/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch index dfa2e67b70..5b7d4cb218 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0383-drm-panel-simple-add-Geekworm-MZP280-Panel.patch @@ -46,7 +46,7 @@ Acked-by: Maxime Ripard static const struct drm_display_mode giantplus_gpg482739qs5_mode = { .clock = 9000, .hdisplay = 480, -@@ -4103,6 +4129,9 @@ static const struct of_device_id platfor +@@ -4105,6 +4131,9 @@ static const struct of_device_id platfor .compatible = "friendlyarm,hd702e", .data = &friendlyarm_hd702e, }, { diff --git a/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch b/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch index bad3790630..7ec1e3843e 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch @@ -86,11 +86,11 @@ Signed-off-by: Jonathan Bell first_trb = false; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1902,6 +1902,7 @@ struct xhci_hcd { - #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) - #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(45) - #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(46) -+#define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(47) +@@ -1904,6 +1904,7 @@ struct xhci_hcd { + #define XHCI_ZHAOXIN_HOST BIT_ULL(46) + #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) + #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48) ++#define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(49) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index 474698e913..29f4ce1684 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -109,11 +109,11 @@ Signed-off-by: Jonathan Bell return 0; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1903,6 +1903,7 @@ struct xhci_hcd { - #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(45) - #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(46) - #define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(47) -+#define XHCI_VLI_HUB_TT_QUIRK BIT_ULL(48) +@@ -1905,6 +1905,7 @@ struct xhci_hcd { + #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) + #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48) + #define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(49) ++#define XHCI_VLI_HUB_TT_QUIRK BIT_ULL(50) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/bcm27xx/patches-6.1/950-0477-drm-atomic-Constify-the-old-new-state-accessors.patch b/target/linux/bcm27xx/patches-6.1/950-0477-drm-atomic-Constify-the-old-new-state-accessors.patch index 983c54fae1..f12a952ec2 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0477-drm-atomic-Constify-the-old-new-state-accessors.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0477-drm-atomic-Constify-the-old-new-state-accessors.patch @@ -16,7 +16,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1- --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c -@@ -880,7 +880,7 @@ EXPORT_SYMBOL(drm_atomic_get_private_obj +@@ -889,7 +889,7 @@ EXPORT_SYMBOL(drm_atomic_get_private_obj * or NULL if the private_obj is not part of the global atomic state. */ struct drm_private_state * @@ -25,7 +25,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1- struct drm_private_obj *obj) { int i; -@@ -902,7 +902,7 @@ EXPORT_SYMBOL(drm_atomic_get_old_private +@@ -911,7 +911,7 @@ EXPORT_SYMBOL(drm_atomic_get_old_private * or NULL if the private_obj is not part of the global atomic state. */ struct drm_private_state * @@ -34,7 +34,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1- struct drm_private_obj *obj) { int i; -@@ -934,7 +934,7 @@ EXPORT_SYMBOL(drm_atomic_get_new_private +@@ -943,7 +943,7 @@ EXPORT_SYMBOL(drm_atomic_get_new_private * not connected. */ struct drm_connector * @@ -43,7 +43,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1- struct drm_encoder *encoder) { struct drm_connector_state *conn_state; -@@ -968,7 +968,7 @@ EXPORT_SYMBOL(drm_atomic_get_old_connect +@@ -977,7 +977,7 @@ EXPORT_SYMBOL(drm_atomic_get_old_connect * not connected. */ struct drm_connector * @@ -52,7 +52,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1- struct drm_encoder *encoder) { struct drm_connector_state *conn_state; -@@ -1118,7 +1118,7 @@ EXPORT_SYMBOL(drm_atomic_get_bridge_stat +@@ -1127,7 +1127,7 @@ EXPORT_SYMBOL(drm_atomic_get_bridge_stat * the bridge is not part of the global atomic state. */ struct drm_bridge_state * @@ -61,7 +61,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1- struct drm_bridge *bridge) { struct drm_private_state *obj_state; -@@ -1140,7 +1140,7 @@ EXPORT_SYMBOL(drm_atomic_get_old_bridge_ +@@ -1149,7 +1149,7 @@ EXPORT_SYMBOL(drm_atomic_get_old_bridge_ * the bridge is not part of the global atomic state. */ struct drm_bridge_state * diff --git a/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch b/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch index 5ce1d8a190..411c9c7c10 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0521-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch @@ -126,7 +126,7 @@ Signed-off-by: Phil Elwell - MEDIA_BUS_FMT_RGB666_1X24_CPADHI --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c -@@ -2135,6 +2135,38 @@ static const struct panel_desc innolux_a +@@ -2136,6 +2136,38 @@ static const struct panel_desc innolux_a .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, }; @@ -165,7 +165,7 @@ Signed-off-by: Phil Elwell static const struct drm_display_mode innolux_at070tn92_mode = { .clock = 33333, .hdisplay = 800, -@@ -4139,6 +4171,9 @@ static const struct of_device_id platfor +@@ -4141,6 +4173,9 @@ static const struct of_device_id platfor .compatible = "innolux,at043tn24", .data = &innolux_at043tn24, }, { diff --git a/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch b/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch index 885806f976..6f62736b08 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch @@ -20,9 +20,9 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h -@@ -93,6 +93,7 @@ struct serial8250_config { +@@ -92,6 +92,7 @@ struct serial8250_config { + #define UART_BUG_NOMSR BIT(2) /* UART has buggy MSR status bits (Au1x00) */ #define UART_BUG_THRE BIT(3) /* UART has buggy THRE reassertion */ - #define UART_BUG_PARITY BIT(4) /* UART mishandles parity if FIFO enabled */ #define UART_BUG_TXRACE BIT(5) /* UART Tx fails to set remote DR */ +#define UART_BUG_NOMSI BIT(6) /* UART has no modem status interrupt */ diff --git a/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 33066a84d8..37bf49c98c 100644 --- a/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -107,11 +107,11 @@ it on BCM4708 family. if (xhci->quirks & XHCI_NEC_HOST) --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1899,6 +1899,7 @@ struct xhci_hcd { - #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(42) - #define XHCI_SUSPEND_RESUME_CLKS BIT_ULL(43) +@@ -1901,6 +1901,7 @@ struct xhci_hcd { #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) -+#define XHCI_FAKE_DOORBELL BIT_ULL(45) + #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) + #define XHCI_ZHAOXIN_HOST BIT_ULL(46) ++#define XHCI_FAKE_DOORBELL BIT_ULL(47) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/generic/backport-6.1/701-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch b/target/linux/generic/backport-6.1/701-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch deleted file mode 100644 index 26e9ae3bcd..0000000000 --- a/target/linux/generic/backport-6.1/701-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch +++ /dev/null @@ -1,45 +0,0 @@ -From e7731194fdf085f46d58b1adccfddbd0dfee4873 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Fri, 7 Jul 2023 08:53:25 +0200 -Subject: [PATCH] net: bgmac: postpone turning IRQs off to avoid SoC hangs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Turning IRQs off is done by accessing Ethernet controller registers. -That can't be done until device's clock is enabled. It results in a SoC -hang otherwise. - -This bug remained unnoticed for years as most bootloaders keep all -Ethernet interfaces turned on. It seems to only affect a niche SoC -family BCM47189. It has two Ethernet controllers but CFE bootloader uses -only the first one. - -Fixes: 34322615cbaa ("net: bgmac: Mask interrupts during probe") -Signed-off-by: Rafał Miłecki -Reviewed-by: Michal Kubiak -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1492,8 +1492,6 @@ int bgmac_enet_probe(struct bgmac *bgmac - - bgmac->in_init = true; - -- bgmac_chip_intrs_off(bgmac); -- - net_dev->irq = bgmac->irq; - SET_NETDEV_DEV(net_dev, bgmac->dev); - dev_set_drvdata(bgmac->dev, bgmac); -@@ -1511,6 +1509,8 @@ int bgmac_enet_probe(struct bgmac *bgmac - */ - bgmac_clk_enable(bgmac, 0); - -+ bgmac_chip_intrs_off(bgmac); -+ - /* This seems to be fixing IRQ by assigning OOB #6 to the core */ - if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) { - if (bgmac->feature_flags & BGMAC_FEAT_IRQ_ID_OOB_6) diff --git a/target/linux/generic/backport-6.1/777-v6.2-05-net-dsa-qca8k-improve-mdio-master-read-write-by-usin.patch b/target/linux/generic/backport-6.1/777-v6.2-05-net-dsa-qca8k-improve-mdio-master-read-write-by-usin.patch index 4cbb66cf35..ea34901472 100644 --- a/target/linux/generic/backport-6.1/777-v6.2-05-net-dsa-qca8k-improve-mdio-master-read-write-by-usin.patch +++ b/target/linux/generic/backport-6.1/777-v6.2-05-net-dsa-qca8k-improve-mdio-master-read-write-by-usin.patch @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -740,9 +740,9 @@ qca8k_mdio_busy_wait(struct mii_bus *bus +@@ -743,9 +743,9 @@ qca8k_mdio_busy_wait(struct mii_bus *bus qca8k_split_addr(reg, &r1, &r2, &page); @@ -40,7 +40,7 @@ Signed-off-by: David S. Miller /* Check if qca8k_read has failed for a different reason * before returnting -ETIMEDOUT -@@ -784,7 +784,7 @@ qca8k_mdio_write(struct qca8k_priv *priv +@@ -787,7 +787,7 @@ qca8k_mdio_write(struct qca8k_priv *priv exit: /* even if the busy_wait timeouts try to clear the MASTER_EN */ @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller mutex_unlock(&bus->mdio_lock); -@@ -814,18 +814,18 @@ qca8k_mdio_read(struct qca8k_priv *priv, +@@ -817,18 +817,18 @@ qca8k_mdio_read(struct qca8k_priv *priv, if (ret) goto exit; diff --git a/target/linux/generic/backport-6.1/801-v6.4-01-net-dsa-qca8k-move-qca8k_port_to_phy-to-header.patch b/target/linux/generic/backport-6.1/801-v6.4-01-net-dsa-qca8k-move-qca8k_port_to_phy-to-header.patch index e336fb81ba..ba8216f783 100644 --- a/target/linux/generic/backport-6.1/801-v6.4-01-net-dsa-qca8k-move-qca8k_port_to_phy-to-header.patch +++ b/target/linux/generic/backport-6.1/801-v6.4-01-net-dsa-qca8k-move-qca8k_port_to_phy-to-header.patch @@ -20,7 +20,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c -@@ -716,21 +716,6 @@ err_clear_skb: +@@ -719,21 +719,6 @@ err_clear_skb: return ret; } diff --git a/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch b/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch index 37922580da..e5cd03f1f3 100644 --- a/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch +++ b/target/linux/generic/backport-6.1/801-v6.4-02-net-dsa-qca8k-add-LEDs-basic-support.patch @@ -71,7 +71,7 @@ Signed-off-by: David S. Miller static void qca8k_split_addr(u32 regaddr, u16 *r1, u16 *r2, u16 *page) -@@ -1726,6 +1727,10 @@ qca8k_setup(struct dsa_switch *ds) +@@ -1729,6 +1730,10 @@ qca8k_setup(struct dsa_switch *ds) if (ret) return ret; diff --git a/target/linux/generic/pending-6.1/160-workqueue-fix-enum-type-for-gcc-13.patch b/target/linux/generic/pending-6.1/160-workqueue-fix-enum-type-for-gcc-13.patch deleted file mode 100644 index 82076121ac..0000000000 --- a/target/linux/generic/pending-6.1/160-workqueue-fix-enum-type-for-gcc-13.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 525ff9c2965770762b81d679820552a208070d59 Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -Date: Tue, 17 Jan 2023 17:40:35 +0100 -Subject: workqueue: fix enum type for gcc-13 - -In gcc-13, the WORK_STRUCT_WQ_DATA_MASK constant is a signed 64-bit -type on 32-bit architectures because the enum definition has both -negative numbers and numbers above LONG_MAX in it: - -kernel/workqueue.c: In function 'get_work_pwq': -kernel/workqueue.c:709:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] - 709 | return (void *)(data & WORK_STRUCT_WQ_DATA_MASK); - | ^ -kernel/workqueue.c: In function 'get_work_pool': -kernel/workqueue.c:737:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] - 737 | return ((struct pool_workqueue *) - | ^ -kernel/workqueue.c: In function 'get_work_pool_id': -kernel/workqueue.c:759:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] - 759 | return ((struct pool_workqueue *) - | ^ - -Change the enum definition to ensure all values can fit into -the range of 'unsigned long' on all architectures. - -Signed-off-by: Arnd Bergmann -Tested-by: Thierry Reding -Tested-by: Lai Jiangshan -Signed-off-by: Tejun Heo ---- - include/linux/workqueue.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/include/linux/workqueue.h -+++ b/include/linux/workqueue.h -@@ -83,7 +83,7 @@ enum { - - /* convenience constants */ - WORK_STRUCT_FLAG_MASK = (1UL << WORK_STRUCT_FLAG_BITS) - 1, -- WORK_STRUCT_WQ_DATA_MASK = ~WORK_STRUCT_FLAG_MASK, -+ WORK_STRUCT_WQ_DATA_MASK = (unsigned long)~WORK_STRUCT_FLAG_MASK, - WORK_STRUCT_NO_POOL = (unsigned long)WORK_OFFQ_POOL_NONE << WORK_OFFQ_POOL_SHIFT, - - /* bit mask for work_busy() return values */ diff --git a/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch index 5b94c9216d..072883e7fe 100644 --- a/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch +++ b/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch @@ -19,7 +19,7 @@ }, [PORT_NPCM] = { .name = "Nuvoton 16550", -@@ -2773,6 +2773,11 @@ serial8250_do_set_termios(struct uart_po +@@ -2770,6 +2770,11 @@ serial8250_do_set_termios(struct uart_po unsigned long flags; unsigned int baud, quot, frac = 0; diff --git a/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch b/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch index 3d5c2182e9..8f4ef91b76 100644 --- a/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch +++ b/target/linux/qualcommax/patches-6.1/0020-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch @@ -16,7 +16,7 @@ Signed-off-by: Bjorn Helgaas --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -1762,6 +1762,7 @@ static const struct of_device_id qcom_pc +@@ -1764,6 +1764,7 @@ static const struct of_device_id qcom_pc { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, diff --git a/target/linux/qualcommax/patches-6.1/0022-v6.5-soc-qcom-mdt_loader-Fix-unconditional-call-to-scm_pa.patch b/target/linux/qualcommax/patches-6.1/0022-v6.5-soc-qcom-mdt_loader-Fix-unconditional-call-to-scm_pa.patch deleted file mode 100644 index 72b38270c4..0000000000 --- a/target/linux/qualcommax/patches-6.1/0022-v6.5-soc-qcom-mdt_loader-Fix-unconditional-call-to-scm_pa.patch +++ /dev/null @@ -1,77 +0,0 @@ -From b8295c6eb276b60f7b75c53a9703ca8fee01eba2 Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Fri, 26 May 2023 13:09:17 +0200 -Subject: [PATCH] soc: qcom: mdt_loader: Fix unconditional call to - scm_pas_mem_setup - -Commit ebeb20a9cd3f ("soc: qcom: mdt_loader: Always invoke PAS -mem_setup") dropped the relocate check and made pas_mem_setup run -unconditionally. The code was later moved with commit f4e526ff7e38 -("soc: qcom: mdt_loader: Extract PAS operations") to -qcom_mdt_pas_init() effectively losing track of what was actually -done. - -The assumption that PAS mem_setup can be done anytime was effectively -wrong, with no good reason and this caused regression on some SoC -that use remoteproc to bringup ath11k. One example is IPQ8074 SoC that -effectively broke resulting in remoteproc silently die and ath11k not -working. - -On this SoC FW relocate is not enabled and PAS mem_setup was correctly -skipped in previous kernel version resulting in correct bringup and -function of remoteproc and ath11k. - -To fix the regression, reintroduce the relocate check in -qcom_mdt_pas_init() and correctly skip PAS mem_setup where relocate is -not enabled. - -Fixes: ebeb20a9cd3f ("soc: qcom: mdt_loader: Always invoke PAS mem_setup") -Reported-by: Robert Marko -Tested-by: Robert Marko -Co-developed-by: Robert Marko -Signed-off-by: Robert Marko -Signed-off-by: Christian Marangi -Cc: stable@vger.kernel.org ---- - drivers/soc/qcom/mdt_loader.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - ---- a/drivers/soc/qcom/mdt_loader.c -+++ b/drivers/soc/qcom/mdt_loader.c -@@ -210,6 +210,7 @@ int qcom_mdt_pas_init(struct device *dev - const struct elf32_hdr *ehdr; - phys_addr_t min_addr = PHYS_ADDR_MAX; - phys_addr_t max_addr = 0; -+ bool relocate = false; - size_t metadata_len; - void *metadata; - int ret; -@@ -224,6 +225,9 @@ int qcom_mdt_pas_init(struct device *dev - if (!mdt_phdr_valid(phdr)) - continue; - -+ if (phdr->p_flags & QCOM_MDT_RELOCATABLE) -+ relocate = true; -+ - if (phdr->p_paddr < min_addr) - min_addr = phdr->p_paddr; - -@@ -246,11 +250,13 @@ int qcom_mdt_pas_init(struct device *dev - goto out; - } - -- ret = qcom_scm_pas_mem_setup(pas_id, mem_phys, max_addr - min_addr); -- if (ret) { -- /* Unable to set up relocation */ -- dev_err(dev, "error %d setting up firmware %s\n", ret, fw_name); -- goto out; -+ if (relocate) { -+ ret = qcom_scm_pas_mem_setup(pas_id, mem_phys, max_addr - min_addr); -+ if (ret) { -+ /* Unable to set up relocation */ -+ dev_err(dev, "error %d setting up firmware %s\n", ret, fw_name); -+ goto out; -+ } - } - - out: From c74b5e09e692839b39c8325b5f8dc5f2a3b3896c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 25 Jul 2023 09:51:35 +0200 Subject: [PATCH 9/9] urngd: update to the latest master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7aefb47 jitterentropy-rngd: update to the v1.2.0 What's interesting about jitterentropy-rngd v1.2.0 release is that it bumps its copy of jitterentropy-library from v2.2.0 to the v3.0.0. That bump includes a relevant commit 3130cd9 ("replace LSFR with SHA-3 256"). When initializing entropy jent calculates time delta. Time values are obtained using clock_gettime() + CLOCK_REALTIME. There is no guarantee from CLOCK_REALTIME of unique values and slow devices often return duplicated ones. A switch from jent_lfsr_time() to jent_hash_time() resulted in many less cases of zero delta and avoids ECOARSETIME. Long story short: on some system this fixes: [ 6.722725] urngd: jent-rng init failed, err: 2 This is important change for BCM53573 which doesn't include hwrng and seems to have arch_timer running at 36,8 Hz. Signed-off-by: Rafał Miłecki --- package/system/urngd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile index 8350f7ceb9..e131e1be7e 100644 --- a/package/system/urngd/Makefile +++ b/package/system/urngd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git -PKG_SOURCE_DATE:=2020-01-21 -PKG_SOURCE_VERSION:=c7f7b6b65b82eda4675b42d8cd28d76ea7aebf1a -PKG_MIRROR_HASH:=2d31025b79fe130c579d6c3f4bf4dc12abc43a7319b20a5cdca24ae363ec70f3 +PKG_SOURCE_DATE:=2023-07-25 +PKG_SOURCE_VERSION:=7aefb47be57df0467d97d539f7fe9e23e607a3b4 +PKG_MIRROR_HASH:=941e4298acc9a0c9b485b9ad706bb11c4d0bc7a66eec22e569b430ab38a9f5fc PKG_LICENSE:=GPL-2.0 BSD-3-Clause PKG_LICENSE_FILES:=