From c6a6aac763aa320a3ed810041e0f1dc7ab77b30f Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 2 Aug 2024 14:30:32 -0700 Subject: [PATCH 01/12] gpio-button-hotplug: use flexible array member zero length arrays are deprecated. Fixes coccinelle warning: WARNING use flexible-array member instead Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16848 Signed-off-by: Robert Marko --- package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c index 1dd0ff2a1a..52346c25d9 100644 --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c @@ -302,7 +302,7 @@ struct gpio_keys_button_dev { struct device *dev; struct gpio_keys_platform_data *pdata; - struct gpio_keys_button_data data[0]; + struct gpio_keys_button_data data[]; }; static void gpio_keys_polled_queue_work(struct gpio_keys_button_dev *bdev) From f2bddc17893ea9819ee485b87f240b8d4db76df1 Mon Sep 17 00:00:00 2001 From: Enrico Mioso Date: Mon, 21 Oct 2024 23:39:59 +0200 Subject: [PATCH 02/12] uboot-mediatek: fix boot media for mt7981 RFB NOR profile Signed-off-by: Enrico Mioso CC: Daniel Golle --- package/boot/uboot-mediatek/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index ab08126b51..3485765368 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -370,7 +370,7 @@ define U-Boot/mt7981_rfb-nor BUILD_DEVICES:=mediatek_mt7981-rfb UBOOT_CONFIG:=mt7981_nor_rfb UBOOT_IMAGE:=u-boot.fip - BL2_BOOTDEV:=spim-nand + BL2_BOOTDEV:=nor BL2_SOC:=mt7981 BL2_DDRTYPE:=ddr3 DEPENDS:=+trusted-firmware-a-mt7981-nor-ddr3 From 11ba2b141fbea0e65484d21c419f4c9d74a23ba3 Mon Sep 17 00:00:00 2001 From: Mauri Sandberg Date: Fri, 11 Oct 2024 10:38:07 +0300 Subject: [PATCH 03/12] ramips: Fix EX400 imagebuilder A factory image for DNA EX400 depends on an initramfs image and they were explicitly removed from the imagebuilder recently. Now the factory image creation fails miserably and it also affects custom image creation with the firmware selector. Add the initramfs kernel to the staging so that it's shipped with the imagebuilder. Also remove a image build target added solely for DNA EX400. Tested by creating a factory and syspupgrade images locally with the imagebuilder and verified their functionality. Related work c85348d9abf4 ("imagebuilder: remove initramfs image files") Fixes: fea2264d9fdd ("ramips: mt7621: Add DNA Valokuitu Plus EX400") Signed-off-by: Mauri Sandberg --- v4: use append-image-stage, remove Build/kernel-initramfs-bin v3: adjust commit subject v2: remove fix for inconsistent line ending elsewhere in the file Link: https://github.com/openwrt/openwrt/pull/16659 Signed-off-by: Robert Marko --- target/linux/ramips/image/mt7621.mk | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 34ed9a4d54..9654e237a8 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -180,10 +180,6 @@ define Build/iodata-mstc-header2 mv $@.new $@ endef -define Build/kernel-initramfs-bin - $(CP) $(KDIR)/vmlinux-initramfs $@ -endef - define Build/znet-header $(eval version=$(word 1,$(1))) $(eval magic=$(if $(word 2,$(1)),$(word 2,$(1)),ZNET)) @@ -1093,8 +1089,8 @@ define Device/dna_valokuitu-plus-ex400 DEVICE_MODEL := Valokuitu Plus EX400 KERNEL := kernel-bin | lzma | uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma - IMAGES := factory.bin sysupgrade.bin - IMAGE/factory.bin := kernel-initramfs-bin | lzma | uImage lzma | \ + IMAGES += factory.bin + IMAGE/factory.bin := append-image-stage initramfs-kernel.bin | \ dna-bootfs with-initrd | dna-header | \ append-md5sum-ascii-salted IMAGE/sysupgrade.bin := dna-bootfs | sysupgrade-tar kernel=$$$$@ | check-size | \ From 8508d87495851e4f33c21e2ad805ad91fe2af309 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 4 Nov 2024 18:20:06 +0100 Subject: [PATCH 04/12] nu801: Mark as nonshared to build in step 1 Mark the package as nonshared to build it in the target specific build step 1 of the build bots instead of the architecture generic build step 2. In the build step 2 it may be left out if we build it using a different target. Fixes: #16857 Link: https://github.com/openwrt/openwrt/pull/16859 Signed-off-by: Robert Marko --- package/system/gpio-cdev/nu801/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/system/gpio-cdev/nu801/Makefile b/package/system/gpio-cdev/nu801/Makefile index 82c04ccb41..7724cd808b 100644 --- a/package/system/gpio-cdev/nu801/Makefile +++ b/package/system/gpio-cdev/nu801/Makefile @@ -3,6 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nu801 +PKG_FLAGS:=nonshared PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git From 4fc47c60006ccacda5ef644c5447ebfcb26c0680 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Sun, 3 Nov 2024 08:53:37 +0100 Subject: [PATCH 05/12] kernel: bump 6.6 to 6.6.59 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.59 Removed upstreamed: - generic/backport-6.6/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch[1] - generic/backport-6.6/780-24-v6.12-r8169-avoid-unsolicited-interrupts.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.59&id=433742ba96baf30c21e654ce3e698ad87100593b 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.59&id=7d6d46b429804b1a182106e27e2f8c0e84689e1a Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/16835 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 +- ...ore-event-ring-segment-table-entries.patch | 2 +- ...-quirks-add-link-TRB-quirk-for-VL805.patch | 2 +- ...b-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch | 2 +- ...5-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch | 2 +- ...wc3-Set-DMA-and-coherent-masks-early.patch | 2 +- ...-add-FS-LS-bus-instance-parkmode-dis.patch | 2 +- ...support-for-performing-fake-doorbell.patch | 2 +- ...-create-a-dummy-net_device-allocator.patch | 2 +- ...ing-some-targets-to-not-load-on-IPv6.patch | 43 ------------------- ...169-improve-handling-task-scheduling.patch | 2 +- ...support-for-LED-s-on-RTL8168-RTL8101.patch | 4 +- ...ix-building-with-CONFIG_LEDS_CLASS-m.patch | 2 +- ...-07-v6.9-r8169-simplify-EEE-handling.patch | 4 +- ...-v6.9-r8169-add-support-for-RTL8126A.patch | 2 +- ...ode-by-using-core-provided-pcpu-stat.patch | 4 +- ...-add-LED-support-for-RTL8125-RTL8126.patch | 2 +- ...D-related-deadlock-on-module-removal.patch | 4 +- ...g-conditional-compiling-for-call-to-.patch | 2 +- ...-disable-interrupt-source-RxOverflow.patch | 2 +- ...r8169-add-support-for-RTL8126A-rev.b.patch | 2 +- ...2-r8169-avoid-unsolicited-interrupts.patch | 39 ----------------- ...et-dsa-mv88e6xxx-Support-LED-control.patch | 6 +-- ...c3-add-optional-PHY-interface-clocks.patch | 2 +- ...ove-performance-usb-using-lowmem-for.patch | 6 +-- 25 files changed, 32 insertions(+), 114 deletions(-) delete mode 100644 target/linux/generic/backport-6.6/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch delete mode 100644 target/linux/generic/backport-6.6/780-24-v6.12-r8169-avoid-unsolicited-interrupts.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index df3464ab41..5e154f2d21 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .58 -LINUX_KERNEL_HASH-6.6.58 = e7df81e588d70fab5ec3ec3bb04ac53d51f0860fc3b1ec45e0a4167a026899db +LINUX_VERSION-6.6 = .59 +LINUX_KERNEL_HASH-6.6.59 = 23616808d8c08f12815ff898f4edb4c11397a2b2843d029ee62452d21833a76d diff --git a/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch index 27a43828dd..ff8c9223b5 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch @@ -52,7 +52,7 @@ Signed-off-by: Jonathan Bell erst_base = xhci_read_64(xhci, &ir->ir_set->erst_base); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1681,8 +1681,9 @@ struct urb_priv { +@@ -1425,8 +1425,9 @@ struct urb_priv { * Each segment table entry is 4*32bits long. 1K seems like an ok size: * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, * meaning 64 ring segments. diff --git a/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index ca49ada4e7..4a7bfd4f2e 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -52,7 +52,7 @@ 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 -@@ -1918,6 +1918,9 @@ struct xhci_hcd { +@@ -1662,6 +1662,9 @@ struct xhci_hcd { #define XHCI_WRITE_64_HI_LO BIT_ULL(47) #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) diff --git a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch index a7d255db40..663a2f9323 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch @@ -100,7 +100,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1920,6 +1920,7 @@ struct xhci_hcd { +@@ -1664,6 +1664,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) diff --git a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index 935ed89c08..f0c75c6bfa 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -144,7 +144,7 @@ Signed-off-by: Jonathan Bell return 0; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1921,6 +1921,7 @@ struct xhci_hcd { +@@ -1665,6 +1665,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) #define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(57) diff --git a/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch b/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch index 7d3a139a77..7609657162 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch @@ -341,7 +341,7 @@ Signed-off-by: Jonathan Bell * @hsphy_interface: "utmi" or "ulpi" * @connected: true when we're connected to a host, false otherwise * @softconnect: true when gadget connect is called, false when disconnect runs -@@ -1296,6 +1300,7 @@ struct dwc3 { +@@ -1298,6 +1302,7 @@ struct dwc3 { u8 tx_max_burst_prd; u8 tx_fifo_resize_max_num; u8 clear_stall_protocol; diff --git a/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch b/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch index 557bb033ef..901553cd6c 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch @@ -62,7 +62,7 @@ Signed-off-by: Jonathan Bell * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk * @tx_de_emphasis: Tx de-emphasis value * 0 - -6dB de-emphasis -@@ -1344,6 +1347,7 @@ struct dwc3 { +@@ -1346,6 +1349,7 @@ struct dwc3 { unsigned ulpi_ext_vbus_drv:1; unsigned parkmode_disable_ss_quirk:1; unsigned parkmode_disable_hs_quirk:1; diff --git a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index efcda98679..13b6566a8e 100644 --- a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -103,7 +103,7 @@ it on BCM4708 family. if (xhci->quirks & XHCI_NEC_HOST) --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1916,6 +1916,7 @@ struct xhci_hcd { +@@ -1660,6 +1660,7 @@ struct xhci_hcd { #define XHCI_ZHAOXIN_HOST BIT_ULL(46) #define XHCI_WRITE_64_HI_LO BIT_ULL(47) #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) diff --git a/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch b/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch index a17a91ec7c..aea95667e5 100644 --- a/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch +++ b/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch @@ -37,7 +37,7 @@ Signed-off-by: David S. Miller --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -4549,6 +4549,9 @@ static inline void netif_addr_unlock_bh( +@@ -4561,6 +4561,9 @@ static inline void netif_addr_unlock_bh( void ether_setup(struct net_device *dev); diff --git a/target/linux/generic/backport-6.6/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch b/target/linux/generic/backport-6.6/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch deleted file mode 100644 index d29c7d463d..0000000000 --- a/target/linux/generic/backport-6.6/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch +++ /dev/null @@ -1,43 +0,0 @@ -Subject: [PATCH v2] netfilter: xtables: fix typo causing some targets to not load on IPv6 -Date: Sat, 19 Oct 2024 08:05:07 +0300 [thread overview] -Message-ID: <20241019-xtables-typos-v2-1-6b8b1735dc8e@0upti.me> (raw) - -These were added with the wrong family in 4cdc55e, which seems -to just have been a typo, but now ip6tables rules with --set-mark -don't work anymore, which is pretty bad. - -Fixes: 0bfcb7b71e73 ("netfilter: xtables: avoid NFPROTO_UNSPEC where needed") -Reviewed-by: Phil Sutter -Signed-off-by: Ilya Katsnelson ---- -Changes in v2: -- Fixed a typo in the commit message (that's karma). -- Replaced a reference to backport commit. -- Link to v1: https://lore.kernel.org/r/20241018-xtables-typos-v1-1-02a51789c0ec@0upti.me ---- - net/netfilter/xt_NFLOG.c | 2 +- - net/netfilter/xt_mark.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/net/netfilter/xt_NFLOG.c -+++ b/net/netfilter/xt_NFLOG.c -@@ -79,7 +79,7 @@ static struct xt_target nflog_tg_reg[] _ - { - .name = "NFLOG", - .revision = 0, -- .family = NFPROTO_IPV4, -+ .family = NFPROTO_IPV6, - .checkentry = nflog_tg_check, - .destroy = nflog_tg_destroy, - .target = nflog_tg, ---- a/net/netfilter/xt_mark.c -+++ b/net/netfilter/xt_mark.c -@@ -62,7 +62,7 @@ static struct xt_target mark_tg_reg[] __ - { - .name = "MARK", - .revision = 2, -- .family = NFPROTO_IPV4, -+ .family = NFPROTO_IPV6, - .target = mark_tg, - .targetsize = sizeof(struct xt_mark_tginfo2), - .me = THIS_MODULE, diff --git a/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch b/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch index f020284cc8..757c800533 100644 --- a/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch +++ b/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski set_bit(flag, tp->wk.flags); schedule_work(&tp->wk.work); } -@@ -4518,8 +4521,7 @@ static void rtl_task(struct work_struct +@@ -4520,8 +4523,7 @@ static void rtl_task(struct work_struct rtnl_lock(); diff --git a/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch b/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch index 95245b9a54..0504a00df4 100644 --- a/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch +++ b/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch @@ -296,7 +296,7 @@ Signed-off-by: David S. Miller static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type) { /* based on RTL8168FP_OOBMAC_BASE in vendor driver */ -@@ -5195,6 +5253,7 @@ static int rtl_init_one(struct pci_dev * +@@ -5197,6 +5255,7 @@ static int rtl_init_one(struct pci_dev * raw_spin_lock_init(&tp->cfg9346_usage_lock); raw_spin_lock_init(&tp->config25_lock); raw_spin_lock_init(&tp->mac_ocp_lock); @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev, struct pcpu_sw_netstats); -@@ -5351,6 +5410,12 @@ static int rtl_init_one(struct pci_dev * +@@ -5353,6 +5412,12 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch b/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch index 819a611cb3..1adaf87625 100644 --- a/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch +++ b/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch @@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski obj-$(CONFIG_R8169) += r8169.o --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5410,11 +5410,10 @@ static int rtl_init_one(struct pci_dev * +@@ -5412,11 +5412,10 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch b/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch index d3a26303ef..c3f94b3aff 100644 --- a/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch +++ b/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch @@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski genphy_soft_reset(tp->phydev); } -@@ -5112,7 +5087,9 @@ static int r8169_mdio_register(struct rt +@@ -5114,7 +5089,9 @@ static int r8169_mdio_register(struct rt } tp->phydev->mac_managed_pm = true; @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski phy_support_asym_pause(tp->phydev); /* PHY will be woken up in rtl_open() */ -@@ -5247,7 +5224,6 @@ static int rtl_init_one(struct pci_dev * +@@ -5249,7 +5226,6 @@ static int rtl_init_one(struct pci_dev * tp->dev = dev; tp->pci_dev = pdev; tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1; diff --git a/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch b/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch index 6dfaa904a1..354aacf1cf 100644 --- a/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch +++ b/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch @@ -321,7 +321,7 @@ Signed-off-by: David S. Miller padto = max_t(unsigned int, padto, ETH_ZLEN); break; default: -@@ -5139,7 +5196,7 @@ static void rtl_hw_initialize(struct rtl +@@ -5141,7 +5198,7 @@ static void rtl_hw_initialize(struct rtl case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48: rtl_hw_init_8168g(tp); break; diff --git a/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch b/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch index 0288dcb11e..c155b11431 100644 --- a/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch +++ b/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5288,11 +5288,6 @@ static int rtl_init_one(struct pci_dev * +@@ -5290,11 +5290,6 @@ static int rtl_init_one(struct pci_dev * raw_spin_lock_init(&tp->mac_ocp_lock); mutex_init(&tp->led_lock); @@ -28,7 +28,7 @@ Signed-off-by: Paolo Abeni /* Get the *optional* external "ether_clk" used on some boards */ tp->clk = devm_clk_get_optional_enabled(&pdev->dev, "ether_clk"); if (IS_ERR(tp->clk)) -@@ -5407,6 +5402,8 @@ static int rtl_init_one(struct pci_dev * +@@ -5409,6 +5404,8 @@ static int rtl_init_one(struct pci_dev * dev->hw_features |= NETIF_F_RXALL; dev->hw_features |= NETIF_F_RXFCS; diff --git a/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch b/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch index 449aa11591..1c793f9b1d 100644 --- a/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch +++ b/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch @@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski void r8169_get_led_name(struct rtl8169_private *tp, int idx, char *buf, int buf_len) { -@@ -5440,10 +5491,12 @@ static int rtl_init_one(struct pci_dev * +@@ -5442,10 +5493,12 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch b/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch index 6e0ff9b14b..cb031d8f34 100644 --- a/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch +++ b/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch @@ -124,7 +124,7 @@ Signed-off-by: David S. Miller u32 ocp_base; }; -@@ -5067,6 +5069,8 @@ static void rtl_remove_one(struct pci_de +@@ -5069,6 +5071,8 @@ static void rtl_remove_one(struct pci_de cancel_work_sync(&tp->wk.work); @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller unregister_netdev(tp->dev); if (tp->dash_type != RTL_DASH_NONE) -@@ -5525,9 +5529,9 @@ static int rtl_init_one(struct pci_dev * +@@ -5527,9 +5531,9 @@ static int rtl_init_one(struct pci_dev * if (IS_ENABLED(CONFIG_R8169_LEDS)) { if (rtl_is_8125(tp)) diff --git a/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch b/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch index e647e18167..0412c91903 100644 --- a/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch +++ b/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5069,7 +5069,8 @@ static void rtl_remove_one(struct pci_de +@@ -5071,7 +5071,8 @@ static void rtl_remove_one(struct pci_de cancel_work_sync(&tp->wk.work); diff --git a/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch b/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch index 9389585f16..fc10a3ff14 100644 --- a/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch +++ b/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5110,12 +5110,10 @@ static void rtl_set_irq_mask(struct rtl8 +@@ -5112,12 +5112,10 @@ static void rtl_set_irq_mask(struct rtl8 tp->irq_mask = RxOK | RxErr | TxOK | TxErr | LinkChg; if (tp->mac_version <= RTL_GIGA_MAC_VER_06) diff --git a/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch b/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch index dd90fc1a65..a825627e74 100644 --- a/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch +++ b/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch @@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski padto = max_t(unsigned int, padto, ETH_ZLEN); break; default: -@@ -5286,7 +5298,7 @@ static void rtl_hw_initialize(struct rtl +@@ -5288,7 +5300,7 @@ static void rtl_hw_initialize(struct rtl case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48: rtl_hw_init_8168g(tp); break; diff --git a/target/linux/generic/backport-6.6/780-24-v6.12-r8169-avoid-unsolicited-interrupts.patch b/target/linux/generic/backport-6.6/780-24-v6.12-r8169-avoid-unsolicited-interrupts.patch deleted file mode 100644 index 8332a285f9..0000000000 --- a/target/linux/generic/backport-6.6/780-24-v6.12-r8169-avoid-unsolicited-interrupts.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 10ce0db787004875f4dba068ea952207d1d8abeb Mon Sep 17 00:00:00 2001 -From: Heiner Kallweit -Date: Fri, 18 Oct 2024 11:08:16 +0200 -Subject: [PATCH] r8169: avoid unsolicited interrupts - -It was reported that after resume from suspend a PCI error is logged -and connectivity is broken. Error message is: -PCI error (cmd = 0x0407, status_errs = 0x0000) -The message seems to be a red herring as none of the error bits is set, -and the PCI command register value also is normal. Exception handling -for a PCI error includes a chip reset what apparently brakes connectivity -here. The interrupt status bit triggering the PCI error handling isn't -actually used on PCIe chip versions, so it's not clear why this bit is -set by the chip. Fix this by ignoring this bit on PCIe chip versions. - -Fixes: 0e4851502f84 ("r8169: merge with version 8.001.00 of Realtek's r8168 driver") -Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219388 -Tested-by: Atlas Yu -Signed-off-by: Heiner Kallweit -Reviewed-by: Simon Horman -Link: https://patch.msgid.link/78e2f535-438f-4212-ad94-a77637ac6c9c@gmail.com -Signed-off-by: Paolo Abeni ---- - drivers/net/ethernet/realtek/r8169_main.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/realtek/r8169_main.c -+++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -4683,7 +4683,9 @@ static irqreturn_t rtl8169_interrupt(int - if ((status & 0xffff) == 0xffff || !(status & tp->irq_mask)) - return IRQ_NONE; - -- if (unlikely(status & SYSErr)) { -+ /* At least RTL8168fp may unexpectedly set the SYSErr bit */ -+ if (unlikely(status & SYSErr && -+ tp->mac_version <= RTL_GIGA_MAC_VER_06)) { - rtl8169_pcierr_interrupt(tp->dev); - goto out; - } diff --git a/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch b/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch index 8557fe2510..711246da61 100644 --- a/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch +++ b/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch @@ -217,7 +217,7 @@ Signed-off-by: Linus Walleij #include #include #include -@@ -275,6 +277,7 @@ struct mv88e6xxx_vlan { +@@ -276,6 +278,7 @@ struct mv88e6xxx_vlan { struct mv88e6xxx_port { struct mv88e6xxx_chip *chip; int port; @@ -225,7 +225,7 @@ Signed-off-by: Linus Walleij struct mv88e6xxx_vlan bridge_pvid; u64 serdes_stats[2]; u64 atu_member_violation; -@@ -289,6 +292,11 @@ struct mv88e6xxx_port { +@@ -290,6 +293,11 @@ struct mv88e6xxx_port { struct devlink_region *region; void *pcs_private; @@ -237,7 +237,7 @@ Signed-off-by: Linus Walleij /* MacAuth Bypass control flag */ bool mab; }; -@@ -561,6 +569,9 @@ struct mv88e6xxx_ops { +@@ -563,6 +571,9 @@ struct mv88e6xxx_ops { phy_interface_t mode); int (*port_get_cmode)(struct mv88e6xxx_chip *chip, int port, u8 *cmode); diff --git a/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch b/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch index 3ae1c54ef2..0b9e47da3c 100644 --- a/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch +++ b/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch @@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman * @reset: reset control * @regs: base address for our registers * @regs_size: address space size -@@ -1167,6 +1169,8 @@ struct dwc3 { +@@ -1169,6 +1171,8 @@ struct dwc3 { struct clk *bus_clk; struct clk *ref_clk; struct clk *susp_clk; diff --git a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch index 2554e73198..44c6fe6126 100644 --- a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch +++ b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch @@ -263,7 +263,7 @@ Signed-off-by: minda.chen /** --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1764,6 +1764,13 @@ struct xhci_hub { +@@ -1508,6 +1508,13 @@ struct xhci_hub { u8 min_rev; }; @@ -277,7 +277,7 @@ Signed-off-by: minda.chen /* There is one xhci_hcd structure per controller */ struct xhci_hcd { struct usb_hcd *main_hcd; -@@ -1917,6 +1924,8 @@ struct xhci_hcd { +@@ -1661,6 +1668,8 @@ struct xhci_hcd { #define XHCI_WRITE_64_HI_LO BIT_ULL(47) #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) @@ -286,7 +286,7 @@ Signed-off-by: minda.chen unsigned int num_active_eps; unsigned int limit_active_eps; struct xhci_port *hw_ports; -@@ -1946,6 +1955,8 @@ struct xhci_hcd { +@@ -1690,6 +1699,8 @@ struct xhci_hcd { struct list_head regset_list; void *dbc; From 31f1dabb4b9727b300ddaa2801903ae4b72e4e1e Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Fri, 1 Nov 2024 21:59:23 +0100 Subject: [PATCH 06/12] mac80211: compatibility with kernel 6.6.59 Fix genlmsg_multicast_allns() build error on kernel 6.6.59. Based on kernel patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?h=v6.6.59&id=e0f83d268974dab0361d11904dfc9acec53f96a6 Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/16835 Signed-off-by: Hauke Mehrtens --- ...t_allns-build-error-on-kernel-6.6.59.patch | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 package/kernel/mac80211/patches/build/236-fix-genlmsg_multicast_allns-build-error-on-kernel-6.6.59.patch diff --git a/package/kernel/mac80211/patches/build/236-fix-genlmsg_multicast_allns-build-error-on-kernel-6.6.59.patch b/package/kernel/mac80211/patches/build/236-fix-genlmsg_multicast_allns-build-error-on-kernel-6.6.59.patch new file mode 100644 index 0000000000..905bf8dfc1 --- /dev/null +++ b/package/kernel/mac80211/patches/build/236-fix-genlmsg_multicast_allns-build-error-on-kernel-6.6.59.patch @@ -0,0 +1,169 @@ +From e0f83d268974dab0361d11904dfc9acec53f96a6 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Fri, 11 Oct 2024 17:12:17 +0000 +Subject: [PATCH] genetlink: hold RCU in genlmsg_mcast() + +[ Upstream commit 56440d7ec28d60f8da3bfa09062b3368ff9b16db ] + +While running net selftests with CONFIG_PROVE_RCU_LIST=y I saw +one lockdep splat [1]. + +genlmsg_mcast() uses for_each_net_rcu(), and must therefore hold RCU. + +Instead of letting all callers guard genlmsg_multicast_allns() +with a rcu_read_lock()/rcu_read_unlock() pair, do it in genlmsg_mcast(). + +This also means the @flags parameter is useless, we need to always use +GFP_ATOMIC. + +[1] +[10882.424136] ============================= +[10882.424166] WARNING: suspicious RCU usage +[10882.424309] 6.12.0-rc2-virtme #1156 Not tainted +[10882.424400] ----------------------------- +[10882.424423] net/netlink/genetlink.c:1940 RCU-list traversed in non-reader section!! +[10882.424469] +other info that might help us debug this: + +[10882.424500] +rcu_scheduler_active = 2, debug_locks = 1 +[10882.424744] 2 locks held by ip/15677: +[10882.424791] #0: ffffffffb6b491b0 (cb_lock){++++}-{3:3}, at: genl_rcv (net/netlink/genetlink.c:1219) +[10882.426334] #1: ffffffffb6b49248 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg (net/netlink/genetlink.c:61 net/netlink/genetlink.c:57 net/netlink/genetlink.c:1209) +[10882.426465] +stack backtrace: +[10882.426805] CPU: 14 UID: 0 PID: 15677 Comm: ip Not tainted 6.12.0-rc2-virtme #1156 +[10882.426919] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 +[10882.427046] Call Trace: +[10882.427131] +[10882.427244] dump_stack_lvl (lib/dump_stack.c:123) +[10882.427335] lockdep_rcu_suspicious (kernel/locking/lockdep.c:6822) +[10882.427387] genlmsg_multicast_allns (net/netlink/genetlink.c:1940 (discriminator 7) net/netlink/genetlink.c:1977 (discriminator 7)) +[10882.427436] l2tp_tunnel_notify.constprop.0 (net/l2tp/l2tp_netlink.c:119) l2tp_netlink +[10882.427683] l2tp_nl_cmd_tunnel_create (net/l2tp/l2tp_netlink.c:253) l2tp_netlink +[10882.427748] genl_family_rcv_msg_doit (net/netlink/genetlink.c:1115) +[10882.427834] genl_rcv_msg (net/netlink/genetlink.c:1195 net/netlink/genetlink.c:1210) +[10882.427877] ? __pfx_l2tp_nl_cmd_tunnel_create (net/l2tp/l2tp_netlink.c:186) l2tp_netlink +[10882.427927] ? __pfx_genl_rcv_msg (net/netlink/genetlink.c:1201) +[10882.427959] netlink_rcv_skb (net/netlink/af_netlink.c:2551) +[10882.428069] genl_rcv (net/netlink/genetlink.c:1220) +[10882.428095] netlink_unicast (net/netlink/af_netlink.c:1332 net/netlink/af_netlink.c:1357) +[10882.428140] netlink_sendmsg (net/netlink/af_netlink.c:1901) +[10882.428210] ____sys_sendmsg (net/socket.c:729 (discriminator 1) net/socket.c:744 (discriminator 1) net/socket.c:2607 (discriminator 1)) + +Fixes: 33f72e6f0c67 ("l2tp : multicast notification to the registered listeners") +Signed-off-by: Eric Dumazet +Cc: James Chapman +Cc: Tom Parkin +Cc: Johannes Berg +Link: https://patch.msgid.link/20241011171217.3166614-1-edumazet@google.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/target/target_core_user.c | 2 +- + include/net/genetlink.h | 3 +-- + net/l2tp/l2tp_netlink.c | 4 ++-- + net/netlink/genetlink.c | 28 ++++++++++++++-------------- + net/wireless/nl80211.c | 8 ++------ + 5 files changed, 20 insertions(+), 25 deletions(-) + +--- a/backport-include/net/genetlink.h ++++ b/backport-include/net/genetlink.h +@@ -150,7 +150,7 @@ int genlmsg_multicast(const struct genl_ + #define genlmsg_multicast_allns LINUX_BACKPORT(genlmsg_multicast_allns) + int backport_genlmsg_multicast_allns(const struct genl_family *family, + struct sk_buff *skb, u32 portid, +- unsigned int group, gfp_t flags); ++ unsigned int group); + + #define genl_family_attrbuf LINUX_BACKPORT(genl_family_attrbuf) + static inline struct nlattr **genl_family_attrbuf(struct genl_family *family) +--- a/compat/backport-genetlink.c ++++ b/compat/backport-genetlink.c +@@ -198,23 +198,23 @@ int genlmsg_multicast(const struct genl_ + } + EXPORT_SYMBOL_GPL(genlmsg_multicast); + +-static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group, +- gfp_t flags) ++static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group) + { + struct sk_buff *tmp; + struct net *net, *prev = NULL; + bool delivered = false; + int err; + ++ rcu_read_lock(); + for_each_net_rcu(net) { + if (prev) { +- tmp = skb_clone(skb, flags); ++ tmp = skb_clone(skb, GFP_ATOMIC); + if (!tmp) { + err = -ENOMEM; + goto error; + } + err = nlmsg_multicast(prev->genl_sock, tmp, +- portid, group, flags); ++ portid, group, GFP_ATOMIC); + if (!err) + delivered = true; + else if (err != -ESRCH) +@@ -223,25 +223,29 @@ static int genlmsg_mcast(struct sk_buff + + prev = net; + } ++ err = nlmsg_multicast(prev->genl_sock, skb, portid, group, GFP_ATOMIC); ++ ++ rcu_read_unlock(); + +- err = nlmsg_multicast(prev->genl_sock, skb, portid, group, flags); + if (!err) + delivered = true; + else if (err != -ESRCH) + return err; + return delivered ? 0 : -ESRCH; + error: ++ rcu_read_unlock(); ++ + kfree_skb(skb); + return err; + } + + int backport_genlmsg_multicast_allns(const struct genl_family *family, + struct sk_buff *skb, u32 portid, +- unsigned int group, gfp_t flags) ++ unsigned int group) + { + group = __backport_genl_group(family, group); + if (group == INVALID_GROUP) + return -EINVAL; +- return genlmsg_mcast(skb, portid, group, flags); ++ return genlmsg_mcast(skb, portid, group); + } + EXPORT_SYMBOL_GPL(backport_genlmsg_multicast_allns); +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -17956,10 +17956,8 @@ void nl80211_common_reg_change_event(enu + + genlmsg_end(msg, hdr); + +- rcu_read_lock(); + genlmsg_multicast_allns(&nl80211_fam, msg, 0, +- NL80211_MCGRP_REGULATORY, GFP_ATOMIC); +- rcu_read_unlock(); ++ NL80211_MCGRP_REGULATORY); + + return; + +@@ -18692,10 +18690,8 @@ void nl80211_send_beacon_hint_event(stru + + genlmsg_end(msg, hdr); + +- rcu_read_lock(); + genlmsg_multicast_allns(&nl80211_fam, msg, 0, +- NL80211_MCGRP_REGULATORY, GFP_ATOMIC); +- rcu_read_unlock(); ++ NL80211_MCGRP_REGULATORY); + + return; + From 562b2c22fff363f060e72c9018d243981b7d6447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Tue, 5 Nov 2024 00:33:02 +0100 Subject: [PATCH 07/12] kernel: r8126: update to v10.014.01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: https://github.com/openwrt/rtl8126/compare/10.013.00...10.014.01 Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8126/Makefile | 6 ++--- .../patches/001-r8126.h-use-BIT_ULL.patch | 21 --------------- .../100-r8126_rss-silence-rxnfc-log.patch | 27 ------------------- ...126-print-link-speed-and-duplex-mode.patch | 10 +++---- 4 files changed, 8 insertions(+), 56 deletions(-) delete mode 100644 package/kernel/r8126/patches/001-r8126.h-use-BIT_ULL.patch delete mode 100644 package/kernel/r8126/patches/100-r8126_rss-silence-rxnfc-log.patch diff --git a/package/kernel/r8126/Makefile b/package/kernel/r8126/Makefile index c269cdcadc..a8f60f9dbb 100644 --- a/package/kernel/r8126/Makefile +++ b/package/kernel/r8126/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8126 -PKG_VERSION:=10.013.00 -PKG_RELEASE:=4 +PKG_VERSION:=10.014.01 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION) -PKG_HASH:=b41bda6ff3bbb7d9bc5b81c5c21355f031587d3a3a5862abcd4d766e942272e7 +PKG_HASH:=dbb10a7abd0972e4abd1b89ea4eb22fc55d6c1dc2f711b5acf4a3bc376275e21 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPLv2 diff --git a/package/kernel/r8126/patches/001-r8126.h-use-BIT_ULL.patch b/package/kernel/r8126/patches/001-r8126.h-use-BIT_ULL.patch deleted file mode 100644 index cfbf31fcbb..0000000000 --- a/package/kernel/r8126/patches/001-r8126.h-use-BIT_ULL.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 9649df50a239d1379cc8d9febd4854a0c7ca0731 Mon Sep 17 00:00:00 2001 -From: Mieczyslaw Nalewaj -Date: Sat, 10 Aug 2024 17:42:44 +0200 -Subject: [PATCH] r8126.h: use BIT_ULL - -Fixes compilation on 32 bit systems. ---- - src/r8126.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/r8126.h -+++ b/src/r8126.h -@@ -678,7 +678,7 @@ This is free software, and you are welco - #ifndef ADVERTISED_2500baseX_Full - #define ADVERTISED_2500baseX_Full 0x8000 - #endif --#define RTK_ADVERTISED_5000baseX_Full BIT(48) -+#define RTK_ADVERTISED_5000baseX_Full BIT_ULL(48) - - #define RTK_ADVERTISE_2500FULL 0x80 - #define RTK_ADVERTISE_5000FULL 0x100 diff --git a/package/kernel/r8126/patches/100-r8126_rss-silence-rxnfc-log.patch b/package/kernel/r8126/patches/100-r8126_rss-silence-rxnfc-log.patch deleted file mode 100644 index d06406004c..0000000000 --- a/package/kernel/r8126/patches/100-r8126_rss-silence-rxnfc-log.patch +++ /dev/null @@ -1,27 +0,0 @@ -From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Sat, 17 Aug 2024 22:07:23 +0200 -Subject: [PATCH] r8126_rss: silence rxnfc log -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This log is noisy and useless, just ignore it. - -Signed-off-by: Chukun Pan -Signed-off-by: Álvaro Fernández Rojas ---- - src/r8126_rss.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/r8126_rss.c -+++ b/src/r8126_rss.c -@@ -91,7 +91,7 @@ int rtl8126_get_rxnfc(struct net_device - struct rtl8126_private *tp = netdev_priv(dev); - int ret = -EOPNOTSUPP; - -- netif_info(tp, drv, tp->dev, "rss get rxnfc\n"); -+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n"); - - if (!(dev->features & NETIF_F_RXHASH)) - return ret; diff --git a/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch b/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch index 308d2494b3..27b3d626c1 100644 --- a/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch +++ b/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch @@ -18,7 +18,7 @@ Signed-off-by: Álvaro Fernández Rojas --- a/src/r8126.h +++ b/src/r8126.h -@@ -1561,6 +1561,8 @@ enum RTL8126_register_content { +@@ -1740,6 +1740,8 @@ enum RTL8126_register_content { LinkStatus = 0x02, FullDup = 0x01, @@ -37,7 +37,7 @@ Signed-off-by: Álvaro Fernández Rojas #include #include #include -@@ -4740,6 +4741,40 @@ rtl8126_link_down_patch(struct net_devic +@@ -4744,6 +4745,40 @@ rtl8126_link_down_patch(struct net_devic #endif } @@ -76,10 +76,10 @@ Signed-off-by: Álvaro Fernández Rojas +} + static void - _rtl8126_check_link_status(struct net_device *dev) + _rtl8126_check_link_status(struct net_device *dev, unsigned int link_state) { -@@ -4748,11 +4783,18 @@ _rtl8126_check_link_status(struct net_de - if (tp->link_ok(dev)) { +@@ -4756,11 +4791,18 @@ _rtl8126_check_link_status(struct net_de + if (link_state == R8126_LINK_STATE_ON) { rtl8126_link_on_patch(dev); - if (netif_msg_ifup(tp)) From f35a29d63f445d784f1e266eaa6d3825a249cd6c Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 4 Nov 2024 22:34:52 +0100 Subject: [PATCH 08/12] packages: drop DEVICE specific dependency for omnia Both packages `ombnia-mcu-firmware` and `omnia-mcutool` would depend on a specific device. The buildbots however build all devices and therefore the package isn't build at all, due to unmet dependencies. While this didn't cause issues with OPKG, APK fails actively due to the missing packages. Drop the specific dependency, however wants to install unrelated firmware on any device can do that anyway. Signed-off-by: Paul Spooren --- package/firmware/omnia-mcu-firmware/Makefile | 1 - package/utils/omnia-mcutool/Makefile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package/firmware/omnia-mcu-firmware/Makefile b/package/firmware/omnia-mcu-firmware/Makefile index 6f7bd6ca70..9c1c8fbe6c 100644 --- a/package/firmware/omnia-mcu-firmware/Makefile +++ b/package/firmware/omnia-mcu-firmware/Makefile @@ -29,7 +29,6 @@ define Package/omnia-mcu-firmware CATEGORY:=Firmware URL:=https://gitlab.nic.cz/turris/hw/$(PKG_DISTNAME)/-/releases TITLE:=CZ.NIC Turris Omnia MCU firmware - DEPENDS:=@TARGET_mvebu_cortexa9_DEVICE_cznic_turris-omnia endef define Package/omnia-mcu-firmware/description diff --git a/package/utils/omnia-mcutool/Makefile b/package/utils/omnia-mcutool/Makefile index 2eca0cf190..66f8ffc6d4 100644 --- a/package/utils/omnia-mcutool/Makefile +++ b/package/utils/omnia-mcutool/Makefile @@ -27,7 +27,7 @@ define Package/omnia-mcutool CATEGORY:=Utilities URL:=https://gitlab.nic.cz/turris/$(PKG_NAME) TITLE:=CZ.NIC Turris Omnia MCU utility - DEPENDS:=+libopenssl +omnia-mcu-firmware @TARGET_mvebu_cortexa9_DEVICE_cznic_turris-omnia + DEPENDS:=+libopenssl +omnia-mcu-firmware endef define Package/omnia-mcutool/description From 6ec1477b4d8b1a7bcc3981c0584785d641c8facb Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 22 Sep 2024 09:07:58 +0200 Subject: [PATCH 09/12] mediatek: set mac increment to 7 for the 5G radio on OpenWrt One Mass production units will get 16 assigned MAC addresses. This allows each phy to spawn up to 7 VAPs which will each have unique MAC without needing the private bit. Signed-off-by: John Crispin --- target/linux/mediatek/dts/mt7981b-openwrt-one.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts index 46d351f76d..584b482179 100644 --- a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts +++ b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts @@ -450,7 +450,7 @@ band@1 { reg = <1>; - nvmem-cells = <&macaddr_factory_4 1>; + nvmem-cells = <&macaddr_factory_4 7>; nvmem-cell-names = "mac-address"; }; }; From 48028cd102cb709cc2d9a06cb45b53b7c2335a69 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 5 Nov 2024 09:43:38 +0100 Subject: [PATCH 10/12] mediatek: set 7 MACs per wifi band in board.json on OpenWrt One Mass production units will get 16 assigned MAC addresses. This allows each phy to spawn up to 7 VAPs which will each have unique MAC without needing the private bit. Signed-off-by: John Crispin --- .../filogic/base-files/etc/board.d/04_defaults | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 target/linux/mediatek/filogic/base-files/etc/board.d/04_defaults diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/04_defaults b/target/linux/mediatek/filogic/base-files/etc/board.d/04_defaults new file mode 100644 index 0000000000..4d4131ec90 --- /dev/null +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/04_defaults @@ -0,0 +1,16 @@ +. /lib/functions/uci-defaults.sh + +board=$(board_name) + +board_config_update + +case $board in +openwrt,one) + ucidef_set_wireless_mac_count 2g 7 + ucidef_set_wireless_mac_count 5g 7 + ;; +esac + +board_config_flush + +exit 0 From 21b5ac862eed7ac373361c914cf6098cab04f503 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 5 Nov 2024 03:05:31 +0000 Subject: [PATCH 11/12] build: set PATH for post-install scripts post-install scripts may need to call executables installed to STAGING_DIR_HOSTPKG which is not part of the PATH set to TARGET_PATH in rules.mk. Set PATH for post-install scripts to TARGET_PATH_PKG. Signed-off-by: Daniel Golle Link: https://github.com/openwrt/openwrt/pull/16865 Signed-off-by: Christian Marangi --- include/rootfs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rootfs.mk b/include/rootfs.mk index e6cadc531d..ff7fd185fe 100644 --- a/include/rootfs.mk +++ b/include/rootfs.mk @@ -84,7 +84,7 @@ define prepare_rootfs IPKG_POSTINST_PATH=./usr/lib/opkg/info/*.postinst; \ fi; \ for script in $$IPKG_POSTINST_PATH; do \ - IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \ + PATH="$(TARGET_PATH_PKG)" IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \ ret=$$?; \ if [ $$ret -ne 0 ]; then \ echo "postinst script $$script has failed with exit code $$ret" >&2; \ From 6490c88c75b3392aca9dae5f4d47a13a0aa35220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Tue, 5 Nov 2024 14:01:06 +0100 Subject: [PATCH 12/12] kernel: r8168: refresh patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patches weren't refreshed when r8168 was updated to v8.054.00 in a85e18b53f0f. Fixes: a85e18b53f0f ("kernel: r8168: update to v8.054.00") Signed-off-by: Álvaro Fernández Rojas --- .../200-r8168-print-link-speed-and-duplex-mode.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/r8168/patches/200-r8168-print-link-speed-and-duplex-mode.patch b/package/kernel/r8168/patches/200-r8168-print-link-speed-and-duplex-mode.patch index 0212ae9bc4..41162b4d9b 100644 --- a/package/kernel/r8168/patches/200-r8168-print-link-speed-and-duplex-mode.patch +++ b/package/kernel/r8168/patches/200-r8168-print-link-speed-and-duplex-mode.patch @@ -18,7 +18,7 @@ Signed-off-by: Chukun Pan --- a/src/r8168.h +++ b/src/r8168.h -@@ -1385,6 +1385,8 @@ enum RTL8168_register_content { +@@ -1468,6 +1468,8 @@ enum RTL8168_register_content { LinkStatus = 0x02, FullDup = 0x01, @@ -37,7 +37,7 @@ Signed-off-by: Chukun Pan #include #include #include -@@ -5373,6 +5374,36 @@ rtl8168_link_down_patch(struct net_devic +@@ -5369,6 +5370,36 @@ rtl8168_link_down_patch(struct net_devic #endif } @@ -74,7 +74,7 @@ Signed-off-by: Chukun Pan static void rtl8168_check_link_status(struct net_device *dev) { -@@ -5392,11 +5423,18 @@ rtl8168_check_link_status(struct net_dev +@@ -5388,11 +5419,18 @@ rtl8168_check_link_status(struct net_dev if (link_status_on) { rtl8168_link_on_patch(dev);