diff --git a/include/kernel-5.15 b/include/kernel-5.15 index c4127a0fedd370..2949af40befd53 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .171 -LINUX_KERNEL_HASH-5.15.171 = 2953e064d8123c4c22c4fd48011378d73c8b99a3bf3d989e33f4f5c8f82f2a3b +LINUX_VERSION-5.15 = .173 +LINUX_KERNEL_HASH-5.15.173 = 8a4b2a47ccc9b208b2b6ed9a216ea1a5eb12852c723bec1a04de9e671a1d7da8 diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index bf9adc9e5dcb3b..cdaa575fbe3d6c 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -119,7 +119,8 @@ domywifi,dw33d) glinet,gl-ar150) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000" ;; -huawei,ap5030dn) +huawei,ap5030dn|\ +huawei,ap6010dn) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000" ;; netgear,wndr3700|\ diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index a80d106afa5250..e14b531c596a92 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -203,7 +203,7 @@ mac80211_hostapd_setup_base() { dsss_cck_40:1 ht_cap_mask=0 - for cap in $(iw phy "$phy" info | grep 'Capabilities:' | cut -d: -f2); do + for cap in $(iw phy "$phy" info | grep -E '^\s*Capabilities:' | cut -d: -f2); do ht_cap_mask="$(($ht_cap_mask | $cap))" done diff --git a/target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts b/target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts new file mode 100644 index 00000000000000..2f2e6e2331720c --- /dev/null +++ b/target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344.dtsi" + +#include +#include +#include + +/ { + model = "Huawei AP6010DN"; + compatible = "huawei,ap6010dn", "qca,ar9344"; + + chosen { + bootargs = "console=ttyS0,9600n8"; + }; + + aliases { + led-boot = &led_function_green; + led-failsafe = &led_function_red; + led-running = &led_function_green; + led-upgrade = &led_function_red; + label-mac-device = ð0; + }; + + leds { + compatible = "gpio-leds"; + + led_function_green: led-status-green { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + led_function_red: led-status-red { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + }; + + keys { + compatible = "gpio-keys"; + + restart { + label = "reset"; + linux,code = ; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + watchdog { + pinctrl-names = "default"; + pinctrl-0 = <&wdt_gpio15>; + + compatible = "linux,wdt-gpio"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <100>; + always-running; + }; + + virtual_flash { + compatible = "mtd-concat"; + devices = <&fwconcat0 &fwconcat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "firmware"; + reg = <0x0 0x1e00000>; + compatible = "openwrt,uimage", "denx,uimage"; + }; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot-a"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "BootupA"; + reg = <0x80000 0x20000>; + }; + + partition@a0000 { + label = "BootupB"; + reg = <0xa0000 0x20000>; + }; + + partition@c0000 { + label = "u-boot-env"; + reg = <0xc0000 0x20000>; + read-only; + }; + + partition@e0000 { + label = "BoardData"; + reg = <0xe0000 0x20000>; + read-only; + }; + + // In the vendor layout, there are the "SysImageA" (12 MiB) + // and the "ConfigA" (3 MiB) partitions here. + fwconcat0: partition@100000 { + label = "fwconcat0"; + reg = <0x100000 0xf00000>; + }; + + partition@1000000 { + label = "u-boot-b"; + reg = <0x1000000 0x80000>; + read-only; + }; + + partition@1080000 { + label = "ResultA"; + reg = <0x1080000 0x20000>; + read-only; + }; + + partition@10a0000 { + label = "ResultB"; + reg = <0x10a0000 0x20000>; + read-only; + }; + + // In the vendor layout, there are the "SysImageB" (12 MiB) + // and the "ConfigB" (3 MiB) partitions here. + fwconcat1: partition@10c0000 { + label = "fwconcat1"; + reg = <0x10c0000 0xf00000>; + }; + + art: partition@1fc0000 { + label = "art"; + reg = <0x1fc0000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_2005b: macaddr@2005b { + compatible = "mac-base"; + reg = <0x2005b 0x6>; + #nvmem-cell-cells = <1>; + }; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + cal_art_5000: cal@5000 { + reg = <0x5000 0x844>; + }; + }; + }; + }; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&macaddr_art_2005b 1>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0033"; + reg = <0x0000 0 0 0 0>; + gpio-controller; + #gpio-cells = <2>; + + nvmem-cells = <&macaddr_art_2005b 2>, <&cal_art_5000>; + nvmem-cell-names = "mac-address", "calibration"; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +ð0 { + status = "okay"; + + nvmem-cells = <&macaddr_art_2005b 0>; + nvmem-cell-names = "mac-address"; + + pll-data = <0x06000000 0x04000101 0x0c001313>; + phy-mode = "rgmii-id"; + phy-handle = <&phy>; + + gmac-config { + device = <&gmac>; + rgmii-gmac0 = <1>; + rxdv-delay = <3>; + rxd-delay = <3>; + }; +}; + +&mdio0 { + status = "okay"; + + phy: ethernet-phy@18 { + reg = <0x4>; + }; +}; + +&pinmux { + wdt_gpio15: pinmux_wdt_gpio15 { + pinctrl-single,bits = <0xc 0x0 0xFF000000>; + }; +}; + +&wdt { + status = "disabled"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 191138f5218b9d..0907b630d2a5b5 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -50,6 +50,7 @@ ath79_setup_interfaces() glinet,gl-ar300m-lite|\ glinet,gl-usb150|\ hak5,wifi-pineapple-nano|\ + huawei,ap6010dn|\ meraki,mr16|\ netgear,ex7300|\ netgear,ex7300-v2|\ @@ -710,7 +711,8 @@ ath79_setup_macs() hak5,packet-squirrel) label_mac=$(mtd_get_mac_binary u-boot 0x1fc00) ;; - huawei,ap5030dn) + huawei,ap5030dn|\ + huawei,ap6010dn) label_mac=$(mtd_get_mac_binary art 0x2005b) ;; iodata,etg3-r) diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh index e845057f42031a..48a3fe6c622359 100644 --- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh @@ -66,7 +66,8 @@ platform_do_upgrade() { ROOTFS_FILE="root.squashfs" platform_do_upgrade_failsafe_datachk "$1" ;; - huawei,ap5030dn) + huawei,ap5030dn|\ + huawei,ap6010dn) # Store beginning address of the "firmware" partition # as KernelA address and KernelB address, each to BootupA & BootupB # This is the address from which the bootloader will try to load the kernel. diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index f264c14314ca86..637788c73e8cc5 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1643,6 +1643,21 @@ define Device/huawei_ap5030dn endef TARGET_DEVICES += huawei_ap5030dn +define Device/huawei_ap6010dn + SOC := ar9344 + DEVICE_VENDOR := Huawei + DEVICE_MODEL := AP6010DN + LOADER_TYPE := bin + LOADER_FLASH_OFFS := 0x111DC0 + KERNEL_SIZE := 15360k + IMAGE_SIZE := 30720k + COMPILE := loader-$(1).bin + COMPILE/loader-$(1).bin := loader-okli-compile | pad-to 64k | uImage none + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 8128 + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none +endef +TARGET_DEVICES += huawei_ap6010dn + define Device/iodata_etg3-r SOC := ar9342 DEVICE_VENDOR := I-O DATA diff --git a/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h b/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h index e7d768397394be..9dc7c0f817ec84 100644 --- a/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h +++ b/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h @@ -670,6 +670,7 @@ #define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13) #define AR934X_GPIO_OUT_GPIO 0x00 +#define AR934X_GPIO_OUTSEL_CLK_OBS4 0x14 #define QCA955X_GPIO_OUTSEL_CLK_OBS5 0x54 diff --git a/target/linux/ath79/image/lzma-loader/src/board.c b/target/linux/ath79/image/lzma-loader/src/board.c index 13926e9b1e6548..c9840b745881b0 100644 --- a/target/linux/ath79/image/lzma-loader/src/board.c +++ b/target/linux/ath79/image/lzma-loader/src/board.c @@ -182,34 +182,40 @@ static inline void mr18_init(void) static inline void mr18_init(void) { } #endif -#ifdef CONFIG_BOARD_HUAWEI_AP5030DN -static inline void ap5030dn_init(void) +#if defined(CONFIG_BOARD_HUAWEI_AP5030DN) || defined(CONFIG_BOARD_HUAWEI_AP6010DN) +static inline void huawei_ap_init(void) { - const unsigned int ap5030dn_watchdog_gpio = 15; + const unsigned int watchdog_gpio = 15; unsigned int gpiobase, reg; gpiobase = KSEG1ADDR(AR71XX_GPIO_BASE); - printf("Huawei AP5030DN\n"); + printf("Huawei AP\n"); reg = READREG(gpiobase + AR71XX_GPIO_REG_OE); WRITEREG(gpiobase + AR71XX_GPIO_REG_OE, - reg & ~(1 << ap5030dn_watchdog_gpio)); + reg & ~(1 << watchdog_gpio)); /* Set GPIO15 MUX to output CLK_OBS5 (= CPU_CLK/4) - * to keep the watchdog happy until wdt-gpio takes over + * or CLK_OBS4 (= AHB_CLK/2) to keep the watchdog happy + * until wdt-gpio takes over */ reg = READREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3); +#if defined(CONFIG_BOARD_HUAWEI_AP5030DN) WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3, reg | (QCA955X_GPIO_OUTSEL_CLK_OBS5 << 24)); +#elif defined(CONFIG_BOARD_HUAWEI_AP6010DN) + WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3, + reg | (AR934X_GPIO_OUTSEL_CLK_OBS4 << 24)); +#endif } #else -static inline void ap5030dn_init(void) { } +static inline void huawei_ap_init(void) {} #endif void board_init(void) { tlwr1043nd_init(); mr18_init(); - ap5030dn_init(); + huawei_ap_init(); } diff --git a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 57f0ecfd9ec914..2a7b9d518a4948 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1337,6 +1340,9 @@ +@@ -1338,6 +1341,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm27xx/patches-5.15/950-0465-v4l2-ctrls-add-support-for-dynamically-allocated-arr.patch b/target/linux/bcm27xx/patches-5.15/950-0465-v4l2-ctrls-add-support-for-dynamically-allocated-arr.patch index 03074222fe79ec..ce3ba65ee2e687 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0465-v4l2-ctrls-add-support-for-dynamically-allocated-arr.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0465-v4l2-ctrls-add-support-for-dynamically-allocated-arr.patch @@ -191,7 +191,7 @@ Signed-off-by: Hans Verkuil /* Validate controls. */ static int validate_ctrls(struct v4l2_ext_controls *cs, struct v4l2_ctrl_helper *helpers, -@@ -872,6 +922,9 @@ int __v4l2_ctrl_s_ctrl_compound(struct v +@@ -877,6 +927,9 @@ int __v4l2_ctrl_s_ctrl_compound(struct v /* It's a driver bug if this happens. */ if (WARN_ON(ctrl->type != type)) return -EINVAL; diff --git a/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch b/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch index 95eedc7c7a3b0d..bad2672aee7554 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch @@ -16,7 +16,7 @@ Signed-off-by: Jonathan Bell --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -1808,6 +1808,8 @@ static const struct usb_audio_quirk_flag +@@ -1810,6 +1810,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_IGNORE_CTL_ERROR), DEVICE_FLG(0x0951, 0x16ad, /* Kingston HyperX */ QUIRK_FLAG_CTL_MSG_DELAY_1M), diff --git a/target/linux/generic/backport-5.15/020-v6.1-01-mm-x86-arm64-add-arch_has_hw_pte_young.patch b/target/linux/generic/backport-5.15/020-v6.1-01-mm-x86-arm64-add-arch_has_hw_pte_young.patch index 56612012d34723..62deee0410315a 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-01-mm-x86-arm64-add-arch_has_hw_pte_young.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-01-mm-x86-arm64-add-arch_has_hw_pte_young.patch @@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton #ifndef arch_wants_old_prefaulted_pte static inline bool arch_wants_old_prefaulted_pte(void) { -@@ -2808,7 +2796,7 @@ static inline int cow_user_page(struct p +@@ -2819,7 +2807,7 @@ static inline int cow_user_page(struct p * On architectures with software "accessed" bits, we would * take a double page fault, so mark it accessed here. */ diff --git a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch index ce7ab38ed9c1e2..e950e77af69ffd 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch @@ -612,7 +612,7 @@ Signed-off-by: Andrew Morton mem_cgroup_id_remove(memcg); --- a/mm/memory.c +++ b/mm/memory.c -@@ -4821,6 +4821,27 @@ static inline void mm_account_fault(stru +@@ -4832,6 +4832,27 @@ static inline void mm_account_fault(stru perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); } @@ -640,7 +640,7 @@ Signed-off-by: Andrew Morton /* * By the time we get here, we already hold the mm semaphore * -@@ -4852,11 +4873,15 @@ vm_fault_t handle_mm_fault(struct vm_are +@@ -4863,11 +4884,15 @@ vm_fault_t handle_mm_fault(struct vm_are if (flags & FAULT_FLAG_USER) mem_cgroup_enter_user_fault(); diff --git a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch index 31ed45b5ceaf2c..3cbfc49ce547f7 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch @@ -382,7 +382,7 @@ Signed-off-by: Andrew Morton } --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -1091,6 +1091,7 @@ static struct mm_struct *mm_init(struct +@@ -1092,6 +1092,7 @@ static struct mm_struct *mm_init(struct goto fail_nocontext; mm->user_ns = get_user_ns(user_ns); @@ -390,7 +390,7 @@ Signed-off-by: Andrew Morton return mm; fail_nocontext: -@@ -1133,6 +1134,7 @@ static inline void __mmput(struct mm_str +@@ -1134,6 +1135,7 @@ static inline void __mmput(struct mm_str } if (mm->binfmt) module_put(mm->binfmt->module); @@ -398,7 +398,7 @@ Signed-off-by: Andrew Morton mmdrop(mm); } -@@ -2622,6 +2624,13 @@ pid_t kernel_clone(struct kernel_clone_a +@@ -2624,6 +2626,13 @@ pid_t kernel_clone(struct kernel_clone_a get_task_struct(p); } diff --git a/target/linux/generic/backport-5.15/020-v6.3-19-mm-add-vma_has_recency.patch b/target/linux/generic/backport-5.15/020-v6.3-19-mm-add-vma_has_recency.patch index f0a0eea4b6ffa2..cc300345c8afbf 100644 --- a/target/linux/generic/backport-5.15/020-v6.3-19-mm-add-vma_has_recency.patch +++ b/target/linux/generic/backport-5.15/020-v6.3-19-mm-add-vma_has_recency.patch @@ -82,7 +82,7 @@ Signed-off-by: Andrew Morton #include #include #include -@@ -1353,8 +1354,7 @@ again: +@@ -1364,8 +1365,7 @@ again: force_flush = 1; set_page_dirty(page); } @@ -92,7 +92,7 @@ Signed-off-by: Andrew Morton mark_page_accessed(page); } rss[mm_counter(page)]--; -@@ -4824,8 +4824,8 @@ static inline void mm_account_fault(stru +@@ -4835,8 +4835,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-5.15/430-v6.3-udf-Allocate-name-buffer-in-directory-iterator-on-he.patch b/target/linux/generic/backport-5.15/430-v6.3-udf-Allocate-name-buffer-in-directory-iterator-on-he.patch deleted file mode 100644 index 53b8d853200166..00000000000000 --- a/target/linux/generic/backport-5.15/430-v6.3-udf-Allocate-name-buffer-in-directory-iterator-on-he.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Tue, 20 Dec 2022 12:38:45 +0100 -Subject: udf: Allocate name buffer in directory iterator on heap - -commit 0aba4860b0d0216a1a300484ff536171894d49d8 upstream. - -Currently we allocate name buffer in directory iterators (struct -udf_fileident_iter) on stack. These structures are relatively large -(some 360 bytes on 64-bit architectures). For udf_rename() which needs -to keep three of these structures in parallel the stack usage becomes -rather heavy - 1536 bytes in total. Allocate the name buffer in the -iterator from heap to avoid excessive stack usage. - -Link: https://lore.kernel.org/all/202212200558.lK9x1KW0-lkp@intel.com -Reported-by: kernel test robot -Signed-off-by: Jan Kara -[Add extra include linux/slab.h] -Signed-off-by: Hauke Mehrtens ---- - fs/udf/directory.c | 24 ++++++++++++++++-------- - fs/udf/udfdecl.h | 2 +- - 2 files changed, 17 insertions(+), 9 deletions(-) - ---- a/fs/udf/directory.c -+++ b/fs/udf/directory.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - - static int udf_verify_fi(struct udf_fileident_iter *iter) - { -@@ -248,9 +249,14 @@ int udf_fiiter_init(struct udf_fileident - iter->elen = 0; - iter->epos.bh = NULL; - iter->name = NULL; -+ iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL); -+ if (!iter->namebuf) -+ return -ENOMEM; - -- if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) -- return udf_copy_fi(iter); -+ if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { -+ err = udf_copy_fi(iter); -+ goto out; -+ } - - if (inode_bmap(dir, iter->pos >> dir->i_blkbits, &iter->epos, - &iter->eloc, &iter->elen, &iter->loffset) != -@@ -260,17 +266,17 @@ int udf_fiiter_init(struct udf_fileident - udf_err(dir->i_sb, - "position %llu not allocated in directory (ino %lu)\n", - (unsigned long long)pos, dir->i_ino); -- return -EFSCORRUPTED; -+ err = -EFSCORRUPTED; -+ goto out; - } - err = udf_fiiter_load_bhs(iter); - if (err < 0) -- return err; -+ goto out; - err = udf_copy_fi(iter); -- if (err < 0) { -+out: -+ if (err < 0) - udf_fiiter_release(iter); -- return err; -- } -- return 0; -+ return err; - } - - int udf_fiiter_advance(struct udf_fileident_iter *iter) -@@ -307,6 +313,8 @@ void udf_fiiter_release(struct udf_filei - brelse(iter->bh[0]); - brelse(iter->bh[1]); - iter->bh[0] = iter->bh[1] = NULL; -+ kfree(iter->namebuf); -+ iter->namebuf = NULL; - } - - static void udf_copy_to_bufs(void *buf1, int len1, void *buf2, int len2, ---- a/fs/udf/udfdecl.h -+++ b/fs/udf/udfdecl.h -@@ -99,7 +99,7 @@ struct udf_fileident_iter { - struct extent_position epos; /* Position after the above extent */ - struct fileIdentDesc fi; /* Copied directory entry */ - uint8_t *name; /* Pointer to entry name */ -- uint8_t namebuf[UDF_NAME_LEN_CS0]; /* Storage for entry name in case -+ uint8_t *namebuf; /* Storage for entry name in case - * the name is split between two blocks - */ - }; diff --git a/target/linux/generic/backport-5.15/431-v6.3-udf-Avoid-directory-type-conversion-failure-due-to-E.patch b/target/linux/generic/backport-5.15/431-v6.3-udf-Avoid-directory-type-conversion-failure-due-to-E.patch deleted file mode 100644 index fa360a7ed22db9..00000000000000 --- a/target/linux/generic/backport-5.15/431-v6.3-udf-Avoid-directory-type-conversion-failure-due-to-E.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 9 Feb 2023 10:33:09 +0100 -Subject: udf: Avoid directory type conversion failure due to ENOMEM - -commit df97f64dfa317a5485daf247b6c043a584ef95f9 upstream. - -When converting directory from in-ICB to normal format, the last -iteration through the directory fixing up directory enteries can fail -due to ENOMEM. We do not expect this iteration to fail since the -directory is already verified to be correct and it is difficult to undo -the conversion at this point. So just use GFP_NOFAIL to make sure the -small allocation cannot fail. - -Reported-by: syzbot+111eaa994ff74f8d440f@syzkaller.appspotmail.com -Fixes: 0aba4860b0d0 ("udf: Allocate name buffer in directory iterator on heap") -Signed-off-by: Jan Kara -Signed-off-by: Greg Kroah-Hartman ---- - fs/udf/directory.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - ---- a/fs/udf/directory.c -+++ b/fs/udf/directory.c -@@ -249,9 +249,12 @@ int udf_fiiter_init(struct udf_fileident - iter->elen = 0; - iter->epos.bh = NULL; - iter->name = NULL; -- iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL); -- if (!iter->namebuf) -- return -ENOMEM; -+ /* -+ * When directory is verified, we don't expect directory iteration to -+ * fail and it can be difficult to undo without corrupting filesystem. -+ * So just do not allow memory allocation failures here. -+ */ -+ iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL | __GFP_NOFAIL); - - if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { - err = udf_copy_fi(iter); diff --git a/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch b/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch index 25c1382695ba81..c64354b107d5d7 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); stmmac_start_tx_dma(priv, chan); -@@ -3785,6 +3776,8 @@ static int stmmac_open(struct net_device +@@ -3786,6 +3777,8 @@ static int stmmac_open(struct net_device } } @@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski ret = stmmac_hw_setup(dev, true); if (ret < 0) { netdev_err(priv->dev, "%s: Hw setup failed\n", __func__); -@@ -6411,6 +6404,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6412,6 +6405,7 @@ void stmmac_enable_rx_queue(struct stmma return; } @@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski stmmac_clear_rx_descriptors(priv, queue); stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, -@@ -6472,6 +6466,7 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6473,6 +6467,7 @@ void stmmac_enable_tx_queue(struct stmma return; } @@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski stmmac_clear_tx_descriptors(priv, queue); stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, -@@ -7399,6 +7394,25 @@ int stmmac_suspend(struct device *dev) +@@ -7400,6 +7395,25 @@ int stmmac_suspend(struct device *dev) } EXPORT_SYMBOL_GPL(stmmac_suspend); @@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski /** * stmmac_reset_queues_param - reset queue parameters * @priv: device pointer -@@ -7409,22 +7423,11 @@ static void stmmac_reset_queues_param(st +@@ -7410,22 +7424,11 @@ static void stmmac_reset_queues_param(st u32 tx_cnt = priv->plat->tx_queues_to_use; u32 queue; diff --git a/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch index 2753b429ded51c..b6e5ee5394cd3c 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -3839,8 +3839,6 @@ static int stmmac_release(struct net_dev +@@ -3840,8 +3840,6 @@ static int stmmac_release(struct net_dev struct stmmac_priv *priv = netdev_priv(dev); u32 chan; @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski if (device_may_wakeup(priv->device)) phylink_speed_down(priv->phylink, false); /* Stop and disconnect the PHY */ -@@ -3852,6 +3850,8 @@ static int stmmac_release(struct net_dev +@@ -3853,6 +3851,8 @@ static int stmmac_release(struct net_dev for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) hrtimer_cancel(&priv->tx_queue[chan].txtimer); diff --git a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch index e41d43f1f3688b..958815e052e195 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch @@ -737,7 +737,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(ret < 0)) { netdev_err(priv->dev, "%s: alloc tx-%d MSI %d (error: %d)\n", -@@ -3732,21 +3732,21 @@ static int stmmac_open(struct net_device +@@ -3733,21 +3733,21 @@ static int stmmac_open(struct net_device bfsize = 0; if (bfsize < BUF_SIZE_16KiB) @@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en; /* Setup per-TXQ tbs flag before TX descriptor alloc */ -@@ -3804,7 +3804,7 @@ irq_error: +@@ -3805,7 +3805,7 @@ irq_error: phylink_stop(priv->phylink); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski stmmac_hw_teardown(dev); init_error: -@@ -3848,7 +3848,7 @@ static int stmmac_release(struct net_dev +@@ -3849,7 +3849,7 @@ static int stmmac_release(struct net_dev stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski netif_tx_disable(dev); -@@ -3912,7 +3912,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3913,7 +3913,7 @@ static bool stmmac_vlan_insert(struct st return false; stmmac_set_tx_owner(priv, p); @@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski return true; } -@@ -3930,7 +3930,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3931,7 +3931,7 @@ static bool stmmac_vlan_insert(struct st static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des, int total_len, bool last_segment, u32 queue) { @@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *desc; u32 buff_size; int tmp_len; -@@ -3941,7 +3941,7 @@ static void stmmac_tso_allocator(struct +@@ -3942,7 +3942,7 @@ static void stmmac_tso_allocator(struct dma_addr_t curr_addr; tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, @@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]); if (tx_q->tbs & STMMAC_TBS_AVAIL) -@@ -3969,7 +3969,7 @@ static void stmmac_tso_allocator(struct +@@ -3970,7 +3970,7 @@ static void stmmac_tso_allocator(struct static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue) { @@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski int desc_size; if (likely(priv->extend_desc)) -@@ -4031,7 +4031,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4032,7 +4032,7 @@ static netdev_tx_t stmmac_tso_xmit(struc dma_addr_t des; int i; @@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski first_tx = tx_q->cur_tx; /* Compute header lengths */ -@@ -4071,7 +4071,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4072,7 +4072,7 @@ static netdev_tx_t stmmac_tso_xmit(struc stmmac_set_mss(priv, mss_desc, mss); tx_q->mss = mss; tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, @@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]); } -@@ -4195,7 +4195,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4196,7 +4196,7 @@ static netdev_tx_t stmmac_tso_xmit(struc * ndo_start_xmit will fill this descriptor the next time it's * called and stmmac_tx_clean may clean up to this descriptor. */ @@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) { netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n", -@@ -4283,7 +4283,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4284,7 +4284,7 @@ static netdev_tx_t stmmac_xmit(struct sk int entry, first_tx; dma_addr_t des; @@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski first_tx = tx_q->cur_tx; if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en) -@@ -4346,7 +4346,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4347,7 +4347,7 @@ static netdev_tx_t stmmac_xmit(struct sk int len = skb_frag_size(frag); bool last_segment = (i == (nfrags - 1)); @@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[entry]); if (likely(priv->extend_desc)) -@@ -4417,7 +4417,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4418,7 +4418,7 @@ static netdev_tx_t stmmac_xmit(struct sk * ndo_start_xmit will fill this descriptor the next time it's * called and stmmac_tx_clean may clean up to this descriptor. */ @@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski tx_q->cur_tx = entry; if (netif_msg_pktdata(priv)) { -@@ -4529,7 +4529,7 @@ static void stmmac_rx_vlan(struct net_de +@@ -4530,7 +4530,7 @@ static void stmmac_rx_vlan(struct net_de */ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue) { @@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski int dirty = stmmac_rx_dirty(priv, queue); unsigned int entry = rx_q->dirty_rx; -@@ -4579,7 +4579,7 @@ static inline void stmmac_rx_refill(stru +@@ -4580,7 +4580,7 @@ static inline void stmmac_rx_refill(stru dma_wmb(); stmmac_set_rx_owner(priv, p, use_rx_wd); @@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski } rx_q->dirty_rx = entry; rx_q->rx_tail_addr = rx_q->dma_rx_phy + -@@ -4607,12 +4607,12 @@ static unsigned int stmmac_rx_buf1_len(s +@@ -4608,12 +4608,12 @@ static unsigned int stmmac_rx_buf1_len(s /* First descriptor, not last descriptor and not split header */ if (status & rx_not_ls) @@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski } static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv, -@@ -4628,7 +4628,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4629,7 +4629,7 @@ static unsigned int stmmac_rx_buf2_len(s /* Not last descriptor */ if (status & rx_not_ls) @@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski plen = stmmac_get_rx_frame_len(priv, p, coe); -@@ -4639,7 +4639,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4640,7 +4640,7 @@ static unsigned int stmmac_rx_buf2_len(s static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue, struct xdp_frame *xdpf, bool dma_map) { @@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski unsigned int entry = tx_q->cur_tx; struct dma_desc *tx_desc; dma_addr_t dma_addr; -@@ -4702,7 +4702,7 @@ static int stmmac_xdp_xmit_xdpf(struct s +@@ -4703,7 +4703,7 @@ static int stmmac_xdp_xmit_xdpf(struct s stmmac_enable_dma_transmission(priv, priv->ioaddr); @@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski tx_q->cur_tx = entry; return STMMAC_XDP_TX; -@@ -4876,7 +4876,7 @@ static void stmmac_dispatch_skb_zc(struc +@@ -4877,7 +4877,7 @@ static void stmmac_dispatch_skb_zc(struc static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget) { @@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski unsigned int entry = rx_q->dirty_rx; struct dma_desc *rx_desc = NULL; bool ret = true; -@@ -4919,7 +4919,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4920,7 +4920,7 @@ static bool stmmac_rx_refill_zc(struct s dma_wmb(); stmmac_set_rx_owner(priv, rx_desc, use_rx_wd); @@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski } if (rx_desc) { -@@ -4934,7 +4934,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4935,7 +4935,7 @@ static bool stmmac_rx_refill_zc(struct s static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue) { @@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski unsigned int count = 0, error = 0, len = 0; int dirty = stmmac_rx_dirty(priv, queue); unsigned int next_entry = rx_q->cur_rx; -@@ -4956,7 +4956,7 @@ static int stmmac_rx_zc(struct stmmac_pr +@@ -4957,7 +4957,7 @@ static int stmmac_rx_zc(struct stmmac_pr desc_size = sizeof(struct dma_desc); } @@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } while (count < limit) { -@@ -5003,7 +5003,7 @@ read_again: +@@ -5004,7 +5004,7 @@ read_again: /* Prefetch the next RX descriptor */ rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx, @@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski next_entry = rx_q->cur_rx; if (priv->extend_desc) -@@ -5116,7 +5116,7 @@ read_again: +@@ -5117,7 +5117,7 @@ read_again: */ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) { @@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned int count = 0, error = 0, len = 0; int status = 0, coe = priv->hw->rx_csum; -@@ -5129,7 +5129,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5130,7 +5130,7 @@ static int stmmac_rx(struct stmmac_priv int buf_sz; dma_dir = page_pool_get_dma_dir(rx_q->page_pool); @@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski if (netif_msg_rx_status(priv)) { void *rx_head; -@@ -5143,7 +5143,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5144,7 +5144,7 @@ static int stmmac_rx(struct stmmac_priv desc_size = sizeof(struct dma_desc); } @@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } while (count < limit) { -@@ -5187,7 +5187,7 @@ read_again: +@@ -5188,7 +5188,7 @@ read_again: break; rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx, @@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski next_entry = rx_q->cur_rx; if (priv->extend_desc) -@@ -5314,7 +5314,7 @@ read_again: +@@ -5315,7 +5315,7 @@ read_again: buf1_len, dma_dir); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, buf->page, buf->page_offset, buf1_len, @@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski /* Data payload appended into SKB */ page_pool_release_page(rx_q->page_pool, buf->page); -@@ -5326,7 +5326,7 @@ read_again: +@@ -5327,7 +5327,7 @@ read_again: buf2_len, dma_dir); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, buf->sec_page, 0, buf2_len, @@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski /* Data payload appended into SKB */ page_pool_release_page(rx_q->page_pool, buf->sec_page); -@@ -5759,11 +5759,13 @@ static irqreturn_t stmmac_safety_interru +@@ -5760,11 +5760,13 @@ static irqreturn_t stmmac_safety_interru static irqreturn_t stmmac_msi_intr_tx(int irq, void *data) { struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data; @@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski /* Check if adapter is up */ if (test_bit(STMMAC_DOWN, &priv->state)) -@@ -5798,10 +5800,12 @@ static irqreturn_t stmmac_msi_intr_tx(in +@@ -5799,10 +5801,12 @@ static irqreturn_t stmmac_msi_intr_tx(in static irqreturn_t stmmac_msi_intr_rx(int irq, void *data) { struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data; @@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski /* Check if adapter is up */ if (test_bit(STMMAC_DOWN, &priv->state)) -@@ -5827,10 +5831,10 @@ static void stmmac_poll_controller(struc +@@ -5828,10 +5832,10 @@ static void stmmac_poll_controller(struc if (priv->plat->multi_msi_en) { for (i = 0; i < priv->plat->rx_queues_to_use; i++) @@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski } else { disable_irq(dev->irq); stmmac_interrupt(dev->irq, dev); -@@ -6011,34 +6015,34 @@ static int stmmac_rings_status_show(stru +@@ -6012,34 +6016,34 @@ static int stmmac_rings_status_show(stru return 0; for (queue = 0; queue < rx_count; queue++) { @@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -6385,7 +6389,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6386,7 +6390,7 @@ void stmmac_disable_rx_queue(struct stmm void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned long flags; u32 buf_size; -@@ -6422,7 +6426,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6423,7 +6427,7 @@ void stmmac_enable_rx_queue(struct stmma rx_q->queue_index); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski rx_q->queue_index); } -@@ -6448,7 +6452,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6449,7 +6453,7 @@ void stmmac_disable_tx_queue(struct stmm void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned long flags; int ret; -@@ -6498,7 +6502,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6499,7 +6503,7 @@ void stmmac_xdp_release(struct net_devic stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski /* Free the IRQ lines */ stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0); -@@ -6557,7 +6561,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6558,7 +6562,7 @@ int stmmac_xdp_open(struct net_device *d /* DMA RX Channel Configuration */ for (chan = 0; chan < rx_cnt; chan++) { @@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, chan); -@@ -6575,7 +6579,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6576,7 +6580,7 @@ int stmmac_xdp_open(struct net_device *d rx_q->queue_index); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski rx_q->queue_index); } -@@ -6584,7 +6588,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6585,7 +6589,7 @@ int stmmac_xdp_open(struct net_device *d /* DMA TX Channel Configuration */ for (chan = 0; chan < tx_cnt; chan++) { @@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -6617,7 +6621,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6618,7 +6622,7 @@ int stmmac_xdp_open(struct net_device *d irq_error: for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski stmmac_hw_teardown(dev); init_error: -@@ -6644,8 +6648,8 @@ int stmmac_xsk_wakeup(struct net_device +@@ -6645,8 +6649,8 @@ int stmmac_xsk_wakeup(struct net_device queue >= priv->plat->tx_queues_to_use) return -EINVAL; @@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski ch = &priv->channel[queue]; if (!rx_q->xsk_pool && !tx_q->xsk_pool) -@@ -6905,8 +6909,8 @@ int stmmac_reinit_ringparam(struct net_d +@@ -6906,8 +6910,8 @@ int stmmac_reinit_ringparam(struct net_d if (netif_running(dev)) stmmac_release(dev); @@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski if (netif_running(dev)) ret = stmmac_open(dev); -@@ -7344,7 +7348,7 @@ int stmmac_suspend(struct device *dev) +@@ -7345,7 +7349,7 @@ int stmmac_suspend(struct device *dev) stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski if (priv->eee_enabled) { priv->tx_path_in_lpi_mode = false; -@@ -7396,7 +7400,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend); +@@ -7397,7 +7401,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend); static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski rx_q->cur_rx = 0; rx_q->dirty_rx = 0; -@@ -7404,7 +7408,7 @@ static void stmmac_reset_rx_queue(struct +@@ -7405,7 +7409,7 @@ static void stmmac_reset_rx_queue(struct static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue) { diff --git a/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch b/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch index 986cb5bbe65e8e..ba6c56a056e3e4 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch @@ -860,7 +860,7 @@ Signed-off-by: Jakub Kicinski stmmac_reset_tx_queue(priv, chan); stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -3688,19 +3751,93 @@ static int stmmac_request_irq(struct net +@@ -3689,19 +3752,93 @@ static int stmmac_request_irq(struct net } /** @@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski u32 chan; int ret; -@@ -3727,45 +3864,10 @@ static int stmmac_open(struct net_device +@@ -3728,45 +3865,10 @@ static int stmmac_open(struct net_device memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); priv->xstats.threshold = tc; @@ -1005,7 +1005,7 @@ Signed-off-by: Jakub Kicinski if (priv->plat->serdes_powerup) { ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv); -@@ -3808,14 +3910,28 @@ irq_error: +@@ -3809,14 +3911,28 @@ irq_error: stmmac_hw_teardown(dev); init_error: @@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski static void stmmac_fpe_stop_wq(struct stmmac_priv *priv) { set_bit(__FPE_REMOVING, &priv->fpe_task_state); -@@ -3864,7 +3980,7 @@ static int stmmac_release(struct net_dev +@@ -3865,7 +3981,7 @@ static int stmmac_release(struct net_dev stmmac_stop_all_dma(priv); /* Release and free the Rx/Tx resources */ @@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski /* Disable the MAC Rx/Tx */ stmmac_mac_set(priv, priv->ioaddr, false); -@@ -6384,7 +6500,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6385,7 +6501,7 @@ void stmmac_disable_rx_queue(struct stmm spin_unlock_irqrestore(&ch->lock, flags); stmmac_stop_rx_dma(priv, queue); @@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski } void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue) -@@ -6395,21 +6511,21 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6396,21 +6512,21 @@ void stmmac_enable_rx_queue(struct stmma u32 buf_size; int ret; @@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, rx_q->queue_index); -@@ -6447,7 +6563,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6448,7 +6564,7 @@ void stmmac_disable_tx_queue(struct stmm spin_unlock_irqrestore(&ch->lock, flags); stmmac_stop_tx_dma(priv, queue); @@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski } void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue) -@@ -6457,21 +6573,21 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6458,21 +6574,21 @@ void stmmac_enable_tx_queue(struct stmma unsigned long flags; int ret; @@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, tx_q->queue_index); -@@ -6511,7 +6627,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6512,7 +6628,7 @@ void stmmac_xdp_release(struct net_devic stmmac_stop_all_dma(priv); /* Release and free the Rx/Tx resources */ @@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski /* Disable the MAC Rx/Tx */ stmmac_mac_set(priv, priv->ioaddr, false); -@@ -6536,14 +6652,14 @@ int stmmac_xdp_open(struct net_device *d +@@ -6537,14 +6653,14 @@ int stmmac_xdp_open(struct net_device *d u32 chan; int ret; @@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski if (ret < 0) { netdev_err(dev, "%s: DMA descriptors initialization failed\n", __func__); -@@ -6625,7 +6741,7 @@ irq_error: +@@ -6626,7 +6742,7 @@ irq_error: stmmac_hw_teardown(dev); init_error: @@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski dma_desc_error: return ret; } -@@ -7491,7 +7607,7 @@ int stmmac_resume(struct device *dev) +@@ -7492,7 +7608,7 @@ int stmmac_resume(struct device *dev) stmmac_reset_queues_param(priv); stmmac_free_tx_skbufs(priv); diff --git a/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch b/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch index 8fccc716597cf5..e1d46f03a94be7 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -5626,18 +5626,15 @@ static int stmmac_change_mtu(struct net_ +@@ -5627,18 +5627,15 @@ static int stmmac_change_mtu(struct net_ { struct stmmac_priv *priv = netdev_priv(dev); int txfifosz = priv->plat->tx_fifo_size; @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) { netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n"); return -EINVAL; -@@ -5649,8 +5646,29 @@ static int stmmac_change_mtu(struct net_ +@@ -5650,8 +5647,29 @@ static int stmmac_change_mtu(struct net_ if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB)) return -EINVAL; diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch index 7a439ce221557c..6e556c67f99a1b 100644 --- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch @@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1159,6 +1164,11 @@ static const struct usb_device_id option +@@ -1160,6 +1165,11 @@ static const struct usb_device_id option { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */ .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) }, @@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support /* Quectel products using Qualcomm vendor ID */ { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)}, { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20), -@@ -1200,6 +1210,11 @@ static const struct usb_device_id option +@@ -1201,6 +1211,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/ipq806x/patches-5.15/700-Revert-net-stmmac-Use-hrtimer-for-TX-coalescing.patch b/target/linux/ipq806x/patches-5.15/700-Revert-net-stmmac-Use-hrtimer-for-TX-coalescing.patch index ad2bafef80780e..1ca611b7400273 100644 --- a/target/linux/ipq806x/patches-5.15/700-Revert-net-stmmac-Use-hrtimer-for-TX-coalescing.patch +++ b/target/linux/ipq806x/patches-5.15/700-Revert-net-stmmac-Use-hrtimer-for-TX-coalescing.patch @@ -98,7 +98,7 @@ Signed-off-by: Oskari Lemmela } for (chan = 0; chan < rx_channel_count; chan++) -@@ -3906,7 +3899,7 @@ irq_error: +@@ -3907,7 +3900,7 @@ irq_error: phylink_stop(priv->phylink); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -107,7 +107,7 @@ Signed-off-by: Oskari Lemmela stmmac_hw_teardown(dev); init_error: -@@ -3964,7 +3957,7 @@ static int stmmac_release(struct net_dev +@@ -3965,7 +3958,7 @@ static int stmmac_release(struct net_dev stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -116,7 +116,7 @@ Signed-off-by: Oskari Lemmela netif_tx_disable(dev); -@@ -6636,7 +6629,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6637,7 +6630,7 @@ void stmmac_xdp_release(struct net_devic stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -125,7 +125,7 @@ Signed-off-by: Oskari Lemmela /* Free the IRQ lines */ stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0); -@@ -6731,8 +6724,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6732,8 +6725,7 @@ int stmmac_xdp_open(struct net_device *d stmmac_set_tx_tail_ptr(priv, priv->ioaddr, tx_q->tx_tail_addr, chan); @@ -135,7 +135,7 @@ Signed-off-by: Oskari Lemmela } /* Enable the MAC Rx/Tx */ -@@ -6755,7 +6747,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6756,7 +6748,7 @@ int stmmac_xdp_open(struct net_device *d irq_error: for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -144,7 +144,7 @@ Signed-off-by: Oskari Lemmela stmmac_hw_teardown(dev); init_error: -@@ -7482,7 +7474,7 @@ int stmmac_suspend(struct device *dev) +@@ -7483,7 +7475,7 @@ int stmmac_suspend(struct device *dev) stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)