diff --git a/config/Config-images.in b/config/Config-images.in index 2f778431a7..2479ec624d 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -295,6 +295,7 @@ menu "Target Images" comment "Image Options" source "target/linux/*/image/Config.in" + source "target/linux/*/*/image/Config.in" config TARGET_KERNEL_PARTSIZE int "Kernel partition size (in MiB)" diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 5240155cee..5c90c189c4 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .94 -LINUX_KERNEL_HASH-5.15.94 = da9270dbe64ddf1db13c70470957ff6796eb996d867bb4aed7d14a70e1c65a72 +LINUX_VERSION-5.15 = .96 +LINUX_KERNEL_HASH-5.15.96 = 348d974c143fdef8517ec703fdaa24bade12a49047848be92cb9e3253b19ef98 diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index c4cc43de2e..7d6cfd5395 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -122,14 +122,14 @@ define Package/grub2/install -O i386-pc \ -c $(PKG_BUILD_DIR)/grub-early.cfg \ -o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \ - at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial vga + at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial test vga $(STAGING_DIR_HOST)/bin/grub-mkimage \ -d $(PKG_BUILD_DIR)/grub-core \ -p /boot/grub \ -O i386-pc \ -c ./files/grub-early.cfg \ -o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \ - at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial vga + at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial test vga $(STAGING_DIR_HOST)/bin/grub-mkimage \ -d $(PKG_BUILD_DIR)/grub-core \ -p /boot/grub \ @@ -154,7 +154,7 @@ define Package/grub2-efi/install -O $(CONFIG_ARCH)-efi \ -c $(PKG_BUILD_DIR)/grub-early.cfg \ -o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \ - at_keyboard boot chain configfile fat linux ls part_gpt reboot serial efi_gop efi_uga + at_keyboard boot chain configfile fat linux ls part_gpt reboot serial test efi_gop efi_uga $(STAGING_DIR_HOST)/bin/grub-mkimage \ -d $(PKG_BUILD_DIR)/grub-core \ -p /boot/grub \ diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 6249efe9e7..0cb7688a24 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package/boot/kexec-tools/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kexec-tools -PKG_VERSION:=2.0.21 -PKG_RELEASE:=2 +PKG_VERSION:=2.0.26 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec -PKG_HASH:=e113142dee891638ad96e0f72cf9277b244477619470b30c41999d312e8e8702 +PKG_HASH:=7fe36a064101cd5c515e41b2be393dce3ca88adce59d6ee668e0af7c0c4570cd PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA diff --git a/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch b/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch deleted file mode 100644 index 82bdd4e7ed..0000000000 --- a/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 9817ec81968a5eec7863902833fb77680544eae4 Mon Sep 17 00:00:00 2001 -From: Alexander Egorenkov -Date: Mon, 12 Apr 2021 13:18:05 +0200 -Subject: [PATCH 1/1] arm: do not copy magic 4 bytes of appended DTB in zImage - -If the passed zImage happens to have a DTB appended, then the magic 4 bytes -of the DTB are copied together with the kernel image. This leads to -failed kexec boots because the decompressor finds the aforementioned -DTB magic and falsely tries to replace the DTB passed in the register r2 -with the non-existent appended one. - -Signed-off-by: Alexander Egorenkov -Signed-off-by: Simon Horman ---- - kexec/arch/arm/kexec-zImage-arm.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - ---- a/kexec/arch/arm/kexec-zImage-arm.c -+++ b/kexec/arch/arm/kexec-zImage-arm.c -@@ -382,6 +382,7 @@ int zImage_arm_load(int argc, char **arg - unsigned int atag_offset = 0x1000; /* 4k offset from memory start */ - unsigned int extra_size = 0x8000; /* TEXT_OFFSET */ - const struct zimage_tag *tag; -+ size_t kernel_buf_size; - size_t kernel_mem_size; - const char *command_line; - char *modified_cmdline = NULL; -@@ -538,6 +539,15 @@ int zImage_arm_load(int argc, char **arg - } - - /* -+ * Save the length of the compressed kernel image w/o the appended DTB. -+ * This will be required later on when the kernel image contained -+ * in the zImage will be loaded into a kernel memory segment. -+ * And we want to load ONLY the compressed kernel image from the zImage -+ * and discard the appended DTB. -+ */ -+ kernel_buf_size = len; -+ -+ /* - * Always extend the zImage by four bytes to ensure that an appended - * DTB image always sees an initialised value after _edata. - */ -@@ -759,7 +769,7 @@ int zImage_arm_load(int argc, char **arg - add_segment(info, dtb_buf, dtb_length, dtb_offset, dtb_length); - } - -- add_segment(info, buf, len, kernel_base, kernel_mem_size); -+ add_segment(info, buf, kernel_buf_size, kernel_base, kernel_mem_size); - - info->entry = (void*)kernel_base; - diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index cc1c648f24..63b5132608 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -13,6 +13,7 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in +buffalo,ls220de|\ buffalo,ls421de) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" ;; diff --git a/package/firmware/linux-firmware/mediatek.mk b/package/firmware/linux-firmware/mediatek.mk index 9c8f68b889..c18058dd64 100644 --- a/package/firmware/linux-firmware/mediatek.mk +++ b/package/firmware/linux-firmware/mediatek.mk @@ -68,3 +68,13 @@ define Package/mt7922bt-firmware/install $(1)/lib/firmware/mediatek endef $(eval $(call BuildPackage,mt7922bt-firmware)) + +Package/mt7986-wo-firmware = $(call Package/firmware-default,MT7986 offload firmware) +define Package/mt7986-wo-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/mediatek + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/mediatek/mt7986_wo_0.bin \ + $(PKG_BUILD_DIR)/mediatek/mt7986_wo_1.bin \ + $(1)/lib/firmware/mediatek +endef +$(eval $(call BuildPackage,mt7986-wo-firmware)) diff --git a/package/kernel/hwmon-gsc/Makefile b/package/kernel/hwmon-gsc/Makefile deleted file mode 100644 index cd7d4efb10..0000000000 --- a/package/kernel/hwmon-gsc/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=hwmon-gsc -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/hwmon-gsc - SUBMENU:=Hardware Monitoring Support - DEPENDS:=@TARGET_imx +kmod-hwmon-core +kmod-i2c-core - TITLE:=Driver for the Gateworks System Controller - AUTOLOAD:=$(call AutoLoad,60,gsc) - FILES:=$(PKG_BUILD_DIR)/gsc.ko -endef - -define KernelPackage/hwmon-gsc/description - Kernel module for the Gateworks System Controller chips. -endef - -define Build/Compile - $(KERNEL_MAKE) \ - M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(BUILDFLAGS)" \ - modules -endef - -$(eval $(call KernelPackage,hwmon-gsc)) diff --git a/package/kernel/hwmon-gsc/src/Makefile b/package/kernel/hwmon-gsc/src/Makefile deleted file mode 100644 index 0e54aed2e3..0000000000 --- a/package/kernel/hwmon-gsc/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-m := gsc.o diff --git a/package/kernel/hwmon-gsc/src/gsc.c b/package/kernel/hwmon-gsc/src/gsc.c deleted file mode 100644 index 737cc599b4..0000000000 --- a/package/kernel/hwmon-gsc/src/gsc.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * A hwmon driver for the Gateworks System Controller - * Copyright (C) 2009 Gateworks Corporation - * - * Author: Chris Lang - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, - * as published by the Free Software Foundation - version 2. - */ - -#include -#include -#include -#include -#include -#include - -#define DRV_VERSION "0.2" - -enum chips { gsp }; - -/* AD7418 registers */ -#define GSP_REG_TEMP_IN 0x00 -#define GSP_REG_VIN 0x02 -#define GSP_REG_3P3 0x05 -#define GSP_REG_BAT 0x08 -#define GSP_REG_5P0 0x0b -#define GSP_REG_CORE 0x0e -#define GSP_REG_CPU1 0x11 -#define GSP_REG_CPU2 0x14 -#define GSP_REG_DRAM 0x17 -#define GSP_REG_EXT_BAT 0x1a -#define GSP_REG_IO1 0x1d -#define GSP_REG_IO2 0x20 -#define GSP_REG_PCIE 0x23 -#define GSP_REG_CURRENT 0x26 -#define GSP_FAN_0 0x2C -#define GSP_FAN_1 0x2E -#define GSP_FAN_2 0x30 -#define GSP_FAN_3 0x32 -#define GSP_FAN_4 0x34 -#define GSP_FAN_5 0x36 - -struct gsp_sensor_info { - const char* name; - int reg; -}; - -static const struct gsp_sensor_info gsp_sensors[] = { - {"temp", GSP_REG_TEMP_IN}, - {"vin", GSP_REG_VIN}, - {"3p3", GSP_REG_3P3}, - {"bat", GSP_REG_BAT}, - {"5p0", GSP_REG_5P0}, - {"core", GSP_REG_CORE}, - {"cpu1", GSP_REG_CPU1}, - {"cpu2", GSP_REG_CPU2}, - {"dram", GSP_REG_DRAM}, - {"ext_bat", GSP_REG_EXT_BAT}, - {"io1", GSP_REG_IO1}, - {"io2", GSP_REG_IO2}, - {"pci2", GSP_REG_PCIE}, - {"current", GSP_REG_CURRENT}, - {"fan_point0", GSP_FAN_0}, - {"fan_point1", GSP_FAN_1}, - {"fan_point2", GSP_FAN_2}, - {"fan_point3", GSP_FAN_3}, - {"fan_point4", GSP_FAN_4}, - {"fan_point5", GSP_FAN_5}, -}; - -struct gsp_data { - struct device *hwmon_dev; - struct attribute_group attrs; - enum chips type; -}; - -static int gsp_probe(struct i2c_client *client, - const struct i2c_device_id *id); -static int gsp_remove(struct i2c_client *client); - -static const struct i2c_device_id gsp_id[] = { - { "gsp", 0 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, gsp_id); - -static struct i2c_driver gsp_driver = { - .driver = { - .name = "gsp", - }, - .probe = gsp_probe, - .remove = gsp_remove, - .id_table = gsp_id, -}; - -/* All registers are word-sized, except for the configuration registers. - * AD7418 uses a high-byte first convention. Do NOT use those functions to - * access the configuration registers CONF and CONF2, as they are byte-sized. - */ -static inline int gsp_read(struct i2c_client *client, u8 reg) -{ - unsigned int adc = 0; - if (reg == GSP_REG_TEMP_IN || reg > GSP_REG_CURRENT) - { - adc |= i2c_smbus_read_byte_data(client, reg); - adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8; - return adc; - } - else - { - adc |= i2c_smbus_read_byte_data(client, reg); - adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8; - adc |= i2c_smbus_read_byte_data(client, reg + 2) << 16; - return adc; - } -} - -static inline int gsp_write(struct i2c_client *client, u8 reg, u16 value) -{ - i2c_smbus_write_byte_data(client, reg, value & 0xff); - i2c_smbus_write_byte_data(client, reg + 1, ((value >> 8) & 0xff)); - return 1; -} - -static ssize_t show_adc(struct device *dev, struct device_attribute *devattr, - char *buf) -{ - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - struct i2c_client *client = to_i2c_client(dev); - return sprintf(buf, "%d\n", gsp_read(client, gsp_sensors[attr->index].reg)); -} - -static ssize_t show_label(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - - return sprintf(buf, "%s\n", gsp_sensors[attr->index].name); -} - -static ssize_t store_fan(struct device *dev, - struct device_attribute *devattr, const char *buf, size_t count) -{ - u16 val; - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - struct i2c_client *client = to_i2c_client(dev); - val = simple_strtoul(buf, NULL, 10); - gsp_write(client, gsp_sensors[attr->index].reg, val); - return count; -} - -static SENSOR_DEVICE_ATTR(temp0_input, S_IRUGO, show_adc, NULL, 0); -static SENSOR_DEVICE_ATTR(temp0_label, S_IRUGO, show_label, NULL, 0); - -static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_adc, NULL, 1); -static SENSOR_DEVICE_ATTR(in0_label, S_IRUGO, show_label, NULL, 1); -static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, show_adc, NULL, 2); -static SENSOR_DEVICE_ATTR(in1_label, S_IRUGO, show_label, NULL, 2); -static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, show_adc, NULL, 3); -static SENSOR_DEVICE_ATTR(in2_label, S_IRUGO, show_label, NULL, 3); -static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, show_adc, NULL, 4); -static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_label, NULL, 4); -static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, show_adc, NULL, 5); -static SENSOR_DEVICE_ATTR(in4_label, S_IRUGO, show_label, NULL, 5); -static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, show_adc, NULL, 6); -static SENSOR_DEVICE_ATTR(in5_label, S_IRUGO, show_label, NULL, 6); -static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, show_adc, NULL, 7); -static SENSOR_DEVICE_ATTR(in6_label, S_IRUGO, show_label, NULL, 7); -static SENSOR_DEVICE_ATTR(in7_input, S_IRUGO, show_adc, NULL, 8); -static SENSOR_DEVICE_ATTR(in7_label, S_IRUGO, show_label, NULL, 8); -static SENSOR_DEVICE_ATTR(in8_input, S_IRUGO, show_adc, NULL, 9); -static SENSOR_DEVICE_ATTR(in8_label, S_IRUGO, show_label, NULL, 9); -static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, show_adc, NULL, 10); -static SENSOR_DEVICE_ATTR(in9_label, S_IRUGO, show_label, NULL, 10); -static SENSOR_DEVICE_ATTR(in10_input, S_IRUGO, show_adc, NULL, 11); -static SENSOR_DEVICE_ATTR(in10_label, S_IRUGO, show_label, NULL, 11); -static SENSOR_DEVICE_ATTR(in11_input, S_IRUGO, show_adc, NULL, 12); -static SENSOR_DEVICE_ATTR(in11_label, S_IRUGO, show_label, NULL, 12); -static SENSOR_DEVICE_ATTR(in12_input, S_IRUGO, show_adc, NULL, 13); -static SENSOR_DEVICE_ATTR(in12_label, S_IRUGO, show_label, NULL, 13); - -static SENSOR_DEVICE_ATTR(fan0_point0, S_IRUGO | S_IWUSR, show_adc, store_fan, 14); -static SENSOR_DEVICE_ATTR(fan0_point1, S_IRUGO | S_IWUSR, show_adc, store_fan, 15); -static SENSOR_DEVICE_ATTR(fan0_point2, S_IRUGO | S_IWUSR, show_adc, store_fan, 16); -static SENSOR_DEVICE_ATTR(fan0_point3, S_IRUGO | S_IWUSR, show_adc, store_fan, 17); -static SENSOR_DEVICE_ATTR(fan0_point4, S_IRUGO | S_IWUSR, show_adc, store_fan, 18); -static SENSOR_DEVICE_ATTR(fan0_point5, S_IRUGO | S_IWUSR, show_adc, store_fan, 19); - -static struct attribute *gsp_attributes[] = { - &sensor_dev_attr_temp0_input.dev_attr.attr, - &sensor_dev_attr_in0_input.dev_attr.attr, - &sensor_dev_attr_in1_input.dev_attr.attr, - &sensor_dev_attr_in2_input.dev_attr.attr, - &sensor_dev_attr_in3_input.dev_attr.attr, - &sensor_dev_attr_in4_input.dev_attr.attr, - &sensor_dev_attr_in5_input.dev_attr.attr, - &sensor_dev_attr_in6_input.dev_attr.attr, - &sensor_dev_attr_in7_input.dev_attr.attr, - &sensor_dev_attr_in8_input.dev_attr.attr, - &sensor_dev_attr_in9_input.dev_attr.attr, - &sensor_dev_attr_in10_input.dev_attr.attr, - &sensor_dev_attr_in11_input.dev_attr.attr, - &sensor_dev_attr_in12_input.dev_attr.attr, - - &sensor_dev_attr_temp0_label.dev_attr.attr, - &sensor_dev_attr_in0_label.dev_attr.attr, - &sensor_dev_attr_in1_label.dev_attr.attr, - &sensor_dev_attr_in2_label.dev_attr.attr, - &sensor_dev_attr_in3_label.dev_attr.attr, - &sensor_dev_attr_in4_label.dev_attr.attr, - &sensor_dev_attr_in5_label.dev_attr.attr, - &sensor_dev_attr_in6_label.dev_attr.attr, - &sensor_dev_attr_in7_label.dev_attr.attr, - &sensor_dev_attr_in8_label.dev_attr.attr, - &sensor_dev_attr_in9_label.dev_attr.attr, - &sensor_dev_attr_in10_label.dev_attr.attr, - &sensor_dev_attr_in11_label.dev_attr.attr, - &sensor_dev_attr_in12_label.dev_attr.attr, - - &sensor_dev_attr_fan0_point0.dev_attr.attr, - &sensor_dev_attr_fan0_point1.dev_attr.attr, - &sensor_dev_attr_fan0_point2.dev_attr.attr, - &sensor_dev_attr_fan0_point3.dev_attr.attr, - &sensor_dev_attr_fan0_point4.dev_attr.attr, - &sensor_dev_attr_fan0_point5.dev_attr.attr, - NULL -}; - - -static int gsp_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - struct i2c_adapter *adapter = client->adapter; - struct gsp_data *data; - int err; - - if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA | - I2C_FUNC_SMBUS_WORD_DATA)) { - err = -EOPNOTSUPP; - goto exit; - } - - if (!(data = kzalloc(sizeof(struct gsp_data), GFP_KERNEL))) { - err = -ENOMEM; - goto exit; - } - - i2c_set_clientdata(client, data); - - data->type = id->driver_data; - - switch (data->type) { - case 0: - data->attrs.attrs = gsp_attributes; - break; - } - - dev_info(&client->dev, "%s chip found\n", client->name); - - /* Register sysfs hooks */ - if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) - goto exit_free; - - data->hwmon_dev = hwmon_device_register(&client->dev); - if (IS_ERR(data->hwmon_dev)) { - err = PTR_ERR(data->hwmon_dev); - goto exit_remove; - } - - return 0; - -exit_remove: - sysfs_remove_group(&client->dev.kobj, &data->attrs); -exit_free: - kfree(data); -exit: - return err; -} - -static int gsp_remove(struct i2c_client *client) -{ - struct gsp_data *data = i2c_get_clientdata(client); - hwmon_device_unregister(data->hwmon_dev); - sysfs_remove_group(&client->dev.kobj, &data->attrs); - kfree(data); - return 0; -} - -static int __init gsp_init(void) -{ - return i2c_add_driver(&gsp_driver); -} - -static void __exit gsp_exit(void) -{ - i2c_del_driver(&gsp_driver); -} - -module_init(gsp_init); -module_exit(gsp_exit); - -MODULE_AUTHOR("Chris Lang "); -MODULE_DESCRIPTION("GSC HWMON driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); - diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index c8d79b622e..79df0471ed 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -108,6 +108,25 @@ endef $(eval $(call KernelPackage,hwmon-drivetemp)) +define KernelPackage/hwmon-gsc + TITLE:=Gateworks System Controller support + KCONFIG:=CONFIG_MFD_GATEWORKS_GSC \ + CONFIG_SENSORS_GSC + FILES:= \ + $(LINUX_DIR)/drivers/mfd/gateworks-gsc.ko \ + $(LINUX_DIR)/drivers/hwmon/gsc-hwmon.ko + AUTOLOAD:=$(call AutoLoad,20,gsc-hwmon,1) + $(call AddDepends/hwmon,+kmod-i2c-core) +endef + +define KernelPackage/hwmon-gsc/description + Kernel module for Gateworks System Controller with temperature sensor, +ADCs, and FAN controller +endef + +$(eval $(call KernelPackage,hwmon-gsc)) + + define KernelPackage/hwmon-gpiofan TITLE:=Generic GPIO FAN support KCONFIG:=CONFIG_SENSORS_GPIO_FAN diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index 7b5609a84c..ce72465ce4 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -115,6 +115,23 @@ endef $(eval $(call KernelPackage,ledtrig-pattern)) +define KernelPackage/ledtrig-tty + SUBMENU:=$(LEDS_MENU) + TITLE:=LED Trigger for TTY devices + DEPENDS:=@LINUX_5_15 + KCONFIG:=CONFIG_LEDS_TRIGGER_TTY + FILES:=$(LED_TRIGGER_DIR)/ledtrig-tty.ko + AUTOLOAD:=$(call AutoLoad,50,ledtrig-tty) +endef + +define KernelPackage/ledtrig-tty/description + This allows LEDs to be controlled by activity on ttys which includes + serial devices like '/dev/ttyS0'. +endef + +$(eval $(call KernelPackage,ledtrig-tty)) + + define KernelPackage/leds-apu SUBMENU:=$(LEDS_MENU) TITLE:=PC Engines APU1 LED support diff --git a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch index 4bd3d4c092..e1c5027cde 100644 --- a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch +++ b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch @@ -1,33 +1,32 @@ -From: Sriram R -Date: Thu, 18 Aug 2022 12:35:42 +0530 +From: Felix Fietkau +Date: Sun, 26 Feb 2023 13:53:08 +0100 Subject: [PATCH] wifi: mac80211: mesh fast xmit support -Currently fast xmit is supported in AP, STA and other device types where -the destination doesn't change for the lifetime of its association by -caching the static parts of the header that can be reused directly for -every Tx such as addresses and updates only mutable header fields such as -PN. -This technique is not directly applicable for a Mesh device type due -to the dynamic nature of the topology and protocol. The header is built -based on the destination mesh device which is proxying a certain external -device and based on the Mesh destination the next hop changes. -And the RA/A1 which is the next hop for reaching the destination can -vary during runtime as per the best route based on airtime. To accommodate -these changes and to come up with a solution to avoid overhead during header -generation, the headers comprising the MAC, Mesh and LLC part are cached -whenever data for a certain external destination is sent. -This cached header is reused every time a data is sent to that external -destination. +Previously, fast xmit only worked on interface types where initially a +sta lookup is performed, and a cached header can be attached to the sta, +requiring only some fields to be updated at runtime. + +This technique is not directly applicable for a mesh device type due +to the dynamic nature of the topology and protocol. There are more +addresses that need to be filled, and there is an extra header with a +dynamic length based on the addressing mode. + +Change the code to cache entries contain a copy of the mesh subframe header + +bridge tunnel header, as well as an embedded struct ieee80211_fast_tx, which +contains the information for building the 802.11 header. + +Add a mesh specific early fast xmit call, which looks up a cached entry and +adds only the mesh subframe header, before passing it over to the generic +fast xmit code. To ensure the changes in network are reflected in these cached headers, flush affected cached entries on path changes, as well as other conditions that currently trigger a fast xmit check in other modes (key changes etc.) -In order to keep the cache small, use a short timeout for expiring cache -entries. +This code is loosely based on a previous implementation by: +Sriram R -Co-developed-by: Felix Fietkau -Signed-off-by: Sriram R +Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau --- @@ -37,24 +36,23 @@ Signed-off-by: Felix Fietkau extern const struct cfg80211_ops mac80211_config_ops; struct ieee80211_local; -+struct mhdr_cache_entry; ++struct ieee80211_mesh_fast_tx; /* Maximum number of broadcast/multicast frames to buffer when some of the * associated stations are using power saving. */ -@@ -655,6 +656,20 @@ struct mesh_table { +@@ -655,6 +656,19 @@ struct mesh_table { atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */ }; +/** -+ * struct mesh_hdr_cache - mesh fast xmit header cache ++ * struct mesh_tx_cache - mesh fast xmit header cache + * -+ * @rhead: hash table containing struct mhdr_cache_entry, using skb DA as key -+ * @walk_head: linked list containing all mhdr_cache_entry objects -+ * @walk_lock: lock protecting walk_head and rhead -+ * @enabled: indicates if header cache is initialized ++ * @rht: hash table containing struct ieee80211_mesh_fast_tx, using skb DA as key ++ * @walk_head: linked list containing all ieee80211_mesh_fast_tx objects ++ * @walk_lock: lock protecting walk_head and rht + */ -+struct mesh_hdr_cache { -+ struct rhashtable rhead; ++struct mesh_tx_cache { ++ struct rhashtable rht; + struct hlist_head walk_head; + spinlock_t walk_lock; +}; @@ -62,145 +60,263 @@ Signed-off-by: Felix Fietkau struct ieee80211_if_mesh { struct timer_list housekeeping_timer; struct timer_list mesh_path_timer; -@@ -733,6 +748,7 @@ struct ieee80211_if_mesh { +@@ -733,6 +747,7 @@ struct ieee80211_if_mesh { struct mesh_table mpp_paths; /* Store paths for MPP&MAP */ int mesh_paths_generation; int mpp_paths_generation; -+ struct mesh_hdr_cache hdr_cache; ++ struct mesh_tx_cache tx_cache; }; #ifdef CPTCFG_MAC80211_MESH -@@ -1998,6 +2014,9 @@ int ieee80211_tx_control_port(struct wip +@@ -1998,6 +2013,11 @@ int ieee80211_tx_control_port(struct wip int link_id, u64 *cookie); int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev, const u8 *buf, size_t len); -+void __ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, -+ struct mhdr_cache_entry *entry, -+ struct sk_buff *skb); ++void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, ++ struct sta_info *sta, ++ struct ieee80211_fast_tx *fast_tx, ++ struct sk_buff *skb, bool ampdu, ++ const u8 *da, const u8 *sa); /* HT */ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c -@@ -780,6 +780,8 @@ static void ieee80211_mesh_housekeeping( +@@ -10,6 +10,7 @@ + #include + #include "ieee80211_i.h" + #include "mesh.h" ++#include "wme.h" + #include "driver-ops.h" + + static int mesh_allocated; +@@ -698,6 +699,95 @@ ieee80211_mesh_update_bss_params(struct + __le32_to_cpu(he_oper->he_oper_params); + } + ++bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, ++ struct sk_buff *skb, u32 ctrl_flags) ++{ ++ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; ++ struct ieee80211_mesh_fast_tx *entry; ++ struct ieee80211s_hdr *meshhdr; ++ u8 sa[ETH_ALEN] __aligned(2); ++ struct tid_ampdu_tx *tid_tx; ++ struct sta_info *sta; ++ bool copy_sa = false; ++ u16 ethertype; ++ u8 tid; ++ ++ if (ctrl_flags & IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP) ++ return false; ++ ++ if (ifmsh->mshcfg.dot11MeshNolearn) ++ return false; ++ ++ /* Add support for these cases later */ ++ if (ifmsh->ps_peers_light_sleep || ifmsh->ps_peers_deep_sleep) ++ return false; ++ ++ if (is_multicast_ether_addr(skb->data)) ++ return false; ++ ++ ethertype = (skb->data[12] << 8) | skb->data[13]; ++ if (ethertype < ETH_P_802_3_MIN) ++ return false; ++ ++ if (skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) ++ return false; ++ ++ if (skb->ip_summed == CHECKSUM_PARTIAL) { ++ skb_set_transport_header(skb, skb_checksum_start_offset(skb)); ++ if (skb_checksum_help(skb)) ++ return false; ++ } ++ ++ entry = mesh_fast_tx_get(sdata, skb->data); ++ if (!entry) ++ return false; ++ ++ if (skb_headroom(skb) + 2 * ETH_ALEN < entry->hdrlen + ++ entry->fast_tx.hdr_len) ++ return false; ++ ++ sta = rcu_dereference(entry->mpath->next_hop); ++ if (!sta) ++ return false; ++ ++ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; ++ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); ++ if (tid_tx) { ++ if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) ++ return false; ++ if (tid_tx->timeout) ++ tid_tx->last_tx = jiffies; ++ } ++ ++ skb = skb_share_check(skb, GFP_ATOMIC); ++ if (!skb) ++ return true; ++ ++ skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); ++ ++ meshhdr = (struct ieee80211s_hdr *)entry->hdr; ++ if ((meshhdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6) { ++ /* preserve SA from eth header for 6-addr frames */ ++ ether_addr_copy(sa, skb->data + ETH_ALEN); ++ copy_sa = true; ++ } ++ ++ memcpy(skb_push(skb, entry->hdrlen - 2 * ETH_ALEN), entry->hdr, ++ entry->hdrlen); ++ ++ meshhdr = (struct ieee80211s_hdr *)skb->data; ++ put_unaligned_le32(atomic_inc_return(&sdata->u.mesh.mesh_seqnum), ++ &meshhdr->seqnum); ++ meshhdr->ttl = sdata->u.mesh.mshcfg.dot11MeshTTL; ++ if (copy_sa) ++ ether_addr_copy(meshhdr->eaddr2, sa); ++ ++ __ieee80211_xmit_fast(sdata, sta, &entry->fast_tx, skb, tid_tx, ++ entry->mpath->dst, sdata->vif.addr); ++ ++ return true; ++} ++ + /** + * ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame + * @hdr: 802.11 frame header +@@ -780,6 +870,8 @@ static void ieee80211_mesh_housekeeping( changed = mesh_accept_plinks_update(sdata); ieee80211_mbss_info_change_notify(sdata, changed); -+ mesh_hdr_cache_gc(sdata); ++ mesh_fast_tx_gc(sdata); + mod_timer(&ifmsh->housekeeping_timer, round_jiffies(jiffies + IEEE80211_MESH_HOUSEKEEPING_INTERVAL)); --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h -@@ -122,11 +122,49 @@ struct mesh_path { +@@ -122,11 +122,41 @@ struct mesh_path { u8 rann_snd_addr[ETH_ALEN]; u32 rann_metric; unsigned long last_preq_to_root; -+ unsigned long fast_xmit_check; ++ unsigned long fast_tx_check; bool is_root; bool is_gate; u32 path_change_count; }; -+#define MESH_HEADER_CACHE_MAX_SIZE 512 -+#define MESH_HEADER_CACHE_THRESHOLD_SIZE 384 -+#define MESH_HEADER_CACHE_TIMEOUT 8000 /* msecs */ -+#define MESH_HEADER_MAX_LEN 68 /* mac+mesh+rfc1042 hdr */ ++#define MESH_FAST_TX_CACHE_MAX_SIZE 512 ++#define MESH_FAST_TX_CACHE_THRESHOLD_SIZE 384 ++#define MESH_FAST_TX_CACHE_TIMEOUT 8000 /* msecs */ + +/** -+ * struct mhdr_cache_entry - Cached Mesh header entry -+ * @addr_key: The Ethernet DA which is the key for this entry -+ * @hdr: The cached header -+ * @machdr_len: Total length of the mac header -+ * @hdrlen: Length of this header entry -+ * @key: Key corresponding to the nexthop stored in the header -+ * @pn_offs: Offset to PN which is updated for every xmit -+ * @band: band used for tx -+ * @walk_list: list containing all the cached header entries ++ * struct ieee80211_mesh_fast_tx - cached mesh fast tx entry + * @rhash: rhashtable pointer -+ * @mpath: The Mesh path corresponding to the Mesh DA -+ * @mppath: The MPP entry corresponding to this DA ++ * @addr_key: The Ethernet DA which is the key for this entry ++ * @fast_tx: base fast_tx data ++ * @hdr: cached mesh and rfc1042 headers ++ * @hdrlen: length of mesh + rfc1042 ++ * @walk_list: list containing all the fast tx entries ++ * @mpath: mesh path corresponding to the Mesh DA ++ * @mppath: MPP entry corresponding to this DA + * @timestamp: Last used time of this entry -+ * @rcu: rcu to free this entry -+ * @path_change_count: Stored path change value corresponding to the mpath + */ -+struct mhdr_cache_entry { -+ u8 addr_key[ETH_ALEN] __aligned(2); -+ u8 hdr[MESH_HEADER_MAX_LEN]; -+ u16 machdr_len; -+ u16 hdrlen; -+ u8 pn_offs; -+ u8 band; -+ struct ieee80211_key __rcu *key; -+ struct hlist_node walk_list; ++struct ieee80211_mesh_fast_tx { + struct rhash_head rhash; ++ u8 addr_key[ETH_ALEN] __aligned(2); ++ ++ struct ieee80211_fast_tx fast_tx; ++ u8 hdr[sizeof(struct ieee80211s_hdr) + sizeof(rfc1042_header)]; ++ u16 hdrlen; ++ + struct mesh_path *mpath, *mppath; ++ struct hlist_node walk_list; + unsigned long timestamp; -+ struct rcu_head rcu; +}; + /* Recent multicast cache */ /* RMC_BUCKETS must be a power of 2, maximum 256 */ #define RMC_BUCKETS 256 -@@ -298,6 +336,15 @@ void mesh_path_discard_frame(struct ieee +@@ -298,6 +328,20 @@ void mesh_path_discard_frame(struct ieee void mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata); bool mesh_action_is_path_sel(struct ieee80211_mgmt *mgmt); -+struct mhdr_cache_entry * -+mesh_get_cached_hdr(struct ieee80211_sub_if_data *sdata, const u8 *addr); -+void mesh_cache_hdr(struct ieee80211_sub_if_data *sdata, -+ struct sk_buff *skb, struct mesh_path *mpath); -+void mesh_hdr_cache_gc(struct ieee80211_sub_if_data *sdata); -+void mesh_hdr_cache_flush(struct ieee80211_sub_if_data *sdata, const u8 *addr, -+ bool is_mpp); -+void mesh_refresh_path(struct ieee80211_sub_if_data *sdata, ++struct ieee80211_mesh_fast_tx * ++mesh_fast_tx_get(struct ieee80211_sub_if_data *sdata, const u8 *addr); ++bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, ++ struct sk_buff *skb, u32 ctrl_flags); ++void mesh_fast_tx_cache(struct ieee80211_sub_if_data *sdata, ++ struct sk_buff *skb, struct mesh_path *mpath); ++void mesh_fast_tx_gc(struct ieee80211_sub_if_data *sdata); ++void mesh_fast_tx_flush_addr(struct ieee80211_sub_if_data *sdata, ++ const u8 *addr); ++void mesh_fast_tx_flush_mpath(struct mesh_path *mpath); ++void mesh_fast_tx_flush_sta(struct ieee80211_sub_if_data *sdata, ++ struct sta_info *sta); ++void mesh_path_refresh(struct ieee80211_sub_if_data *sdata, + struct mesh_path *mpath, const u8 *addr); #ifdef CPTCFG_MAC80211_MESH static inline --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c -@@ -491,8 +491,11 @@ static u32 hwmp_route_info_get(struct ie +@@ -394,6 +394,7 @@ static u32 hwmp_route_info_get(struct ie + u32 orig_sn, orig_metric; + unsigned long orig_lifetime, exp_time; + u32 last_hop_metric, new_metric; ++ bool flush_mpath = false; + bool process = true; + u8 hopcount; + +@@ -491,8 +492,10 @@ static u32 hwmp_route_info_get(struct ie } if (fresh_info) { - if (rcu_access_pointer(mpath->next_hop) != sta) + if (rcu_access_pointer(mpath->next_hop) != sta) { mpath->path_change_count++; -+ mesh_hdr_cache_flush(mpath->sdata, mpath->dst, -+ false); ++ flush_mpath = true; + } mesh_path_assign_nexthop(mpath, sta); mpath->flags |= MESH_PATH_SN_VALID; mpath->metric = new_metric; -@@ -539,8 +542,11 @@ static u32 hwmp_route_info_get(struct ie +@@ -502,6 +505,8 @@ static u32 hwmp_route_info_get(struct ie + mpath->hop_count = hopcount; + mesh_path_activate(mpath); + spin_unlock_bh(&mpath->state_lock); ++ if (flush_mpath) ++ mesh_fast_tx_flush_mpath(mpath); + ewma_mesh_fail_avg_init(&sta->mesh->fail_avg); + /* init it at a low value - 0 start is tricky */ + ewma_mesh_fail_avg_add(&sta->mesh->fail_avg, 1); +@@ -539,8 +544,10 @@ static u32 hwmp_route_info_get(struct ie } if (fresh_info) { - if (rcu_access_pointer(mpath->next_hop) != sta) + if (rcu_access_pointer(mpath->next_hop) != sta) { mpath->path_change_count++; -+ mesh_hdr_cache_flush(mpath->sdata, mpath->dst, -+ false); ++ flush_mpath = true; + } mesh_path_assign_nexthop(mpath, sta); mpath->metric = last_hop_metric; mpath->exp_time = time_after(mpath->exp_time, exp_time) -@@ -977,7 +983,7 @@ free: - * Locking: the function must be called from within a rcu read lock block. - * - */ --static void mesh_queue_preq(struct mesh_path *mpath, u8 flags) -+void mesh_queue_preq(struct mesh_path *mpath, u8 flags) - { - struct ieee80211_sub_if_data *sdata = mpath->sdata; - struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; -@@ -1215,6 +1221,20 @@ static int mesh_nexthop_lookup_nolearn(s +@@ -548,6 +555,8 @@ static u32 hwmp_route_info_get(struct ie + mpath->hop_count = 1; + mesh_path_activate(mpath); + spin_unlock_bh(&mpath->state_lock); ++ if (flush_mpath) ++ mesh_fast_tx_flush_mpath(mpath); + ewma_mesh_fail_avg_init(&sta->mesh->fail_avg); + /* init it at a low value - 0 start is tricky */ + ewma_mesh_fail_avg_add(&sta->mesh->fail_avg, 1); +@@ -1215,6 +1224,20 @@ static int mesh_nexthop_lookup_nolearn(s return 0; } -+void mesh_refresh_path(struct ieee80211_sub_if_data *sdata, ++void mesh_path_refresh(struct ieee80211_sub_if_data *sdata, + struct mesh_path *mpath, const u8 *addr) +{ + if (mpath->flags & (MESH_PATH_REQ_QUEUED | MESH_PATH_FIXED | @@ -217,7 +333,7 @@ Signed-off-by: Felix Fietkau /** * mesh_nexthop_lookup - put the appropriate next hop on a mesh frame. Calling * this function is considered "using" the associated mpath, so preempt a path -@@ -1242,19 +1262,18 @@ int mesh_nexthop_lookup(struct ieee80211 +@@ -1242,19 +1265,15 @@ int mesh_nexthop_lookup(struct ieee80211 if (!mpath || !(mpath->flags & MESH_PATH_ACTIVE)) return -ENOENT; @@ -228,18 +344,15 @@ Signed-off-by: Felix Fietkau - !(mpath->flags & MESH_PATH_RESOLVING) && - !(mpath->flags & MESH_PATH_FIXED)) - mesh_queue_preq(mpath, PREQ_Q_F_START | PREQ_Q_F_REFRESH); -+ mesh_refresh_path(sdata, mpath, hdr->addr4); ++ mesh_path_refresh(sdata, mpath, hdr->addr4); next_hop = rcu_dereference(mpath->next_hop); if (next_hop) { memcpy(hdr->addr1, next_hop->sta.addr, ETH_ALEN); memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN); ieee80211_mps_set_frame_flags(sdata, next_hop, hdr); -+ /* Cache the whole header so as to use next time rather than resolving -+ * and building it every time -+ */ + if (ieee80211_hw_check(&sdata->local->hw, SUPPORT_FAST_XMIT)) -+ mesh_cache_hdr(sdata, skb, mpath); ++ mesh_fast_tx_cache(sdata, skb, mpath); return 0; } @@ -257,37 +370,37 @@ Signed-off-by: Felix Fietkau .hashfn = mesh_table_hash, }; -+static const struct rhashtable_params mesh_hdr_rht_params = { ++static const struct rhashtable_params fast_tx_rht_params = { + .nelem_hint = 10, + .automatic_shrinking = true, -+ .key_len = ETH_ALEN, -+ .key_offset = offsetof(struct mhdr_cache_entry, addr_key), -+ .head_offset = offsetof(struct mhdr_cache_entry, rhash), ++ .key_len = ETH_ALEN, ++ .key_offset = offsetof(struct ieee80211_mesh_fast_tx, addr_key), ++ .head_offset = offsetof(struct ieee80211_mesh_fast_tx, rhash), + .hashfn = mesh_table_hash, +}; + -+static void __mesh_hdr_cache_entry_free(void *ptr, void *tblptr) ++static void __mesh_fast_tx_entry_free(void *ptr, void *tblptr) +{ -+ struct mhdr_cache_entry *mhdr = ptr; ++ struct ieee80211_mesh_fast_tx *entry = ptr; + -+ kfree_rcu(mhdr, rcu); ++ kfree_rcu(entry, fast_tx.rcu_head); +} + -+static void mesh_hdr_cache_deinit(struct ieee80211_sub_if_data *sdata) ++static void mesh_fast_tx_deinit(struct ieee80211_sub_if_data *sdata) +{ -+ struct mesh_hdr_cache *cache; ++ struct mesh_tx_cache *cache; + -+ cache = &sdata->u.mesh.hdr_cache; -+ rhashtable_free_and_destroy(&cache->rhead, -+ __mesh_hdr_cache_entry_free, NULL); ++ cache = &sdata->u.mesh.tx_cache; ++ rhashtable_free_and_destroy(&cache->rht, ++ __mesh_fast_tx_entry_free, NULL); +} + -+static void mesh_hdr_cache_init(struct ieee80211_sub_if_data *sdata) ++static void mesh_fast_tx_init(struct ieee80211_sub_if_data *sdata) +{ -+ struct mesh_hdr_cache *cache; ++ struct mesh_tx_cache *cache; + -+ cache = &sdata->u.mesh.hdr_cache; -+ rhashtable_init(&cache->rhead, &mesh_hdr_rht_params); ++ cache = &sdata->u.mesh.tx_cache; ++ rhashtable_init(&cache->rht, &fast_tx_rht_params); + INIT_HLIST_HEAD(&cache->walk_head); + spin_lock_init(&cache->walk_lock); +} @@ -295,66 +408,75 @@ Signed-off-by: Felix Fietkau static inline bool mpath_expired(struct mesh_path *mpath) { return (mpath->flags & MESH_PATH_ACTIVE) && -@@ -381,6 +417,211 @@ struct mesh_path *mesh_path_new(struct i +@@ -381,6 +417,243 @@ struct mesh_path *mesh_path_new(struct i return new_mpath; } -+struct mhdr_cache_entry * -+mesh_get_cached_hdr(struct ieee80211_sub_if_data *sdata, const u8 *addr) ++static void mesh_fast_tx_entry_free(struct mesh_tx_cache *cache, ++ struct ieee80211_mesh_fast_tx *entry) +{ -+ struct mesh_path *mpath, *mppath; -+ struct mhdr_cache_entry *entry; -+ struct mesh_hdr_cache *cache; ++ hlist_del_rcu(&entry->walk_list); ++ rhashtable_remove_fast(&cache->rht, &entry->rhash, fast_tx_rht_params); ++ kfree_rcu(entry, fast_tx.rcu_head); ++} + -+ cache = &sdata->u.mesh.hdr_cache; -+ entry = rhashtable_lookup(&cache->rhead, addr, mesh_hdr_rht_params); ++struct ieee80211_mesh_fast_tx * ++mesh_fast_tx_get(struct ieee80211_sub_if_data *sdata, const u8 *addr) ++{ ++ struct ieee80211_mesh_fast_tx *entry; ++ struct mesh_tx_cache *cache; ++ ++ cache = &sdata->u.mesh.tx_cache; ++ entry = rhashtable_lookup(&cache->rht, addr, fast_tx_rht_params); + if (!entry) + return NULL; + -+ mpath = rcu_dereference(entry->mpath); -+ mppath = rcu_dereference(entry->mppath); -+ if (!(mpath->flags & MESH_PATH_ACTIVE) || mpath_expired(mpath)) ++ if (!(entry->mpath->flags & MESH_PATH_ACTIVE) || ++ mpath_expired(entry->mpath)) { ++ spin_lock_bh(&cache->walk_lock); ++ entry = rhashtable_lookup(&cache->rht, addr, fast_tx_rht_params); ++ if (entry) ++ mesh_fast_tx_entry_free(cache, entry); ++ spin_unlock_bh(&cache->walk_lock); + return NULL; ++ } + -+ mesh_refresh_path(sdata, mpath, NULL); -+ if (mppath) -+ mppath->exp_time = jiffies; ++ mesh_path_refresh(sdata, entry->mpath, NULL); ++ if (entry->mppath) ++ entry->mppath->exp_time = jiffies; + entry->timestamp = jiffies; + + return entry; +} + -+void mesh_cache_hdr(struct ieee80211_sub_if_data *sdata, -+ struct sk_buff *skb, struct mesh_path *mpath) ++void mesh_fast_tx_cache(struct ieee80211_sub_if_data *sdata, ++ struct sk_buff *skb, struct mesh_path *mpath) +{ + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -+ struct mesh_hdr_cache *cache; -+ struct mhdr_cache_entry *mhdr, *old_mhdr; ++ struct ieee80211_mesh_fast_tx *entry, *prev; ++ struct ieee80211_mesh_fast_tx build = {}; + struct ieee80211s_hdr *meshhdr; -+ struct sta_info *next_hop; ++ struct mesh_tx_cache *cache; + struct ieee80211_key *key; + struct mesh_path *mppath; -+ u16 meshhdr_len; -+ u8 pn_offs = 0; -+ int hdrlen; ++ struct sta_info *sta; ++ u8 *qc; + -+ if (sdata->noack_map) ++ if (sdata->noack_map || ++ !ieee80211_is_data_qos(hdr->frame_control)) + return; + -+ if (!ieee80211_is_data_qos(hdr->frame_control)) ++ build.fast_tx.hdr_len = ieee80211_hdrlen(hdr->frame_control); ++ meshhdr = (struct ieee80211s_hdr *)(skb->data + build.fast_tx.hdr_len); ++ build.hdrlen = ieee80211_get_mesh_hdrlen(meshhdr); ++ ++ cache = &sdata->u.mesh.tx_cache; ++ if (atomic_read(&cache->rht.nelems) >= MESH_FAST_TX_CACHE_MAX_SIZE) + return; + -+ hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ meshhdr = (struct ieee80211s_hdr *)(skb->data + hdrlen); -+ meshhdr_len = ieee80211_get_mesh_hdrlen(meshhdr); -+ -+ cache = &sdata->u.mesh.hdr_cache; -+ if (atomic_read(&cache->rhead.nelems) >= MESH_HEADER_CACHE_MAX_SIZE) -+ return; -+ -+ next_hop = rcu_dereference(mpath->next_hop); -+ if (!next_hop) ++ sta = rcu_dereference(mpath->next_hop); ++ if (!sta) + return; + + if ((meshhdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6) { @@ -362,6 +484,7 @@ Signed-off-by: Felix Fietkau + mppath = mpp_path_lookup(sdata, meshhdr->eaddr1); + if (!mppath) + return; ++ build.mppath = mppath; + } else if (ieee80211_has_a4(hdr->frame_control)) { + mppath = mpath; + } else { @@ -369,14 +492,20 @@ Signed-off-by: Felix Fietkau + } + + /* rate limit, in case fast xmit can't be enabled */ -+ if (mppath->fast_xmit_check == jiffies) ++ if (mppath->fast_tx_check == jiffies) + return; + -+ mppath->fast_xmit_check = jiffies; ++ mppath->fast_tx_check = jiffies; + -+ key = rcu_access_pointer(next_hop->ptk[next_hop->ptk_idx]); ++ /* ++ * Same use of the sta lock as in ieee80211_check_fast_xmit, in order ++ * to protect against concurrent sta key updates. ++ */ ++ spin_lock_bh(&sta->lock); ++ key = rcu_access_pointer(sta->ptk[sta->ptk_idx]); + if (!key) + key = rcu_access_pointer(sdata->default_unicast_key); ++ build.fast_tx.key = key; + + if (key) { + bool gen_iv, iv_spc; @@ -386,157 +515,184 @@ Signed-off-by: Felix Fietkau + + if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) || + (key->flags & KEY_FLAG_TAINTED)) -+ return; ++ goto unlock_sta; + + switch (key->conf.cipher) { + case WLAN_CIPHER_SUITE_CCMP: + case WLAN_CIPHER_SUITE_CCMP_256: + if (gen_iv) -+ pn_offs = hdrlen; ++ build.fast_tx.pn_offs = build.fast_tx.hdr_len; + if (gen_iv || iv_spc) -+ hdrlen += IEEE80211_CCMP_HDR_LEN; ++ build.fast_tx.hdr_len += IEEE80211_CCMP_HDR_LEN; + break; + case WLAN_CIPHER_SUITE_GCMP: + case WLAN_CIPHER_SUITE_GCMP_256: + if (gen_iv) -+ pn_offs = hdrlen; ++ build.fast_tx.pn_offs = build.fast_tx.hdr_len; + if (gen_iv || iv_spc) -+ hdrlen += IEEE80211_GCMP_HDR_LEN; ++ build.fast_tx.hdr_len += IEEE80211_GCMP_HDR_LEN; + break; + default: -+ return; ++ goto unlock_sta; + } + } + -+ if (WARN_ON_ONCE(hdrlen + meshhdr_len + sizeof(rfc1042_header) > -+ MESH_HEADER_MAX_LEN)) -+ return; ++ memcpy(build.addr_key, mppath->dst, ETH_ALEN); ++ build.timestamp = jiffies; ++ build.fast_tx.band = info->band; ++ build.fast_tx.da_offs = offsetof(struct ieee80211_hdr, addr3); ++ build.fast_tx.sa_offs = offsetof(struct ieee80211_hdr, addr4); ++ build.mpath = mpath; ++ memcpy(build.hdr, meshhdr, build.hdrlen); ++ memcpy(build.hdr + build.hdrlen, rfc1042_header, sizeof(rfc1042_header)); ++ build.hdrlen += sizeof(rfc1042_header); ++ memcpy(build.fast_tx.hdr, hdr, build.fast_tx.hdr_len); + -+ mhdr = kzalloc(sizeof(*mhdr), GFP_ATOMIC); -+ if (!mhdr) -+ return; -+ -+ memcpy(mhdr->addr_key, mppath->dst, ETH_ALEN); -+ mhdr->machdr_len = hdrlen; -+ mhdr->hdrlen = mhdr->machdr_len + meshhdr_len + sizeof(rfc1042_header); -+ rcu_assign_pointer(mhdr->mpath, mpath); -+ if (meshhdr->flags & MESH_FLAGS_AE) -+ rcu_assign_pointer(mhdr->mppath, mppath); -+ rcu_assign_pointer(mhdr->key, key); -+ mhdr->timestamp = jiffies; -+ mhdr->band = info->band; -+ mhdr->pn_offs = pn_offs; -+ -+ if (pn_offs) { -+ memcpy(mhdr->hdr, skb->data, pn_offs); -+ memcpy(mhdr->hdr + mhdr->machdr_len, skb->data + pn_offs, -+ mhdr->hdrlen - mhdr->machdr_len); -+ } else { -+ memcpy(mhdr->hdr, skb->data, mhdr->hdrlen); -+ } -+ -+ if (key) { -+ hdr = (struct ieee80211_hdr *)mhdr->hdr; ++ hdr = (struct ieee80211_hdr *)build.fast_tx.hdr; ++ if (build.fast_tx.key) + hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); ++ ++ qc = ieee80211_get_qos_ctl(hdr); ++ qc[1] |= IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT >> 8; ++ ++ entry = kmemdup(&build, sizeof(build), GFP_ATOMIC); ++ if (!entry) ++ goto unlock_sta; ++ ++ spin_lock(&cache->walk_lock); ++ prev = rhashtable_lookup_get_insert_fast(&cache->rht, ++ &entry->rhash, ++ fast_tx_rht_params); ++ if (unlikely(IS_ERR(prev))) { ++ kfree(entry); ++ goto unlock_cache; + } + -+ spin_lock_bh(&cache->walk_lock); -+ old_mhdr = rhashtable_lookup_get_insert_fast(&cache->rhead, -+ &mhdr->rhash, -+ mesh_hdr_rht_params); -+ if (likely(!old_mhdr)) -+ hlist_add_head(&mhdr->walk_list, &cache->walk_head); -+ else -+ kfree(mhdr); -+ spin_unlock_bh(&cache->walk_lock); ++ /* ++ * replace any previous entry in the hash table, in case we're ++ * replacing it with a different type (e.g. mpath -> mpp) ++ */ ++ if (unlikely(prev)) { ++ rhashtable_replace_fast(&cache->rht, &prev->rhash, ++ &entry->rhash, fast_tx_rht_params); ++ hlist_del_rcu(&prev->walk_list); ++ kfree_rcu(prev, fast_tx.rcu_head); ++ } ++ ++ hlist_add_head(&entry->walk_list, &cache->walk_head); ++ ++unlock_cache: ++ spin_unlock(&cache->walk_lock); ++unlock_sta: ++ spin_unlock_bh(&sta->lock); +} + -+static void mesh_hdr_cache_entry_free(struct mesh_hdr_cache *cache, -+ struct mhdr_cache_entry *entry) ++void mesh_fast_tx_gc(struct ieee80211_sub_if_data *sdata) +{ -+ hlist_del_rcu(&entry->walk_list); -+ rhashtable_remove_fast(&cache->rhead, &entry->rhash, mesh_hdr_rht_params); -+ kfree_rcu(entry, rcu); -+} -+ -+void mesh_hdr_cache_gc(struct ieee80211_sub_if_data *sdata) -+{ -+ unsigned long timeout = msecs_to_jiffies(MESH_HEADER_CACHE_TIMEOUT); -+ struct mesh_hdr_cache *cache; -+ struct mhdr_cache_entry *entry; ++ unsigned long timeout = msecs_to_jiffies(MESH_FAST_TX_CACHE_TIMEOUT); ++ struct mesh_tx_cache *cache; ++ struct ieee80211_mesh_fast_tx *entry; + struct hlist_node *n; + -+ cache = &sdata->u.mesh.hdr_cache; -+ if (atomic_read(&cache->rhead.nelems) < MESH_HEADER_CACHE_THRESHOLD_SIZE) ++ cache = &sdata->u.mesh.tx_cache; ++ if (atomic_read(&cache->rht.nelems) < MESH_FAST_TX_CACHE_THRESHOLD_SIZE) + return; + + spin_lock_bh(&cache->walk_lock); + hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list) + if (!time_is_after_jiffies(entry->timestamp + timeout)) -+ mesh_hdr_cache_entry_free(cache, entry); ++ mesh_fast_tx_entry_free(cache, entry); + spin_unlock_bh(&cache->walk_lock); +} + -+void mesh_hdr_cache_flush(struct ieee80211_sub_if_data *sdata, const u8 *addr, -+ bool is_mpp) ++void mesh_fast_tx_flush_mpath(struct mesh_path *mpath) +{ -+ struct mesh_hdr_cache *cache = &sdata->u.mesh.hdr_cache; -+ struct mhdr_cache_entry *entry; ++ struct ieee80211_sub_if_data *sdata = mpath->sdata; ++ struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache; ++ struct ieee80211_mesh_fast_tx *entry; + struct hlist_node *n; + -+ cache = &sdata->u.mesh.hdr_cache; ++ cache = &sdata->u.mesh.tx_cache; + spin_lock_bh(&cache->walk_lock); -+ -+ /* Only one header per mpp address is expected in the header cache */ -+ if (is_mpp) { -+ entry = rhashtable_lookup(&cache->rhead, addr, -+ mesh_hdr_rht_params); -+ if (entry) -+ mesh_hdr_cache_entry_free(cache, entry); -+ goto out; -+ } -+ + hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list) -+ if (ether_addr_equal(entry->mpath->dst, addr)) -+ mesh_hdr_cache_entry_free(cache, entry); ++ if (entry->mpath == mpath) ++ mesh_fast_tx_entry_free(cache, entry); ++ spin_unlock_bh(&cache->walk_lock); ++} + -+out: ++void mesh_fast_tx_flush_sta(struct ieee80211_sub_if_data *sdata, ++ struct sta_info *sta) ++{ ++ struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache; ++ struct ieee80211_mesh_fast_tx *entry; ++ struct hlist_node *n; ++ ++ cache = &sdata->u.mesh.tx_cache; ++ spin_lock_bh(&cache->walk_lock); ++ hlist_for_each_entry_safe(entry, n, &cache->walk_head, walk_list) ++ if (rcu_access_pointer(entry->mpath->next_hop) == sta) ++ mesh_fast_tx_entry_free(cache, entry); ++ spin_unlock_bh(&cache->walk_lock); ++} ++ ++void mesh_fast_tx_flush_addr(struct ieee80211_sub_if_data *sdata, ++ const u8 *addr) ++{ ++ struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache; ++ struct ieee80211_mesh_fast_tx *entry; ++ ++ cache = &sdata->u.mesh.tx_cache; ++ spin_lock_bh(&cache->walk_lock); ++ entry = rhashtable_lookup(&cache->rht, addr, fast_tx_rht_params); ++ if (entry) ++ mesh_fast_tx_entry_free(cache, entry); + spin_unlock_bh(&cache->walk_lock); +} + /** * mesh_path_add - allocate and add a new path to the mesh path table * @dst: destination address of the path (ETH_ALEN length) -@@ -521,6 +762,8 @@ static void mesh_path_free_rcu(struct me +@@ -464,6 +737,8 @@ int mpp_path_add(struct ieee80211_sub_if - static void __mesh_path_del(struct mesh_table *tbl, struct mesh_path *mpath) + if (ret) + kfree(new_mpath); ++ else ++ mesh_fast_tx_flush_addr(sdata, dst); + + sdata->u.mesh.mpp_paths_generation++; + return ret; +@@ -523,6 +798,10 @@ static void __mesh_path_del(struct mesh_ { -+ mesh_hdr_cache_flush(mpath->sdata, mpath->dst, -+ tbl == &mpath->sdata->u.mesh.mpp_paths); hlist_del_rcu(&mpath->walk_list); rhashtable_remove_fast(&tbl->rhead, &mpath->rhash, mesh_rht_params); ++ if (tbl == &mpath->sdata->u.mesh.mpp_paths) ++ mesh_fast_tx_flush_addr(mpath->sdata, mpath->dst); ++ else ++ mesh_fast_tx_flush_mpath(mpath); mesh_path_free_rcu(tbl, mpath); -@@ -747,6 +990,7 @@ void mesh_path_fix_nexthop(struct mesh_p + } + +@@ -747,6 +1026,7 @@ void mesh_path_fix_nexthop(struct mesh_p mpath->exp_time = 0; mpath->flags = MESH_PATH_FIXED | MESH_PATH_SN_VALID; mesh_path_activate(mpath); -+ mesh_hdr_cache_flush(mpath->sdata, mpath->dst, false); ++ mesh_fast_tx_flush_mpath(mpath); spin_unlock_bh(&mpath->state_lock); ewma_mesh_fail_avg_init(&next_hop->mesh->fail_avg); /* init it at a low value - 0 start is tricky */ -@@ -758,6 +1002,7 @@ void mesh_pathtbl_init(struct ieee80211_ +@@ -758,6 +1038,7 @@ void mesh_pathtbl_init(struct ieee80211_ { mesh_table_init(&sdata->u.mesh.mesh_paths); mesh_table_init(&sdata->u.mesh.mpp_paths); -+ mesh_hdr_cache_init(sdata); ++ mesh_fast_tx_init(sdata); } static -@@ -785,6 +1030,7 @@ void mesh_path_expire(struct ieee80211_s +@@ -785,6 +1066,7 @@ void mesh_path_expire(struct ieee80211_s void mesh_pathtbl_unregister(struct ieee80211_sub_if_data *sdata) { -+ mesh_hdr_cache_deinit(sdata); ++ mesh_fast_tx_deinit(sdata); mesh_table_free(&sdata->u.mesh.mesh_paths); mesh_table_free(&sdata->u.mesh.mpp_paths); } @@ -565,7 +721,7 @@ Signed-off-by: Felix Fietkau + + /* flush fast xmit cache if the address path changed */ + if (update) -+ mesh_hdr_cache_flush(sdata, proxied_addr, true); ++ mesh_fast_tx_flush_addr(sdata, proxied_addr); + rcu_read_unlock(); } @@ -577,168 +733,106 @@ Signed-off-by: Felix Fietkau return; + if (ieee80211_vif_is_mesh(&sdata->vif)) -+ mesh_hdr_cache_flush(sdata, sta->addr, false); ++ mesh_fast_tx_flush_sta(sdata, sta); + /* Locking here protects both the pointer itself, and against concurrent * invocations winning data access races to, e.g., the key pointer that * is used. -@@ -3723,6 +3726,155 @@ free: - kfree_skb(skb); +@@ -3402,6 +3405,9 @@ static bool ieee80211_amsdu_aggregate(st + if (sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) + return false; + ++ if (ieee80211_vif_is_mesh(&sdata->vif)) ++ return false; ++ + if (skb_is_gso(skb)) + return false; + +@@ -3634,10 +3640,11 @@ free: + return NULL; } -+void __ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, -+ struct mhdr_cache_entry *entry, -+ struct sk_buff *skb) -+{ -+ struct ieee80211_local *local = sdata->local; -+ struct ieee80211_tx_data tx = {}; -+ struct ieee80211_tx_info *info; -+ struct ieee80211_key *key; -+ struct ieee80211_hdr *hdr; -+ struct mesh_path *mpath; -+ ieee80211_tx_result r; -+ struct sta_info *sta; -+ u8 tid; +-static void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, +- struct sta_info *sta, +- struct ieee80211_fast_tx *fast_tx, +- struct sk_buff *skb, u8 tid, bool ampdu) ++void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, ++ struct sta_info *sta, ++ struct ieee80211_fast_tx *fast_tx, ++ struct sk_buff *skb, bool ampdu, ++ const u8 *da, const u8 *sa) + { + struct ieee80211_local *local = sdata->local; + struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; +@@ -3645,8 +3652,6 @@ static void __ieee80211_xmit_fast(struct + struct ieee80211_tx_data tx; + ieee80211_tx_result r; + int hw_headroom = sdata->local->hw.extra_tx_headroom; +- int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); +- struct ethhdr eth; + + skb = skb_share_check(skb, GFP_ATOMIC); + if (unlikely(!skb)) +@@ -3661,16 +3666,15 @@ static void __ieee80211_xmit_fast(struct + * more room than we already have in 'extra_head' + */ + if (unlikely(ieee80211_skb_resize(sdata, skb, +- max_t(int, extra_head + hw_headroom - ++ max_t(int, fast_tx->hdr_len + hw_headroom - + skb_headroom(skb), 0), + ENCRYPT_NO))) + goto free; + +- memcpy(ð, skb->data, ETH_HLEN - 2); +- hdr = skb_push(skb, extra_head); ++ hdr = skb_push(skb, fast_tx->hdr_len); + memcpy(skb->data, fast_tx->hdr, fast_tx->hdr_len); +- memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); +- memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); ++ memcpy(skb->data + fast_tx->da_offs, da, ETH_ALEN); ++ memcpy(skb->data + fast_tx->sa_offs, sa, ETH_ALEN); + + info = IEEE80211_SKB_CB(skb); + memset(info, 0, sizeof(*info)); +@@ -3689,7 +3693,8 @@ static void __ieee80211_xmit_fast(struct + #endif + + if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { +- tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; ++ u8 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; + -+ if (!IS_ENABLED(CPTCFG_MAC80211_MESH)) -+ return; + *ieee80211_get_qos_ctl(hdr) = tid; + } + +@@ -3732,6 +3737,7 @@ static bool ieee80211_xmit_fast(struct i + struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; + struct tid_ampdu_tx *tid_tx = NULL; + struct sk_buff *next; ++ struct ethhdr eth; + u8 tid = IEEE80211_NUM_TIDS; + + /* control port protocol needs a lot of special handling */ +@@ -3757,14 +3763,18 @@ static bool ieee80211_xmit_fast(struct i + } + } + ++ memcpy(ð, skb->data, ETH_HLEN - 2); + -+ info = IEEE80211_SKB_CB(skb); -+ memset(info, 0, sizeof(*info)); -+ info->band = entry->band; -+ info->control.vif = &sdata->vif; -+ info->flags = IEEE80211_TX_CTL_FIRST_FRAGMENT | -+ IEEE80211_TX_CTL_DONTFRAG; -+ -+ info->control.flags = IEEE80211_TX_CTRL_FAST_XMIT; -+ -+#ifdef CONFIG_MAC80211_DEBUGFS -+ if (local->force_tx_status) -+ info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; -+#endif -+ -+ mpath = entry->mpath; -+ key = entry->key; -+ sta = rcu_dereference(mpath->next_hop); -+ -+ __skb_queue_head_init(&tx.skbs); -+ -+ tx.flags = IEEE80211_TX_UNICAST; -+ tx.local = local; -+ tx.sdata = sdata; -+ tx.sta = sta; -+ tx.key = key; -+ tx.skb = skb; -+ -+ hdr = (struct ieee80211_hdr *)skb->data; -+ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; -+ *ieee80211_get_qos_ctl(hdr) = tid; -+ -+ ieee80211_aggr_check(sdata, sta, skb); -+ -+ if (ieee80211_queue_skb(local, sdata, sta, skb)) -+ return; -+ -+ r = ieee80211_xmit_fast_finish(sdata, sta, entry->pn_offs, key, &tx); -+ if (r == TX_DROP) { -+ kfree_skb(skb); -+ return; -+ } -+ -+ __skb_queue_tail(&tx.skbs, skb); -+ ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false); -+} -+ -+ -+static bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, -+ struct sk_buff *skb, u32 ctrl_flags) -+{ -+ struct ieee80211_local *local = sdata->local; -+ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; -+ struct mhdr_cache_entry *entry; -+ struct ieee80211s_hdr *meshhdr; -+ u8 sa[ETH_ALEN] __aligned(2); -+ struct sta_info *sta; -+ bool copy_sa = false; -+ u16 ethertype; -+ -+ if (ctrl_flags & IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP) -+ return false; -+ -+ if (ifmsh->mshcfg.dot11MeshNolearn) -+ return false; -+ -+ if (!ieee80211_hw_check(&local->hw, SUPPORT_FAST_XMIT)) -+ return false; -+ -+ /* Add support for these cases later */ -+ if (ifmsh->ps_peers_light_sleep || ifmsh->ps_peers_deep_sleep) -+ return false; -+ -+ if (is_multicast_ether_addr(skb->data)) -+ return false; -+ -+ ethertype = (skb->data[12] << 8) | skb->data[13]; -+ if (ethertype < ETH_P_802_3_MIN) -+ return false; -+ -+ if (skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) -+ return false; -+ -+ if (skb->ip_summed == CHECKSUM_PARTIAL) { -+ skb_set_transport_header(skb, skb_checksum_start_offset(skb)); -+ if (skb_checksum_help(skb)) -+ return false; -+ } -+ -+ entry = mesh_get_cached_hdr(sdata, skb->data); -+ if (!entry) -+ return false; -+ -+ /* Avoid extra work in this path */ -+ if (skb_headroom(skb) < (entry->hdrlen - ETH_HLEN + 2)) -+ return false; -+ -+ /* If the skb is shared we need to obtain our own copy */ -+ if (skb_shared(skb)) { -+ struct sk_buff *oskb = skb; -+ -+ skb = skb_clone(skb, GFP_ATOMIC); -+ if (!skb) -+ return false; -+ -+ kfree_skb(oskb); -+ } -+ -+ sta = rcu_dereference(entry->mpath->next_hop); -+ skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); -+ -+ meshhdr = (struct ieee80211s_hdr *)(entry->hdr + entry->machdr_len); -+ if ((meshhdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6) { -+ /* preserve SA from eth header for 6-addr frames */ -+ ether_addr_copy(sa, skb->data + ETH_ALEN); -+ copy_sa = true; -+ } -+ -+ memcpy(skb_push(skb, entry->hdrlen - 2 * ETH_ALEN), entry->hdr, -+ entry->hdrlen); -+ -+ meshhdr = (struct ieee80211s_hdr *)(skb->data + entry->machdr_len); -+ put_unaligned_le32(atomic_inc_return(&sdata->u.mesh.mesh_seqnum), -+ &meshhdr->seqnum); -+ meshhdr->ttl = sdata->u.mesh.mshcfg.dot11MeshTTL; -+ if (copy_sa) -+ ether_addr_copy(meshhdr->eaddr2, sa); -+ -+ __ieee80211_mesh_xmit_fast(sdata, entry, skb); -+ -+ return true; -+} -+ - static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, - struct sta_info *sta, - struct ieee80211_fast_tx *fast_tx, -@@ -4244,8 +4396,14 @@ void __ieee80211_subif_start_xmit(struct + /* after this point (skb is modified) we cannot return false */ ++ skb_pull(skb, ETH_HLEN - 2); + skb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata)); + if (!skb) + return true; + + skb_list_walk_safe(skb, skb, next) { + skb_mark_not_on_list(skb); +- __ieee80211_xmit_fast(sdata, sta, fast_tx, skb, tid, tid_tx); ++ __ieee80211_xmit_fast(sdata, sta, fast_tx, skb, tid_tx, ++ eth.h_dest, eth.h_source); + } + + return true; +@@ -4244,8 +4254,15 @@ void __ieee80211_subif_start_xmit(struct return; } @@ -747,13 +841,14 @@ Signed-off-by: Felix Fietkau rcu_read_lock(); + if (ieee80211_vif_is_mesh(&sdata->vif) && ++ ieee80211_hw_check(&local->hw, SUPPORT_FAST_XMIT) && + ieee80211_mesh_xmit_fast(sdata, skb, ctrl_flags)) + goto out; + if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) goto out_free; -@@ -4255,8 +4413,6 @@ void __ieee80211_subif_start_xmit(struct +@@ -4255,8 +4272,6 @@ void __ieee80211_subif_start_xmit(struct skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); ieee80211_aggr_check(sdata, sta, skb); diff --git a/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch b/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch index e0d4e60ed7..3b0bae67a5 100644 --- a/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch +++ b/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch @@ -3,40 +3,92 @@ Date: Thu, 16 Feb 2023 11:07:30 +0100 Subject: [PATCH] wifi: mac80211: use mesh header cache to speed up mesh forwarding -Use it to look up the next hop address + sta pointer + key and call -__ieee80211_mesh_xmit_fast to queue the tx frame. - Significantly reduces mesh forwarding path CPU usage and enables the -use of iTXQ. +direct use of iTXQ. Signed-off-by: Felix Fietkau --- --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2731,6 +2731,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ - struct ieee80211_hdr hdr = { - .frame_control = cpu_to_le16(fc) - }; -+ struct mhdr_cache_entry *entry = NULL; - struct ieee80211_hdr *fwd_hdr; - struct ieee80211s_hdr *mesh_hdr; - struct ieee80211_tx_info *info; -@@ -2788,7 +2789,12 @@ ieee80211_rx_mesh_data(struct ieee80211_ - return RX_DROP_MONITOR; +@@ -2720,6 +2720,65 @@ ieee80211_deliver_skb(struct ieee80211_r } + } -- if (mesh_hdr->flags & MESH_FLAGS_AE) { -+ if ((mesh_hdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6) -+ entry = mesh_get_cached_hdr(sdata, mesh_hdr->eaddr1); -+ else if (!(mesh_hdr->flags & MESH_FLAGS_AE)) -+ entry = mesh_get_cached_hdr(sdata, eth->h_dest); ++#ifdef CPTCFG_MAC80211_MESH ++static bool ++ieee80211_rx_mesh_fast_forward(struct ieee80211_sub_if_data *sdata, ++ struct sk_buff *skb, int hdrlen) ++{ ++ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; ++ struct ieee80211_mesh_fast_tx *entry = NULL; ++ struct ieee80211s_hdr *mesh_hdr; ++ struct tid_ampdu_tx *tid_tx; ++ struct sta_info *sta; ++ struct ethhdr eth; ++ u8 tid; + -+ if (!entry && (mesh_hdr->flags & MESH_FLAGS_AE)) { - struct mesh_path *mppath; - char *proxied_addr; - bool update = false; -@@ -2862,11 +2868,23 @@ ieee80211_rx_mesh_data(struct ieee80211_ ++ mesh_hdr = (struct ieee80211s_hdr *)(skb->data + sizeof(eth)); ++ if ((mesh_hdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6) ++ entry = mesh_fast_tx_get(sdata, mesh_hdr->eaddr1); ++ else if (!(mesh_hdr->flags & MESH_FLAGS_AE)) ++ entry = mesh_fast_tx_get(sdata, skb->data); ++ if (!entry) ++ return false; ++ ++ sta = rcu_dereference(entry->mpath->next_hop); ++ if (!sta) ++ return false; ++ ++ if (skb_linearize(skb)) ++ return false; ++ ++ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; ++ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); ++ if (tid_tx) { ++ if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) ++ return false; ++ ++ if (tid_tx->timeout) ++ tid_tx->last_tx = jiffies; ++ } ++ ++ ieee80211_aggr_check(sdata, sta, skb); ++ ++ if (ieee80211_get_8023_tunnel_proto(skb->data + hdrlen, ++ &skb->protocol)) ++ hdrlen += ETH_ALEN; ++ else ++ skb->protocol = htons(skb->len - hdrlen); ++ skb_set_network_header(skb, hdrlen + 2); ++ ++ skb->dev = sdata->dev; ++ memcpy(ð, skb->data, ETH_HLEN - 2); ++ skb_pull(skb, sizeof(eth)); ++ __ieee80211_xmit_fast(sdata, sta, &entry->fast_tx, skb, tid_tx, ++ eth.h_dest, eth.h_source); ++ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast); ++ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames); ++ ++ return true; ++} ++#endif ++ + static ieee80211_rx_result + ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta, + struct sk_buff *skb) +@@ -2824,6 +2883,10 @@ ieee80211_rx_mesh_data(struct ieee80211_ + + skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]); + ++ if (!multicast && ++ ieee80211_rx_mesh_fast_forward(sdata, skb, mesh_hdrlen)) ++ return RX_QUEUED; ++ + ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control, + eth->h_dest, eth->h_source); + hdrlen = ieee80211_hdrlen(hdr.frame_control); +@@ -2862,6 +2925,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; info->control.vif = &sdata->vif; info->control.jiffies = jiffies; @@ -44,23 +96,7 @@ Signed-off-by: Felix Fietkau if (multicast) { IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast); memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); - /* update power mode indication when forwarding */ - ieee80211_mps_set_frame_flags(sdata, NULL, fwd_hdr); -+ } else if (entry) { -+ struct ieee80211_hdr *ehdr = (struct ieee80211_hdr *)entry->hdr; -+ -+ ether_addr_copy(fwd_hdr->addr1, ehdr->addr1); -+ ether_addr_copy(fwd_hdr->addr2, sdata->vif.addr); -+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast); -+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames); -+ qos[0] = fwd_skb->priority; -+ qos[1] = ieee80211_get_qos_ctl(ehdr)[1]; -+ __ieee80211_mesh_xmit_fast(sdata, entry, fwd_skb); -+ return RX_QUEUED; - } else if (!mesh_nexthop_lookup(sdata, fwd_skb)) { - /* mesh power mode flags updated in mesh_nexthop_lookup */ - IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast); -@@ -2883,7 +2901,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2883,7 +2947,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ } IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames); @@ -68,3 +104,29 @@ Signed-off-by: Felix Fietkau ieee80211_add_pending_skb(local, fwd_skb); rx_accept: +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -2018,6 +2018,8 @@ void __ieee80211_xmit_fast(struct ieee80 + struct ieee80211_fast_tx *fast_tx, + struct sk_buff *skb, bool ampdu, + const u8 *da, const u8 *sa); ++void ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata, ++ struct sta_info *sta, struct sk_buff *skb); + + /* HT */ + void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -1191,10 +1191,8 @@ static bool ieee80211_tx_prep_agg(struct + return queued; + } + +-static void +-ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata, +- struct sta_info *sta, +- struct sk_buff *skb) ++void ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata, ++ struct sta_info *sta, struct sk_buff *skb) + { + struct rate_control_ref *ref = sdata->local->rate_ctrl; + u16 tid; diff --git a/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch b/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch index d9af8c7929..e2b268ae4c 100644 --- a/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch +++ b/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2847,6 +2847,9 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2904,6 +2904,9 @@ ieee80211_rx_mesh_data(struct ieee80211_ if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr))) return RX_DROP_UNUSABLE; @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau } fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr)); -@@ -2861,7 +2864,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2918,7 +2921,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ hdrlen += ETH_ALEN; else fwd_skb->protocol = htons(fwd_skb->len - hdrlen); diff --git a/package/kernel/mac80211/patches/subsys/322-wifi-mac80211-fix-mesh-path-discovery-based-on-unica.patch b/package/kernel/mac80211/patches/subsys/322-wifi-mac80211-fix-mesh-path-discovery-based-on-unica.patch new file mode 100644 index 0000000000..292a89ef92 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/322-wifi-mac80211-fix-mesh-path-discovery-based-on-unica.patch @@ -0,0 +1,52 @@ +From: Felix Fietkau +Date: Sun, 26 Feb 2023 20:30:20 +0100 +Subject: [PATCH] wifi: mac80211: fix mesh path discovery based on unicast + packets + +If a packet has reached its intended destination, it was bumped to the code +that accepts it, without first checking if a mesh_path needs to be created +based on the discovered source. +Fix this by moving the destination address check further down + +Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -2824,17 +2824,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ + mesh_rmc_check(sdata, eth->h_source, mesh_hdr)) + return RX_DROP_MONITOR; + +- /* Frame has reached destination. Don't forward */ +- if (ether_addr_equal(sdata->vif.addr, eth->h_dest)) +- goto rx_accept; +- +- if (!ifmsh->mshcfg.dot11MeshForwarding) { +- if (is_multicast_ether_addr(eth->h_dest)) +- goto rx_accept; +- +- return RX_DROP_MONITOR; +- } +- + /* forward packet */ + if (sdata->crypto_tx_tailroom_needed_cnt) + tailroom = IEEE80211_ENCRYPT_TAILROOM; +@@ -2881,6 +2870,17 @@ ieee80211_rx_mesh_data(struct ieee80211_ + rcu_read_unlock(); + } + ++ /* Frame has reached destination. Don't forward */ ++ if (ether_addr_equal(sdata->vif.addr, eth->h_dest)) ++ goto rx_accept; ++ ++ if (!ifmsh->mshcfg.dot11MeshForwarding) { ++ if (is_multicast_ether_addr(eth->h_dest)) ++ goto rx_accept; ++ ++ return RX_DROP_MONITOR; ++ } ++ + skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]); + + if (!multicast && diff --git a/package/kernel/mac80211/patches/subsys/323-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch b/package/kernel/mac80211/patches/subsys/323-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch new file mode 100644 index 0000000000..2310593635 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/323-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch @@ -0,0 +1,68 @@ +From: Muna Sinada +Date: Wed, 5 Oct 2022 14:54:45 -0700 +Subject: [PATCH] wifi: mac80211: Add VHT MU-MIMO related flags in + ieee80211_bss_conf + +Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and +MU Beamformee for VHT. This is utilized to pass MU-MIMO +configurations from user space to driver in AP mode. + +Signed-off-by: Muna Sinada +Link: https://lore.kernel.org/r/1665006886-23874-1-git-send-email-quic_msinada@quicinc.com +[fixed indentation, removed redundant !!] +Signed-off-by: Johannes Berg +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -653,6 +653,14 @@ struct ieee80211_fils_discovery { + * write-protected by sdata_lock and local->mtx so holding either is fine + * for read access. + * @color_change_color: the bss color that will be used after the change. ++ * @vht_su_beamformer: in AP mode, does this BSS support operation as an VHT SU ++ * beamformer ++ * @vht_su_beamformee: in AP mode, does this BSS support operation as an VHT SU ++ * beamformee ++ * @vht_mu_beamformer: in AP mode, does this BSS support operation as an VHT MU ++ * beamformer ++ * @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU ++ * beamformee + */ + struct ieee80211_bss_conf { + const u8 *bssid; +@@ -726,6 +734,11 @@ struct ieee80211_bss_conf { + + bool color_change_active; + u8 color_change_color; ++ ++ bool vht_su_beamformer; ++ bool vht_su_beamformee; ++ bool vht_mu_beamformer; ++ bool vht_mu_beamformee; + }; + + /** +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1251,6 +1251,21 @@ static int ieee80211_start_ap(struct wip + prev_beacon_int = link_conf->beacon_int; + link_conf->beacon_int = params->beacon_interval; + ++ if (params->vht_cap) { ++ link_conf->vht_su_beamformer = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE); ++ link_conf->vht_su_beamformee = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE); ++ link_conf->vht_mu_beamformer = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE); ++ link_conf->vht_mu_beamformee = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); ++ } ++ + if (params->he_cap && params->he_oper) { + link_conf->he_support = true; + link_conf->htc_trig_based_pkt_ext = diff --git a/package/kernel/mac80211/patches/subsys/324-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch b/package/kernel/mac80211/patches/subsys/324-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch new file mode 100644 index 0000000000..a3c44531bd --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/324-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch @@ -0,0 +1,68 @@ +From: Muna Sinada +Date: Wed, 5 Oct 2022 14:54:46 -0700 +Subject: [PATCH] wifi: mac80211: Add HE MU-MIMO related flags in + ieee80211_bss_conf + +Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and Full +Bandwidth UL MU-MIMO for HE. This is utilized to pass MU-MIMO +configurations from user space to driver in AP mode. + +Signed-off-by: Muna Sinada +Link: https://lore.kernel.org/r/1665006886-23874-2-git-send-email-quic_msinada@quicinc.com +[fixed indentation, removed redundant !!] +Signed-off-by: Johannes Berg +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -661,6 +661,15 @@ struct ieee80211_fils_discovery { + * beamformer + * @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU + * beamformee ++ * @he_su_beamformer: in AP-mode, does this BSS support operation as an HE SU ++ * beamformer ++ * @he_su_beamformee: in AP-mode, does this BSS support operation as an HE SU ++ * beamformee ++ * @he_mu_beamformer: in AP-mode, does this BSS support operation as an HE MU ++ * beamformer ++ * @he_full_ul_mumimo: does this BSS support the reception (AP) or transmission ++ * (non-AP STA) of an HE TB PPDU on an RU that spans the entire PPDU ++ * bandwidth + */ + struct ieee80211_bss_conf { + const u8 *bssid; +@@ -739,6 +748,10 @@ struct ieee80211_bss_conf { + bool vht_su_beamformee; + bool vht_mu_beamformer; + bool vht_mu_beamformee; ++ bool he_su_beamformer; ++ bool he_su_beamformee; ++ bool he_mu_beamformer; ++ bool he_full_ul_mumimo; + }; + + /** +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1280,6 +1280,21 @@ static int ieee80211_start_ap(struct wip + changed |= BSS_CHANGED_HE_BSS_COLOR; + } + ++ if (params->he_cap) { ++ link_conf->he_su_beamformer = ++ params->he_cap->phy_cap_info[3] & ++ IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER; ++ link_conf->he_su_beamformee = ++ params->he_cap->phy_cap_info[4] & ++ IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE; ++ link_conf->he_mu_beamformer = ++ params->he_cap->phy_cap_info[4] & ++ IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER; ++ link_conf->he_full_ul_mumimo = ++ params->he_cap->phy_cap_info[2] & ++ IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO; ++ } ++ + if (sdata->vif.type == NL80211_IFTYPE_AP && + params->mbssid_config.tx_wdev) { + err = ieee80211_set_ap_mbssid_options(sdata, diff --git a/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch new file mode 100644 index 0000000000..acd6c126aa --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch @@ -0,0 +1,60 @@ +From: Ryder Lee +Date: Sat, 18 Feb 2023 01:50:05 +0800 +Subject: [PATCH] wifi: mac80211: introduce + ieee80211_refresh_tx_agg_session_timer() + +This allows low level drivers to refresh the tx agg session timer, based on +querying stats from the firmware usually. Especially for some mt76 devices +support .net_fill_forward_path would bypass mac80211, which leads to tx BA +session timeout for certain clients. + +Signed-off-by: Ryder Lee +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -5970,6 +5970,18 @@ void ieee80211_queue_delayed_work(struct + unsigned long delay); + + /** ++ * ieee80211_refresh_tx_agg_session_timer - Refresh a tx agg session timer. ++ * @sta: the station for which to start a BA session ++ * @tid: the TID to BA on. ++ * ++ * This function allows low level driver to refresh tx agg session timer ++ * to maintain BA session, the session level will still be managed by the ++ * mac80211. ++ */ ++void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *sta, ++ u16 tid); ++ ++/** + * ieee80211_start_tx_ba_session - Start a tx Block Ack session. + * @sta: the station for which to start a BA session + * @tid: the TID to BA on. +--- a/net/mac80211/agg-tx.c ++++ b/net/mac80211/agg-tx.c +@@ -552,6 +552,23 @@ void ieee80211_tx_ba_session_handle_star + ieee80211_send_addba_with_timeout(sta, tid_tx); + } + ++void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *pubsta, ++ u16 tid) ++{ ++ struct sta_info *sta = container_of(pubsta, struct sta_info, sta); ++ struct tid_ampdu_tx *tid_tx; ++ ++ if (WARN_ON_ONCE(tid >= IEEE80211_NUM_TIDS)) ++ return; ++ ++ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); ++ if (!tid_tx) ++ return; ++ ++ tid_tx->last_tx = jiffies; ++} ++EXPORT_SYMBOL(ieee80211_refresh_tx_agg_session_timer); ++ + /* + * After accepting the AddBA Response we activated a timer, + * resetting it after each frame that we send. diff --git a/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch b/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch new file mode 100644 index 0000000000..b2b94d026b --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch @@ -0,0 +1,77 @@ +From: Felix Fietkau +Date: Thu, 2 Mar 2023 13:52:29 +0100 +Subject: [PATCH] wifi: mac80211: add mesh fast-rx support + +This helps bring down rx CPU usage by avoiding calls to the rx handlers in +the slow path. Supports forwarding and local rx, including A-MSDU. + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -4572,6 +4572,12 @@ void ieee80211_check_fast_rx(struct sta_ + } + + break; ++ case NL80211_IFTYPE_MESH_POINT: ++ fastrx.expected_ds_bits = cpu_to_le16(IEEE80211_FCTL_FROMDS | ++ IEEE80211_FCTL_TODS); ++ fastrx.da_offs = offsetof(struct ieee80211_hdr, addr3); ++ fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr4); ++ break; + default: + goto clear; + } +@@ -4780,6 +4786,7 @@ static bool ieee80211_invoke_fast_rx(str + struct sk_buff *skb = rx->skb; + struct ieee80211_hdr *hdr = (void *)skb->data; + struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); ++ static ieee80211_rx_result res; + int orig_len = skb->len; + int hdrlen = ieee80211_hdrlen(hdr->frame_control); + int snap_offs = hdrlen; +@@ -4841,7 +4848,8 @@ static bool ieee80211_invoke_fast_rx(str + snap_offs += IEEE80211_CCMP_HDR_LEN; + } + +- if (!(status->rx_flags & IEEE80211_RX_AMSDU)) { ++ if (!ieee80211_vif_is_mesh(&rx->sdata->vif) && ++ !(status->rx_flags & IEEE80211_RX_AMSDU)) { + if (!pskb_may_pull(skb, snap_offs + sizeof(*payload))) + return false; + +@@ -4880,13 +4888,29 @@ static bool ieee80211_invoke_fast_rx(str + /* do the header conversion - first grab the addresses */ + ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs); + ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs); +- skb_postpull_rcsum(skb, skb->data + snap_offs, +- sizeof(rfc1042_header) + 2); +- /* remove the SNAP but leave the ethertype */ +- skb_pull(skb, snap_offs + sizeof(rfc1042_header)); ++ if (ieee80211_vif_is_mesh(&rx->sdata->vif)) { ++ skb_pull(skb, snap_offs - 2); ++ put_unaligned_be16(skb->len - 2, skb->data); ++ } else { ++ skb_postpull_rcsum(skb, skb->data + snap_offs, ++ sizeof(rfc1042_header) + 2); ++ ++ /* remove the SNAP but leave the ethertype */ ++ skb_pull(skb, snap_offs + sizeof(rfc1042_header)); ++ } + /* push the addresses in front */ + memcpy(skb_push(skb, sizeof(addrs)), &addrs, sizeof(addrs)); + ++ res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb); ++ switch (res) { ++ case RX_QUEUED: ++ return true; ++ case RX_CONTINUE: ++ break; ++ default: ++ goto drop; ++ } ++ + ieee80211_rx_8023(rx, fast_rx, orig_len); + + return true; diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index 817be9e4d2..80ffb493b8 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -87,7 +87,7 @@ CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1536,6 +1536,7 @@ struct ieee80211_local { +@@ -1535,6 +1535,7 @@ struct ieee80211_local { int dynamic_ps_forced_timeout; int user_power_level; /* in dBm, for all interfaces */ diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 933f3b28a4..34930d7693 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-02-02 -PKG_SOURCE_VERSION:=b2360d59747c6fed2b65bc1c3563c10593c83f3e -PKG_MIRROR_HASH:=f85f00fa8f549de348a115f92c4f0235e413ed924669aece390c7570882526dd +PKG_SOURCE_DATE:=2023-03-01 +PKG_SOURCE_VERSION:=c32d6d849c43792abd8007e13e468b12d6d6e0b7 +PKG_MIRROR_HASH:=b7004bc920ba44cef2f7868d94beb2d288ff9d399af624ce5dad972f953723c8 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index b08fe541bd..912ed80ba2 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=dbb3d721eb606606c2fc0875067449e5c882d22affaa8dc70367daff7c198152 -PKG_SOURCE_DATE:=2023-02-15 -PKG_SOURCE_VERSION:=12155d3881b9bdd44b8682970638dbfd9f55e2cb +PKG_MIRROR_HASH:=4ec370a1cdc9fa69131f1403b064d2e05d54ee865411917410d7540454265319 +PKG_SOURCE_DATE:=2023-02-28 +PKG_SOURCE_VERSION:=bfe882d5ff4eeebb8f57c8a0f9b9e767a57870d8 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts index 915b4414dd..2ee7ab56c5 100644 --- a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts +++ b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts @@ -160,7 +160,6 @@ phy0: port8@8 { reg = <8>; - label = "cpu"; ethernet = <ð0>; fixed-link { diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts index 58586eb036..106ca56e7e 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts @@ -99,7 +99,6 @@ port@5 { reg = <5>; - label = "cpu"; ethernet = <ð0>; }; }; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-16m-nor.dtsi b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-16m-nor.dtsi index 7cc4bb689c..b915dd5a72 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-16m-nor.dtsi +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-16m-nor.dtsi @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "ar9344.dtsi" - &spi { status = "okay"; @@ -55,9 +53,3 @@ }; }; }; - -&wmac { - status = "okay"; - - qca,no-eeprom; -}; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts new file mode 100644 index 0000000000..d77078c5a2 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344_mikrotik_routerboard.dtsi" +#include "ar9344_mikrotik_routerboard-16m-nor.dtsi" + +/ { + model = "MikroTik RouterBOARD 911-2Hn/5Hn (Lite2/Lite5)"; + compatible = "mikrotik,routerboard-911-lite", "qca,ar9344"; +}; + +&leds { + pinctrl-names = "default"; + pinctrl-0 = <&enable_gpio_20>; + + lan { + label = "green:lan"; + gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + }; + + power { + label = "green:power"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led_user: user { + label = "green:user"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; +}; + +&pinmux { + enable_gpio_20: pinmux_gpio_out_function5 { + pinctrl-single,bits = <0x14 0x0 0xff>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts index 194a789fb2..b6de8c4b7b 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts @@ -1,91 +1,27 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include "ar9344_mikrotik_routerboard.dtsi" #include "ar9344_mikrotik_routerboard-16m-nor.dtsi" -#include -#include - / { compatible = "mikrotik,routerboard-lhg-5nd", "qca,ar9344"; model = "MikroTik RouterBOARD LHG 5nD"; - - aliases { - led-boot = &led_user; - led-failsafe = &led_user; - led-running = &led_user; - led-upgrade = &led_user; - }; - - leds { - compatible = "gpio-leds"; - - power { - label = "blue:power"; - gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; - default-state = "on"; - }; - - rssilow { - label = "green:rssilow"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - rssimediumlow { - label = "green:rssimediumlow"; - gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - }; - - rssimedium { - label = "green:rssimedium"; - gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - }; - - rssimediumhigh { - label = "green:rssimediumhigh"; - gpios = <&gpio 21 GPIO_ACTIVE_LOW>; - }; - - rssihigh { - label = "green:rssihigh"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - }; - - led_user: user { - label = "white:user"; - gpios = <&gpio 20 GPIO_ACTIVE_LOW>; - }; - - lan { - label = "green:lan"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; }; -ð0 { - status = "okay"; +&leds { + power { + label = "blue:power"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; - phy-handle = <&swphy0>; + led_user: user { + label = "white:user"; + gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + }; - gmac-config { - device = <&gmac>; - switch-phy-swap = <1>; + lan { + label = "green:lan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; - -ð1 { - status = "okay"; - - compatible = "syscon", "simple-mfd"; -}; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi deleted file mode 100644 index 6cf84c98b3..0000000000 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi +++ /dev/null @@ -1,185 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "ar9344.dtsi" - -#include -#include - -/ { - compatible = "mikrotik,routerboard-sxt-5n", "qca,ar9344"; - model = "MikroTik SXT 5N platform"; - - aliases { - led-boot = &led_user; - led-failsafe = &led_user; - led-running = &led_user; - led-upgrade = &led_user; - }; - - leds { - compatible = "gpio-leds"; - - power { - label = "green:power"; - gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; - default-state = "on"; - }; - - rssilow { - label = "green:rssilow"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - rssimediumlow { - label = "green:rssimediumlow"; - gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - }; - - rssimedium { - label = "green:rssimedium"; - gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - }; - - rssimediumhigh { - label = "green:rssimediumhigh"; - gpios = <&gpio 21 GPIO_ACTIVE_LOW>; - }; - - rssihigh { - label = "green:rssihigh"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - }; - - led_user: user { - label = "green:user"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - - gpio_nand_power { - gpio-export,name = "sxt5n:power:nand"; - gpio-export,output = <0>; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - }; - }; - - beeper { - compatible = "gpio-beeper"; - gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; - }; -}; - -&spi { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <40000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "RouterBoot"; - reg = <0x0 0x20000>; - compatible = "mikrotik,routerboot-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "bootloader1"; - reg = <0x0 0x0>; - read-only; - }; - - hard_config { - read-only; - }; - - bios { - size = <0x1000>; - read-only; - }; - - soft_config { - }; - - partition@10000 { - label = "bootloader2"; - reg = <0x10000 0x10000>; - read-only; - }; - }; - }; - }; -}; - -&nand { - status = "okay"; - - nand-ecc-mode = "soft"; - qca,nand-swap-dma; - qca,nand-scan-fixup; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "booter"; - reg = <0x0000000 0x0040000>; - read-only; - }; - - partition@40000 { - label = "kernel"; - reg = <0x0040000 0x03c0000>; - }; - - partition@400000 { - label = "ubi"; - reg = <0x0400000 0x7c00000>; - }; - }; -}; - -ð0 { - status = "okay"; - - phy-handle = <&swphy0>; - - gmac-config { - device = <&gmac>; - switch-phy-swap = <1>; - }; -}; - -ð1 { - status = "okay"; - - compatible = "syscon", "simple-mfd"; -}; - -&wmac { - status = "okay"; - - qca,no-eeprom; -}; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts index 3d0b941c24..c8b1183d70 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts @@ -1,8 +1,114 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "ar9344_mikrotik_routerboard-sxt-5n.dtsi" +#include "ar9344_mikrotik_routerboard.dtsi" / { compatible = "mikrotik,routerboard-sxt-5nd-r2", "qca,ar9344"; model = "MikroTik RouterBOARD SXT 5nD r2 (SXT Lite5)"; + + gpio-export { + compatible = "gpio-export"; + + gpio_nand_power { + gpio-export,name = "sxt5n:power:nand"; + gpio-export,output = <0>; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; + }; +}; + +&leds { + power { + label = "green:power"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led_user: user { + label = "green:user"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "RouterBoot"; + reg = <0x0 0x20000>; + compatible = "mikrotik,routerboot-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader1"; + reg = <0x0 0x0>; + read-only; + }; + + hard_config { + read-only; + }; + + bios { + size = <0x1000>; + read-only; + }; + + soft_config { + }; + + partition@10000 { + label = "bootloader2"; + reg = <0x10000 0x10000>; + read-only; + }; + }; + }; + }; +}; + +&nand { + status = "okay"; + + nand-ecc-mode = "soft"; + qca,nand-swap-dma; + qca,nand-scan-fixup; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "booter"; + reg = <0x0000000 0x0040000>; + read-only; + }; + + partition@40000 { + label = "kernel"; + reg = <0x0040000 0x03c0000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x0400000 0x7c00000>; + }; + }; }; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard.dtsi b/target/linux/ath79/dts/ar9344_mikrotik_routerboard.dtsi new file mode 100644 index 0000000000..10233e3d4e --- /dev/null +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard.dtsi @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_user; + led-failsafe = &led_user; + led-running = &led_user; + led-upgrade = &led_user; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds: leds { + compatible = "gpio-leds"; + + rssilow { + label = "green:rssilow"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + rssimediumlow { + label = "green:rssimediumlow"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + rssimedium { + label = "green:rssimedium"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + rssimediumhigh { + label = "green:rssimediumhigh"; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + }; + + rssihigh { + label = "green:rssihigh"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy0>; + + gmac-config { + device = <&gmac>; + switch-phy-swap = <1>; + }; +}; + +ð1 { + status = "okay"; + + compatible = "syscon", "simple-mfd"; +}; + +&wmac { + status = "okay"; + + qca,no-eeprom; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index a8bdd7a6f0..c967f7ad9f 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2697,7 +2697,7 @@ define Device/teltonika_rut300 DEVICE_VENDOR := Teltonika DEVICE_MODEL := RUT300 SUPPORTED_TELTONIKA_DEVICES := teltonika,rut30x - DEVICE_PACKAGES := -kmod-ath9k -uboot-envtools -wpad-basic-wolfssl kmod-usb2 + DEVICE_PACKAGES := -kmod-ath9k -uboot-envtools -wpad-basic-openssl kmod-usb2 IMAGE_SIZE := 15552k IMAGES += factory.bin IMAGE/factory.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ diff --git a/target/linux/ath79/image/mikrotik.mk b/target/linux/ath79/image/mikrotik.mk index c90579fbb5..fb0035fb65 100644 --- a/target/linux/ath79/image/mikrotik.mk +++ b/target/linux/ath79/image/mikrotik.mk @@ -9,6 +9,16 @@ define Device/mikrotik_routerboard-493g endef TARGET_DEVICES += mikrotik_routerboard-493g +define Device/mikrotik_routerboard-911-lite + $(Device/mikrotik_nor) + SOC := ar9344 + DEVICE_MODEL := RouterBOARD 911 Lite2/Lite5 (2Hn/5Hn) + DEVICE_PACKAGES += rssileds + IMAGE_SIZE := 16256k + SUPPORTED_DEVICES += rb-911-2hn rb-911-5hn +endef +TARGET_DEVICES += mikrotik_routerboard-911-lite + define Device/mikrotik_routerboard-912uag-2hpnd $(Device/mikrotik_nand) SOC := ar9342 diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds b/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds index 76b91a54a5..4c1b98fff2 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds @@ -6,6 +6,16 @@ board_config_update board=$(board_name) case "$board" in +mikrotik,routerboard-911-lite|\ +mikrotik,routerboard-lhg-5nd) + ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100" + ucidef_set_led_rssi "rssimediumlow" "rssimediumlow" "green:rssimediumlow" "wlan0" "20" "100" + ucidef_set_led_rssi "rssimedium" "rssimedium" "green:rssimedium" "wlan0" "40" "100" + ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "60" "100" + ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "80" "100" + ;; mikrotik,routerboard-951ui-2nd|\ mikrotik,routerboard-952ui-5ac2nd) ucidef_set_led_netdev "port1" "port1" "green:port1" "eth1" @@ -19,15 +29,6 @@ mikrotik,routerboard-mapl-2nd|\ mikrotik,routerboard-wap-2nd) ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" ;; -mikrotik,routerboard-lhg-5nd) - ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" - ucidef_set_rssimon "wlan0" "200000" "1" - ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100" - ucidef_set_led_rssi "rssimediumlow" "rssimediumlow" "green:rssimediumlow" "wlan0" "20" "100" - ucidef_set_led_rssi "rssimedium" "rssimedium" "green:rssimedium" "wlan0" "40" "100" - ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "60" "100" - ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "80" "100" - ;; mikrotik,routerboard-map-2nd) ucidef_set_led_netdev "eth_1" "eth_1" "green:eth_1" "eth1" ucidef_set_led_switch "eth_2" "eth_2" "green:eth_2" "switch0" "0x4" diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network index 5646d8cf68..da63347c3c 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network +++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network @@ -14,6 +14,7 @@ ath79_setup_interfaces() ucidef_add_switch "switch1" \ "0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3" ;; + mikrotik,routerboard-911-lite|\ mikrotik,routerboard-912uag-2hpnd|\ mikrotik,routerboard-lhg-2nd|\ mikrotik,routerboard-lhg-5nd|\ @@ -52,6 +53,7 @@ ath79_setup_macs() local mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)" case "$board" in + mikrotik,routerboard-911-lite|\ mikrotik,routerboard-912uag-2hpnd|\ mikrotik,routerboard-lhg-2nd|\ mikrotik,routerboard-lhg-5nd|\ diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index aa5354bfdb..e0bf1e47ef 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -23,6 +23,7 @@ board=$(board_name) case "$FIRMWARE" in "ath9k-eeprom-ahb-18100000.wmac.bin") case $board in + mikrotik,routerboard-911-lite|\ mikrotik,routerboard-912uag-2hpnd|\ mikrotik,routerboard-lhg-2nd|\ mikrotik,routerboard-lhg-5nd|\ diff --git a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch index 4fd06552e0..5b10dd6288 100644 --- a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch @@ -258,7 +258,7 @@ SVN-Revision: 35130 #include #include #include -@@ -943,10 +944,10 @@ static void tcp_v6_send_response(const s +@@ -944,10 +945,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch index f030bb33ed..3913ddda2d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch @@ -12,7 +12,7 @@ Signed-off-by: Dave Stevenson --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3554,6 +3554,13 @@ N: bcm113* +@@ -3555,6 +3555,13 @@ N: bcm113* N: bcm216* N: kona diff --git a/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch b/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch index 9833d5312d..375d488a92 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch @@ -90,7 +90,7 @@ Signed-off-by: Dave Stevenson +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3554,6 +3554,13 @@ N: bcm113* +@@ -3555,6 +3555,13 @@ N: bcm113* N: bcm216* N: kona diff --git a/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch b/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch index d1f115d9be..b7bb1474ec 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch @@ -28,7 +28,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3562,7 +3562,7 @@ F: Documentation/devicetree/bindings/med +@@ -3563,7 +3563,7 @@ F: Documentation/devicetree/bindings/med F: drivers/staging/media/rpivid BROADCOM BCM2835 CAMERA DRIVER diff --git a/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch b/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch index aece1d6229..9f4a0f33ec 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch @@ -31,7 +31,7 @@ Reported-by: kbuild test robot --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3566,7 +3566,7 @@ M: Raspberry Pi Kernel Maintenance --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17529,6 +17529,14 @@ T: git git://linuxtv.org/media_tree.git +@@ -17530,6 +17530,14 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml F: drivers/media/i2c/imx412.c diff --git a/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch b/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch index 3f9149ed15..d1dc2613b9 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch @@ -35,7 +35,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3568,6 +3568,15 @@ S: Maintained +@@ -3569,6 +3569,15 @@ S: Maintained F: drivers/media/platform/bcm2835/ F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml diff --git a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch index f21349769c..d60c0f372c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch @@ -132,7 +132,7 @@ Signed-off-by: David Plowman +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17543,6 +17543,7 @@ M: Raspberry Pi Kernel Maintenance +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17547,6 +17547,14 @@ F: Documentation/devicetree/bindings/med +@@ -17548,6 +17548,14 @@ F: Documentation/devicetree/bindings/med F: Documentation/devicetree/bindings/media/i2c/imx477.yaml F: drivers/media/i2c/imx477.c diff --git a/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch b/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch index a0f4963c41..de80fe4628 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch @@ -26,7 +26,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c -@@ -5742,13 +5742,13 @@ static const u32 hdmi_colorimetry_val[] +@@ -5743,13 +5743,13 @@ static const u32 hdmi_colorimetry_val[] #undef ACE /** @@ -43,7 +43,7 @@ Signed-off-by: Maxime Ripard const struct drm_connector_state *conn_state) { u32 colorimetry_val; -@@ -5767,7 +5767,7 @@ drm_hdmi_avi_infoframe_colorspace(struct +@@ -5768,7 +5768,7 @@ drm_hdmi_avi_infoframe_colorspace(struct frame->extended_colorimetry = (colorimetry_val >> 2) & EXTENDED_COLORIMETRY_MASK; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch index 442e10add2..8f5d167b4c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch @@ -63,7 +63,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-6-noral --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -5980,6 +5980,14 @@ T: git git://anongit.freedesktop.org/drm +@@ -5981,6 +5981,14 @@ T: git git://anongit.freedesktop.org/drm F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt F: drivers/gpu/drm/tiny/mi0283qt.c diff --git a/target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch b/target/linux/bcm47xx/patches-5.10/030-v5.17-0001-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch similarity index 84% rename from target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch rename to target/linux/bcm47xx/patches-5.10/030-v5.17-0001-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch index 0c23e8aaf5..921825be5c 100644 --- a/target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch +++ b/target/linux/bcm47xx/patches-5.10/030-v5.17-0001-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch @@ -15,7 +15,7 @@ Signed-off-by: Thomas Bogendoerfer --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -289,6 +289,12 @@ bcm47xx_buttons_linksys_wrt320n_v1[] __i +@@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in }; static const struct gpio_keys_button @@ -28,9 +28,9 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { BCM47XX_GPIO_KEY(5, KEY_WIMAX), BCM47XX_GPIO_KEY(6, KEY_RESTART), -@@ -644,6 +650,9 @@ int __init bcm47xx_buttons_register(void - case BCM47XX_BOARD_LINKSYS_WRT320N_V1: - err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1); +@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_WRT310NV1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1); break; + case BCM47XX_BOARD_LINKSYS_WRT310NV2: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2); diff --git a/target/linux/bcm47xx/patches-5.15/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch b/target/linux/bcm47xx/patches-5.10/030-v5.17-0002-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch similarity index 93% rename from target/linux/bcm47xx/patches-5.15/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch rename to target/linux/bcm47xx/patches-5.10/030-v5.17-0002-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch index f34336edd5..3fb013a585 100644 --- a/target/linux/bcm47xx/patches-5.15/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch +++ b/target/linux/bcm47xx/patches-5.10/030-v5.17-0002-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch @@ -28,7 +28,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in +@@ -283,6 +283,12 @@ bcm47xx_buttons_linksys_wrt310n_v2[] __i }; static const struct gpio_keys_button @@ -41,9 +41,9 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { BCM47XX_GPIO_KEY(5, KEY_WIMAX), BCM47XX_GPIO_KEY(6, KEY_RESTART), -@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void - case BCM47XX_BOARD_LINKSYS_WRT310NV1: - err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1); +@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_WRT310NV2: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2); break; + case BCM47XX_BOARD_LINKSYS_WRT320N_V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1); diff --git a/target/linux/bcm47xx/patches-5.10/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch b/target/linux/bcm47xx/patches-5.10/030-v5.17-0003-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch similarity index 94% rename from target/linux/bcm47xx/patches-5.10/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch rename to target/linux/bcm47xx/patches-5.10/030-v5.17-0003-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch index 23d50ad902..c09140e99d 100644 --- a/target/linux/bcm47xx/patches-5.10/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch +++ b/target/linux/bcm47xx/patches-5.10/030-v5.17-0003-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch @@ -28,7 +28,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_asus_rtn12[] __initconst = { BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON), BCM47XX_GPIO_KEY(1, KEY_RESTART), -@@ -502,6 +508,9 @@ int __init bcm47xx_buttons_register(void +@@ -490,6 +496,9 @@ int __init bcm47xx_buttons_register(void int err; switch (board) { @@ -55,7 +55,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_leds_asus_rtn12[] __initconst = { BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), -@@ -571,6 +579,9 @@ void __init bcm47xx_leds_register(void) +@@ -563,6 +571,9 @@ void __init bcm47xx_leds_register(void) enum bcm47xx_board board = bcm47xx_board_get(); switch (board) { diff --git a/target/linux/bcm47xx/patches-5.15/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch b/target/linux/bcm47xx/patches-5.10/030-v5.17-0004-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch similarity index 95% rename from target/linux/bcm47xx/patches-5.15/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch rename to target/linux/bcm47xx/patches-5.10/030-v5.17-0004-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch index 6631e79048..8740942d6f 100644 --- a/target/linux/bcm47xx/patches-5.15/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch +++ b/target/linux/bcm47xx/patches-5.10/030-v5.17-0004-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch @@ -26,7 +26,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -398,6 +398,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini +@@ -410,6 +410,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini }; static const struct gpio_keys_button @@ -38,7 +38,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_RESTART), BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON), -@@ -683,6 +688,9 @@ int __init bcm47xx_buttons_register(void +@@ -701,6 +706,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_NETGEAR_R6200_V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1); break; diff --git a/target/linux/bcm47xx/patches-5.10/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch b/target/linux/bcm47xx/patches-5.10/030-v5.17-0005-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch similarity index 95% rename from target/linux/bcm47xx/patches-5.10/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch rename to target/linux/bcm47xx/patches-5.10/030-v5.17-0005-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch index 8f66aee192..6975bce952 100644 --- a/target/linux/bcm47xx/patches-5.10/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch +++ b/target/linux/bcm47xx/patches-5.10/030-v5.17-0005-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch @@ -27,7 +27,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -403,6 +403,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini +@@ -415,6 +415,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini }; static const struct gpio_keys_button @@ -40,7 +40,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_RESTART), BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON), -@@ -691,6 +697,9 @@ int __init bcm47xx_buttons_register(void +@@ -709,6 +715,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_NETGEAR_R6300_V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1); break; diff --git a/target/linux/bcm47xx/patches-5.15/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch b/target/linux/bcm47xx/patches-5.10/031-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch similarity index 94% rename from target/linux/bcm47xx/patches-5.15/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch rename to target/linux/bcm47xx/patches-5.10/031-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch index 272a74933b..8c2233c804 100644 --- a/target/linux/bcm47xx/patches-5.15/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch +++ b/target/linux/bcm47xx/patches-5.10/031-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch @@ -36,7 +36,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -448,6 +448,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i +@@ -460,6 +460,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i }; static const struct gpio_keys_button @@ -50,7 +50,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_netgear_wnr834bv2[] __initconst = { BCM47XX_GPIO_KEY(6, KEY_RESTART), }; -@@ -718,6 +725,9 @@ int __init bcm47xx_buttons_register(void +@@ -736,6 +743,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_NETGEAR_WNR3500L: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1); break; @@ -62,7 +62,7 @@ Signed-off-by: Thomas Bogendoerfer break; --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c -@@ -520,6 +520,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init +@@ -528,6 +528,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init }; static const struct gpio_led @@ -77,7 +77,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_leds_netgear_wnr834bv2[] __initconst = { BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), -@@ -780,6 +788,9 @@ void __init bcm47xx_leds_register(void) +@@ -791,6 +799,9 @@ void __init bcm47xx_leds_register(void) case BCM47XX_BOARD_NETGEAR_WNR3500L: bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1); break; diff --git a/target/linux/bcm47xx/patches-5.10/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch b/target/linux/bcm47xx/patches-5.10/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch new file mode 100644 index 0000000000..4faecdc7d5 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.10/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch @@ -0,0 +1,65 @@ +From fc605b914167de75432c3b5aae239fb191e84a31 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 8 Feb 2023 08:03:01 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Linksys E2500 V3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home WiFi router. 16 MiB flash, 64 MiB RAM, BCM5325 +switch, on-SoC 802.11n radio. + +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: Thomas Bogendoerfer +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/buttons.c | 9 +++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 11 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -130,6 +130,7 @@ struct bcm47xx_board_type_list2 bcm47xx_ + {{BCM47XX_BOARD_LINKSYS_E1000V21, "Linksys E1000 V2.1"}, "E1000", "2.1"}, + {{BCM47XX_BOARD_LINKSYS_E1200V2, "Linksys E1200 V2"}, "E1200", "2.0"}, + {{BCM47XX_BOARD_LINKSYS_E2000V1, "Linksys E2000 V1"}, "Linksys E2000", "1.0"}, ++ {{BCM47XX_BOARD_LINKSYS_E2500V3, "Linksys E2500 V3"}, "E2500", "1.0"}, + /* like WRT610N v2.0 */ + {{BCM47XX_BOARD_LINKSYS_E3000V1, "Linksys E3000 V1"}, "E300", "1.0"}, + {{BCM47XX_BOARD_LINKSYS_E3200V1, "Linksys E3200 V1"}, "E3200", "1.0"}, +--- a/arch/mips/bcm47xx/buttons.c ++++ b/arch/mips/bcm47xx/buttons.c +@@ -223,6 +223,12 @@ bcm47xx_buttons_linksys_e2000v1[] __init + }; + + static const struct gpio_keys_button ++bcm47xx_buttons_linksys_e2500v3[] __initconst = { ++ BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON), ++ BCM47XX_GPIO_KEY(10, KEY_RESTART), ++}; ++ ++static const struct gpio_keys_button + bcm47xx_buttons_linksys_e3000v1[] __initconst = { + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), + BCM47XX_GPIO_KEY(6, KEY_RESTART), +@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_E2000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1); + break; ++ case BCM47XX_BOARD_LINKSYS_E2500V3: ++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2500v3); ++ break; + case BCM47XX_BOARD_LINKSYS_E3000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -61,6 +61,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_LINKSYS_E1000V21, + BCM47XX_BOARD_LINKSYS_E1200V2, + BCM47XX_BOARD_LINKSYS_E2000V1, ++ BCM47XX_BOARD_LINKSYS_E2500V3, + BCM47XX_BOARD_LINKSYS_E3000V1, + BCM47XX_BOARD_LINKSYS_E3200V1, + BCM47XX_BOARD_LINKSYS_E4200V1, diff --git a/target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch b/target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch new file mode 100644 index 0000000000..f93fc0cd8d --- /dev/null +++ b/target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch @@ -0,0 +1,46 @@ +From d61615c366a489646a1bfe5b33455f916762d5f4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 8 Feb 2023 10:16:37 +0100 +Subject: [PATCH] net: bgmac: fix BCM5358 support by setting correct flags +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Code blocks handling BCMA_CHIP_ID_BCM5357 and BCMA_CHIP_ID_BCM53572 were +incorrectly unified. Chip package values are not unique and cannot be +checked independently. They are meaningful only in a context of a given +chip. + +Packages BCM5358 and BCM47188 share the same value but then belong to +different chips. Code unification resulted in treating BCM5358 as +BCM47188 and broke its initialization. + +Link: https://github.com/openwrt/openwrt/issues/8278 +Fixes: cb1b0f90acfe ("net: ethernet: bgmac: unify code of the same family") +Cc: Jon Mason +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Link: https://lore.kernel.org/r/20230208091637.16291-1-zajec5@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/broadcom/bgmac-bcma.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bgmac-bcma.c ++++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c +@@ -240,12 +240,12 @@ static int bgmac_probe(struct bcma_devic + bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST; + bgmac->feature_flags |= BGMAC_FEAT_FLW_CTRL1; + bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_PHY; +- if (ci->pkg == BCMA_PKG_ID_BCM47188 || +- ci->pkg == BCMA_PKG_ID_BCM47186) { ++ if ((ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM47186) || ++ (ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg == BCMA_PKG_ID_BCM47188)) { + bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_RGMII; + bgmac->feature_flags |= BGMAC_FEAT_IOST_ATTACHED; + } +- if (ci->pkg == BCMA_PKG_ID_BCM5358) ++ if (ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM5358) + bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_EPHYRMII; + break; + case BCMA_CHIP_ID_BCM53573: diff --git a/target/linux/bcm47xx/patches-5.10/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch b/target/linux/bcm47xx/patches-5.10/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch new file mode 100644 index 0000000000..333c3d7b87 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.10/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch @@ -0,0 +1,61 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 27 Feb 2023 07:44:38 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Huawei B593u-12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home router. One of very few bcm47xx devices with +cellular modems (here: LTE). + +Signed-off-by: Rafał Miłecki +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/leds.c | 8 ++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 10 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -193,6 +193,7 @@ struct bcm47xx_board_type_list1 bcm47xx_ + /* boardtype, boardnum, boardrev */ + static const + struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = { ++ {{BCM47XX_BOARD_HUAWEI_B593U_12, "Huawei B593u-12"}, "0x053d", "1234", "0x1301"}, + {{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"}, + {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"}, + {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"}, +--- a/arch/mips/bcm47xx/leds.c ++++ b/arch/mips/bcm47xx/leds.c +@@ -223,6 +223,11 @@ bcm47xx_leds_dlink_dir330[] __initconst + /* Huawei */ + + static const struct gpio_led ++bcm47xx_leds_huawei_b593u_12[] __initconst = { ++ BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led + bcm47xx_leds_huawei_e970[] __initconst = { + BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), + }; +@@ -672,6 +677,9 @@ void __init bcm47xx_leds_register(void) + bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330); + break; + ++ case BCM47XX_BOARD_HUAWEI_B593U_12: ++ bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12); ++ break; + case BCM47XX_BOARD_HUAWEI_E970: + bcm47xx_set_pdata(bcm47xx_leds_huawei_e970); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -53,6 +53,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_DLINK_DIR130, + BCM47XX_BOARD_DLINK_DIR330, + ++ BCM47XX_BOARD_HUAWEI_B593U_12, + BCM47XX_BOARD_HUAWEI_E970, + + BCM47XX_BOARD_LINKSYS_E900V1, diff --git a/target/linux/bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch b/target/linux/bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch new file mode 100644 index 0000000000..91611d8004 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch @@ -0,0 +1,76 @@ +From 327dabbd0111910a7d174b0b812d608d6b67bead Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 8 Aug 2022 23:05:25 +0200 +Subject: [PATCH] bgmac: fix *initial* chip reset to support BCM5358 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +While bringing hardware up we should perform a full reset including the +switch bit (BGMAC_BCMA_IOCTL_SW_RESET aka SICF_SWRST). It's what +specification says and what reference driver does. + +This seems to be critical for the BCM5358. Without this hardware doesn't +get initialized properly and doesn't seem to transmit or receive any +packets. + +Originally bgmac was calling bgmac_chip_reset() before setting +"has_robosw" property which resulted in expected behaviour. That has +changed as a side effect of adding platform device support which +regressed BCM5358 support. + +Fixes: f6a95a24957a ("net: ethernet: bgmac: Add platform device support") +Cc: Jon Mason +Signed-off-by: Rafał Miłecki +--- + drivers/net/ethernet/broadcom/bgmac.c | 8 ++++++-- + drivers/net/ethernet/broadcom/bgmac.h | 2 ++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bgmac.c ++++ b/drivers/net/ethernet/broadcom/bgmac.c +@@ -891,13 +891,13 @@ static void bgmac_chip_reset_idm_config( + + if (iost & BGMAC_BCMA_IOST_ATTACHED) { + flags = BGMAC_BCMA_IOCTL_SW_CLKEN; +- if (!bgmac->has_robosw) ++ if (bgmac->in_init || !bgmac->has_robosw) + flags |= BGMAC_BCMA_IOCTL_SW_RESET; + } + bgmac_clk_enable(bgmac, flags); + } + +- if (iost & BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw) ++ if (iost & BGMAC_BCMA_IOST_ATTACHED && (bgmac->in_init || !bgmac->has_robosw)) + bgmac_idm_write(bgmac, BCMA_IOCTL, + bgmac_idm_read(bgmac, BCMA_IOCTL) & + ~BGMAC_BCMA_IOCTL_SW_RESET); +@@ -1502,6 +1502,8 @@ int bgmac_enet_probe(struct bgmac *bgmac + struct net_device *net_dev = bgmac->net_dev; + int err; + ++ bgmac->in_init = true; ++ + bgmac_chip_intrs_off(bgmac); + + net_dev->irq = bgmac->irq; +@@ -1562,6 +1564,8 @@ int bgmac_enet_probe(struct bgmac *bgmac + bgmac->b53_device = &bgmac_b53_dev; + } + ++ bgmac->in_init = false; ++ + err = register_netdev(bgmac->net_dev); + if (err) { + dev_err(bgmac->dev, "Cannot register net device\n"); +--- a/drivers/net/ethernet/broadcom/bgmac.h ++++ b/drivers/net/ethernet/broadcom/bgmac.h +@@ -513,6 +513,8 @@ struct bgmac { + int irq; + u32 int_mask; + ++ bool in_init; ++ + /* Current MAC state */ + int mac_speed; + int mac_duplex; diff --git a/target/linux/bcm47xx/patches-5.15/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch b/target/linux/bcm47xx/patches-5.15/030-v5.17-0001-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch similarity index 84% rename from target/linux/bcm47xx/patches-5.15/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch rename to target/linux/bcm47xx/patches-5.15/030-v5.17-0001-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch index 0c23e8aaf5..921825be5c 100644 --- a/target/linux/bcm47xx/patches-5.15/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch +++ b/target/linux/bcm47xx/patches-5.15/030-v5.17-0001-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch @@ -15,7 +15,7 @@ Signed-off-by: Thomas Bogendoerfer --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -289,6 +289,12 @@ bcm47xx_buttons_linksys_wrt320n_v1[] __i +@@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in }; static const struct gpio_keys_button @@ -28,9 +28,9 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { BCM47XX_GPIO_KEY(5, KEY_WIMAX), BCM47XX_GPIO_KEY(6, KEY_RESTART), -@@ -644,6 +650,9 @@ int __init bcm47xx_buttons_register(void - case BCM47XX_BOARD_LINKSYS_WRT320N_V1: - err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1); +@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_WRT310NV1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1); break; + case BCM47XX_BOARD_LINKSYS_WRT310NV2: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2); diff --git a/target/linux/bcm47xx/patches-5.10/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch b/target/linux/bcm47xx/patches-5.15/030-v5.17-0002-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch similarity index 93% rename from target/linux/bcm47xx/patches-5.10/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch rename to target/linux/bcm47xx/patches-5.15/030-v5.17-0002-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch index f34336edd5..3fb013a585 100644 --- a/target/linux/bcm47xx/patches-5.10/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch +++ b/target/linux/bcm47xx/patches-5.15/030-v5.17-0002-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch @@ -28,7 +28,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in +@@ -283,6 +283,12 @@ bcm47xx_buttons_linksys_wrt310n_v2[] __i }; static const struct gpio_keys_button @@ -41,9 +41,9 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { BCM47XX_GPIO_KEY(5, KEY_WIMAX), BCM47XX_GPIO_KEY(6, KEY_RESTART), -@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void - case BCM47XX_BOARD_LINKSYS_WRT310NV1: - err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1); +@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_WRT310NV2: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2); break; + case BCM47XX_BOARD_LINKSYS_WRT320N_V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1); diff --git a/target/linux/bcm47xx/patches-5.15/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch b/target/linux/bcm47xx/patches-5.15/030-v5.17-0003-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch similarity index 94% rename from target/linux/bcm47xx/patches-5.15/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch rename to target/linux/bcm47xx/patches-5.15/030-v5.17-0003-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch index 23d50ad902..c09140e99d 100644 --- a/target/linux/bcm47xx/patches-5.15/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch +++ b/target/linux/bcm47xx/patches-5.15/030-v5.17-0003-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch @@ -28,7 +28,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_asus_rtn12[] __initconst = { BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON), BCM47XX_GPIO_KEY(1, KEY_RESTART), -@@ -502,6 +508,9 @@ int __init bcm47xx_buttons_register(void +@@ -490,6 +496,9 @@ int __init bcm47xx_buttons_register(void int err; switch (board) { @@ -55,7 +55,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_leds_asus_rtn12[] __initconst = { BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), -@@ -571,6 +579,9 @@ void __init bcm47xx_leds_register(void) +@@ -563,6 +571,9 @@ void __init bcm47xx_leds_register(void) enum bcm47xx_board board = bcm47xx_board_get(); switch (board) { diff --git a/target/linux/bcm47xx/patches-5.10/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch b/target/linux/bcm47xx/patches-5.15/030-v5.17-0004-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch similarity index 95% rename from target/linux/bcm47xx/patches-5.10/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch rename to target/linux/bcm47xx/patches-5.15/030-v5.17-0004-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch index 6631e79048..8740942d6f 100644 --- a/target/linux/bcm47xx/patches-5.10/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch +++ b/target/linux/bcm47xx/patches-5.15/030-v5.17-0004-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch @@ -26,7 +26,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -398,6 +398,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini +@@ -410,6 +410,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini }; static const struct gpio_keys_button @@ -38,7 +38,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_RESTART), BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON), -@@ -683,6 +688,9 @@ int __init bcm47xx_buttons_register(void +@@ -701,6 +706,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_NETGEAR_R6200_V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1); break; diff --git a/target/linux/bcm47xx/patches-5.15/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch b/target/linux/bcm47xx/patches-5.15/030-v5.17-0005-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch similarity index 95% rename from target/linux/bcm47xx/patches-5.15/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch rename to target/linux/bcm47xx/patches-5.15/030-v5.17-0005-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch index 8f66aee192..6975bce952 100644 --- a/target/linux/bcm47xx/patches-5.15/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch +++ b/target/linux/bcm47xx/patches-5.15/030-v5.17-0005-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch @@ -27,7 +27,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -403,6 +403,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini +@@ -415,6 +415,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini }; static const struct gpio_keys_button @@ -40,7 +40,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_RESTART), BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON), -@@ -691,6 +697,9 @@ int __init bcm47xx_buttons_register(void +@@ -709,6 +715,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_NETGEAR_R6300_V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1); break; diff --git a/target/linux/bcm47xx/patches-5.10/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch b/target/linux/bcm47xx/patches-5.15/031-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch similarity index 94% rename from target/linux/bcm47xx/patches-5.10/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch rename to target/linux/bcm47xx/patches-5.15/031-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch index 272a74933b..8c2233c804 100644 --- a/target/linux/bcm47xx/patches-5.10/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch +++ b/target/linux/bcm47xx/patches-5.15/031-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch @@ -36,7 +36,7 @@ Signed-off-by: Thomas Bogendoerfer {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -448,6 +448,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i +@@ -460,6 +460,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i }; static const struct gpio_keys_button @@ -50,7 +50,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_buttons_netgear_wnr834bv2[] __initconst = { BCM47XX_GPIO_KEY(6, KEY_RESTART), }; -@@ -718,6 +725,9 @@ int __init bcm47xx_buttons_register(void +@@ -736,6 +743,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_NETGEAR_WNR3500L: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1); break; @@ -62,7 +62,7 @@ Signed-off-by: Thomas Bogendoerfer break; --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c -@@ -520,6 +520,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init +@@ -528,6 +528,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init }; static const struct gpio_led @@ -77,7 +77,7 @@ Signed-off-by: Thomas Bogendoerfer bcm47xx_leds_netgear_wnr834bv2[] __initconst = { BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), -@@ -780,6 +788,9 @@ void __init bcm47xx_leds_register(void) +@@ -791,6 +799,9 @@ void __init bcm47xx_leds_register(void) case BCM47XX_BOARD_NETGEAR_WNR3500L: bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1); break; diff --git a/target/linux/bcm47xx/patches-5.15/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch b/target/linux/bcm47xx/patches-5.15/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch new file mode 100644 index 0000000000..4faecdc7d5 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.15/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch @@ -0,0 +1,65 @@ +From fc605b914167de75432c3b5aae239fb191e84a31 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 8 Feb 2023 08:03:01 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Linksys E2500 V3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home WiFi router. 16 MiB flash, 64 MiB RAM, BCM5325 +switch, on-SoC 802.11n radio. + +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: Thomas Bogendoerfer +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/buttons.c | 9 +++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 11 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -130,6 +130,7 @@ struct bcm47xx_board_type_list2 bcm47xx_ + {{BCM47XX_BOARD_LINKSYS_E1000V21, "Linksys E1000 V2.1"}, "E1000", "2.1"}, + {{BCM47XX_BOARD_LINKSYS_E1200V2, "Linksys E1200 V2"}, "E1200", "2.0"}, + {{BCM47XX_BOARD_LINKSYS_E2000V1, "Linksys E2000 V1"}, "Linksys E2000", "1.0"}, ++ {{BCM47XX_BOARD_LINKSYS_E2500V3, "Linksys E2500 V3"}, "E2500", "1.0"}, + /* like WRT610N v2.0 */ + {{BCM47XX_BOARD_LINKSYS_E3000V1, "Linksys E3000 V1"}, "E300", "1.0"}, + {{BCM47XX_BOARD_LINKSYS_E3200V1, "Linksys E3200 V1"}, "E3200", "1.0"}, +--- a/arch/mips/bcm47xx/buttons.c ++++ b/arch/mips/bcm47xx/buttons.c +@@ -223,6 +223,12 @@ bcm47xx_buttons_linksys_e2000v1[] __init + }; + + static const struct gpio_keys_button ++bcm47xx_buttons_linksys_e2500v3[] __initconst = { ++ BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON), ++ BCM47XX_GPIO_KEY(10, KEY_RESTART), ++}; ++ ++static const struct gpio_keys_button + bcm47xx_buttons_linksys_e3000v1[] __initconst = { + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), + BCM47XX_GPIO_KEY(6, KEY_RESTART), +@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_E2000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1); + break; ++ case BCM47XX_BOARD_LINKSYS_E2500V3: ++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2500v3); ++ break; + case BCM47XX_BOARD_LINKSYS_E3000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -61,6 +61,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_LINKSYS_E1000V21, + BCM47XX_BOARD_LINKSYS_E1200V2, + BCM47XX_BOARD_LINKSYS_E2000V1, ++ BCM47XX_BOARD_LINKSYS_E2500V3, + BCM47XX_BOARD_LINKSYS_E3000V1, + BCM47XX_BOARD_LINKSYS_E3200V1, + BCM47XX_BOARD_LINKSYS_E4200V1, diff --git a/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch b/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch index ab53cfd6e9..56c686f308 100644 --- a/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch +++ b/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch @@ -20,7 +20,7 @@ Signed-off-by: Florian Fainelli --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3900,6 +3900,7 @@ L: linux-mtd@lists.infradead.org +@@ -3901,6 +3901,7 @@ L: linux-mtd@lists.infradead.org L: bcm-kernel-feedback-list@broadcom.com S: Maintained F: drivers/mtd/nand/raw/brcmnand/ diff --git a/target/linux/bcm47xx/patches-5.15/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch b/target/linux/bcm47xx/patches-5.15/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch new file mode 100644 index 0000000000..333c3d7b87 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.15/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch @@ -0,0 +1,61 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 27 Feb 2023 07:44:38 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Huawei B593u-12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home router. One of very few bcm47xx devices with +cellular modems (here: LTE). + +Signed-off-by: Rafał Miłecki +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/leds.c | 8 ++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 10 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -193,6 +193,7 @@ struct bcm47xx_board_type_list1 bcm47xx_ + /* boardtype, boardnum, boardrev */ + static const + struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = { ++ {{BCM47XX_BOARD_HUAWEI_B593U_12, "Huawei B593u-12"}, "0x053d", "1234", "0x1301"}, + {{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"}, + {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"}, + {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"}, +--- a/arch/mips/bcm47xx/leds.c ++++ b/arch/mips/bcm47xx/leds.c +@@ -223,6 +223,11 @@ bcm47xx_leds_dlink_dir330[] __initconst + /* Huawei */ + + static const struct gpio_led ++bcm47xx_leds_huawei_b593u_12[] __initconst = { ++ BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led + bcm47xx_leds_huawei_e970[] __initconst = { + BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), + }; +@@ -672,6 +677,9 @@ void __init bcm47xx_leds_register(void) + bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330); + break; + ++ case BCM47XX_BOARD_HUAWEI_B593U_12: ++ bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12); ++ break; + case BCM47XX_BOARD_HUAWEI_E970: + bcm47xx_set_pdata(bcm47xx_leds_huawei_e970); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -53,6 +53,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_DLINK_DIR130, + BCM47XX_BOARD_DLINK_DIR330, + ++ BCM47XX_BOARD_HUAWEI_B593U_12, + BCM47XX_BOARD_HUAWEI_E970, + + BCM47XX_BOARD_LINKSYS_E900V1, diff --git a/target/linux/bcm47xx/patches-5.15/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch b/target/linux/bcm47xx/patches-5.15/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch new file mode 100644 index 0000000000..f5f998e0f5 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.15/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch @@ -0,0 +1,76 @@ +From 327dabbd0111910a7d174b0b812d608d6b67bead Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 8 Aug 2022 23:05:25 +0200 +Subject: [PATCH] bgmac: fix *initial* chip reset to support BCM5358 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +While bringing hardware up we should perform a full reset including the +switch bit (BGMAC_BCMA_IOCTL_SW_RESET aka SICF_SWRST). It's what +specification says and what reference driver does. + +This seems to be critical for the BCM5358. Without this hardware doesn't +get initialized properly and doesn't seem to transmit or receive any +packets. + +Originally bgmac was calling bgmac_chip_reset() before setting +"has_robosw" property which resulted in expected behaviour. That has +changed as a side effect of adding platform device support which +regressed BCM5358 support. + +Fixes: f6a95a24957a ("net: ethernet: bgmac: Add platform device support") +Cc: Jon Mason +Signed-off-by: Rafał Miłecki +--- + drivers/net/ethernet/broadcom/bgmac.c | 8 ++++++-- + drivers/net/ethernet/broadcom/bgmac.h | 2 ++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bgmac.c ++++ b/drivers/net/ethernet/broadcom/bgmac.c +@@ -891,13 +891,13 @@ static void bgmac_chip_reset_idm_config( + + if (iost & BGMAC_BCMA_IOST_ATTACHED) { + flags = BGMAC_BCMA_IOCTL_SW_CLKEN; +- if (!bgmac->has_robosw) ++ if (bgmac->in_init || !bgmac->has_robosw) + flags |= BGMAC_BCMA_IOCTL_SW_RESET; + } + bgmac_clk_enable(bgmac, flags); + } + +- if (iost & BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw) ++ if (iost & BGMAC_BCMA_IOST_ATTACHED && (bgmac->in_init || !bgmac->has_robosw)) + bgmac_idm_write(bgmac, BCMA_IOCTL, + bgmac_idm_read(bgmac, BCMA_IOCTL) & + ~BGMAC_BCMA_IOCTL_SW_RESET); +@@ -1502,6 +1502,8 @@ int bgmac_enet_probe(struct bgmac *bgmac + struct net_device *net_dev = bgmac->net_dev; + int err; + ++ bgmac->in_init = true; ++ + bgmac_chip_intrs_off(bgmac); + + net_dev->irq = bgmac->irq; +@@ -1562,6 +1564,8 @@ int bgmac_enet_probe(struct bgmac *bgmac + bgmac->b53_device = &bgmac_b53_dev; + } + ++ bgmac->in_init = false; ++ + err = register_netdev(bgmac->net_dev); + if (err) { + dev_err(bgmac->dev, "Cannot register net device\n"); +--- a/drivers/net/ethernet/broadcom/bgmac.h ++++ b/drivers/net/ethernet/broadcom/bgmac.h +@@ -475,6 +475,8 @@ struct bgmac { + int irq; + u32 int_mask; + ++ bool in_init; ++ + /* Current MAC state */ + int mac_speed; + int mac_duplex; diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch index 946bc79b60..adc7d6bb0c 100644 --- a/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch +++ b/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch @@ -95,7 +95,7 @@ Signed-off-by: Linus Walleij + }; --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3572,6 +3572,13 @@ F: Documentation/devicetree/bindings/net +@@ -3573,6 +3573,13 @@ F: Documentation/devicetree/bindings/net F: drivers/net/ethernet/broadcom/bcm4908_enet.* F: drivers/net/ethernet/broadcom/unimac.h diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch index 5bd380f67a..7e7dccb6f6 100644 --- a/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch +++ b/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch @@ -23,7 +23,7 @@ Signed-off-by: Linus Walleij --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3578,6 +3578,7 @@ M: bcm-kernel-feedback-list@broadcom.com +@@ -3579,6 +3579,7 @@ M: bcm-kernel-feedback-list@broadcom.com L: linux-gpio@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index c2e5afc5ed..6bec600540 100644 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -16,6 +16,9 @@ bcm53xx_setup_interfaces() asus,rt-ac88u) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan" ;; + dlink,dwl-8610ap) + ucidef_set_interface_lan "eth0 eth1" "dhcp" + ;; linksys,panamera) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan" ;; diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 3291adb684..5ec1e90545 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -105,6 +105,22 @@ define Build/seama-nand -i $@.entity endef +define Build/dwl8610ap-image + mkdir -p $@.tmptar + # The DWL8610AP pretends to be a Broadcom reference design + echo "bcm953012er" > $@.tmptar/board + echo "LVL7" > $@.tmptar/model + # Something high beyond what D-Link has put out + echo "5.0.0.0" > $@.tmptar/version + # Create rootfs.bin, this is just a NAND image including everything + cp $@ $@.tmptar/rootfs.bin + # Hash the rootfs.bin + cat $@.tmptar/rootfs.bin | md5sum > $@.tmptar/rootfs.md5 + cd $@.tmptar && tar -c -f $@.new * + rm -rf $@.tmptar + mv $@.new $@ +endef + DEVICE_VARS += ASUS_PRODUCTID DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR DEVICE_VARS += SIGNATURE @@ -250,6 +266,15 @@ define Device/dlink_dir-885l endef TARGET_DEVICES += dlink_dir-885l +define Device/dlink_dwl-8610ap + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DWL-8610AP + DEVICE_PACKAGES := $(B43) + IMAGES := factory.tar + IMAGE/factory.tar := append-ubi | trx-nand | dwl8610ap-image +endef +TARGET_DEVICES += dlink_dwl-8610ap + define Device/linksys_ea6300-v1 DEVICE_VENDOR := Linksys DEVICE_MODEL := EA6300 diff --git a/target/linux/bmips/dts/bcm6318.dtsi b/target/linux/bmips/dts/bcm6318.dtsi index 9f613ad47a..13e1bf1144 100644 --- a/target/linux/bmips/dts/bcm6318.dtsi +++ b/target/linux/bmips/dts/bcm6318.dtsi @@ -400,7 +400,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm63268.dtsi b/target/linux/bmips/dts/bcm63268.dtsi index 2ab14e5a33..2bc86d26f9 100644 --- a/target/linux/bmips/dts/bcm63268.dtsi +++ b/target/linux/bmips/dts/bcm63268.dtsi @@ -521,7 +521,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6328.dtsi b/target/linux/bmips/dts/bcm6328.dtsi index c8e9138ccb..dfd603b7c6 100644 --- a/target/linux/bmips/dts/bcm6328.dtsi +++ b/target/linux/bmips/dts/bcm6328.dtsi @@ -418,7 +418,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6362.dtsi b/target/linux/bmips/dts/bcm6362.dtsi index 77473c22bb..d66a602df7 100644 --- a/target/linux/bmips/dts/bcm6362.dtsi +++ b/target/linux/bmips/dts/bcm6362.dtsi @@ -515,7 +515,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6368.dtsi b/target/linux/bmips/dts/bcm6368.dtsi index b50a572fd0..5ba9092193 100644 --- a/target/linux/bmips/dts/bcm6368.dtsi +++ b/target/linux/bmips/dts/bcm6368.dtsi @@ -529,7 +529,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch b/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch index 41b3d8139f..14763c1211 100644 --- a/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch +++ b/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch @@ -14,7 +14,7 @@ Signed-off-by: Johan Almbladh --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3430,6 +3430,7 @@ S: Supported +@@ -3431,6 +3431,7 @@ S: Supported F: arch/arm64/net/ BPF JIT for MIPS (32-BIT AND 64-BIT) 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 92e08bb4e3..3df9bb6210 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 @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue); static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue); -@@ -1710,9 +1713,6 @@ static int __init_dma_rx_desc_rings(stru +@@ -1711,9 +1714,6 @@ static int __init_dma_rx_desc_rings(stru return -ENOMEM; } @@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski /* Setup the chained descriptor addresses */ if (priv->mode == STMMAC_CHAIN_MODE) { if (priv->extend_desc) -@@ -1818,12 +1818,6 @@ static int __init_dma_tx_desc_rings(stru +@@ -1819,12 +1819,6 @@ static int __init_dma_tx_desc_rings(stru tx_q->tx_skbuff[i] = NULL; } @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -2692,10 +2686,7 @@ static void stmmac_tx_err(struct stmmac_ +@@ -2693,10 +2687,7 @@ static void stmmac_tx_err(struct stmmac_ stmmac_stop_tx_dma(priv, chan); dma_free_tx_skbufs(priv, chan); stmmac_clear_tx_descriptors(priv, chan); @@ -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); -@@ -3779,6 +3770,8 @@ static int stmmac_open(struct net_device +@@ -3780,6 +3771,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__); -@@ -6422,6 +6415,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6423,6 +6416,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, -@@ -6483,6 +6477,7 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6484,6 +6478,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, -@@ -7405,6 +7400,25 @@ int stmmac_suspend(struct device *dev) +@@ -7406,6 +7401,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 -@@ -7415,22 +7429,11 @@ static void stmmac_reset_queues_param(st +@@ -7416,22 +7430,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 e3c15061b8..5c033e9d52 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 -@@ -3831,8 +3831,6 @@ static int stmmac_release(struct net_dev +@@ -3832,8 +3832,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 */ -@@ -3844,6 +3842,8 @@ static int stmmac_release(struct net_dev +@@ -3845,6 +3843,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 3903eb0565..a717688125 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 @@ -189,7 +189,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->dirty_tx != tx_q->cur_tx) return -EBUSY; /* still unfinished work */ -@@ -1307,7 +1307,7 @@ static void stmmac_display_rx_rings(stru +@@ -1308,7 +1308,7 @@ static void stmmac_display_rx_rings(stru /* Display RX rings */ for (queue = 0; queue < rx_cnt; queue++) { @@ -198,7 +198,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tRX Queue %u rings\n", queue); -@@ -1320,7 +1320,7 @@ static void stmmac_display_rx_rings(stru +@@ -1321,7 +1321,7 @@ static void stmmac_display_rx_rings(stru } /* Display RX ring */ @@ -207,7 +207,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } } -@@ -1334,7 +1334,7 @@ static void stmmac_display_tx_rings(stru +@@ -1335,7 +1335,7 @@ static void stmmac_display_tx_rings(stru /* Display TX rings */ for (queue = 0; queue < tx_cnt; queue++) { @@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tTX Queue %d rings\n", queue); -@@ -1349,7 +1349,7 @@ static void stmmac_display_tx_rings(stru +@@ -1350,7 +1350,7 @@ static void stmmac_display_tx_rings(stru desc_size = sizeof(struct dma_desc); } @@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski tx_q->dma_tx_phy, desc_size); } } -@@ -1390,21 +1390,21 @@ static int stmmac_set_bfsize(int mtu, in +@@ -1391,21 +1391,21 @@ static int stmmac_set_bfsize(int mtu, in */ static void stmmac_clear_rx_descriptors(struct stmmac_priv *priv, u32 queue) { @@ -253,7 +253,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -1416,12 +1416,12 @@ static void stmmac_clear_rx_descriptors( +@@ -1417,12 +1417,12 @@ static void stmmac_clear_rx_descriptors( */ static void stmmac_clear_tx_descriptors(struct stmmac_priv *priv, u32 queue) { @@ -269,7 +269,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1469,7 +1469,7 @@ static void stmmac_clear_descriptors(str +@@ -1470,7 +1470,7 @@ static void stmmac_clear_descriptors(str static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p, int i, gfp_t flags, u32 queue) { @@ -278,7 +278,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->page) { -@@ -1494,7 +1494,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1495,7 +1495,7 @@ static int stmmac_init_rx_buffers(struct buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset; stmmac_set_desc_addr(priv, p, buf->addr); @@ -287,7 +287,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_desc3(priv, p); return 0; -@@ -1508,7 +1508,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1509,7 +1509,7 @@ static int stmmac_init_rx_buffers(struct */ static void stmmac_free_rx_buffer(struct stmmac_priv *priv, u32 queue, int i) { @@ -296,7 +296,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (buf->page) -@@ -1528,7 +1528,7 @@ static void stmmac_free_rx_buffer(struct +@@ -1529,7 +1529,7 @@ static void stmmac_free_rx_buffer(struct */ static void stmmac_free_tx_buffer(struct stmmac_priv *priv, u32 queue, int i) { @@ -305,7 +305,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->tx_skbuff_dma[i].buf && tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) { -@@ -1573,17 +1573,17 @@ static void dma_free_rx_skbufs(struct st +@@ -1574,17 +1574,17 @@ static void dma_free_rx_skbufs(struct st { int i; @@ -326,7 +326,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; int ret; -@@ -1610,10 +1610,10 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1611,10 +1611,10 @@ static int stmmac_alloc_rx_buffers(struc */ static void dma_free_rx_xskbufs(struct stmmac_priv *priv, u32 queue) { @@ -339,7 +339,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->xdp) -@@ -1626,10 +1626,10 @@ static void dma_free_rx_xskbufs(struct s +@@ -1627,10 +1627,10 @@ static void dma_free_rx_xskbufs(struct s static int stmmac_alloc_rx_buffers_zc(struct stmmac_priv *priv, u32 queue) { @@ -352,7 +352,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf; dma_addr_t dma_addr; struct dma_desc *p; -@@ -1672,7 +1672,7 @@ static struct xsk_buff_pool *stmmac_get_ +@@ -1673,7 +1673,7 @@ static struct xsk_buff_pool *stmmac_get_ */ static int __init_dma_rx_desc_rings(struct stmmac_priv *priv, u32 queue, gfp_t flags) { @@ -361,7 +361,7 @@ Signed-off-by: Jakub Kicinski int ret; netif_dbg(priv, probe, priv->dev, -@@ -1718,11 +1718,11 @@ static int __init_dma_rx_desc_rings(stru +@@ -1719,11 +1719,11 @@ static int __init_dma_rx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, rx_q->dma_erx, rx_q->dma_rx_phy, @@ -375,7 +375,7 @@ Signed-off-by: Jakub Kicinski } return 0; -@@ -1749,7 +1749,7 @@ static int init_dma_rx_desc_rings(struct +@@ -1750,7 +1750,7 @@ static int init_dma_rx_desc_rings(struct err_init_rx_buffers: while (queue >= 0) { @@ -384,7 +384,7 @@ Signed-off-by: Jakub Kicinski if (rx_q->xsk_pool) dma_free_rx_xskbufs(priv, queue); -@@ -1778,7 +1778,7 @@ err_init_rx_buffers: +@@ -1779,7 +1779,7 @@ err_init_rx_buffers: */ static int __init_dma_tx_desc_rings(struct stmmac_priv *priv, u32 queue) { @@ -393,7 +393,7 @@ Signed-off-by: Jakub Kicinski int i; netif_dbg(priv, probe, priv->dev, -@@ -1790,16 +1790,16 @@ static int __init_dma_tx_desc_rings(stru +@@ -1791,16 +1791,16 @@ static int __init_dma_tx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, tx_q->dma_etx, tx_q->dma_tx_phy, @@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1869,12 +1869,12 @@ static int init_dma_desc_rings(struct ne +@@ -1870,12 +1870,12 @@ static int init_dma_desc_rings(struct ne */ static void dma_free_tx_skbufs(struct stmmac_priv *priv, u32 queue) { @@ -428,7 +428,7 @@ Signed-off-by: Jakub Kicinski stmmac_free_tx_buffer(priv, queue, i); if (tx_q->xsk_pool && tx_q->xsk_frames_done) { -@@ -1904,7 +1904,7 @@ static void stmmac_free_tx_skbufs(struct +@@ -1905,7 +1905,7 @@ static void stmmac_free_tx_skbufs(struct */ static void __free_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -437,7 +437,7 @@ Signed-off-by: Jakub Kicinski /* Release the DMA RX socket buffers */ if (rx_q->xsk_pool) -@@ -1917,11 +1917,11 @@ static void __free_dma_rx_desc_resources +@@ -1918,11 +1918,11 @@ static void __free_dma_rx_desc_resources /* Free DMA regions of consistent memory previously allocated */ if (!priv->extend_desc) @@ -451,7 +451,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), rx_q->dma_erx, rx_q->dma_rx_phy); -@@ -1950,7 +1950,7 @@ static void free_dma_rx_desc_resources(s +@@ -1951,7 +1951,7 @@ static void free_dma_rx_desc_resources(s */ static void __free_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -460,7 +460,7 @@ Signed-off-by: Jakub Kicinski size_t size; void *addr; -@@ -1968,7 +1968,7 @@ static void __free_dma_tx_desc_resources +@@ -1969,7 +1969,7 @@ static void __free_dma_tx_desc_resources addr = tx_q->dma_tx; } @@ -469,7 +469,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy); -@@ -1997,7 +1997,7 @@ static void free_dma_tx_desc_resources(s +@@ -1998,7 +1998,7 @@ static void free_dma_tx_desc_resources(s */ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -478,7 +478,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; bool xdp_prog = stmmac_xdp_is_enabled(priv); struct page_pool_params pp_params = { 0 }; -@@ -2009,8 +2009,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2010,8 +2010,8 @@ static int __alloc_dma_rx_desc_resources rx_q->priv_data = priv; pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV; @@ -489,7 +489,7 @@ Signed-off-by: Jakub Kicinski pp_params.order = ilog2(num_pages); pp_params.nid = dev_to_node(priv->device); pp_params.dev = priv->device; -@@ -2025,7 +2025,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2026,7 +2026,7 @@ static int __alloc_dma_rx_desc_resources return ret; } @@ -498,7 +498,7 @@ Signed-off-by: Jakub Kicinski sizeof(*rx_q->buf_pool), GFP_KERNEL); if (!rx_q->buf_pool) -@@ -2033,7 +2033,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2034,7 +2034,7 @@ static int __alloc_dma_rx_desc_resources if (priv->extend_desc) { rx_q->dma_erx = dma_alloc_coherent(priv->device, @@ -507,7 +507,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2042,7 +2042,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2043,7 +2043,7 @@ static int __alloc_dma_rx_desc_resources } else { rx_q->dma_rx = dma_alloc_coherent(priv->device, @@ -516,7 +516,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2099,20 +2099,20 @@ err_dma: +@@ -2100,20 +2100,20 @@ err_dma: */ static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -540,7 +540,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct sk_buff *), GFP_KERNEL); if (!tx_q->tx_skbuff) -@@ -2125,7 +2125,7 @@ static int __alloc_dma_tx_desc_resources +@@ -2126,7 +2126,7 @@ static int __alloc_dma_tx_desc_resources else size = sizeof(struct dma_desc); @@ -549,7 +549,7 @@ Signed-off-by: Jakub Kicinski addr = dma_alloc_coherent(priv->device, size, &tx_q->dma_tx_phy, GFP_KERNEL); -@@ -2369,7 +2369,7 @@ static void stmmac_dma_operation_mode(st +@@ -2370,7 +2370,7 @@ static void stmmac_dma_operation_mode(st /* configure all channels */ for (chan = 0; chan < rx_channels_count; chan++) { @@ -558,7 +558,7 @@ Signed-off-by: Jakub Kicinski u32 buf_size; qmode = priv->plat->rx_queues_cfg[chan].mode_to_use; -@@ -2384,7 +2384,7 @@ static void stmmac_dma_operation_mode(st +@@ -2385,7 +2385,7 @@ static void stmmac_dma_operation_mode(st chan); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -567,7 +567,7 @@ Signed-off-by: Jakub Kicinski chan); } } -@@ -2400,7 +2400,7 @@ static void stmmac_dma_operation_mode(st +@@ -2401,7 +2401,7 @@ static void stmmac_dma_operation_mode(st static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget) { struct netdev_queue *nq = netdev_get_tx_queue(priv->dev, queue); @@ -576,7 +576,7 @@ Signed-off-by: Jakub Kicinski struct xsk_buff_pool *pool = tx_q->xsk_pool; unsigned int entry = tx_q->cur_tx; struct dma_desc *tx_desc = NULL; -@@ -2475,7 +2475,7 @@ static bool stmmac_xdp_xmit_zc(struct st +@@ -2476,7 +2476,7 @@ static bool stmmac_xdp_xmit_zc(struct st stmmac_enable_dma_transmission(priv, priv->ioaddr); @@ -585,7 +585,7 @@ Signed-off-by: Jakub Kicinski entry = tx_q->cur_tx; } -@@ -2501,7 +2501,7 @@ static bool stmmac_xdp_xmit_zc(struct st +@@ -2502,7 +2502,7 @@ static bool stmmac_xdp_xmit_zc(struct st */ static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue) { @@ -594,7 +594,7 @@ Signed-off-by: Jakub Kicinski unsigned int bytes_compl = 0, pkts_compl = 0; unsigned int entry, xmits = 0, count = 0; -@@ -2514,7 +2514,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2515,7 +2515,7 @@ static int stmmac_tx_clean(struct stmmac entry = tx_q->dirty_tx; /* Try to clean all TX complete frame in 1 shot */ @@ -603,7 +603,7 @@ Signed-off-by: Jakub Kicinski struct xdp_frame *xdpf; struct sk_buff *skb; struct dma_desc *p; -@@ -2614,7 +2614,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2615,7 +2615,7 @@ static int stmmac_tx_clean(struct stmmac stmmac_release_tx_desc(priv, p, priv->mode); @@ -612,7 +612,7 @@ Signed-off-by: Jakub Kicinski } tx_q->dirty_tx = entry; -@@ -2679,7 +2679,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2680,7 +2680,7 @@ static int stmmac_tx_clean(struct stmmac */ static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan) { @@ -621,7 +621,7 @@ Signed-off-by: Jakub Kicinski netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan)); -@@ -2746,8 +2746,8 @@ static int stmmac_napi_check(struct stmm +@@ -2747,8 +2747,8 @@ static int stmmac_napi_check(struct stmm { int status = stmmac_dma_interrupt_status(priv, priv->ioaddr, &priv->xstats, chan, dir); @@ -632,7 +632,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[chan]; struct napi_struct *rx_napi; struct napi_struct *tx_napi; -@@ -2923,7 +2923,7 @@ static int stmmac_init_dma_engine(struct +@@ -2924,7 +2924,7 @@ static int stmmac_init_dma_engine(struct /* DMA RX Channel Configuration */ for (chan = 0; chan < rx_channels_count; chan++) { @@ -641,7 +641,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, chan); -@@ -2937,7 +2937,7 @@ static int stmmac_init_dma_engine(struct +@@ -2938,7 +2938,7 @@ static int stmmac_init_dma_engine(struct /* DMA TX Channel Configuration */ for (chan = 0; chan < tx_channels_count; chan++) { @@ -650,7 +650,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -2952,7 +2952,7 @@ static int stmmac_init_dma_engine(struct +@@ -2953,7 +2953,7 @@ static int stmmac_init_dma_engine(struct static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue) { @@ -659,7 +659,7 @@ Signed-off-by: Jakub Kicinski hrtimer_start(&tx_q->txtimer, STMMAC_COAL_TIMER(priv->tx_coal_timer[queue]), -@@ -3002,7 +3002,7 @@ static void stmmac_init_coalesce(struct +@@ -3003,7 +3003,7 @@ static void stmmac_init_coalesce(struct u32 chan; for (chan = 0; chan < tx_channel_count; chan++) { @@ -668,7 +668,7 @@ Signed-off-by: Jakub Kicinski priv->tx_coal_frames[chan] = STMMAC_TX_FRAMES; priv->tx_coal_timer[chan] = STMMAC_COAL_TX_TIMER; -@@ -3024,12 +3024,12 @@ static void stmmac_set_rings_length(stru +@@ -3025,12 +3025,12 @@ static void stmmac_set_rings_length(stru /* set TX ring length */ for (chan = 0; chan < tx_channels_count; chan++) stmmac_set_tx_ring_len(priv, priv->ioaddr, @@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -3364,7 +3364,7 @@ static int stmmac_hw_setup(struct net_de +@@ -3365,7 +3365,7 @@ static int stmmac_hw_setup(struct net_de /* Enable TSO */ if (priv->tso) { for (chan = 0; chan < tx_cnt; chan++) { @@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski /* TSO and TBS cannot co-exist */ if (tx_q->tbs & STMMAC_TBS_AVAIL) -@@ -3386,7 +3386,7 @@ static int stmmac_hw_setup(struct net_de +@@ -3387,7 +3387,7 @@ static int stmmac_hw_setup(struct net_de /* TBS */ for (chan = 0; chan < tx_cnt; chan++) { @@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski int enable = tx_q->tbs & STMMAC_TBS_AVAIL; stmmac_enable_tbs(priv, priv->ioaddr, enable, chan); -@@ -3430,7 +3430,7 @@ static void stmmac_free_irq(struct net_d +@@ -3431,7 +3431,7 @@ static void stmmac_free_irq(struct net_d for (j = irq_idx - 1; j >= 0; j--) { if (priv->tx_irq[j] > 0) { irq_set_affinity_hint(priv->tx_irq[j], NULL); @@ -710,7 +710,7 @@ Signed-off-by: Jakub Kicinski } } irq_idx = priv->plat->rx_queues_to_use; -@@ -3439,7 +3439,7 @@ static void stmmac_free_irq(struct net_d +@@ -3440,7 +3440,7 @@ static void stmmac_free_irq(struct net_d for (j = irq_idx - 1; j >= 0; j--) { if (priv->rx_irq[j] > 0) { irq_set_affinity_hint(priv->rx_irq[j], NULL); @@ -719,7 +719,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -3572,7 +3572,7 @@ static int stmmac_request_irq_multi_msi( +@@ -3573,7 +3573,7 @@ static int stmmac_request_irq_multi_msi( sprintf(int_name, "%s:%s-%d", dev->name, "rx", i); ret = request_irq(priv->rx_irq[i], stmmac_msi_intr_rx, @@ -728,7 +728,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(ret < 0)) { netdev_err(priv->dev, "%s: alloc rx-%d MSI %d (error: %d)\n", -@@ -3595,7 +3595,7 @@ static int stmmac_request_irq_multi_msi( +@@ -3596,7 +3596,7 @@ static int stmmac_request_irq_multi_msi( sprintf(int_name, "%s:%s-%d", dev->name, "tx", i); ret = request_irq(priv->tx_irq[i], stmmac_msi_intr_tx, @@ -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", -@@ -3726,21 +3726,21 @@ static int stmmac_open(struct net_device +@@ -3727,21 +3727,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 */ -@@ -3798,7 +3798,7 @@ irq_error: +@@ -3799,7 +3799,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: -@@ -3840,7 +3840,7 @@ static int stmmac_release(struct net_dev +@@ -3841,7 +3841,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); -@@ -3904,7 +3904,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3905,7 +3905,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; } -@@ -3922,7 +3922,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3923,7 +3923,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; -@@ -3933,7 +3933,7 @@ static void stmmac_tso_allocator(struct +@@ -3934,7 +3934,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) -@@ -3961,7 +3961,7 @@ static void stmmac_tso_allocator(struct +@@ -3962,7 +3962,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)) -@@ -4023,7 +4023,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4024,7 +4024,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 */ -@@ -4063,7 +4063,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4064,7 +4064,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]); } -@@ -4175,7 +4175,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4176,7 +4176,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", -@@ -4263,7 +4263,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4264,7 +4264,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) -@@ -4326,7 +4326,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4327,7 +4327,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)) -@@ -4397,7 +4397,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4398,7 +4398,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)) { -@@ -4512,7 +4512,7 @@ static void stmmac_rx_vlan(struct net_de +@@ -4513,7 +4513,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; -@@ -4562,7 +4562,7 @@ static inline void stmmac_rx_refill(stru +@@ -4563,7 +4563,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 + -@@ -4590,12 +4590,12 @@ static unsigned int stmmac_rx_buf1_len(s +@@ -4591,12 +4591,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, -@@ -4611,7 +4611,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4612,7 +4612,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); -@@ -4622,7 +4622,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4623,7 +4623,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; -@@ -4685,7 +4685,7 @@ static int stmmac_xdp_xmit_xdpf(struct s +@@ -4686,7 +4686,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; -@@ -4859,7 +4859,7 @@ static void stmmac_dispatch_skb_zc(struc +@@ -4860,7 +4860,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; -@@ -4902,7 +4902,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4903,7 +4903,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) { -@@ -4917,7 +4917,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4918,7 +4918,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; -@@ -4939,7 +4939,7 @@ static int stmmac_rx_zc(struct stmmac_pr +@@ -4940,7 +4940,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) { -@@ -4986,7 +4986,7 @@ read_again: +@@ -4987,7 +4987,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) -@@ -5107,7 +5107,7 @@ read_again: +@@ -5108,7 +5108,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; -@@ -5120,7 +5120,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5121,7 +5121,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; -@@ -5134,7 +5134,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5135,7 +5135,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) { -@@ -5178,7 +5178,7 @@ read_again: +@@ -5179,7 +5179,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) -@@ -5312,7 +5312,7 @@ read_again: +@@ -5313,7 +5313,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); -@@ -5324,7 +5324,7 @@ read_again: +@@ -5325,7 +5325,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); -@@ -5766,11 +5766,13 @@ static irqreturn_t stmmac_safety_interru +@@ -5767,11 +5767,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 if (unlikely(!data)) { netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__); -@@ -5810,10 +5812,12 @@ static irqreturn_t stmmac_msi_intr_tx(in +@@ -5811,10 +5813,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 if (unlikely(!data)) { netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__); -@@ -5844,10 +5848,10 @@ static void stmmac_poll_controller(struc +@@ -5845,10 +5849,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); -@@ -6028,34 +6032,34 @@ static int stmmac_rings_status_show(stru +@@ -6029,34 +6033,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 } } -@@ -6396,7 +6400,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6397,7 +6401,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; -@@ -6433,7 +6437,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6434,7 +6438,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); } -@@ -6459,7 +6463,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6460,7 +6464,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; -@@ -6509,7 +6513,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6510,7 +6514,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); -@@ -6568,7 +6572,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6569,7 +6573,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); -@@ -6586,7 +6590,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6587,7 +6591,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); } -@@ -6595,7 +6599,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6596,7 +6600,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); -@@ -6628,7 +6632,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6629,7 +6633,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: -@@ -6655,8 +6659,8 @@ int stmmac_xsk_wakeup(struct net_device +@@ -6656,8 +6660,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) -@@ -6912,8 +6916,8 @@ int stmmac_reinit_ringparam(struct net_d +@@ -6913,8 +6917,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); -@@ -7351,7 +7355,7 @@ int stmmac_suspend(struct device *dev) +@@ -7352,7 +7356,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; -@@ -7402,7 +7406,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend); +@@ -7403,7 +7407,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; -@@ -7410,7 +7414,7 @@ static void stmmac_reset_rx_queue(struct +@@ -7411,7 +7415,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 3dc5297f65..8ad6f208cb 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 @@ -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 -@@ -1298,7 +1298,8 @@ static int stmmac_phy_setup(struct stmma +@@ -1299,7 +1299,8 @@ static int stmmac_phy_setup(struct stmma return 0; } @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_cnt = priv->plat->rx_queues_to_use; unsigned int desc_size; -@@ -1307,7 +1308,7 @@ static void stmmac_display_rx_rings(stru +@@ -1308,7 +1309,7 @@ static void stmmac_display_rx_rings(stru /* Display RX rings */ for (queue = 0; queue < rx_cnt; queue++) { @@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tRX Queue %u rings\n", queue); -@@ -1320,12 +1321,13 @@ static void stmmac_display_rx_rings(stru +@@ -1321,12 +1322,13 @@ static void stmmac_display_rx_rings(stru } /* Display RX ring */ @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski { u32 tx_cnt = priv->plat->tx_queues_to_use; unsigned int desc_size; -@@ -1334,7 +1336,7 @@ static void stmmac_display_tx_rings(stru +@@ -1335,7 +1337,7 @@ static void stmmac_display_tx_rings(stru /* Display TX rings */ for (queue = 0; queue < tx_cnt; queue++) { @@ -61,7 +61,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tTX Queue %d rings\n", queue); -@@ -1349,18 +1351,19 @@ static void stmmac_display_tx_rings(stru +@@ -1350,18 +1352,19 @@ static void stmmac_display_tx_rings(stru desc_size = sizeof(struct dma_desc); } @@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski } static int stmmac_set_bfsize(int mtu, int bufsize) -@@ -1384,44 +1387,50 @@ static int stmmac_set_bfsize(int mtu, in +@@ -1385,44 +1388,50 @@ static int stmmac_set_bfsize(int mtu, in /** * stmmac_clear_rx_descriptors - clear RX descriptors * @priv: driver private structure @@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1438,10 +1447,12 @@ static void stmmac_clear_tx_descriptors( +@@ -1439,10 +1448,12 @@ static void stmmac_clear_tx_descriptors( /** * stmmac_clear_descriptors - clear descriptors * @priv: driver private structure @@ -161,7 +161,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_queue_cnt = priv->plat->rx_queues_to_use; u32 tx_queue_cnt = priv->plat->tx_queues_to_use; -@@ -1449,16 +1460,17 @@ static void stmmac_clear_descriptors(str +@@ -1450,16 +1461,17 @@ static void stmmac_clear_descriptors(str /* Clear the RX descriptors */ for (queue = 0; queue < rx_queue_cnt; queue++) @@ -181,7 +181,7 @@ Signed-off-by: Jakub Kicinski * @p: descriptor pointer * @i: descriptor index * @flags: gfp flag -@@ -1466,10 +1478,12 @@ static void stmmac_clear_descriptors(str +@@ -1467,10 +1479,12 @@ static void stmmac_clear_descriptors(str * Description: this function is called to allocate a receive buffer, perform * the DMA mapping and init the descriptor. */ @@ -196,7 +196,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->page) { -@@ -1494,7 +1508,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1495,7 +1509,7 @@ static int stmmac_init_rx_buffers(struct buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset; stmmac_set_desc_addr(priv, p, buf->addr); @@ -205,7 +205,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_desc3(priv, p); return 0; -@@ -1503,12 +1517,13 @@ static int stmmac_init_rx_buffers(struct +@@ -1504,12 +1518,13 @@ static int stmmac_init_rx_buffers(struct /** * stmmac_free_rx_buffer - free RX dma buffers * @priv: private structure @@ -222,7 +222,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (buf->page) -@@ -1523,12 +1538,15 @@ static void stmmac_free_rx_buffer(struct +@@ -1524,12 +1539,15 @@ static void stmmac_free_rx_buffer(struct /** * stmmac_free_tx_buffer - free RX dma buffers * @priv: private structure @@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->tx_skbuff_dma[i].buf && tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) { -@@ -1567,23 +1585,28 @@ static void stmmac_free_tx_buffer(struct +@@ -1568,23 +1586,28 @@ static void stmmac_free_tx_buffer(struct /** * dma_free_rx_skbufs - free RX dma buffers * @priv: private structure @@ -276,7 +276,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; int ret; -@@ -1592,7 +1615,7 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1593,7 +1616,7 @@ static int stmmac_alloc_rx_buffers(struc else p = rx_q->dma_rx + i; @@ -285,7 +285,7 @@ Signed-off-by: Jakub Kicinski queue); if (ret) return ret; -@@ -1606,14 +1629,17 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1607,14 +1630,17 @@ static int stmmac_alloc_rx_buffers(struc /** * dma_free_rx_xskbufs - free RX dma buffers from XSK pool * @priv: private structure @@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->xdp) -@@ -1624,12 +1650,14 @@ static void dma_free_rx_xskbufs(struct s +@@ -1625,12 +1651,14 @@ static void dma_free_rx_xskbufs(struct s } } @@ -324,7 +324,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf; dma_addr_t dma_addr; struct dma_desc *p; -@@ -1664,22 +1692,25 @@ static struct xsk_buff_pool *stmmac_get_ +@@ -1665,22 +1693,25 @@ static struct xsk_buff_pool *stmmac_get_ /** * __init_dma_rx_desc_rings - init the RX descriptor ring (per queue) * @priv: driver private structure @@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski xdp_rxq_info_unreg_mem_model(&rx_q->xdp_rxq); -@@ -1706,9 +1737,9 @@ static int __init_dma_rx_desc_rings(stru +@@ -1707,9 +1738,9 @@ static int __init_dma_rx_desc_rings(stru /* RX XDP ZC buffer pool may not be populated, e.g. * xdpsock TX-only. */ @@ -365,7 +365,7 @@ Signed-off-by: Jakub Kicinski if (ret < 0) return -ENOMEM; } -@@ -1718,17 +1749,19 @@ static int __init_dma_rx_desc_rings(stru +@@ -1719,17 +1750,19 @@ static int __init_dma_rx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, rx_q->dma_erx, rx_q->dma_rx_phy, @@ -388,7 +388,7 @@ Signed-off-by: Jakub Kicinski { struct stmmac_priv *priv = netdev_priv(dev); u32 rx_count = priv->plat->rx_queues_to_use; -@@ -1740,7 +1773,7 @@ static int init_dma_rx_desc_rings(struct +@@ -1741,7 +1774,7 @@ static int init_dma_rx_desc_rings(struct "SKB addresses:\nskb\t\tskb data\tdma data\n"); for (queue = 0; queue < rx_count; queue++) { @@ -397,7 +397,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_init_rx_buffers; } -@@ -1749,12 +1782,12 @@ static int init_dma_rx_desc_rings(struct +@@ -1750,12 +1783,12 @@ static int init_dma_rx_desc_rings(struct err_init_rx_buffers: while (queue >= 0) { @@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski rx_q->buf_alloc_num = 0; rx_q->xsk_pool = NULL; -@@ -1771,14 +1804,17 @@ err_init_rx_buffers: +@@ -1772,14 +1805,17 @@ err_init_rx_buffers: /** * __init_dma_tx_desc_rings - init the TX descriptor ring (per queue) * @priv: driver private structure @@ -434,7 +434,7 @@ Signed-off-by: Jakub Kicinski int i; netif_dbg(priv, probe, priv->dev, -@@ -1790,16 +1826,16 @@ static int __init_dma_tx_desc_rings(stru +@@ -1791,16 +1827,16 @@ static int __init_dma_tx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, tx_q->dma_etx, tx_q->dma_tx_phy, @@ -454,7 +454,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1821,7 +1857,8 @@ static int __init_dma_tx_desc_rings(stru +@@ -1822,7 +1858,8 @@ static int __init_dma_tx_desc_rings(stru return 0; } @@ -464,7 +464,7 @@ Signed-off-by: Jakub Kicinski { struct stmmac_priv *priv = netdev_priv(dev); u32 tx_queue_cnt; -@@ -1830,7 +1867,7 @@ static int init_dma_tx_desc_rings(struct +@@ -1831,7 +1868,7 @@ static int init_dma_tx_desc_rings(struct tx_queue_cnt = priv->plat->tx_queues_to_use; for (queue = 0; queue < tx_queue_cnt; queue++) @@ -473,7 +473,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -1838,26 +1875,29 @@ static int init_dma_tx_desc_rings(struct +@@ -1839,26 +1876,29 @@ static int init_dma_tx_desc_rings(struct /** * init_dma_desc_rings - init the RX/TX descriptor rings * @dev: net device structure @@ -508,7 +508,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -1865,17 +1905,20 @@ static int init_dma_desc_rings(struct ne +@@ -1866,17 +1906,20 @@ static int init_dma_desc_rings(struct ne /** * dma_free_tx_skbufs - free TX dma buffers * @priv: private structure @@ -533,7 +533,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->xsk_pool && tx_q->xsk_frames_done) { xsk_tx_completed(tx_q->xsk_pool, tx_q->xsk_frames_done); -@@ -1894,34 +1937,37 @@ static void stmmac_free_tx_skbufs(struct +@@ -1895,34 +1938,37 @@ static void stmmac_free_tx_skbufs(struct u32 queue; for (queue = 0; queue < tx_queue_cnt; queue++) @@ -578,7 +578,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), rx_q->dma_erx, rx_q->dma_rx_phy); -@@ -1933,29 +1979,33 @@ static void __free_dma_rx_desc_resources +@@ -1934,29 +1980,33 @@ static void __free_dma_rx_desc_resources page_pool_destroy(rx_q->page_pool); } @@ -617,7 +617,7 @@ Signed-off-by: Jakub Kicinski if (priv->extend_desc) { size = sizeof(struct dma_extended_desc); -@@ -1968,7 +2018,7 @@ static void __free_dma_tx_desc_resources +@@ -1969,7 +2019,7 @@ static void __free_dma_tx_desc_resources addr = tx_q->dma_tx; } @@ -626,7 +626,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy); -@@ -1976,28 +2026,32 @@ static void __free_dma_tx_desc_resources +@@ -1977,28 +2027,32 @@ static void __free_dma_tx_desc_resources kfree(tx_q->tx_skbuff); } @@ -663,7 +663,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; bool xdp_prog = stmmac_xdp_is_enabled(priv); struct page_pool_params pp_params = { 0 }; -@@ -2009,8 +2063,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2010,8 +2064,8 @@ static int __alloc_dma_rx_desc_resources rx_q->priv_data = priv; pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV; @@ -674,7 +674,7 @@ Signed-off-by: Jakub Kicinski pp_params.order = ilog2(num_pages); pp_params.nid = dev_to_node(priv->device); pp_params.dev = priv->device; -@@ -2025,7 +2079,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2026,7 +2080,7 @@ static int __alloc_dma_rx_desc_resources return ret; } @@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski sizeof(*rx_q->buf_pool), GFP_KERNEL); if (!rx_q->buf_pool) -@@ -2033,7 +2087,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2034,7 +2088,7 @@ static int __alloc_dma_rx_desc_resources if (priv->extend_desc) { rx_q->dma_erx = dma_alloc_coherent(priv->device, @@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2042,7 +2096,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2043,7 +2097,7 @@ static int __alloc_dma_rx_desc_resources } else { rx_q->dma_rx = dma_alloc_coherent(priv->device, @@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2067,7 +2121,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2068,7 +2122,8 @@ static int __alloc_dma_rx_desc_resources return 0; } @@ -711,7 +711,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_count = priv->plat->rx_queues_to_use; u32 queue; -@@ -2075,7 +2130,7 @@ static int alloc_dma_rx_desc_resources(s +@@ -2076,7 +2131,7 @@ static int alloc_dma_rx_desc_resources(s /* RX queues buffers and DMA */ for (queue = 0; queue < rx_count; queue++) { @@ -720,7 +720,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_dma; } -@@ -2083,7 +2138,7 @@ static int alloc_dma_rx_desc_resources(s +@@ -2084,7 +2139,7 @@ static int alloc_dma_rx_desc_resources(s return 0; err_dma: @@ -729,7 +729,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -2091,28 +2146,31 @@ err_dma: +@@ -2092,28 +2147,31 @@ err_dma: /** * __alloc_dma_tx_desc_resources - alloc TX resources (per queue). * @priv: private structure @@ -765,7 +765,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct sk_buff *), GFP_KERNEL); if (!tx_q->tx_skbuff) -@@ -2125,7 +2183,7 @@ static int __alloc_dma_tx_desc_resources +@@ -2126,7 +2184,7 @@ static int __alloc_dma_tx_desc_resources else size = sizeof(struct dma_desc); @@ -774,7 +774,7 @@ Signed-off-by: Jakub Kicinski addr = dma_alloc_coherent(priv->device, size, &tx_q->dma_tx_phy, GFP_KERNEL); -@@ -2142,7 +2200,8 @@ static int __alloc_dma_tx_desc_resources +@@ -2143,7 +2201,8 @@ static int __alloc_dma_tx_desc_resources return 0; } @@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski { u32 tx_count = priv->plat->tx_queues_to_use; u32 queue; -@@ -2150,7 +2209,7 @@ static int alloc_dma_tx_desc_resources(s +@@ -2151,7 +2210,7 @@ static int alloc_dma_tx_desc_resources(s /* TX queues buffers and DMA */ for (queue = 0; queue < tx_count; queue++) { @@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_dma; } -@@ -2158,27 +2217,29 @@ static int alloc_dma_tx_desc_resources(s +@@ -2159,27 +2218,29 @@ static int alloc_dma_tx_desc_resources(s return 0; err_dma: @@ -827,7 +827,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -2186,16 +2247,18 @@ static int alloc_dma_desc_resources(stru +@@ -2187,16 +2248,18 @@ static int alloc_dma_desc_resources(stru /** * free_dma_desc_resources - free dma desc resources * @priv: private structure @@ -849,7 +849,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -2684,8 +2747,8 @@ static void stmmac_tx_err(struct stmmac_ +@@ -2685,8 +2748,8 @@ static void stmmac_tx_err(struct stmmac_ netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan)); stmmac_stop_tx_dma(priv, chan); @@ -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); -@@ -3682,19 +3745,93 @@ static int stmmac_request_irq(struct net +@@ -3683,19 +3746,93 @@ static int stmmac_request_irq(struct net } /** @@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski u32 chan; int ret; -@@ -3721,45 +3858,10 @@ static int stmmac_open(struct net_device +@@ -3722,45 +3859,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); -@@ -3802,14 +3904,28 @@ irq_error: +@@ -3803,14 +3905,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); -@@ -3856,7 +3972,7 @@ static int stmmac_release(struct net_dev +@@ -3857,7 +3973,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); -@@ -6395,7 +6511,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6396,7 +6512,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) -@@ -6406,21 +6522,21 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6407,21 +6523,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); -@@ -6458,7 +6574,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6459,7 +6575,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) -@@ -6468,21 +6584,21 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6469,21 +6585,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); -@@ -6522,7 +6638,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6523,7 +6639,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); -@@ -6547,14 +6663,14 @@ int stmmac_xdp_open(struct net_device *d +@@ -6548,14 +6664,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__); -@@ -6636,7 +6752,7 @@ irq_error: +@@ -6637,7 +6753,7 @@ irq_error: stmmac_hw_teardown(dev); init_error: @@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski dma_desc_error: return ret; } -@@ -7497,7 +7613,7 @@ int stmmac_resume(struct device *dev) +@@ -7498,7 +7614,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 6ebb527726..2576df4522 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 -@@ -5624,18 +5624,15 @@ static int stmmac_change_mtu(struct net_ +@@ -5625,18 +5625,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; -@@ -5647,8 +5644,29 @@ static int stmmac_change_mtu(struct net_ +@@ -5648,8 +5645,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/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch b/target/linux/generic/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch index 71d9f109a7..ebab8c7c73 100644 --- a/target/linux/generic/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch +++ b/target/linux/generic/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch @@ -206,7 +206,7 @@ Signed-off-by: Greg Kroah-Hartman } return 0; -@@ -1139,9 +1141,33 @@ struct nvmem_device *devm_nvmem_device_g +@@ -1142,9 +1144,33 @@ struct nvmem_device *devm_nvmem_device_g } EXPORT_SYMBOL_GPL(devm_nvmem_device_get); @@ -240,7 +240,7 @@ Signed-off-by: Greg Kroah-Hartman struct nvmem_cell *cell = ERR_PTR(-ENOENT); struct nvmem_cell_lookup *lookup; struct nvmem_device *nvmem; -@@ -1166,11 +1192,15 @@ nvmem_cell_get_from_lookup(struct device +@@ -1169,11 +1195,15 @@ nvmem_cell_get_from_lookup(struct device break; } @@ -259,7 +259,7 @@ Signed-off-by: Greg Kroah-Hartman } break; } -@@ -1181,10 +1211,10 @@ nvmem_cell_get_from_lookup(struct device +@@ -1184,10 +1214,10 @@ nvmem_cell_get_from_lookup(struct device } #if IS_ENABLED(CONFIG_OF) @@ -273,7 +273,7 @@ Signed-off-by: Greg Kroah-Hartman mutex_lock(&nvmem_mutex); list_for_each_entry(iter, &nvmem->cells, node) { -@@ -1214,6 +1244,7 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1217,6 +1247,7 @@ struct nvmem_cell *of_nvmem_cell_get(str { struct device_node *cell_np, *nvmem_np; struct nvmem_device *nvmem; @@ -281,7 +281,7 @@ Signed-off-by: Greg Kroah-Hartman struct nvmem_cell *cell; int index = 0; -@@ -1234,12 +1265,16 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1237,12 +1268,16 @@ struct nvmem_cell *of_nvmem_cell_get(str if (IS_ERR(nvmem)) return ERR_CAST(nvmem); @@ -300,7 +300,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } EXPORT_SYMBOL_GPL(of_nvmem_cell_get); -@@ -1345,13 +1380,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put); +@@ -1348,13 +1383,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put); */ void nvmem_cell_put(struct nvmem_cell *cell) { @@ -320,7 +320,7 @@ Signed-off-by: Greg Kroah-Hartman { u8 *p, *b; int i, extra, bit_offset = cell->bit_offset; -@@ -1385,8 +1424,8 @@ static void nvmem_shift_read_buffer_in_p +@@ -1388,8 +1427,8 @@ static void nvmem_shift_read_buffer_in_p } static int __nvmem_cell_read(struct nvmem_device *nvmem, @@ -331,7 +331,7 @@ Signed-off-by: Greg Kroah-Hartman { int rc; -@@ -1417,18 +1456,18 @@ static int __nvmem_cell_read(struct nvme +@@ -1420,18 +1459,18 @@ static int __nvmem_cell_read(struct nvme */ void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) { @@ -353,7 +353,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) { kfree(buf); return ERR_PTR(rc); -@@ -1438,7 +1477,7 @@ void *nvmem_cell_read(struct nvmem_cell +@@ -1441,7 +1480,7 @@ void *nvmem_cell_read(struct nvmem_cell } EXPORT_SYMBOL_GPL(nvmem_cell_read); @@ -362,7 +362,7 @@ Signed-off-by: Greg Kroah-Hartman u8 *_buf, int len) { struct nvmem_device *nvmem = cell->nvmem; -@@ -1491,16 +1530,7 @@ err: +@@ -1494,16 +1533,7 @@ err: return ERR_PTR(rc); } @@ -380,7 +380,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_device *nvmem = cell->nvmem; int rc; -@@ -1526,6 +1556,21 @@ int nvmem_cell_write(struct nvmem_cell * +@@ -1529,6 +1559,21 @@ int nvmem_cell_write(struct nvmem_cell * return len; } @@ -402,7 +402,7 @@ Signed-off-by: Greg Kroah-Hartman EXPORT_SYMBOL_GPL(nvmem_cell_write); static int nvmem_cell_read_common(struct device *dev, const char *cell_id, -@@ -1628,7 +1673,7 @@ static const void *nvmem_cell_read_varia +@@ -1631,7 +1676,7 @@ static const void *nvmem_cell_read_varia if (IS_ERR(cell)) return cell; @@ -411,7 +411,7 @@ Signed-off-by: Greg Kroah-Hartman buf = nvmem_cell_read(cell, len); nvmem_cell_put(cell); if (IS_ERR(buf)) -@@ -1724,18 +1769,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab +@@ -1727,18 +1772,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) { @@ -433,7 +433,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) return rc; -@@ -1755,17 +1800,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read +@@ -1758,17 +1803,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read int nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) { diff --git a/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch b/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch index 420d2a5d7e..df264add24 100644 --- a/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch +++ b/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch @@ -30,7 +30,7 @@ Signed-off-by: Greg Kroah-Hartman struct gpio_desc *wp_gpio; void *priv; }; -@@ -797,6 +798,7 @@ struct nvmem_device *nvmem_register(cons +@@ -799,6 +800,7 @@ struct nvmem_device *nvmem_register(cons nvmem->type = config->type; nvmem->reg_read = config->reg_read; nvmem->reg_write = config->reg_write; @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem->keepout = config->keepout; nvmem->nkeepout = config->nkeepout; if (config->of_node) -@@ -1438,6 +1440,13 @@ static int __nvmem_cell_read(struct nvme +@@ -1441,6 +1443,13 @@ static int __nvmem_cell_read(struct nvme if (cell->bit_offset || cell->nbits) nvmem_shift_read_buffer_in_place(cell, buf); diff --git a/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch b/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch index c049e2a1ae..ca5357c8d9 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch @@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -940,28 +940,6 @@ struct nvmem_device *devm_nvmem_register +@@ -943,28 +943,6 @@ struct nvmem_device *devm_nvmem_register } EXPORT_SYMBOL_GPL(devm_nvmem_register); diff --git a/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch b/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch index c714fa1a16..b71a0a365b 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch @@ -16,7 +16,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -902,9 +902,9 @@ void nvmem_unregister(struct nvmem_devic +@@ -905,9 +905,9 @@ void nvmem_unregister(struct nvmem_devic } EXPORT_SYMBOL_GPL(nvmem_unregister); @@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman } /** -@@ -921,20 +921,16 @@ static void devm_nvmem_release(struct de +@@ -924,20 +924,16 @@ static void devm_nvmem_release(struct de struct nvmem_device *devm_nvmem_register(struct device *dev, const struct nvmem_config *config) { diff --git a/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch b/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch index dc96a9b88c..4f471f2667 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch @@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -898,7 +898,8 @@ static void nvmem_device_release(struct +@@ -901,7 +901,8 @@ static void nvmem_device_release(struct */ void nvmem_unregister(struct nvmem_device *nvmem) { diff --git a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch index 07c5808403..a4c1b66c9e 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17953,6 +17953,11 @@ L: netdev@vger.kernel.org +@@ -17954,6 +17954,11 @@ L: netdev@vger.kernel.org S: Maintained F: drivers/net/ethernet/dlink/sundance.c diff --git a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch index eeffbdaf52..6503c7aa3b 100644 --- a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch +++ b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -12353,6 +12353,14 @@ S: Supported +@@ -12354,6 +12354,14 @@ S: Supported F: Documentation/devicetree/bindings/mtd/atmel-nand.txt F: drivers/mtd/nand/raw/atmel/* diff --git a/target/linux/generic/backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch b/target/linux/generic/backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch deleted file mode 100644 index e2089e7b05..0000000000 --- a/target/linux/generic/backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5544e90c81261e82e02bbf7c6015a4b9c8c825ef Mon Sep 17 00:00:00 2001 -From: Gaosheng Cui -Date: Fri, 16 Sep 2022 13:20:50 +0100 -Subject: [PATCH] nvmem: core: add error handling for dev_set_name - -The type of return value of dev_set_name is int, which may return -wrong result, so we add error handling for it to reclaim memory -of nvmem resource, and return early when an error occurs. - -Signed-off-by: Gaosheng Cui -Signed-off-by: Srinivas Kandagatla -Link: https://lore.kernel.org/r/20220916122100.170016-4-srinivas.kandagatla@linaro.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/nvmem/core.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - ---- a/drivers/nvmem/core.c -+++ b/drivers/nvmem/core.c -@@ -809,18 +809,24 @@ struct nvmem_device *nvmem_register(cons - - switch (config->id) { - case NVMEM_DEVID_NONE: -- dev_set_name(&nvmem->dev, "%s", config->name); -+ rval = dev_set_name(&nvmem->dev, "%s", config->name); - break; - case NVMEM_DEVID_AUTO: -- dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id); -+ rval = dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id); - break; - default: -- dev_set_name(&nvmem->dev, "%s%d", -+ rval = dev_set_name(&nvmem->dev, "%s%d", - config->name ? : "nvmem", - config->name ? config->id : nvmem->id); - break; - } - -+ if (rval) { -+ ida_free(&nvmem_ida, nvmem->id); -+ kfree(nvmem); -+ return ERR_PTR(rval); -+ } -+ - nvmem->read_only = device_property_present(config->dev, "read-only") || - config->read_only || !nvmem->reg_write; - diff --git a/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch b/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch index 99a9907f6f..a229c303ad 100644 --- a/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch +++ b/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -1240,16 +1240,21 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1237,16 +1237,21 @@ struct nvmem_cell *of_nvmem_cell_get(str if (!cell_np) return ERR_PTR(-ENOENT); diff --git a/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch b/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch index cefc4c89c7..454d3bf0ed 100644 --- a/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch +++ b/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch @@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman }; static DEFINE_MUTEX(nvmem_mutex); -@@ -1125,7 +1126,8 @@ struct nvmem_device *devm_nvmem_device_g +@@ -1122,7 +1123,8 @@ struct nvmem_device *devm_nvmem_device_g } EXPORT_SYMBOL_GPL(devm_nvmem_device_get); @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_cell *cell; const char *name = NULL; -@@ -1144,6 +1146,7 @@ static struct nvmem_cell *nvmem_create_c +@@ -1141,6 +1143,7 @@ static struct nvmem_cell *nvmem_create_c cell->id = name; cell->entry = entry; @@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } -@@ -1182,7 +1185,7 @@ nvmem_cell_get_from_lookup(struct device +@@ -1179,7 +1182,7 @@ nvmem_cell_get_from_lookup(struct device __nvmem_device_put(nvmem); cell = ERR_PTR(-ENOENT); } else { @@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); } -@@ -1230,15 +1233,27 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1227,15 +1230,27 @@ struct nvmem_cell *of_nvmem_cell_get(str struct nvmem_device *nvmem; struct nvmem_cell_entry *cell_entry; struct nvmem_cell *cell; @@ -105,7 +105,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem_np = of_get_parent(cell_np); if (!nvmem_np) { -@@ -1260,7 +1275,7 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1257,7 +1272,7 @@ struct nvmem_cell *of_nvmem_cell_get(str return ERR_PTR(-ENOENT); } @@ -114,7 +114,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); -@@ -1413,8 +1428,8 @@ static void nvmem_shift_read_buffer_in_p +@@ -1410,8 +1425,8 @@ static void nvmem_shift_read_buffer_in_p } static int __nvmem_cell_read(struct nvmem_device *nvmem, @@ -125,7 +125,7 @@ Signed-off-by: Greg Kroah-Hartman { int rc; -@@ -1428,7 +1443,7 @@ static int __nvmem_cell_read(struct nvme +@@ -1425,7 +1440,7 @@ static int __nvmem_cell_read(struct nvme nvmem_shift_read_buffer_in_place(cell, buf); if (nvmem->cell_post_process) { @@ -134,7 +134,7 @@ Signed-off-by: Greg Kroah-Hartman cell->offset, buf, cell->bytes); if (rc) return rc; -@@ -1463,7 +1478,7 @@ void *nvmem_cell_read(struct nvmem_cell +@@ -1460,7 +1475,7 @@ void *nvmem_cell_read(struct nvmem_cell if (!buf) return ERR_PTR(-ENOMEM); @@ -143,7 +143,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) { kfree(buf); return ERR_PTR(rc); -@@ -1776,7 +1791,7 @@ ssize_t nvmem_device_cell_read(struct nv +@@ -1773,7 +1788,7 @@ ssize_t nvmem_device_cell_read(struct nv if (rc) return rc; diff --git a/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch b/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch new file mode 100644 index 0000000000..0d4fe819f0 --- /dev/null +++ b/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch @@ -0,0 +1,98 @@ +From a621c4fdc7e1ef6b9aabe083d57bf6a637fdaf76 Mon Sep 17 00:00:00 2001 +From: Kuniyuki Iwashima +Date: Mon, 27 Feb 2023 13:15:48 -0800 +Subject: [PATCH] net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from + sk_stream_kill_queues(). + +commit 62ec33b44e0f7168ff2886520fec6fb62d03b5a3 upstream. + +Christoph Paasch reported that commit b5fc29233d28 ("inet6: Remove +inet6_destroy_sock() in sk->sk_prot->destroy().") started triggering +WARN_ON_ONCE(sk->sk_forward_alloc) in sk_stream_kill_queues(). [0 - 2] +Also, we can reproduce it by a program in [3]. + +In the commit, we delay freeing ipv6_pinfo.pktoptions from sk->destroy() +to sk->sk_destruct(), so sk->sk_forward_alloc is no longer zero in +inet_csk_destroy_sock(). + +The same check has been in inet_sock_destruct() from at least v2.6, +we can just remove the WARN_ON_ONCE(). However, among the users of +sk_stream_kill_queues(), only CAIF is not calling inet_sock_destruct(). +Thus, we add the same WARN_ON_ONCE() to caif_sock_destructor(). + +[0]: https://lore.kernel.org/netdev/39725AB4-88F1-41B3-B07F-949C5CAEFF4F@icloud.com/ +[1]: https://github.com/multipath-tcp/mptcp_net-next/issues/341 +[2]: +WARNING: CPU: 0 PID: 3232 at net/core/stream.c:212 sk_stream_kill_queues+0x2f9/0x3e0 +Modules linked in: +CPU: 0 PID: 3232 Comm: syz-executor.0 Not tainted 6.2.0-rc5ab24eb4698afbe147b424149c529e2a43ec24eb5 #2 +Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 +RIP: 0010:sk_stream_kill_queues+0x2f9/0x3e0 +Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 08 01 00 00 e9 60 ff ff ff e8 d0 5f b6 fe 0f 0b eb 97 e8 c7 5f b6 fe <0f> 0b eb a0 e8 be 5f b6 fe 0f 0b e9 6a fe ff ff e8 02 07 e3 fe e9 +RSP: 0018:ffff88810570fc68 EFLAGS: 00010293 +RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 +RDX: ffff888101f38f40 RSI: ffffffff8285e529 RDI: 0000000000000005 +RBP: 0000000000000ce0 R08: 0000000000000005 R09: 0000000000000000 +R10: 0000000000000ce0 R11: 0000000000000001 R12: ffff8881009e9488 +R13: ffffffff84af2cc0 R14: 0000000000000000 R15: ffff8881009e9458 +FS: 00007f7fdfbd5800(0000) GS:ffff88811b600000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 0000001b32923000 CR3: 00000001062fc006 CR4: 0000000000170ef0 +Call Trace: + + inet_csk_destroy_sock+0x1a1/0x320 + __tcp_close+0xab6/0xe90 + tcp_close+0x30/0xc0 + inet_release+0xe9/0x1f0 + inet6_release+0x4c/0x70 + __sock_release+0xd2/0x280 + sock_close+0x15/0x20 + __fput+0x252/0xa20 + task_work_run+0x169/0x250 + exit_to_user_mode_prepare+0x113/0x120 + syscall_exit_to_user_mode+0x1d/0x40 + do_syscall_64+0x48/0x90 + entry_SYSCALL_64_after_hwframe+0x72/0xdc +RIP: 0033:0x7f7fdf7ae28d +Code: c1 20 00 00 75 10 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 37 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 +RSP: 002b:00000000007dfbb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 +RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7fdf7ae28d +RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003 +RBP: 0000000000000000 R08: 000000007f338e0f R09: 0000000000000e0f +R10: 000000007f338e13 R11: 0000000000000293 R12: 00007f7fdefff000 +R13: 00007f7fdefffcd8 R14: 00007f7fdefffce0 R15: 00007f7fdefffcd8 + + +[3]: https://lore.kernel.org/netdev/20230208004245.83497-1-kuniyu@amazon.com/ + +Fixes: b5fc29233d28 ("inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().") +Reported-by: syzbot +Reported-by: Christoph Paasch +Signed-off-by: Kuniyuki Iwashima +Reviewed-by: Eric Dumazet +Signed-off-by: Jakub Kicinski +--- + net/caif/caif_socket.c | 1 + + net/core/stream.c | 1 - + 2 files changed, 1 insertion(+), 1 deletion(-) + +--- a/net/caif/caif_socket.c ++++ b/net/caif/caif_socket.c +@@ -1020,6 +1020,7 @@ static void caif_sock_destructor(struct + return; + } + sk_stream_kill_queues(&cf_sk->sk); ++ WARN_ON(sk->sk_forward_alloc); + caif_free_client(&cf_sk->layer); + } + +--- a/net/core/stream.c ++++ b/net/core/stream.c +@@ -209,7 +209,6 @@ void sk_stream_kill_queues(struct sock * + sk_mem_reclaim(sk); + + WARN_ON(sk->sk_wmem_queued); +- WARN_ON(sk->sk_forward_alloc); + + /* It is _impossible_ for the backlog to contain anything + * when we get here. All user references to this socket diff --git a/target/linux/generic/hack-5.15/204-module_strip.patch b/target/linux/generic/hack-5.15/204-module_strip.patch index 979daa4727..dd5d93e226 100644 --- a/target/linux/generic/hack-5.15/204-module_strip.patch +++ b/target/linux/generic/hack-5.15/204-module_strip.patch @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -2352,6 +2352,13 @@ config UNUSED_KSYMS_WHITELIST +@@ -2356,6 +2356,13 @@ config UNUSED_KSYMS_WHITELIST one per line. The path can be absolute, or relative to the kernel source tree. diff --git a/target/linux/generic/hack-5.15/253-ksmbd-config.patch b/target/linux/generic/hack-5.15/253-ksmbd-config.patch index a29cf3bf61..b8cb94f62b 100644 --- a/target/linux/generic/hack-5.15/253-ksmbd-config.patch +++ b/target/linux/generic/hack-5.15/253-ksmbd-config.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string --- a/init/Kconfig +++ b/init/Kconfig -@@ -2384,7 +2384,7 @@ config PADATA +@@ -2388,7 +2388,7 @@ config PADATA bool config ASN1 diff --git a/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch b/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch index e27ac3595f..4f3af6c6b0 100644 --- a/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch +++ b/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -25,6 +25,14 @@ static struct sk_buff *mtk_tag_xmit(stru +@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru u8 xmit_tpid; u8 *mtk_tag; @@ -21,8 +21,7 @@ Signed-off-by: Felix Fietkau + * corrupted. With tags enabled, we need to make sure that packets are + * at least 68 bytes (including FCS and tag). + */ -+ if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) -+ return NULL; ++ eth_skb_pad(skb); + /* Build the special tag after the MAC Source Address. If VLAN header * is present, it's required that VLAN header and special tag is diff --git a/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch index b525976fc9..930d0ff0fe 100644 --- a/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch +++ b/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1443,6 +1443,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW +@@ -1447,6 +1447,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW the unaligned access emulation. see arch/parisc/kernel/unaligned.c for reference diff --git a/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch b/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch index e27ac3595f..4f3af6c6b0 100644 --- a/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch +++ b/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -25,6 +25,14 @@ static struct sk_buff *mtk_tag_xmit(stru +@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru u8 xmit_tpid; u8 *mtk_tag; @@ -21,8 +21,7 @@ Signed-off-by: Felix Fietkau + * corrupted. With tags enabled, we need to make sure that packets are + * at least 68 bytes (including FCS and tag). + */ -+ if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) -+ return NULL; ++ eth_skb_pad(skb); + /* Build the special tag after the MAC Source Address. If VLAN header * is present, it's required that VLAN header and special tag is diff --git a/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch b/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch index 7739366ade..e8c9631819 100644 --- a/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch +++ b/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch @@ -9,9 +9,9 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -33,6 +33,8 @@ static struct sk_buff *mtk_tag_xmit(stru - if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) - return NULL; +@@ -32,6 +32,8 @@ static struct sk_buff *mtk_tag_xmit(stru + */ + eth_skb_pad(skb); + skb_set_queue_mapping(skb, dp->index); + diff --git a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch index 2a02efe0aa..5f0a106ae4 100644 --- a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1810,6 +1810,15 @@ config EMBEDDED +@@ -1814,6 +1814,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-4i-edge-200.dts b/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-4i-edge-200.dts index 143dac97fe..8e6c198c5e 100644 --- a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-4i-edge-200.dts +++ b/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-4i-edge-200.dts @@ -112,7 +112,6 @@ port@5 { reg = <5>; - label = "cpu"; phy-mode = "rgmii-id"; ethernet = <ð0port>; diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts b/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts index f8f940dfc6..d0f2e35343 100644 --- a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts +++ b/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts @@ -125,7 +125,6 @@ port@5 { reg = <5>; - label = "cpu"; ethernet = <ð0port>; fixed-link { speed = <1000>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi index 7fa2fac1ef..e4c9be8f87 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi @@ -447,7 +447,6 @@ port@6 { reg = <0x6>; - label = "cpu"; phy-mode = "internal"; ethernet = <ð0>; diff --git a/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch b/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch index 00c8e869be..784c13085d 100644 --- a/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch +++ b/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch @@ -854,7 +854,7 @@ Signed-off-by: Pawel Dembicki +}; --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -7526,6 +7526,14 @@ F: drivers/ptp/ptp_qoriq.c +@@ -7527,6 +7527,14 @@ F: drivers/ptp/ptp_qoriq.c F: drivers/ptp/ptp_qoriq_debugfs.c F: include/linux/fsl/ptp_qoriq.h diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts index fdbcbc18bc..c7e11c80b0 100644 --- a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts +++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts @@ -258,7 +258,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi index 1fe839575e..abac02a72d 100644 --- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi +++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi @@ -181,7 +181,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts index 181abb915c..3846fabbed 100644 --- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts +++ b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts @@ -191,7 +191,6 @@ port@6 { ethernet = <&gmac0>; - label = "cpu"; phy-mode = "2500base-x"; reg = <6>; diff --git a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi index 5a1cd99f61..a240f9bfce 100644 --- a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi +++ b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi @@ -137,7 +137,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts index 9661d0c7fb..ecc25fd328 100644 --- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts +++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts @@ -196,7 +196,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi b/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi index 50c7f3e88e..a4e443a0fb 100644 --- a/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi +++ b/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi @@ -178,7 +178,6 @@ cpu_port0: port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "trgmii"; diff --git a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts index b40ac52848..dc1868a066 100644 --- a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts +++ b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts @@ -161,7 +161,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts index 8e47cb8579..4d118b0fbc 100644 --- a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts +++ b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts @@ -223,7 +223,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi index cd74fbec74..101b81f8a9 100644 --- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi +++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi @@ -234,7 +234,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi index 3fbe288dae..b63692c161 100644 --- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi +++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi @@ -350,7 +350,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts index 52b6c152fe..85465223cf 100644 --- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -139,7 +139,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "2500base-x"; diff --git a/target/linux/mediatek/filogic/target.mk b/target/linux/mediatek/filogic/target.mk index 0c5bf4844e..7775fb218d 100644 --- a/target/linux/mediatek/filogic/target.mk +++ b/target/linux/mediatek/filogic/target.mk @@ -2,7 +2,7 @@ ARCH:=aarch64 SUBTARGET:=filogic BOARDNAME:=Filogic 830 (MT7986) CPU_TYPE:=cortex-a53 -DEFAULT_PACKAGES += kmod-crypto-hw-safexcel kmod-mt7915e kmod-mt7986-firmware wpad-basic-wolfssl uboot-envtools +DEFAULT_PACKAGES += kmod-crypto-hw-safexcel kmod-mt7915e kmod-mt7986-firmware wpad-basic-openssl uboot-envtools mt7986-wo-firmware KERNELNAME:=Image dtbs define Target/Description diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network index c613a3cd60..d2229fe6bf 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network @@ -61,6 +61,7 @@ mvebu_setup_macs() local label_mac="" case "$board" in + buffalo,ls220de|\ buffalo,ls421de) lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr) ;; diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh index 18b978d437..9019c1aeff 100755 --- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh @@ -25,6 +25,13 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in + buffalo,ls220de) + # Kernel UBI volume name must be "boot" + CI_KERNPART=boot + CI_KERN_UBIPART=ubi_kernel + CI_ROOT_UBIPART=ubi + nand_do_upgrade "$1" + ;; buffalo,ls421de) nand_do_upgrade "$1" ;; diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts new file mode 100644 index 0000000000..3de9ac5473 --- /dev/null +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts @@ -0,0 +1,380 @@ +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) +/* + * Device Tree file for Buffalo LinkStation LS220DE + * + * Copyright (C) 2023 Daniel González Cabanelas + */ + +/dts-v1/; + +#include "armada-370.dtsi" +#include "mvebu-linkstation-fan.dtsi" +#include +#include +#include +#include + +/ { + model = "Buffalo LinkStation LS220DE"; + compatible = "buffalo,ls220de", "marvell,armada370", "marvell,armada-370-xp"; + + aliases { + led-boot = &led_boot; + led-failsafe = &led_failsafe; + led-running = &led_power; + led-upgrade = &led_upgrade; + }; + + chosen { + bootargs = "earlycon"; + stdout-path = "serial0:115200n8"; + append-rootblock = "nullparameter="; /* override the bootloader args */ + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; /* 256 MB */ + }; + + soc { + ranges = ; + }; + + system_fan: gpio_fan { + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH + &gpio0 14 GPIO_ACTIVE_HIGH>; + alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + + #cooling-cells = <2>; + }; + + thermal-zones { + hdd-thermal { + polling-delay = <20000>; + polling-delay-passive = <2000>; + + thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */ + + trips { + hdd_alert1: trip1 { + temperature = <34000>; + hysteresis = <2000>; + type = "active"; + }; + hdd_alert2: trip2 { + temperature = <40000>; + hysteresis = <2000>; + type = "active"; + }; + hdd_alert3: trip3 { + temperature = <45000>; + hysteresis = <2000>; + type = "passive"; + }; + hdd_hot { + temperature = <50000>; + hysteresis = <2000>; + type = "hot"; + }; + hdd_crit { + temperature = <60000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map1 { + trip = <&hdd_alert1>; + cooling-device = <&system_fan THERMAL_NO_LIMIT 1>; + }; + map2 { + trip = <&hdd_alert2>; + cooling-device = <&system_fan 2 2>; + }; + map3 { + trip = <&hdd_alert3>; + cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>; + }; + }; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + pinctrl-0 = <&pmx_buttons>; + pinctrl-names = "default"; + + power { + label = "Power Switch"; + linux,code = ; + linux,input-type = ; + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + }; + + function { + label = "Function Button"; + linux,code = ; + gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; + }; + }; + + gpio_leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_leds1 &pmx_leds2>; + + indicator_red { + function = LED_FUNCTION_INDICATOR; + color = ; + gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + panic-indicator; + }; + + led_power: power_white { + label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led_failsafe: power_red { + label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; + }; + + led_upgrade: power_orange { + label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; + }; + + led_boot: indicator_white { + label = "white:indicator"; + function = LED_FUNCTION_INDICATOR; + color = ; + gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; + }; + + hdd1_red { + function = LED_FUNCTION_DISK; + color = ; + gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "ata1"; + function-enumerator = <1>; + }; + + hdd2_red { + function = LED_FUNCTION_DISK; + color = ; + gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "ata2"; + function-enumerator = <2>; + }; + }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&pmx_power_hdd1 &pmx_power_hdd2>; + pinctrl-names = "default"; + + sata1_power: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "HDD1"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + startup-delay-us = <2000000>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>; + }; + + sata2_power: regulator@2 { + compatible = "regulator-fixed"; + reg = <2>; + regulator-name = "HDD2"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + startup-delay-us = <4000000>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&coherencyfab { + broken-idle; +}; + +ð1 { + pinctrl-0 = <&ge1_rgmii_pins>; + pinctrl-names = "default"; + status = "okay"; + phy-handle = <ðphy0>; + phy-connection-type = "rgmii-id"; +}; + +&mdio { + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + + ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */ + reg = <0>; + marvell,reg-init = <0x3 0x10 0xf000 0x091A>, /* LED function */ + <0x3 0x11 0x0000 0x4401>, /* LED polarity */ + <0x3 0x12 0x0000 0x4905>; /* LED timer */ + #thermal-sensor-cells = <0>; + }; +}; + +&nand_controller { + status = "okay"; + + nand@0 { + reg = <0>; + label = "pxa3xx_nand-0"; + nand-rb = <0>; + marvell,nand-keep-config; + nand-on-flash-bbt; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ubi_kernel"; + reg = <0x00000000 0x02000000>; /* 32 MiB */ + }; + + partition@2000000 { + label = "ubi"; + reg = <0x02000000 0x1df00000>; /* 479 MiB */ + }; + }; + }; +}; + +&sata { + nr-ports = <2>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + hdd0_temp: sata-port@0 { + reg = <0>; + #thermal-sensor-cells = <0>; + }; + + hdd1_temp: sata-port@1 { + reg = <1>; + #thermal-sensor-cells = <0>; + }; +}; + +&spi0 { + status = "okay"; + pinctrl-0 = <&spi0_pins2>; + pinctrl-names = "default"; + + spi-flash@0 { + compatible = "mxicy,mx25l8005", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x00000 0xf0000>; /* 960 KiB*/ + label = "u-boot"; + read-only; + }; + partition@f0000 { + reg = <0xf0000 0x10000>; /* 64 KiB */ + label = "u-boot-env"; + }; + }; + }; +}; + +&pmsu { + pinctrl-0 = <&pmx_power_cpu>; + pinctrl-names = "default"; +}; + +&uart0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&pinctrl { + pmx_power_hdd2: pmx-power-hdd2 { + marvell,pins = "mpp2"; + marvell,function = "gpio"; + }; + + pmx_power_cpu: pmx-power-cpu { + marvell,pins = "mpp4"; + marvell,function = "vdd"; + }; + + pmx_power_hdd1: pmx-power-hdd1 { + marvell,pins = "mpp8"; + marvell,function = "gpio"; + }; + + pmx_fan_lock: pmx-fan-lock { + marvell,pins = "mpp10"; + marvell,function = "gpio"; + }; + + pmx_hdd_present: pmx-hdd-present { + marvell,pins = "mpp11", "mpp12"; + marvell,function = "gpio"; + }; + + pmx_fan_high: pmx-fan-high { + marvell,pins = "mpp13"; + marvell,function = "gpio"; + }; + + pmx_fan_low: pmx-fan-low { + marvell,pins = "mpp14"; + marvell,function = "gpio"; + }; + + pmx_buttons: pmx-buttons { + marvell,pins = "mpp15", "mpp16"; + marvell,function = "gpio"; + }; + + pmx_leds1: pmx-leds { + marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61"; + marvell,function = "gpo"; + }; + + pmx_leds2: pmx-leds { + marvell,pins = "mpp55", "mpp57", "mpp62"; + marvell,function = "gpio"; + }; +}; diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts index 669b67e5a9..1a6594e3cd 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts @@ -184,7 +184,6 @@ switch0port0: port@0 { reg = <0>; - label = "cpu"; ethernet = <ð0>; }; diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts index 72d7267ccd..8d163059a0 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts @@ -175,7 +175,6 @@ port@0 { reg = <0>; - label = "cpu"; ethernet = <ð0>; }; diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts index c4e11b5049..26804a4875 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts @@ -339,7 +339,6 @@ port@5 { reg = <5>; - label = "cpu"; ethernet = <&cp0_eth1>; phy-mode = "2500base-x"; managed = "in-band-status"; diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index b0498d34c9..57129d2dcb 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -53,6 +53,16 @@ define Build/buffalo-kernel-jffs2 rm -rf $(KDIR)/kernel_jffs2 $@.fakerd endef +define Build/buffalo-kernel-ubifs + rm -rf $@-ubidir + mkdir -p $@-ubidir + mv $@ $@-ubidir/uImage.buffalo + touch $@ + $(call Build/append-uImage-fakehdr, ramdisk) + mv $@ $@-ubidir/initrd.buffalo + $(STAGING_DIR_HOST)/bin/mkfs.ubifs $(KERNEL_UBIFS_OPTS) -r $@-ubidir $@ +endef + # Some info about Ctera firmware: # 1. It's simple tar file (GNU standard), but it must have ".firm" suffix. # 2. It contains two images: kernel and romdisk. Both are required. diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 1412e78010..6a3a79128d 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -14,6 +14,21 @@ define Device/kernel-size-migration Upgrade via sysupgrade mechanism is not possible, so new installation via factory style image is required. endef +define Device/buffalo_ls220de + $(Device/NAND-128K) + DEVICE_VENDOR := Buffalo + DEVICE_MODEL := LinkStation LS220DE + KERNEL_UBIFS_OPTS = -m $$(PAGESIZE) -e 124KiB -c 172 -x none + KERNEL := kernel-bin | append-dtb | uImage none | buffalo-kernel-ubifs + KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none + DEVICE_DTS := armada-370-buffalo-ls220de + DEVICE_PACKAGES := \ + kmod-hwmon-gpiofan kmod-hwmon-drivetemp kmod-linkstation-poweroff \ + kmod-md-mod kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-fs-xfs \ + mdadm mkf2fs e2fsprogs partx-utils +endef +TARGET_DEVICES += buffalo_ls220de + define Device/buffalo_ls421de $(Device/NAND-128K) DEVICE_VENDOR := Buffalo diff --git a/target/linux/mvebu/patches-5.15/105-power-reset-linkstation-poweroff-add-ls220de.patch b/target/linux/mvebu/patches-5.15/105-power-reset-linkstation-poweroff-add-ls220de.patch new file mode 100644 index 0000000000..3223861234 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/105-power-reset-linkstation-poweroff-add-ls220de.patch @@ -0,0 +1,15 @@ +--- a/drivers/power/reset/linkstation-poweroff.c ++++ b/drivers/power/reset/linkstation-poweroff.c +@@ -142,6 +142,12 @@ static void linkstation_poweroff(void) + } + + static const struct of_device_id ls_poweroff_of_match[] = { ++ { .compatible = "buffalo,ls220d", ++ .data = &linkstation_power_off_cfg, ++ }, ++ { .compatible = "buffalo,ls220de", ++ .data = &linkstation_power_off_cfg, ++ }, + { .compatible = "buffalo,ls421d", + .data = &linkstation_power_off_cfg, + }, diff --git a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch index b8accf180b..7d27ae2e99 100644 --- a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch +++ b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch @@ -16,7 +16,7 @@ Cc: Robert Marko --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9063,6 +9063,22 @@ F: include/net/nl802154.h +@@ -9064,6 +9064,22 @@ F: include/net/nl802154.h F: net/ieee802154/ F: net/mac802154/ diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile index 50c5cd6d21..57250a5e01 100644 --- a/target/linux/octeontx/Makefile +++ b/target/linux/octeontx/Makefile @@ -10,8 +10,7 @@ BOARDNAME:=Octeon-TX FEATURES:=squashfs ramdisk targz pcie gpio rtc usb fpu SUBTARGETS:=generic -KERNEL_PATCHVER:=5.10 -KERNEL_TESTING_PATCHVER:=5.15 +KERNEL_PATCHVER:=5.15 define Target/Description Build images for Octeon-TX CN80XX/CN81XX based boards @@ -21,4 +20,9 @@ include $(INCLUDE_DIR)/target.mk KERNELNAME:=Image +DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid \ + kmod-hwmon-gsc kmod-leds-gpio kmod-pps-gpio \ + kmod-gpio-button-hotplug kmod-input-evdev kmod-rtc-ds1672 \ + kmod-can kmod-can-mcp251x + $(eval $(call BuildTarget)) diff --git a/target/linux/octeontx/config-5.10 b/target/linux/octeontx/config-5.10 deleted file mode 100644 index 19a8c258d9..0000000000 --- a/target/linux/octeontx/config-5.10 +++ /dev/null @@ -1,413 +0,0 @@ -CONFIG_64BIT=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_ARCH_HIBERNATION_HEADER=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_KEEP_MEMBLOCK=y -CONFIG_ARCH_MMAP_RND_BITS=18 -CONFIG_ARCH_MMAP_RND_BITS_MAX=33 -CONFIG_ARCH_MMAP_RND_BITS_MIN=18 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 -CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_STACKWALK=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARCH_THUNDER=y -CONFIG_ARM64=y -CONFIG_ARM64_4K_PAGES=y -CONFIG_ARM64_CNP=y -CONFIG_ARM64_CRYPTO=y -CONFIG_ARM64_ERRATUM_819472=y -CONFIG_ARM64_ERRATUM_824069=y -CONFIG_ARM64_ERRATUM_826319=y -CONFIG_ARM64_ERRATUM_827319=y -CONFIG_ARM64_ERRATUM_843419=y -CONFIG_ARM64_HW_AFDBM=y -CONFIG_ARM64_MODULE_PLTS=y -CONFIG_ARM64_PAGE_SHIFT=12 -CONFIG_ARM64_PAN=y -CONFIG_ARM64_PA_BITS=48 -CONFIG_ARM64_PA_BITS_48=y -CONFIG_ARM64_PTR_AUTH=y -CONFIG_ARM64_SVE=y -CONFIG_ARM64_TAGGED_ADDR_ABI=y -CONFIG_ARM64_UAO=y -CONFIG_ARM64_VA_BITS=48 -# CONFIG_ARM64_VA_BITS_39 is not set -CONFIG_ARM64_VA_BITS_48=y -CONFIG_ARM64_VHE=y -CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y -CONFIG_ARM_AMBA=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -CONFIG_ARM_CPUIDLE=y -CONFIG_ARM_GIC=y -CONFIG_ARM_GIC_V2M=y -CONFIG_ARM_GIC_V3=y -CONFIG_ARM_GIC_V3_ITS=y -CONFIG_ARM_GIC_V3_ITS_PCI=y -CONFIG_ARM_PSCI_FW=y -CONFIG_ARM_SBSA_WATCHDOG=y -CONFIG_ATA=y -# CONFIG_ATA_SFF is not set -CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y -CONFIG_BALLOON_COMPACTION=y -CONFIG_BLK_DEV_BSG=y -CONFIG_BLK_DEV_BSGLIB=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_MQ_PCI=y -CONFIG_BLK_MQ_VIRTIO=y -CONFIG_BLK_PM=y -CONFIG_BLK_SCSI_REQUEST=y -CONFIG_CAVIUM_ERRATUM_22375=y -CONFIG_CAVIUM_ERRATUM_23144=y -CONFIG_CAVIUM_ERRATUM_23154=y -CONFIG_CAVIUM_ERRATUM_27456=y -CONFIG_CAVIUM_ERRATUM_30115=y -CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y -CONFIG_CLKDEV_LOOKUP=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_CMA=y -CONFIG_CMA_ALIGNMENT=8 -CONFIG_CMA_AREAS=7 -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_SIZE_MBYTES=16 -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -CONFIG_COMMON_CLK=y -CONFIG_COMMON_CLK_CS2000_CP=y -# CONFIG_COMPAT_32BIT_TIME is not set -CONFIG_CONFIGFS_FS=y -CONFIG_CONTIG_ALLOC=y -CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_PM=y -CONFIG_CPU_RMAP=y -CONFIG_CRASH_CORE=y -CONFIG_CRASH_DUMP=y -CONFIG_CRC16=y -CONFIG_CRC7=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC_T10DIF=y -CONFIG_CRYPTO_AES_ARM64=y -CONFIG_CRYPTO_AES_ARM64_CE=y -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -CONFIG_CRYPTO_AES_ARM64_CE_CCM=y -CONFIG_CRYPTO_ANSI_CPRNG=y -CONFIG_CRYPTO_BLAKE2S=y -CONFIG_CRYPTO_CRC32=y -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRCT10DIF=y -CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y -CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_DRBG_HMAC=y -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_GHASH_ARM64_CE=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_JITTERENTROPY=y -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA1_ARM64_CE=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA256_ARM64=y -CONFIG_CRYPTO_SHA2_ARM64_CE=y -CONFIG_CRYPTO_SIMD=y -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_DMADEVICES=y -CONFIG_DMA_CMA=y -CONFIG_DMA_DIRECT_REMAP=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_OF=y -CONFIG_DMA_PERNUMA_CMA=y -CONFIG_DMA_REMAP=y -CONFIG_DMA_SHARED_BUFFER=y -CONFIG_DTC=y -CONFIG_DT_IDLE_STATES=y -CONFIG_EDAC=y -# CONFIG_EDAC_DEBUG is not set -# CONFIG_EDAC_DMC520 is not set -CONFIG_EDAC_LEGACY_SYSFS=y -CONFIG_EDAC_SUPPORT=y -CONFIG_EDAC_THUNDERX=y -# CONFIG_EDAC_XGENE is not set -CONFIG_EEPROM_AT24=y -CONFIG_FAT_FS=y -CONFIG_FIXED_PHY=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_FRAME_POINTER=y -CONFIG_FREEZER=y -CONFIG_FW_CACHE=y -CONFIG_FW_LOADER_PAGED_BUF=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_ARCH_TOPOLOGY=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_VULNERABILITIES=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_EARLY_IOREMAP=y -CONFIG_GENERIC_GETTIMEOFDAY=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_MIGRATION=y -CONFIG_GENERIC_IRQ_MULTI_HANDLER=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_GENERIC_MSI_IRQ=y -CONFIG_GENERIC_MSI_IRQ_DOMAIN=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_PHY=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GLOB=y -CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y -CONFIG_GPIO_THUNDERX=y -CONFIG_HANDLE_DOMAIN_IRQ=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_HIBERNATION_SNAPSHOT_DEV=y -CONFIG_HOLES_IN_ZONE=y -CONFIG_HOTPLUG_CPU=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_HWSPINLOCK=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_CAVIUM=y -CONFIG_HW_RANDOM_OPTEE=y -CONFIG_I2C=y -CONFIG_I2C_ALGOBIT=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y -CONFIG_I2C_SMBUS=y -CONFIG_I2C_THUNDERX=y -CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -CONFIG_INITRAMFS_SOURCE="" -CONFIG_IRQCHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_TIME_ACCOUNTING=y -CONFIG_IRQ_WORK=y -# CONFIG_ISDN is not set -CONFIG_JUMP_LABEL=y -CONFIG_KEXEC=y -CONFIG_KEXEC_CORE=y -CONFIG_KSM=y -CONFIG_LIBFDT=y -CONFIG_LOCK_DEBUGGING_SUPPORT=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_MAILBOX=y -# CONFIG_MAILBOX_TEST is not set -CONFIG_MDIO_BUS=y -CONFIG_MDIO_CAVIUM=y -CONFIG_MDIO_DEVICE=y -CONFIG_MDIO_DEVRES=y -CONFIG_MDIO_THUNDER=y -CONFIG_MEMFD_CREATE=y -CONFIG_MEMORY_BALLOON=y -CONFIG_MEMORY_ISOLATION=y -CONFIG_MEMTEST=y -CONFIG_MFD_SYSCON=y -CONFIG_MIGRATION=y -CONFIG_MMC=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_CAVIUM_THUNDERX=y -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_MSDOS_FS=y -# CONFIG_MTD is not set -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y -CONFIG_NEED_SG_DMA_LENGTH=y -CONFIG_NET_FLOW_LIMIT=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NODES_SHIFT=2 -CONFIG_NO_HZ_COMMON=y -CONFIG_NO_HZ_IDLE=y -CONFIG_NR_CPUS=64 -CONFIG_NUMA=y -CONFIG_NUMA_BALANCING=y -CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y -CONFIG_NVMEM=y -CONFIG_NVMEM_SYSFS=y -CONFIG_OF=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_FLATTREE=y -CONFIG_OF_GPIO=y -CONFIG_OF_IRQ=y -CONFIG_OF_KOBJ=y -CONFIG_OF_MDIO=y -CONFIG_OF_NET=y -CONFIG_OF_NUMA=y -CONFIG_OPTEE=y -CONFIG_OPTEE_SHM_NUM_PRIV_PAGES=1 -CONFIG_PADATA=y -CONFIG_PAGE_REPORTING=y -CONFIG_PARAVIRT=y -CONFIG_PARTITION_PERCPU=y -CONFIG_PCI=y -CONFIG_PCIEAER=y -CONFIG_PCIEPORTBUS=y -CONFIG_PCIE_PME=y -CONFIG_PCI_ATS=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_DOMAINS_GENERIC=y -CONFIG_PCI_ECAM=y -CONFIG_PCI_HOST_COMMON=y -CONFIG_PCI_HOST_GENERIC=y -CONFIG_PCI_HOST_THUNDER_ECAM=y -CONFIG_PCI_HOST_THUNDER_PEM=y -CONFIG_PCI_IOV=y -CONFIG_PCI_MSI=y -CONFIG_PCI_MSI_IRQ_DOMAIN=y -CONFIG_PGTABLE_LEVELS=4 -CONFIG_PHYLIB=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_PM=y -CONFIG_PM_CLK=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_STD_PARTITION="" -CONFIG_POSIX_MQUEUE=y -CONFIG_POSIX_MQUEUE_SYSCTL=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_SYSCON=y -CONFIG_POWER_RESET_XGENE=y -CONFIG_POWER_SUPPLY=y -CONFIG_PROC_VMCORE=y -CONFIG_QUEUED_RWLOCKS=y -CONFIG_QUEUED_SPINLOCKS=y -CONFIG_RAS=y -CONFIG_RATIONAL=y -# CONFIG_RAVE_SP_CORE is not set -CONFIG_REBOOT_MODE=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_MMIO=y -CONFIG_RESET_CONTROLLER=y -CONFIG_RFS_ACCEL=y -CONFIG_RODATA_FULL_DEFAULT_ENABLED=y -CONFIG_RPS=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1672=y -CONFIG_RTC_I2C_AND_SPI=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_SATA_HOST=y -CONFIG_SCHED_INFO=y -CONFIG_SCHED_MC=y -CONFIG_SCSI=y -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_PROC_FS is not set -CONFIG_SCSI_SAS_ATA=y -CONFIG_SCSI_SAS_ATTRS=y -CONFIG_SCSI_SAS_HOST_SMP=y -CONFIG_SCSI_SAS_LIBSAS=y -CONFIG_SECCOMP=y -CONFIG_SECCOMP_FILTER=y -CONFIG_SERIAL_8250_DW=y -CONFIG_SERIAL_8250_DWLIB=y -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_DEV_BUS=y -CONFIG_SERIAL_DEV_CTRL_TTYPORT=y -CONFIG_SERIAL_MCTRL_GPIO=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_XILINX_PS_UART=y -CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y -CONFIG_SG_POOL=y -CONFIG_SMP=y -CONFIG_SPARSEMEM=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSE_IRQ=y -CONFIG_SPI=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_THUNDERX=y -CONFIG_SRAM=y -CONFIG_SRCU=y -CONFIG_SWIOTLB=y -CONFIG_SWPHY=y -CONFIG_SYNC_FILE=y -CONFIG_SYSCON_REBOOT_MODE=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASK_IO_ACCOUNTING=y -CONFIG_TASK_XACCT=y -CONFIG_TEE=y -CONFIG_THREAD_INFO_IN_TASK=y -CONFIG_THUNDER_NIC_BGX=y -CONFIG_THUNDER_NIC_PF=y -CONFIG_THUNDER_NIC_RGX=y -CONFIG_THUNDER_NIC_VF=y -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TIMER_OF=y -CONFIG_TIMER_PROBE=y -CONFIG_TRANSPARENT_HUGEPAGE=y -CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y -# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set -CONFIG_TREE_RCU=y -CONFIG_TREE_SRCU=y -CONFIG_UNMAP_KERNEL_AT_EL0=y -CONFIG_USB=y -CONFIG_USB_COMMON=y -CONFIG_USB_PCI=y -CONFIG_USB_SUPPORT=y -# CONFIG_USB_UHCI_HCD is not set -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_XHCI_PCI=y -CONFIG_USB_XHCI_PLATFORM=y -CONFIG_USE_PERCPU_NUMA_NODE_ID=y -CONFIG_VIRTIO=y -CONFIG_VIRTIO_BALLOON=y -# CONFIG_VIRTIO_BLK is not set -CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_NET is not set -CONFIG_VIRTIO_PCI=y -CONFIG_VIRTIO_PCI_LEGACY=y -CONFIG_VMAP_STACK=y -CONFIG_WATCHDOG_CORE=y -CONFIG_XARRAY_MULTI=y -CONFIG_XPS=y -CONFIG_XXHASH=y -CONFIG_ZONE_DMA32=y diff --git a/target/linux/octeontx/config-5.15 b/target/linux/octeontx/config-5.15 index 36402b70eb..40cab28f60 100644 --- a/target/linux/octeontx/config-5.15 +++ b/target/linux/octeontx/config-5.15 @@ -145,6 +145,8 @@ CONFIG_EDAC_SUPPORT=y CONFIG_EDAC_THUNDERX=y # CONFIG_EDAC_XGENE is not set CONFIG_EEPROM_AT24=y +CONFIG_EXT4_FS=y +CONFIG_F2FS_FS=y CONFIG_FAT_FS=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y diff --git a/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch deleted file mode 100644 index 28502d393f..0000000000 --- a/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch +++ /dev/null @@ -1,59 +0,0 @@ -From d0ff7a1bcfe886cab1a237895b08ac51ecfe10e7 Mon Sep 17 00:00:00 2001 -From: Tim Harvey -Date: Wed, 10 Apr 2019 08:00:47 -0700 -Subject: [PATCH 04/12] PCI: add quirk for Gateworks PLX PEX860x switch with - GPIO PERST# - -Gateworks boards use PLX PEX860x switches where downstream ports -have their PERST# driven from the PEX GPIO. - -Signed-off-by: Tim Harvey ---- - drivers/pci/quirks.c | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - ---- a/drivers/pci/quirks.c -+++ b/drivers/pci/quirks.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -5787,3 +5788,34 @@ static void nvidia_ion_ahci_fixup(struct - pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING; - } - DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup); -+ -+#ifdef CONFIG_PCI_HOST_THUNDER_PEM -+/* -+ * fixup for PLX PEX8909 bridge to configure GPIO1-7 as output High -+ * as they are used for slots1-7 PERST# -+ */ -+static void newport_pciesw_early_fixup(struct pci_dev *dev) -+{ -+ u32 dw; -+ -+ if (!of_machine_is_compatible("gw,newport")) -+ return; -+ -+ if (dev->devfn != 0) -+ return; -+ -+ dev_info(&dev->dev, "de-asserting PERST#\n"); -+ pci_read_config_dword(dev, 0x62c, &dw); -+ dw |= 0xaaa8; /* GPIO1-7 outputs */ -+ pci_write_config_dword(dev, 0x62c, dw); -+ -+ pci_read_config_dword(dev, 0x644, &dw); -+ dw |= 0xfe; /* GPIO1-7 output high */ -+ pci_write_config_dword(dev, 0x644, dw); -+ -+ msleep(100); -+} -+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8609, newport_pciesw_early_fixup); -+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8606, newport_pciesw_early_fixup); -+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8604, newport_pciesw_early_fixup); -+#endif /* CONFIG_PCI_HOST_THUNDER_PEM */ diff --git a/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts index 15dc5f445e..c611263099 100644 --- a/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts +++ b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts @@ -269,7 +269,6 @@ status = "disabled"; reg = "<5>"; - label = "cpu"; ethernet = <&enet2>; phy-mode = "rgmii-id"; @@ -281,7 +280,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&enet3>; phy-mode = "rgmii-id"; diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 46bc82149a..6eb671bc98 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -566,7 +566,6 @@ port@6 { reg = <6>; - label = "cpu"; ethernet = <&gmac0>; phy-mode = "rgmii"; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 6dc85d885f..d0568584dc 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -134,7 +134,7 @@ define Device/adslr_g7 IMAGE_SIZE := 16064k DEVICE_VENDOR := ADSLR DEVICE_MODEL := G7 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += adslr_g7 @@ -144,7 +144,7 @@ define Device/afoundry_ew1200 DEVICE_VENDOR := AFOUNDRY DEVICE_MODEL := EW1200 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += ew1200 endef TARGET_DEVICES += afoundry_ew1200 @@ -154,7 +154,7 @@ define Device/alfa-network_quad-e4g IMAGE_SIZE := 16064k DEVICE_VENDOR := ALFA Network DEVICE_MODEL := Quad-E4G - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \ + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ -wpad-basic-openssl SUPPORTED_DEVICES += quad-e4g endef @@ -163,7 +163,7 @@ TARGET_DEVICES += alfa-network_quad-e4g define Device/ampedwireless_ally_common $(Device/dsa-migration) DEVICE_VENDOR := Amped Wireless - DEVICE_PACKAGES := kmod-mt7615-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware IMAGE_SIZE := 32768k KERNEL_SIZE := 4096k BLOCKSIZE := 128k @@ -208,7 +208,7 @@ define Device/arcadyan_we420223-99 IMAGES += factory.trx IMAGE/factory.trx := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += arcadyan_we420223-99 @@ -217,7 +217,8 @@ define Device/asiarf_ap7621-001 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-001 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ + -wpad-basic-openssl -uboot-envtools endef TARGET_DEVICES += asiarf_ap7621-001 @@ -226,7 +227,8 @@ define Device/asiarf_ap7621-nv1 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-NV1 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ + -wpad-basic-openssl -uboot-envtools endef TARGET_DEVICES += asiarf_ap7621-nv1 @@ -238,7 +240,7 @@ define Device/asus_rp-ac56 IMAGE_SIZE := 16000k BLOCKSIZE := 64k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 \ - kmod-i2c-ralink kmod-sound-mt7620 + kmod-i2c-ralink kmod-sound-mt7620 -uboot-envtools IMAGES += factory.bin IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ @@ -256,7 +258,7 @@ define Device/asus_rp-ac87 IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ check-size | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware rssileds + DEVICE_PACKAGES := kmod-mt7615-firmware rssileds -uboot-envtools endef TARGET_DEVICES += asus_rp-ac87 @@ -285,7 +287,7 @@ define Device/asus_rt-ac65p IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware endef TARGET_DEVICES += asus_rt-ac65p @@ -302,7 +304,7 @@ define Device/asus_rt-ac85p IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware endef TARGET_DEVICES += asus_rt-ac85p @@ -314,7 +316,7 @@ define Device/asus_rt-n56u-b1 DEVICE_VARIANT := B1 IMAGE_SIZE := 16064k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += asus_rt-n56u-b1 @@ -333,8 +335,7 @@ define Device/asus_rt-ax53u IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 uboot-envtools \ - kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += asus_rt-ax53u @@ -357,7 +358,7 @@ define Device/asus_rt-ax54 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef TARGET_DEVICES += asus_rt-ax54 @@ -378,8 +379,7 @@ define Device/beeline_smartbox-flash IMAGES += factory.trx IMAGE/factory.trx := append-kernel | append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware \ - uboot-envtools uencrypt + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uencrypt endef TARGET_DEVICES += beeline_smartbox-flash @@ -392,7 +392,7 @@ define Device/beeline_smartbox-giga DEVICE_VENDOR := Beeline DEVICE_MODEL := SmartBox GIGA DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb3 uboot-envtools + kmod-usb3 endef TARGET_DEVICES += beeline_smartbox-giga @@ -404,8 +404,7 @@ define Device/beeline_smartbox-turbo SERCOMM_SWVER := 1004 DEVICE_VENDOR := Beeline DEVICE_MODEL := SmartBox TURBO - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 endef TARGET_DEVICES += beeline_smartbox-turbo @@ -417,7 +416,7 @@ define Device/belkin_rt1800 IMAGE_SIZE := 49152k DEVICE_VENDOR := Belkin DEVICE_MODEL := RT1800 - DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 UBINIZE_OPTS := -E 5 KERNEL_LOADADDR := 0x82000000 KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ @@ -437,7 +436,7 @@ define Device/buffalo_wsr-1166dhp IMAGE_SIZE := 15936k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-1166DHP - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools SUPPORTED_DEVICES += wsr-1166 endef TARGET_DEVICES += buffalo_wsr-1166dhp @@ -451,7 +450,7 @@ define Device/buffalo_wsr-2533dhpl DEVICE_ALT0_VENDOR := Buffalo DEVICE_ALT0_MODEL := WSR-2533DHP IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools DEFAULT := n endef TARGET_DEVICES += buffalo_wsr-2533dhpl @@ -461,7 +460,7 @@ define Device/buffalo_wsr-600dhp IMAGE_SIZE := 16064k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-600DHP - DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci + DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci -uboot-envtools SUPPORTED_DEVICES += wsr-600 endef TARGET_DEVICES += buffalo_wsr-600dhp @@ -472,7 +471,7 @@ define Device/bolt_arion IMAGE_SIZE := 32448k DEVICE_VENDOR := BOLT DEVICE_MODEL := Arion - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 endef TARGET_DEVICES += bolt_arion @@ -482,7 +481,7 @@ define Device/cudy_m1800 DEVICE_MODEL := M1800 IMAGE_SIZE := 16064k UIMAGE_NAME := R17 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += cudy_m1800 @@ -493,7 +492,7 @@ define Device/cudy_wr1300-v1 DEVICE_MODEL := WR1300 DEVICE_VARIANT := v1 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += cudy,wr1300 R10 endef TARGET_DEVICES += cudy_wr1300-v1 @@ -504,7 +503,8 @@ define Device/cudy_wr1300-v2 DEVICE_VENDOR := Cudy DEVICE_MODEL := WR1300 DEVICE_VARIANT := v2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools SUPPORTED_DEVICES += cudy,wr1300 R23 endef TARGET_DEVICES += cudy_wr1300-v2 @@ -515,7 +515,7 @@ define Device/cudy_wr2100 DEVICE_MODEL := WR2100 IMAGE_SIZE := 15872k UIMAGE_NAME := R11 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += cudy_wr2100 @@ -525,7 +525,7 @@ define Device/cudy_x6 DEVICE_VENDOR := Cudy DEVICE_MODEL := X6 UIMAGE_NAME := R13 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += cudy_x6 @@ -546,7 +546,7 @@ define Device/dlink_dap-x1860-a1 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size | elx-header 011b0060 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7915-firmware rssileds + DEVICE_PACKAGES := kmod-mt7915-firmware rssileds -uboot-envtools endef TARGET_DEVICES += dlink_dap-x1860-a1 @@ -554,7 +554,7 @@ define Device/dlink_dir-8xx-a1 $(Device/dsa-migration) IMAGE_SIZE := 16000k DEVICE_VENDOR := D-Link - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools KERNEL := $$(KERNEL) | uimage-sgehdr IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ @@ -566,7 +566,7 @@ define Device/dlink_dir-8xx-r1 $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := D-Link - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ check-size | append-metadata @@ -581,7 +581,7 @@ define Device/dlink_dir-xx60-a1 UBINIZE_OPTS := -E 5 DEVICE_VENDOR := D-Link DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools KERNEL := $$(KERNEL) | uimage-sgehdr IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata @@ -648,7 +648,8 @@ define Device/dlink_dir-860l-b1 DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-860L DEVICE_VARIANT := B1 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools SUPPORTED_DEVICES += dir-860l-b1 endef TARGET_DEVICES += dlink_dir-860l-b1 @@ -704,7 +705,8 @@ define Device/dual-q_h721 IMAGE_SIZE := 16064k DEVICE_VENDOR := Dual-Q DEVICE_MODEL := H721 - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-openssl -uboot-envtools endef TARGET_DEVICES += dual-q_h721 @@ -715,7 +717,7 @@ define Device/d-team_newifi-d2 DEVICE_VENDOR := Newifi DEVICE_MODEL := D2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += d-team_newifi-d2 @@ -725,7 +727,7 @@ define Device/d-team_pbr-m1 DEVICE_VENDOR := PandoraBox DEVICE_MODEL := PBR-M1 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 kmod-usb-ledtrig-usbport + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += pbr-m1 endef TARGET_DEVICES += d-team_pbr-m1 @@ -741,7 +743,7 @@ define Device/edimax_ra21s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020040 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += edimax_ra21s @@ -760,7 +762,7 @@ define Device/edimax_re23s IMAGE/factory.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ check-size - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += edimax_re23s @@ -773,7 +775,7 @@ define Device/edimax_rg21s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020038 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += edimax_rg21s @@ -785,7 +787,7 @@ define Device/elecom_wrc-1167ghbk2-s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-wrc-gs-factory WRC-1167GHBK2-S 0.00 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += elecom_wrc-1167ghbk2-s @@ -797,7 +799,7 @@ define Device/elecom_wrc-gs IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 -N | \ append-string MT7621_ELECOM_$$$$(ELECOM_HWNAME) - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef define Device/elecom_wrc-1167gs2-b @@ -858,7 +860,7 @@ define Device/elecom_wrc-2533ghbk2-t IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0107003b 8844A2D168B45A2D | \ elecom-product-header WRC-2533GHBK2-T - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools DEFAULT := n endef TARGET_DEVICES += elecom_wrc-2533ghbk2-t @@ -873,7 +875,7 @@ define Device/elecom_wrc-2533ghbk-i IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0107002d 8844A2D168B45A2D | \ elecom-product-header WRC-2533GHBK-I - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += elecom_wrc-2533ghbk-i @@ -909,8 +911,7 @@ define Device/etisalat_s3 SERCOMM_SWVER := 4009 DEVICE_VENDOR := Etisalat DEVICE_MODEL := S3 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 endef TARGET_DEVICES += etisalat_s3 @@ -919,7 +920,8 @@ define Device/firefly_firewrt IMAGE_SIZE := 16064k DEVICE_VENDOR := Firefly DEVICE_MODEL := FireWRT - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools SUPPORTED_DEVICES += firewrt endef TARGET_DEVICES += firefly_firewrt @@ -930,7 +932,7 @@ define Device/gehua_ghl-r-001 DEVICE_VENDOR := GeHua DEVICE_MODEL := GHL-R-001 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += gehua_ghl-r-001 @@ -939,7 +941,7 @@ define Device/glinet_gl-mt1300 IMAGE_SIZE := 32448k DEVICE_VENDOR := GL.iNet DEVICE_MODEL := GL-MT1300 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += glinet_gl-mt1300 @@ -948,7 +950,8 @@ define Device/gnubee_gb-pc1 $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud One - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 \ + -wpad-basic-openssl -uboot-envtools IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc1 @@ -958,7 +961,8 @@ define Device/gnubee_gb-pc2 $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud Two - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 \ + -wpad-basic-openssl -uboot-envtools IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc2 @@ -976,7 +980,7 @@ define Device/h3c_tx180x KERNEL := $$(KERNEL_INITRAMFS) | h3c-blank-header IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := H3C - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef define Device/h3c_tx1800-plus @@ -1013,7 +1017,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) haier-sim_wr1800k-factory endif IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef define Device/haier_har-20s2u1 @@ -1028,7 +1032,7 @@ define Device/hilink_hlk-7621a-evb $(Device/uimage-lzma-loader) DEVICE_VENDOR := HiLink DEVICE_MODEL := HLK-7621A evaluation board - DEVICE_PACKAGES += kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES += kmod-mt76x2 kmod-usb3 -uboot-envtools IMAGE_SIZE := 32448k endef TARGET_DEVICES += hilink_hlk-7621a-evb @@ -1047,7 +1051,7 @@ define Device/hiwifi_hc5962 check-size DEVICE_VENDOR := HiWiFi DEVICE_MODEL := HC5962 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 -uboot-envtools endef TARGET_DEVICES += hiwifi_hc5962 @@ -1066,7 +1070,7 @@ define Device/humax_e10 IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | \ edimax-header -s CSYS -m EA03 -f 0x70000 -S 0x01100000 | \ check-size | zip upg -P f013c26cf0a320fb71d03356dcb6bb63 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += humax_e10 @@ -1078,7 +1082,7 @@ define Device/huasifei_ws1208v2 DEVICE_MODEL := WS1208V2 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ kmod-usb3 kmod-usb-net-cdc-mbim kmod-usb-net-qmi-wwan \ - kmod-usb-serial-option + kmod-usb-serial-option -uboot-envtools endef TARGET_DEVICES += huasifei_ws1208v2 @@ -1091,7 +1095,7 @@ define Device/iodata_wn-ax1167gr ARTIFACTS := initramfs-factory.bin ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \ check-size 7680k | senao-header -r 0x30a -p 0x1055 -t 4 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools endef TARGET_DEVICES += iodata_wn-ax1167gr @@ -1119,7 +1123,7 @@ define Device/iodata_wn-ax1167gr2 DEVICE_MODEL := WN-AX1167GR2 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d42 -n '3.10(XBC.1)b10' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-ax1167gr2 @@ -1128,7 +1132,7 @@ define Device/iodata_wn-ax2033gr DEVICE_MODEL := WN-AX2033GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d42 -n '3.10(VST.1)C10' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-ax2033gr @@ -1137,7 +1141,7 @@ define Device/iodata_wn-dx1167r DEVICE_MODEL := WN-DX1167R KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d43 -n '3.10(XIK.1)b10' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-dx1167r @@ -1146,7 +1150,8 @@ define Device/iodata_wn-dx1200gr DEVICE_MODEL := WN-DX1200GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d43 -n '3.10(XIQ.0)b20' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools endef TARGET_DEVICES += iodata_wn-dx1200gr @@ -1155,7 +1160,7 @@ define Device/iodata_wn-dx2033gr DEVICE_MODEL := WN-DX2033GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d42 -n '3.10(XID.0)b30' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-dx2033gr @@ -1165,7 +1170,7 @@ define Device/iodata_wn-gx300gr IMAGE_SIZE := 7616k DEVICE_VENDOR := I-O DATA DEVICE_MODEL := WN-GX300GR - DEVICE_PACKAGES := kmod-mt7603 + DEVICE_PACKAGES := kmod-mt7603 -uboot-envtools endef TARGET_DEVICES += iodata_wn-gx300gr @@ -1178,7 +1183,7 @@ define Device/iodata_wnpr2600g IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0104003a 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wnpr2600g @@ -1188,7 +1193,7 @@ define Device/iptime_a3002mesh UIMAGE_NAME := a3002me DEVICE_VENDOR := ipTIME DEVICE_MODEL := A3002MESH - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iptime_a3002mesh @@ -1199,7 +1204,8 @@ define Device/iptime_a3004ns-dual UIMAGE_NAME := a3004nd DEVICE_VENDOR := ipTIME DEVICE_MODEL := A3004NS-dual - DEVICE_PACKAGES := kmod-usb3 kmod-mt76x2 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-usb3 kmod-mt76x2 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef TARGET_DEVICES += iptime_a3004ns-dual @@ -1216,7 +1222,7 @@ define Device/iptime_a3004t IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := ipTIME DEVICE_MODEL := A3004T - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += iptime_a3004t @@ -1227,7 +1233,7 @@ define Device/iptime_a6004ns-m DEVICE_VENDOR := ipTIME DEVICE_MODEL := A6004NS-M DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += iptime_a6004ns-m @@ -1238,7 +1244,7 @@ define Device/iptime_a6ns-m DEVICE_VENDOR := ipTIME DEVICE_MODEL := A6ns-M DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += iptime_a6ns-m @@ -1248,7 +1254,7 @@ define Device/iptime_a8004t UIMAGE_NAME := a8004t DEVICE_VENDOR := ipTIME DEVICE_MODEL := A8004T - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += iptime_a8004t @@ -1268,7 +1274,7 @@ define Device/iptime_ax2004m check-size | iptime-crc32 ax2004m DEVICE_VENDOR := ipTIME DEVICE_MODEL := AX2004M - DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += iptime_ax2004m @@ -1283,7 +1289,7 @@ define Device/iptime_t5004 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := ipTIME DEVICE_MODEL := T5004 - DEVICE_PACKAGES := -wpad-basic-openssl + DEVICE_PACKAGES := -wpad-basic-openssl -uboot-envtools endef TARGET_DEVICES += iptime_t5004 @@ -1296,7 +1302,7 @@ define Device/jcg_jhr-ac876m DEVICE_VENDOR := JCG DEVICE_MODEL := JHR-AC876M DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += jcg_jhr-ac876m @@ -1314,7 +1320,7 @@ define Device/jcg_q20 check-size DEVICE_VENDOR := JCG DEVICE_MODEL := Q20 - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef TARGET_DEVICES += jcg_q20 @@ -1327,7 +1333,7 @@ define Device/jcg_y2 JCG_MAXSIZE := 16064k DEVICE_VENDOR := JCG DEVICE_MODEL := Y2 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += jcg_y2 @@ -1338,7 +1344,8 @@ define Device/keenetic_kn-3010 IMAGE_SIZE := 31488k DEVICE_VENDOR := Keenetic DEVICE_MODEL := KN-3010 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to $$$$(BLOCKSIZE) | \ check-size | zyimage -d 0x803010 -v "KN-3010" @@ -1352,7 +1359,7 @@ define Device/lenovo_newifi-d1 DEVICE_VENDOR := Newifi DEVICE_MODEL := D1 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += newifi-d1 endef TARGET_DEVICES += lenovo_newifi-d1 @@ -1366,8 +1373,7 @@ define Device/linksys_e5600 IMAGE_SIZE := 26624k DEVICE_VENDOR := Linksys DEVICE_MODEL := E5600 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap UBINIZE_OPTS := -E 5 IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata @@ -1393,8 +1399,7 @@ define Device/linksys_ea7xxx KERNEL_SIZE := 4096k IMAGE_SIZE := 36864k DEVICE_VENDOR := Linksys - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware \ - uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware UBINIZE_OPTS := -E 5 IMAGES := sysupgrade.bin factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata @@ -1458,7 +1463,7 @@ define Device/linksys_re6500 IMAGE_SIZE := 7872k DEVICE_VENDOR := Linksys DEVICE_MODEL := RE6500 - DEVICE_PACKAGES := kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt76x2 -uboot-envtools SUPPORTED_DEVICES += re6500 endef TARGET_DEVICES += linksys_re6500 @@ -1468,7 +1473,8 @@ define Device/mediatek_ap-mt7621a-v60 IMAGE_SIZE := 7872k DEVICE_VENDOR := Mediatek DEVICE_MODEL := AP-MT7621A-V60 EVB - DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 \ + -wpad-basic-openssl -uboot-envtools endef TARGET_DEVICES += mediatek_ap-mt7621a-v60 @@ -1478,7 +1484,8 @@ define Device/mediatek_mt7621-eval-board IMAGE_SIZE := 15104k DEVICE_VENDOR := MediaTek DEVICE_MODEL := MT7621 EVB - DEVICE_PACKAGES := -wpad-basic-openssl + + DEVICE_PACKAGES := -wpad-basic-openssl -uboot-envtools SUPPORTED_DEVICES += mt7621 endef TARGET_DEVICES += mediatek_mt7621-eval-board @@ -1488,7 +1495,7 @@ define Device/MikroTik DEVICE_VENDOR := MikroTik BLOCKSIZE := 64k IMAGE_SIZE := 16128k - DEVICE_PACKAGES := kmod-usb3 + DEVICE_PACKAGES := kmod-usb3 -uboot-envtools KERNEL_NAME := vmlinuz KERNEL := kernel-bin | append-dtb-elf IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \ @@ -1541,7 +1548,7 @@ define Device/mqmaker_witi DEVICE_VENDOR := MQmaker DEVICE_MODEL := WiTi DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m endef TARGET_DEVICES += mqmaker_witi @@ -1554,7 +1561,7 @@ define Device/mtc_wr1201 DEVICE_MODEL := Wireless Router WR1201 KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma -n 'WR1201_8_128' DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += mtc_wr1201 @@ -1575,7 +1582,7 @@ define Device/mts_wg430223 IMAGES += factory.trx IMAGE/factory.trx := append-kernel | append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware uboot-envtools uencrypt + DEVICE_PACKAGES := kmod-mt7615-firmware uencrypt endef TARGET_DEVICES += mts_wg430223 @@ -1584,7 +1591,7 @@ define Device/netgear_ex6150 $(Device/uimage-lzma-loader) DEVICE_VENDOR := NETGEAR DEVICE_MODEL := EX6150 - DEVICE_PACKAGES := kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt76x2 -uboot-envtools NETGEAR_BOARD_ID := U12H318T00_NETGEAR IMAGE_SIZE := 14848k IMAGES += factory.chk @@ -1607,7 +1614,8 @@ define Device/netgear_sercomm_nand IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-ubi | check-size DEVICE_VENDOR := NETGEAR - DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef define Device/netgear_r6220 @@ -1756,7 +1764,7 @@ define Device/netgear_wax202 $(Device/dsa-migration) DEVICE_VENDOR := NETGEAR DEVICE_MODEL := WAX202 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools NETGEAR_ENC_MODEL := WAX202 NETGEAR_ENC_REGION := US BLOCKSIZE := 128k @@ -1788,7 +1796,7 @@ define Device/netgear_wndr3700-v5 SERCOMM_SWVER := 0x1054 SERCOMM_PAD := 320k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += wndr3700v5 endef TARGET_DEVICES += netgear_wndr3700-v5 @@ -1810,7 +1818,8 @@ define Device/netis_wf2881 check-size DEVICE_VENDOR := NETIS DEVICE_MODEL := WF2881 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef TARGET_DEVICES += netis_wf2881 @@ -1820,7 +1829,7 @@ define Device/oraybox_x3a IMAGE_SIZE := 15360k DEVICE_VENDOR := OrayBox DEVICE_MODEL := X3A - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += oraybox_x3a @@ -1832,7 +1841,7 @@ define Device/phicomm_k2p DEVICE_ALT0_VENDOR := Phicomm DEVICE_ALT0_MODEL := KE 2P SUPPORTED_DEVICES += k2p - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += phicomm_k2p @@ -1842,7 +1851,7 @@ define Device/planex_vr500 IMAGE_SIZE := 65216k DEVICE_VENDOR := Planex DEVICE_MODEL := VR500 - DEVICE_PACKAGES := kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-usb3 -wpad-basic-openssl -uboot-envtools SUPPORTED_DEVICES += vr500 endef TARGET_DEVICES += planex_vr500 @@ -1861,8 +1870,7 @@ define Device/raisecom_msg1500-x-00 DEVICE_VARIANT := X.00 DEVICE_ALT0_VENDOR := Nokia DEVICE_ALT0_MODEL := A-040W-Q - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += raisecom_msg1500-x-00 @@ -1870,7 +1878,8 @@ define Device/renkforce_ws-wn530hp3-a $(Device/dsa-migration) DEVICE_VENDOR := Renkforce DEVICE_MODEL := WS-WN530HP3-A - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools IMAGE/sysupgrade.bin := append-kernel | pad-to 65536 | append-rootfs | \ check-size | append-metadata IMAGE_SIZE := 15040k @@ -1885,8 +1894,7 @@ define Device/rostelecom_rt-sf-1 SERCOMM_SWVER := 1026 DEVICE_VENDOR := Rostelecom DEVICE_MODEL := RT-SF-1 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 endef TARGET_DEVICES += rostelecom_rt-sf-1 @@ -1897,7 +1905,7 @@ define Device/samknows_whitebox-v8 DEVICE_VENDOR := SamKnows DEVICE_MODEL := Whitebox 8 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport uboot-envtools + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += sk-wb8 endef TARGET_DEVICES += samknows_whitebox-v8 @@ -1912,7 +1920,7 @@ define Device/sercomm_na502 KERNEL_SIZE := 4096k DEVICE_VENDOR := SERCOMM DEVICE_MODEL := NA502 - DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3 + DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3 -uboot-envtools endef TARGET_DEVICES += sercomm_na502 @@ -1927,7 +1935,7 @@ define Device/sercomm_na502s DEVICE_VENDOR := SERCOMM DEVICE_MODEL := NA502S DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3 kmod-usb-serial \ - kmod-usb-serial-xr_usb_serial_common + kmod-usb-serial-xr_usb_serial_common -uboot-envtools endef TARGET_DEVICES += sercomm_na502s @@ -1945,7 +1953,8 @@ define Device/snr_snr-cpe-me2-lite DEVICE_VENDOR := SNR DEVICE_MODEL := SNR-CPE-ME2-Lite UIMAGE_NAME := $$(DEVICE_MODEL) - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools endef TARGET_DEVICES += snr_snr-cpe-me2-lite @@ -1954,7 +1963,8 @@ define Device/storylink_sap-g3200u3 IMAGE_SIZE := 7872k DEVICE_VENDOR := STORYLiNK DEVICE_MODEL := SAP-G3200U3 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools SUPPORTED_DEVICES += sap-g3200u3 endef TARGET_DEVICES += storylink_sap-g3200u3 @@ -1964,7 +1974,7 @@ define Device/telco-electronics_x1 IMAGE_SIZE := 16064k DEVICE_VENDOR := Telco Electronics DEVICE_MODEL := X1 - DEVICE_PACKAGES := kmod-usb3 kmod-mt76 + DEVICE_PACKAGES := kmod-usb3 kmod-mt76 -uboot-envtools endef TARGET_DEVICES += telco-electronics_x1 @@ -1973,7 +1983,7 @@ define Device/tenbay_t-mb5eu-v01 DEVICE_VENDOR := Tenbay DEVICE_MODEL := T-MB5EU-V01 DEVICE_DTS_CONFIG := config@1 - DEVICE_PACKAGES += kmod-mt7915-firmware kmod-usb3 + DEVICE_PACKAGES += kmod-mt7915-firmware kmod-usb3 -uboot-envtools KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGE_SIZE := 15808k SUPPORTED_DEVICES += mt7621-dm2-t-mb5eu-v01-nor @@ -1986,7 +1996,7 @@ define Device/thunder_timecloud IMAGE_SIZE := 16064k DEVICE_VENDOR := Thunder DEVICE_MODEL := Timecloud - DEVICE_PACKAGES := kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-usb3 -wpad-basic-openssl -uboot-envtools SUPPORTED_DEVICES += timecloud endef TARGET_DEVICES += thunder_timecloud @@ -1997,7 +2007,7 @@ define Device/totolink_a7000r UIMAGE_NAME := C8340R1C-9999 DEVICE_VENDOR := TOTOLINK DEVICE_MODEL := A7000R - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += totolink_a7000r @@ -2007,7 +2017,7 @@ define Device/totolink_x5000r UIMAGE_NAME := C8343R-9999 DEVICE_VENDOR := TOTOLINK DEVICE_MODEL := X5000R - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += totolink_x5000r @@ -2017,7 +2027,7 @@ define Device/tplink_archer-a6-v3 DEVICE_MODEL := Archer A6 DEVICE_VARIANT := V3 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e \ - kmod-mt7663-firmware-ap + kmod-mt7663-firmware-ap -uboot-envtools TPLINK_BOARD_ID := ARCHER-A6-V3 KERNEL := $(KERNEL_DTB) | uImage lzma IMAGE_SIZE := 15744k @@ -2029,8 +2039,8 @@ define Device/tplink_archer-c6-v3 $(Device/tplink-safeloader) DEVICE_MODEL := Archer C6 DEVICE_VARIANT := V3 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e \ - kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools TPLINK_BOARD_ID := ARCHER-C6-V3 KERNEL := $(KERNEL_DTB) | uImage lzma IMAGE_SIZE := 15744k @@ -2042,9 +2052,8 @@ define Device/tplink_archer-c6u-v1 $(Device/tplink-safeloader) DEVICE_MODEL := Archer C6U DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7603 \ - kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools KERNEL := $(KERNEL_DTB) | uImage lzma TPLINK_BOARD_ID := ARCHER-C6U-V1 IMAGE_SIZE := 15744k @@ -2056,7 +2065,8 @@ define Device/tplink_deco-m4r-v4 $(Device/tplink-safeloader) DEVICE_MODEL := Deco M4R DEVICE_VARIANT := v4 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools KERNEL := $(KERNEL_DTB) | uImage lzma TPLINK_BOARD_ID := DECO-M4R-V4 IMAGE_SIZE := 15744k @@ -2068,7 +2078,8 @@ define Device/tplink_eap235-wall-v1 $(Device/tplink-safeloader) DEVICE_MODEL := EAP235-Wall DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools TPLINK_BOARD_ID := EAP235-WALL-V1 IMAGE_SIZE := 13440k IMAGE/factory.bin := append-rootfs | tplink-safeloader factory | \ @@ -2081,7 +2092,7 @@ define Device/tplink_eap615-wall-v1 $(Device/tplink-safeloader) DEVICE_MODEL := EAP615-Wall DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools TPLINK_BOARD_ID := EAP615-WALL-V1 KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | pad-to 64k KERNEL_INITRAMFS := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd @@ -2102,8 +2113,7 @@ define Device/tplink_ec330-g5u-v1 DEVICE_ALT0_VENDOR := TP-Link DEVICE_ALT0_MODEL := Archer C9ERT DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb-ledtrig-usbport \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb-ledtrig-usbport kmod-usb3 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | \ uImage-tplink-c9 standalone '$(call toupper,$(LINUX_KARCH)) \ $(VERSION_DIST) Linux-$(LINUX_VERSION)' | \ @@ -2119,7 +2129,7 @@ define Device/tplink_er605-v2 DEVICE_VENDOR := TP-Link DEVICE_MODEL := ER605 DEVICE_VARIANT := v2 - DEVICE_PACKAGES := -wpad-basic-wolfssl kmod-usb3 + DEVICE_PACKAGES := -wpad-basic-openssl kmod-usb3 -uboot-envtools BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k @@ -2139,7 +2149,7 @@ define Device/tplink_mr600-v2-eu DEVICE_VARIANT := v2 (EU) TPLINK_FLASHLAYOUT := 16Mltq DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb-net-qmi-wwan uqmi kmod-usb3 + kmod-usb-net-qmi-wwan uqmi kmod-usb3 -uboot-envtools KERNEL := $(KERNEL_DTB) | uImage lzma KERNEL_INITRAMFS := $$(KERNEL) | tplink-v2-header TPLINK_BOARD_ID := MR600-V2-EU @@ -2152,7 +2162,7 @@ define Device/tplink_re350-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE350 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools TPLINK_BOARD_ID := RE350-V1 IMAGE_SIZE := 6016k SUPPORTED_DEVICES += re350-v1 @@ -2164,7 +2174,7 @@ define Device/tplink_re500-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE500 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools TPLINK_BOARD_ID := RE500-V1 IMAGE_SIZE := 14208k endef @@ -2175,7 +2185,7 @@ define Device/tplink_re650-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE650 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools TPLINK_BOARD_ID := RE650-V1 IMAGE_SIZE := 14208k endef @@ -2186,7 +2196,7 @@ define Device/tplink_re650-v2 $(Device/tplink-safeloader) DEVICE_MODEL := RE650 DEVICE_VARIANT := v2 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools TPLINK_BOARD_ID := RE650-V2 IMAGE_SIZE := 7994k endef @@ -2197,7 +2207,8 @@ define Device/tplink_tl-wpa8631p-v3 $(Device/tplink-safeloader) DEVICE_MODEL := TL-WPA8631P DEVICE_VARIANT := v3 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools TPLINK_BOARD_ID := TL-WPA8631P-V3 IMAGE_SIZE := 7232k endef @@ -2213,7 +2224,7 @@ define Device/ubnt_edgerouter_common KERNEL_INITRAMFS := $$(KERNEL) | \ ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES += -wpad-basic-openssl + DEVICE_PACKAGES += -wpad-basic-openssl -uboot-envtools endef define Device/ubnt_edgerouter-x @@ -2239,7 +2250,7 @@ define Device/ubnt_unifi-6-lite DEVICE_MODEL := UniFi 6 Lite DEVICE_DTS_CONFIG := config@1 DEVICE_DTS_LOADADDR := 0x87000000 - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915-firmware + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915-firmware -uboot-envtools KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGE_SIZE := 15424k endef @@ -2252,7 +2263,8 @@ define Device/ubnt_unifi-flexhd DEVICE_DTS_CONFIG := config@2 DEVICE_DTS_LOADADDR := 0x87000000 KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware kmod-leds-ubnt-ledbar + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware kmod-leds-ubnt-ledbar \ + -uboot-envtools IMAGE_SIZE := 15552k endef TARGET_DEVICES += ubnt_unifi-flexhd @@ -2261,7 +2273,7 @@ define Device/ubnt_unifi-nanohd $(Device/dsa-migration) DEVICE_VENDOR := Ubiquiti DEVICE_MODEL := UniFi nanoHD - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware -uboot-envtools IMAGE_SIZE := 15552k endef TARGET_DEVICES += ubnt_unifi-nanohd @@ -2272,6 +2284,7 @@ define Device/ubnt_usw-flex DEVICE_MODEL := UniFi Switch Flex DEVICE_DTS_CONFIG := config@1 DEVICE_DTS_LOADADDR := 0x87000000 + DEVICE_PACKAGES += -uboot-envtools KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGE_SIZE := 14720k endef @@ -2284,7 +2297,7 @@ define Device/unielec_u7621-01-16m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-01 DEVICE_VARIANT := 16M - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 -uboot-envtools endef TARGET_DEVICES += unielec_u7621-01-16m @@ -2295,7 +2308,8 @@ define Device/unielec_u7621-06-16m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 16M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-openssl -uboot-envtools SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m endef TARGET_DEVICES += unielec_u7621-06-16m @@ -2307,7 +2321,8 @@ define Device/unielec_u7621-06-32m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 32M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-openssl -uboot-envtools SUPPORTED_DEVICES += unielec,u7621-06-32m endef TARGET_DEVICES += unielec_u7621-06-32m @@ -2319,7 +2334,8 @@ define Device/unielec_u7621-06-64m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 64M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-openssl -uboot-envtools SUPPORTED_DEVICES += unielec,u7621-06-512m-64m endef TARGET_DEVICES += unielec_u7621-06-64m @@ -2328,7 +2344,7 @@ define Device/wavlink_wl-wn531a6 $(Device/dsa-migration) DEVICE_VENDOR := Wavlink DEVICE_MODEL := WL-WN531A6 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 -uboot-envtools IMAGE_SIZE := 15040k endef TARGET_DEVICES += wavlink_wl-wn531a6 @@ -2338,7 +2354,7 @@ define Device/wavlink_wl-wn533a8 DEVICE_VENDOR := Wavlink DEVICE_MODEL := WL-WN533A8 KERNEL_INITRAMFS_SUFFIX := -WN533A8$$(KERNEL_SUFFIX) - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools IMAGE_SIZE := 15040k endef TARGET_DEVICES += wavlink_wl-wn533a8 @@ -2356,7 +2372,7 @@ define Device/wavlink_ws-wn572hp3-4g IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb3 kmod-usb-net-rndis comgt-ncm + kmod-usb3 kmod-usb-net-rndis comgt-ncm -uboot-envtools endef TARGET_DEVICES += wavlink_ws-wn572hp3-4g @@ -2368,7 +2384,7 @@ define Device/wevo_11acnas DEVICE_VENDOR := WeVO DEVICE_MODEL := 11AC NAS Router DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += 11acnas endef TARGET_DEVICES += wevo_11acnas @@ -2382,7 +2398,7 @@ define Device/wevo_w2914ns-v2 DEVICE_MODEL := W2914NS DEVICE_VARIANT := v2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += w2914nsv2 endef TARGET_DEVICES += wevo_w2914ns-v2 @@ -2396,7 +2412,7 @@ define Device/winstars_ws-wn583a6 DEVICE_ALT0_VENDOR := Gemeita DEVICE_ALT0_MODEL := AC2100 KERNEL_INITRAMFS_SUFFIX := -WN583A6$$(KERNEL_SUFFIX) - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += winstars_ws-wn583a6 @@ -2404,7 +2420,6 @@ define Device/xiaomi_nand_separate $(Device/dsa-migration) $(Device/uimage-lzma-loader) DEVICE_VENDOR := Xiaomi - DEVICE_PACKAGES := uboot-envtools BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k @@ -2420,7 +2435,7 @@ define Device/xiaomi_mi-router-3g DEVICE_MODEL := Mi Router 3G IMAGE_SIZE := 124416k DEVICE_PACKAGES += kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += R3G mir3g xiaomi,mir3g endef TARGET_DEVICES += xiaomi_mi-router-3g @@ -2432,7 +2447,7 @@ define Device/xiaomi_mi-router-3g-v2 DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 3G DEVICE_VARIANT := v2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools SUPPORTED_DEVICES += xiaomi,mir3g-v2 endef TARGET_DEVICES += xiaomi_mi-router-3g-v2 @@ -2451,8 +2466,7 @@ define Device/xiaomi_mi-router-3-pro IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += xiaomi,mir3p endef TARGET_DEVICES += xiaomi_mi-router-3-pro @@ -2472,7 +2486,7 @@ define Device/xiaomi_mi-router-4a-gigabit DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 4A DEVICE_VARIANT := Gigabit Edition - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools endef TARGET_DEVICES += xiaomi_mi-router-4a-gigabit @@ -2483,7 +2497,8 @@ define Device/xiaomi_mi-router-4a-gigabit-v2 DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 4A DEVICE_VARIANT := Gigabit Edition v2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools endef TARGET_DEVICES += xiaomi_mi-router-4a-gigabit-v2 @@ -2491,7 +2506,7 @@ define Device/xiaomi_mi-router-ac2100 $(Device/xiaomi_nand_separate) DEVICE_MODEL := Mi Router AC2100 IMAGE_SIZE := 120320k - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += xiaomi_mi-router-ac2100 @@ -2508,7 +2523,7 @@ define Device/xiaomi_mi-router-cr660x IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/firmware.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES += kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES += kmod-mt7915-firmware endef define Device/xiaomi_mi-router-cr6606 @@ -2542,7 +2557,8 @@ define Device/xiaoyu_xy-c5 IMAGE_SIZE := 32448k DEVICE_VENDOR := XiaoYu DEVICE_MODEL := XY-C5 - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-openssl + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-openssl \ + -uboot-envtools endef TARGET_DEVICES += xiaoyu_xy-c5 @@ -2552,7 +2568,7 @@ define Device/xzwifi_creativebox-v1 DEVICE_VENDOR := CreativeBox DEVICE_MODEL := v1 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 -wpad-basic-openssl + kmod-usb3 -wpad-basic-openssl -uboot-envtools endef TARGET_DEVICES += xzwifi_creativebox-v1 @@ -2562,7 +2578,7 @@ define Device/youhua_wr1200js DEVICE_VENDOR := YouHua DEVICE_MODEL := WR1200JS DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += youhua_wr1200js @@ -2571,8 +2587,8 @@ define Device/youku_yk-l2 IMAGE_SIZE := 16064k DEVICE_VENDOR := Youku DEVICE_MODEL := YK-L2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ + kmod-usb-ledtrig-usbport -uboot-envtools UIMAGE_MAGIC := 0x12291000 UIMAGE_NAME := 400000000000000000003000 endef @@ -2583,7 +2599,7 @@ define Device/yuncore_ax820 IMAGE_SIZE := 15808k DEVICE_VENDOR := YunCore DEVICE_MODEL := AX820 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += yuncore_ax820 @@ -2593,7 +2609,7 @@ define Device/yuncore_fap640 IMAGE_SIZE := 15808k DEVICE_VENDOR := YunCore DEVICE_MODEL := FAP640 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += yuncore_fap640 @@ -2603,7 +2619,7 @@ define Device/yuncore_fap690 IMAGE_SIZE := 15808k DEVICE_VENDOR := YunCore DEVICE_MODEL := FAP690 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += yuncore_fap690 @@ -2615,7 +2631,8 @@ define Device/zbtlink_zbt-we1326 DEVICE_MODEL := ZBT-WE1326 DEVICE_ALT0_VENDOR := Wiflyer DEVICE_ALT0_MODEL := WF3526-P - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \ + -uboot-envtools SUPPORTED_DEVICES += zbt-we1326 endef TARGET_DEVICES += zbtlink_zbt-we1326 @@ -2627,7 +2644,7 @@ define Device/zbtlink_zbt-we3526 DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WE3526 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-we3526 @@ -2639,7 +2656,7 @@ define Device/zbtlink_zbt-wg1602-16m DEVICE_MODEL := ZBT-WG1602 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1602-16m @@ -2651,7 +2668,7 @@ define Device/zbtlink_zbt-wg1602-v04-16m DEVICE_MODEL := ZBT-WG1602-V04 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1602-v04-16m @@ -2663,7 +2680,7 @@ define Device/zbtlink_zbt-wg1602-v04-32m DEVICE_MODEL := ZBT-WG1602-V04 DEVICE_VARIANT := 32M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1602-v04-32m @@ -2675,7 +2692,8 @@ define Device/zbtlink_zbt-wg1608-16m DEVICE_MODEL := ZBT-WG1608 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt7615e \ - kmod-mt7663-firmware-ap kmod-usb3 kmod-usb-ledtrig-usbport + kmod-mt7663-firmware-ap kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1608-16m @@ -2686,7 +2704,7 @@ define Device/zbtlink_zbt-wg2626 DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WG2626 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += zbt-wg2626 endef TARGET_DEVICES += zbtlink_zbt-wg2626 @@ -2699,7 +2717,7 @@ define Device/zbtlink_zbt-wg3526-16m DEVICE_MODEL := ZBT-WG3526 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ - kmod-usb3 kmod-usb-ledtrig-usbport + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M endef TARGET_DEVICES += zbtlink_zbt-wg3526-16m @@ -2712,7 +2730,7 @@ define Device/zbtlink_zbt-wg3526-32m DEVICE_MODEL := ZBT-WG3526 DEVICE_VARIANT := 32M DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ - kmod-usb3 kmod-usb-ledtrig-usbport + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M endef TARGET_DEVICES += zbtlink_zbt-wg3526-32m @@ -2723,7 +2741,7 @@ define Device/zio_freezio DEVICE_VENDOR := ZIO DEVICE_MODEL := FREEZIO DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zio_freezio @@ -2734,9 +2752,8 @@ define Device/zyxel_lte3301-plus UBINIZE_OPTS := -E 5 DEVICE_VENDOR := ZyXEL DEVICE_MODEL := LTE3301-PLUS - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - uboot-envtools kmod-usb-ledtrig-usbport kmod-usb-net-qmi-wwan \ - kmod-usb-serial-option uqmi + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport \ + kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi KERNEL := $(KERNEL_DTB) | uImage lzma | \ zytrx-header $$(DEVICE_MODEL) $$(VERSION_DIST)-$$(REVISION) KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma | \ @@ -2753,7 +2770,7 @@ define Device/zyxel_nr7101 UBINIZE_OPTS := -E 5 DEVICE_VENDOR := ZyXEL DEVICE_MODEL := NR7101 - DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 uboot-envtools kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi KERNEL := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) $$(VERSION_DIST)-$$(REVISION) KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) 9.99(ABUV.9)$$(VERSION_DIST)-recovery KERNEL_INITRAMFS_SUFFIX := -recovery.bin @@ -2768,7 +2785,7 @@ define Device/zyxel_nwa-ax PAGESIZE := 2048 KERNEL_SIZE := 8192k UBINIZE_OPTS := -E 5 - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools zyxel-bootconfig + DEVICE_PACKAGES := kmod-mt7915-firmware zyxel-bootconfig KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGES += factory.bin ramboot-factory.bin IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | zyxel-nwa-fit @@ -2798,7 +2815,7 @@ define Device/zyxel_wap6805 IMAGE_SIZE := 32448k DEVICE_VENDOR := ZyXEL DEVICE_MODEL := WAP6805 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii -uboot-envtools KERNEL := $$(KERNEL/lzma-loader) | uImage none | uimage-padhdr 160 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index f79d056457..193ce17421 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -55,6 +55,8 @@ define Device/asus_rt-ac1200-v2 DEVICE_VENDOR := ASUS DEVICE_MODEL := RT-AC1200 DEVICE_VARIANT := V2 + DEVICE_ALT0_VENDOR := ASUS + DEVICE_ALT0_MODEL := RT-AC750L IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index e6536da3f3..92cc9094a8 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -120,6 +120,7 @@ endef TARGET_DEVICES += allnet_all5002 define Device/allnet_all5003 + $(Device/uimage-lzma-loader) SOC := rt5350 IMAGE_SIZE := 32448k DEVICE_VENDOR := Allnet diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk index c1b850f6c3..787ec08d72 100644 --- a/target/linux/ramips/mt7621/target.mk +++ b/target/linux/ramips/mt7621/target.mk @@ -10,7 +10,7 @@ KERNELNAME:=vmlinux vmlinuz # make Kernel/CopyImage use $LINUX_DIR/vmlinuz IMAGES_DIR:=../../.. -DEFAULT_PACKAGES += wpad-basic-openssl +DEFAULT_PACKAGES += wpad-basic-openssl uboot-envtools define Target/Description Build firmware images for Ralink MT7621 based boards. diff --git a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch index 794cdfa37a..93f0fe5cf4 100644 --- a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch +++ b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch @@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15890,6 +15890,13 @@ S: Maintained +@@ -15891,6 +15891,13 @@ S: Maintained F: include/sound/rt*.h F: sound/soc/codecs/rt* diff --git a/target/linux/sunxi/config-5.15 b/target/linux/sunxi/config-5.15 index 85018ba2ab..51af0860c0 100644 --- a/target/linux/sunxi/config-5.15 +++ b/target/linux/sunxi/config-5.15 @@ -317,6 +317,7 @@ CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=8 CONFIG_NVMEM=y CONFIG_NVMEM_SUNXI_SID=y +CONFIG_NVMEM_SYSFS=y CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y diff --git a/target/linux/sunxi/cortexa53/config-5.15 b/target/linux/sunxi/cortexa53/config-5.15 index d0e569ef11..fe464fa2ec 100644 --- a/target/linux/sunxi/cortexa53/config-5.15 +++ b/target/linux/sunxi/cortexa53/config-5.15 @@ -57,7 +57,6 @@ CONFIG_MUSB_PIO_ONLY=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NOP_USB_XCEIV=y CONFIG_NO_IOPORT_MAP=y -CONFIG_NVMEM_SYSFS=y CONFIG_PARTITION_PERCPU=y CONFIG_PHY_SUN50I_USB3=y CONFIG_PINCTRL_SUN50I_A100=y diff --git a/target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader b/target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader deleted file mode 100644 index 42f04d76a7..0000000000 --- a/target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader +++ /dev/null @@ -1,18 +0,0 @@ -upgrade_bootloader() { - local diskdev - - . /lib/upgrade/common.sh - - if [ ! -f /boot/grub/upgraded ] && export_bootdevice && export_partdevice diskdev 0; then - part_magic_efi "/dev/$diskdev" && return 0 - echo "(hd0) /dev/$diskdev" > /tmp/device.map - /usr/sbin/grub-bios-setup \ - -m "/tmp/device.map" \ - -d "/boot/grub" \ - -r "hd0,msdos1" \ - "/dev/$diskdev" \ - && touch /boot/grub/upgraded - fi -} - -[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main upgrade_bootloader diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh index d8f2eba97e..5dad7a538a 100644 --- a/target/linux/x86/base-files/lib/upgrade/platform.sh +++ b/target/linux/x86/base-files/lib/upgrade/platform.sh @@ -62,8 +62,7 @@ platform_do_bootloader_upgrade() { -m "/tmp/device.map" \ -d "/tmp/boot/boot/grub" \ -r "hd0,${parttable}1" \ - "/dev/$diskdev" \ - && touch /tmp/boot/boot/grub/upgraded + "/dev/$diskdev" umount /tmp/boot fi diff --git a/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch b/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch index 0ef3c0c087..03cb33acbf 100644 --- a/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch +++ b/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch @@ -63,7 +63,7 @@ Sighed-off-by: Philip Prindeville --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig -@@ -700,7 +700,7 @@ config XO1_RFKILL +@@ -701,7 +701,7 @@ config XO1_RFKILL laptop. config PCENGINES_APU2 @@ -72,7 +72,7 @@ Sighed-off-by: Philip Prindeville depends on INPUT && INPUT_KEYBOARD && GPIOLIB depends on LEDS_CLASS select GPIO_AMD_FCH -@@ -708,7 +708,7 @@ config PCENGINES_APU2 +@@ -709,7 +709,7 @@ config PCENGINES_APU2 select LEDS_GPIO help This driver provides support for the front button and LEDs on diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index dbcaf4afce..e53384a006 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -2,7 +2,7 @@ choice prompt "Binutils Version" if TOOLCHAINOPTS - default BINUTILS_USE_VERSION_2_39 + default BINUTILS_USE_VERSION_2_40 help Select the version of binutils you wish to use. diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index 479a8459fe..c9f8584480 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -6,10 +6,10 @@ config BINUTILS_VERSION_2_38 bool config BINUTILS_VERSION_2_39 - default y if !TOOLCHAINOPTS bool config BINUTILS_VERSION_2_40 + default y if !TOOLCHAINOPTS bool config BINUTILS_VERSION diff --git a/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch b/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch new file mode 100644 index 0000000000..19af34091c --- /dev/null +++ b/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch @@ -0,0 +1,70 @@ +From f7c5db99b76e8dde89335d794c82fcbfbf53c612 Mon Sep 17 00:00:00 2001 +From: Enze Li +Date: Sat, 14 Jan 2023 11:33:48 +0800 +Subject: [PATCH 05/50] libctf: update regexp to allow makeinfo to build + document + +While trying to build gdb on latest openSUSE Tumbleweed, I noticed the +following warning, + + checking for makeinfo... makeinfo --split-size=5000000 + configure: WARNING: + *** Makeinfo is too old. Info documentation will not be built. + +then I checked the version of makeinfo, it said, +====== +$ makeinfo --version +texi2any (GNU texinfo) 7.0.1 + +Copyright (C) 2022 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +====== + +After digging a little bit, it became quite obvious that a dot is +missing in regexp that makes it impossible to match versions higher than +7.0, and here's the solution: + +- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then ++ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then + +However, Eli pointed out that the solution above has another problem: it +will stop working when Texinfo 10.1 will be released. Meanwhile, he +suggested to solve this problem permanently. That is, we don't care +about the minor version for Texinfo > 6.9, we only care about the major +version. + +In this way, the problem will be resolved permanently, thanks to Eli. + +libctf/ChangeLog: + + * configure: Regenerated. + * configure.ac: Update regexp to match versions higher than 7.0. +--- + libctf/configure | 2 +- + libctf/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/libctf/configure ++++ b/libctf/configure +@@ -14865,7 +14865,7 @@ esac + # We require texinfo to be 6.3 or later, for a working synindex + # and validatemenus: otherwise we fall back to /bin/true. + if ${MAKEINFO} --version \ +- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then ++ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then + build_info=yes + else + build_info= +--- a/libctf/configure.ac ++++ b/libctf/configure.ac +@@ -184,7 +184,7 @@ changequote(,) + # We require texinfo to be 6.3 or later, for a working synindex + # and validatemenus: otherwise we fall back to /bin/true. + if ${MAKEINFO} --version \ +- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then ++ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then + build_info=yes + else + build_info= diff --git a/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch b/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch new file mode 100644 index 0000000000..0676240442 --- /dev/null +++ b/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch @@ -0,0 +1,444 @@ +From 59706683feafb6252d0ad369cf8759f75fd147be Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Tue, 17 Jan 2023 12:02:56 +0000 +Subject: [PATCH 07/50] Fix version number snafu in some configuration files: + 2.40.00 should be 2.40 + +--- + binutils/configure | 20 ++++++++++---------- + gprof/configure | 20 ++++++++++---------- + gprofng/configure | 20 ++++++++++---------- + gprofng/doc/version.texi | 4 ++-- + gprofng/libcollector/configure | 20 ++++++++++---------- + ld/configure | 20 ++++++++++---------- + 6 files changed, 52 insertions(+), 52 deletions(-) + +--- a/binutils/configure ++++ b/binutils/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for binutils 2.40.00. ++# Generated by GNU Autoconf 2.69 for binutils 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='binutils' + PACKAGE_TARNAME='binutils' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='binutils 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='binutils 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures binutils 2.40.00 to adapt to many kinds of systems. ++\`configure' configures binutils 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1472,7 +1472,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of binutils 2.40.00:";; ++ short | recursive ) echo "Configuration of binutils 2.40:";; + esac + cat <<\_ACEOF + +@@ -1631,7 +1631,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-binutils configure 2.40.00 ++binutils configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by binutils $as_me 2.40.00, which was ++It was created by binutils $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3081,7 +3081,7 @@ fi + + # Define the identity of the package. + PACKAGE='binutils' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by binutils $as_me 2.40.00, which was ++This file was extended by binutils $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -15392,7 +15392,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-binutils config.status 2.40.00 ++binutils config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprof/configure ++++ b/gprof/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprof 2.40.00. ++# Generated by GNU Autoconf 2.69 for gprof 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprof' + PACKAGE_TARNAME='gprof' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='gprof 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='gprof 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprof 2.40.00 to adapt to many kinds of systems. ++\`configure' configures gprof 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1409,7 +1409,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprof 2.40.00:";; ++ short | recursive ) echo "Configuration of gprof 2.40:";; + esac + cat <<\_ACEOF + +@@ -1520,7 +1520,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprof configure 2.40.00 ++gprof configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprof $as_me 2.40.00, which was ++It was created by gprof $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2864,7 +2864,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprof' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprof $as_me 2.40.00, which was ++This file was extended by gprof $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -12638,7 +12638,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprof config.status 2.40.00 ++gprof config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/configure ++++ b/gprofng/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40.00. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='gprofng 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='gprofng 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1362,7 +1362,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1433,7 +1433,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40.00:";; ++ short | recursive ) echo "Configuration of gprofng 2.40:";; + esac + cat <<\_ACEOF + +@@ -1547,7 +1547,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40.00 ++gprofng configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2079,7 +2079,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40.00, which was ++It was created by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3052,7 +3052,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -17467,7 +17467,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40.00, which was ++This file was extended by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -17533,7 +17533,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40.00 ++gprofng config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/doc/version.texi ++++ b/gprofng/doc/version.texi +@@ -1,4 +1,4 @@ + @set UPDATED 5 January 2023 + @set UPDATED-MONTH January 2023 +-@set EDITION 2.40.00 +-@set VERSION 2.40.00 ++@set EDITION 2.40 ++@set VERSION 2.40 +--- a/gprofng/libcollector/configure ++++ b/gprofng/libcollector/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40.00. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='gprofng 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='gprofng 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1396,7 +1396,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40.00:";; ++ short | recursive ) echo "Configuration of gprofng 2.40:";; + esac + cat <<\_ACEOF + +@@ -1505,7 +1505,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40.00 ++gprofng configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40.00, which was ++It was created by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2968,7 +2968,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40.00, which was ++This file was extended by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -16164,7 +16164,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40.00 ++gprofng config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/ld/configure ++++ b/ld/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for ld 2.40.00. ++# Generated by GNU Autoconf 2.69 for ld 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='ld' + PACKAGE_TARNAME='ld' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='ld 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='ld 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures ld 2.40.00 to adapt to many kinds of systems. ++\`configure' configures ld 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1494,7 +1494,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of ld 2.40.00:";; ++ short | recursive ) echo "Configuration of ld 2.40:";; + esac + cat <<\_ACEOF + +@@ -1661,7 +1661,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-ld configure 2.40.00 ++ld configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by ld $as_me 2.40.00, which was ++It was created by ld $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3359,7 +3359,7 @@ fi + + # Define the identity of the package. + PACKAGE='ld' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by ld $as_me 2.40.00, which was ++This file was extended by ld $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -18149,7 +18149,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-ld config.status 2.40.00 ++ld config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + diff --git a/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch b/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch new file mode 100644 index 0000000000..bef40f546f --- /dev/null +++ b/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch @@ -0,0 +1,60 @@ +From bcea253f5fa194e57f9564e8461c718e228bd26e Mon Sep 17 00:00:00 2001 +From: Indu Bhagat +Date: Wed, 18 Jan 2023 23:17:49 -0800 +Subject: [PATCH 10/50] toplevel: Makefile.def: add install-strip dependency on + libsframe + +As noted in PR libsframe/30014 - FTBFS: install-strip fails because +bfdlib relinks and fails to find libsframe, the install time +dependencies of libbfd need to be updated. + + PR libsframe/30014 + * Makefile.def: Reflect that libsframe needs to installed before + libbfd. Reorder a bit to better track libsframe dependencies. + * Makefile.in: Regenerate. + +(cherry picked from commit b8d21eb0cd10d6127e77cc437d82e949adb0c454) +--- + Makefile.def | 5 ++++- + Makefile.in | 3 ++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/Makefile.def ++++ b/Makefile.def +@@ -493,7 +493,6 @@ dependencies = { module=install-binutils + dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; + + // Likewise for ld, libctf, and bfd. +-dependencies = { module=install-bfd; on=install-libsframe; }; + dependencies = { module=install-libctf; on=install-bfd; }; + dependencies = { module=install-ld; on=install-bfd; }; + dependencies = { module=install-ld; on=install-libctf; }; +@@ -501,6 +500,10 @@ dependencies = { module=install-strip-li + dependencies = { module=install-strip-ld; on=install-strip-bfd; }; + dependencies = { module=install-strip-ld; on=install-strip-libctf; }; + ++// libbfd depends on libsframe ++dependencies = { module=install-bfd; on=install-libsframe; }; ++dependencies = { module=install-strip-bfd; on=install-strip-libsframe; }; ++ + // libopcodes depends on libbfd + dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; }; + dependencies = { module=install-opcodes; on=install-bfd; }; +--- a/Makefile.in ++++ b/Makefile.in +@@ -64549,13 +64549,14 @@ all-stageautoprofile-binutils: maybe-all + all-stageautofeedback-binutils: maybe-all-stageautofeedback-libsframe + install-binutils: maybe-install-opcodes + install-strip-binutils: maybe-install-strip-opcodes +-install-bfd: maybe-install-libsframe + install-libctf: maybe-install-bfd + install-ld: maybe-install-bfd + install-ld: maybe-install-libctf + install-strip-libctf: maybe-install-strip-bfd + install-strip-ld: maybe-install-strip-bfd + install-strip-ld: maybe-install-strip-libctf ++install-bfd: maybe-install-libsframe ++install-strip-bfd: maybe-install-strip-libsframe + configure-opcodes: configure-bfd + configure-stage1-opcodes: configure-stage1-bfd + configure-stage2-opcodes: configure-stage2-bfd diff --git a/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch b/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch new file mode 100644 index 0000000000..ae557645c0 --- /dev/null +++ b/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch @@ -0,0 +1,703 @@ +From c6e269febbc946a54ed9dbbb2dc70feba6017607 Mon Sep 17 00:00:00 2001 +From: Vladimir Mezentsev +Date: Fri, 20 Jan 2023 15:39:55 -0800 +Subject: [PATCH 18/50] gprofng: PR29521 [docs] man pages are not in the + release tarball + +gprofng/ChangeLog +2023-01-20 Vladimir Mezentsev + + PR gprofng/29521 + * configure.ac: Check if $MAKEINFO and $HELP2MAN are missing. + * Makefile.am: Build doc if $MAKEINFO exists. + * doc/gprofng.texi: Update documentation for gprofng. + * doc/Makefile.am: Build gprofng.1. + * src/Makefile.am: Move the build of gprofng.1 to doc/Makefile.am. + * configure: Rebuild. + * Makefile.in: Rebuild. + * doc/Makefile.in: Rebuild. + * src/Makefile.in: Rebuild. +--- + gprofng/Makefile.am | 2 +- + gprofng/Makefile.in | 2 +- + gprofng/configure | 79 +++++++++++++++--- + gprofng/configure.ac | 21 +++-- + gprofng/doc/Makefile.am | 24 +++++- + gprofng/doc/Makefile.in | 93 ++++++++++++++++++--- + gprofng/doc/gprofng.texi | 169 +++++++++++++++++++++++++++++++++++++++ + gprofng/src/Makefile.am | 8 +- + gprofng/src/Makefile.in | 8 +- + 9 files changed, 364 insertions(+), 42 deletions(-) + +--- a/gprofng/Makefile.am ++++ b/gprofng/Makefile.am +@@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = dejagnu foreign + if BUILD_COLLECTOR + COLLECTOR_SUBDIRS = libcollector + endif +-if BUILD_MAN ++if BUILD_DOC + DOC_SUBDIR = doc + endif + if BUILD_SRC +--- a/gprofng/Makefile.in ++++ b/gprofng/Makefile.in +@@ -381,7 +381,7 @@ zlibinc = @zlibinc@ + ACLOCAL_AMFLAGS = -I . -I .. + AUTOMAKE_OPTIONS = dejagnu foreign + @BUILD_COLLECTOR_TRUE@COLLECTOR_SUBDIRS = libcollector +-@BUILD_MAN_TRUE@DOC_SUBDIR = doc ++@BUILD_DOC_TRUE@DOC_SUBDIR = doc + @BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR) + SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS) + DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR) +--- a/gprofng/configure ++++ b/gprofng/configure +@@ -639,6 +639,8 @@ GPROFNG_CPPFLAGS + GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS + GPROFNG_CFLAGS + LD_NO_AS_NEEDED ++BUILD_DOC_FALSE ++BUILD_DOC_TRUE + BUILD_MAN_FALSE + BUILD_MAN_TRUE + HELP2MAN +@@ -12221,7 +12223,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12224 "configure" ++#line 12226 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12327,7 +12329,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12330 "configure" ++#line 12332 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -16737,9 +16739,58 @@ fi + + # Generate manpages, if possible. + build_man=false ++build_doc=false + if test $cross_compiling = no; then ++ for ac_prog in help2man ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_HELP2MAN+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$HELP2MAN"; then ++ ac_cv_prog_HELP2MAN="$HELP2MAN" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_HELP2MAN="$ac_prog" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++HELP2MAN=$ac_cv_prog_HELP2MAN ++if test -n "$HELP2MAN"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 ++$as_echo "$HELP2MAN" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + +-HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} ++ ++ test -n "$HELP2MAN" && break ++done ++test -n "$HELP2MAN" || HELP2MAN="$MISSING help2man" ++ ++ case "x$HELP2MAN" in ++ x | */missing\ help2man* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: help2man is missing. Man pages will not be built." >&5 ++$as_echo "$as_me: WARNING: gprofng: help2man is missing. Man pages will not be built." >&2;} ++ ;; ++ * ) build_man=true ;; ++ esac + + for ac_prog in makeinfo + do +@@ -16782,10 +16833,10 @@ fi + + test -n "$MAKEINFO" && break + done +-test -n "$MAKEINFO" || MAKEINFO=""@echo makeinfo missing; true"" ++test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo" + +- case "$MAKEINFO" in +- *true) ++ case "x$MAKEINFO" in ++ x | */missing\ makeinfo*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&5 + $as_echo "$as_me: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&2;} + ;; +@@ -16796,9 +16847,7 @@ $as_echo "$as_me: WARNING: gprofng: make + $as_echo "$as_me: WARNING: gprofng: $MAKEINFO is too old. Info documentation will not be built." >&2;} + MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true" + ;; +- x* ) +- build_man=true +- ;; ++ x* ) build_doc=true ;; + esac + ;; + esac +@@ -16812,6 +16861,14 @@ else + BUILD_MAN_FALSE= + fi + ++ if test x$build_doc = xtrue; then ++ BUILD_DOC_TRUE= ++ BUILD_DOC_FALSE='#' ++else ++ BUILD_DOC_TRUE='#' ++ BUILD_DOC_FALSE= ++fi ++ + + LD_NO_AS_NEEDED=${no_as_needed} + +@@ -17070,6 +17127,10 @@ if test -z "${BUILD_MAN_TRUE}" && test - + as_fn_error $? "conditional \"BUILD_MAN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then ++ as_fn_error $? "conditional \"BUILD_DOC\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +--- a/gprofng/configure.ac ++++ b/gprofng/configure.ac +@@ -210,11 +210,19 @@ AM_ZLIB + + # Generate manpages, if possible. + build_man=false ++build_doc=false + if test $cross_compiling = no; then +- AM_MISSING_PROG(HELP2MAN, help2man) +- AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"]) +- case "$MAKEINFO" in +- *true) ++ AC_CHECK_PROGS([HELP2MAN], help2man, [$MISSING help2man]) ++ case "x$HELP2MAN" in ++ x | */missing\ help2man* ) ++ AC_MSG_WARN([gprofng: help2man is missing. Man pages will not be built.]) ++ ;; ++ * ) build_man=true ;; ++ esac ++ ++ AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo]) ++ case "x$MAKEINFO" in ++ x | */missing\ makeinfo*) + AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will not be built.]) + ;; + *) +@@ -223,15 +231,14 @@ if test $cross_compiling = no; then + AC_MSG_WARN([gprofng: $MAKEINFO is too old. Info documentation will not be built.]) + MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true" + ;; +- x* ) +- build_man=true +- ;; ++ x* ) build_doc=true ;; + esac + ;; + esac + AC_SUBST(MAKEINFO) + fi + AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue]) ++AM_CONDITIONAL([BUILD_DOC], [test x$build_doc = xtrue]) + + AC_SUBST(LD_NO_AS_NEEDED, [${no_as_needed}]) + AC_SUBST(GPROFNG_CFLAGS, [${gprofng_cflags}]) +--- a/gprofng/doc/Makefile.am ++++ b/gprofng/doc/Makefile.am +@@ -19,9 +19,31 @@ + + AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex + ++# Options to extract the man page ++MANCONF = -Dman ++ ++TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS) ++POD2MAN = pod2man --center="User Commands" \ ++ --release="binutils-$(VERSION)" --section=1 ++ + info_TEXINFOS = gprofng.texi + gprofng_TEXINFOS = fdl.texi + TEXINFO_TEX = . + MAKEINFOHTML = $(MAKEINFO) --html --no-split + +-MAINTAINERCLEANFILES = gprofng.info ++man_MANS = gprofng.1 ++ ++# Build the man page from the texinfo file ++# The sed command removes the no-adjust Nroff command so that ++# the man output looks standard. ++gprofng.1: $(srcdir)/gprofng.texi ++ $(AM_V_GEN)touch $@ ++ $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod ++ $(AM_V_at)-($(POD2MAN) gprofng.pod | \ ++ sed -e '/^.if n .na/d' > $@.tmp && \ ++ mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1) ++ $(AM_V_at)rm -f gprofng.pod ++ ++MAINTAINERCLEANFILES = gprofng.info $(man_MANS) ++ ++info: $(man_MANS) +--- a/gprofng/doc/Makefile.in ++++ b/gprofng/doc/Makefile.in +@@ -182,7 +182,7 @@ am__can_run_installinfo = \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +-am__installdirs = "$(DESTDIR)$(infodir)" ++am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; + am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ +@@ -210,6 +210,9 @@ am__uninstall_files_from_dir = { \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } ++man1dir = $(mandir)/man1 ++NROFF = nroff ++MANS = $(man_MANS) + am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) + am__DIST_COMMON = $(gprofng_TEXINFOS) $(srcdir)/Makefile.in \ + $(top_srcdir)/../mkinstalldirs mdate-sh texinfo.tex +@@ -361,11 +364,19 @@ top_srcdir = @top_srcdir@ + zlibdir = @zlibdir@ + zlibinc = @zlibinc@ + AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex ++ ++# Options to extract the man page ++MANCONF = -Dman ++TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS) ++POD2MAN = pod2man --center="User Commands" \ ++ --release="binutils-$(VERSION)" --section=1 ++ + info_TEXINFOS = gprofng.texi + gprofng_TEXINFOS = fdl.texi + TEXINFO_TEX = . + MAKEINFOHTML = $(MAKEINFO) --html --no-split +-MAINTAINERCLEANFILES = gprofng.info ++man_MANS = gprofng.1 ++MAINTAINERCLEANFILES = gprofng.info $(man_MANS) + all: all-am + + .SUFFIXES: +@@ -558,6 +569,49 @@ maintainer-clean-aminfo: + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done ++install-man1: $(man_MANS) ++ @$(NORMAL_INSTALL) ++ @list1=''; \ ++ list2='$(man_MANS)'; \ ++ test -n "$(man1dir)" \ ++ && test -n "`echo $$list1$$list2`" \ ++ || exit 0; \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ ++ { for i in $$list1; do echo "$$i"; done; \ ++ if test -n "$$list2"; then \ ++ for i in $$list2; do echo "$$i"; done \ ++ | sed -n '/\.1[a-z]*$$/p'; \ ++ fi; \ ++ } | while read p; do \ ++ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; echo "$$p"; \ ++ done | \ ++ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ ++ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ ++ sed 'N;N;s,\n, ,g' | { \ ++ list=; while read file base inst; do \ ++ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ ++ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ ++ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ ++ fi; \ ++ done; \ ++ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ ++ while read files; do \ ++ test -z "$$files" || { \ ++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ ++ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ ++ done; } ++ ++uninstall-man1: ++ @$(NORMAL_UNINSTALL) ++ @list=''; test -n "$(man1dir)" || exit 0; \ ++ files=`{ for i in $$list; do echo "$$i"; done; \ ++ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ ++ sed -n '/\.1[a-z]*$$/p'; \ ++ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ ++ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ ++ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + tags TAGS: + + ctags CTAGS: +@@ -600,9 +654,9 @@ distdir: $(DISTFILES) + dist-info + check-am: all-am + check: check-am +-all-am: Makefile $(INFO_DEPS) ++all-am: Makefile $(INFO_DEPS) $(MANS) + installdirs: +- for dir in "$(DESTDIR)$(infodir)"; do \ ++ for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: install-am +@@ -652,11 +706,9 @@ html: html-am + + html-am: $(HTMLS) + +-info: info-am +- + info-am: $(INFO_DEPS) + +-install-data-am: install-info-am ++install-data-am: install-info-am install-man + + install-dvi: install-dvi-am + +@@ -739,7 +791,7 @@ install-info-am: $(INFO_DEPS) + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +-install-man: ++install-man: install-man1 + + install-pdf: install-pdf-am + +@@ -794,7 +846,9 @@ ps: ps-am + ps-am: $(PSS) + + uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ +- uninstall-pdf-am uninstall-ps-am ++ uninstall-man uninstall-pdf-am uninstall-ps-am ++ ++uninstall-man: uninstall-man1 + + .MAKE: install-am install-strip + +@@ -804,19 +858,32 @@ uninstall-am: uninstall-dvi-am uninstall + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ +- install-info-am install-man install-pdf install-pdf-am \ +- install-ps install-ps-am install-strip installcheck \ +- installcheck-am installdirs maintainer-clean \ ++ install-info-am install-man install-man1 install-pdf \ ++ install-pdf-am install-ps install-ps-am install-strip \ ++ installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic \ + maintainer-clean-vti mostlyclean mostlyclean-aminfo \ + mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am \ + uninstall-dvi-am uninstall-html-am uninstall-info-am \ +- uninstall-pdf-am uninstall-ps-am ++ uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am + + .PRECIOUS: Makefile + + ++# Build the man page from the texinfo file ++# The sed command removes the no-adjust Nroff command so that ++# the man output looks standard. ++gprofng.1: $(srcdir)/gprofng.texi ++ $(AM_V_GEN)touch $@ ++ $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod ++ $(AM_V_at)-($(POD2MAN) gprofng.pod | \ ++ sed -e '/^.if n .na/d' > $@.tmp && \ ++ mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1) ++ $(AM_V_at)rm -f gprofng.pod ++ ++info: $(man_MANS) ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- a/gprofng/doc/gprofng.texi ++++ b/gprofng/doc/gprofng.texi +@@ -1,5 +1,8 @@ + \input texinfo @c -*-texinfo-*- + ++@c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES ++@c BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { ++ + @c ---------------------------------------------------------------------------- + @c This is the Texinfo source file for the GPROFNG manual. + @c +@@ -59,6 +62,10 @@ gprofng + @cindex \label\, \string\ + @end macro + ++@macro gcctabopt{body} ++@code{\body\} ++@end macro ++ + @c -- Get the version information --------------------------------------------- + @include version.texi + +@@ -99,6 +106,20 @@ section entitled ``GNU Free Documentatio + @page + @vskip 0pt plus 1filll + @insertcopying ++ ++@c man begin COPYRIGHT ++ ++Copyright @copyright{} 2022-2023 Free Software Foundation, Inc. ++ ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the GNU Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled ``GNU Free Documentation License''. ++ ++@c man end ++ + @end titlepage + + @c -- Generate the Table of Contents ------------------------------------------ +@@ -163,6 +184,154 @@ Terminology + @end menu + @end ifinfo + ++@ifset man ++ ++@c man title gprofng the driver for the gprofng tool suite ++ ++@c man begin SYNOPSIS ++gprofng [OPTION(S)] ACTION [@b{QUALIFIER}] [ARGUMENTS] TARGET ++@c man end ++ ++@c man begin DESCRIPTION ++This is the driver for the GPROFNG tools suite to gather and analyze performance data. ++ ++The driver executes the action specified. An example of an action is @code{collect} ++to collect performance data. Depending on the action, a qualifier may be needed to ++define the command. Several qualifiers support options. The last item on the command ++is the target the command applies to. ++ ++For example, to collect performance data for an application called @code{a.out} and ++store the results in experiment directory @code{mydata.er}, the following command may ++be used: ++ ++@smallexample ++$ gprofng collect app -o mydata.er a.out ++@end smallexample ++ ++In this example, the action is @code{collect}, the qualifier is @code{app}, the single ++argument is @code{-o mydata.er} and the target is @code{a.out}. ++ ++If gprofng is executed without any additional option, action, or target, a usage ++overview is printed. ++ ++@c man end ++ ++@c man begin OPTIONS ++ ++@table @gcctabopt ++ ++@item @var{--version} ++print the version number and exit. ++ ++@item @var{--help} ++print usage information and exit. ++ ++@end table ++ ++@c man end ++ ++@c man begin NOTES ++ ++The gprofng driver supports the following commands. ++ ++@c The man pages for the commands below can be viewed using the command name with "gprofng" replaced by "gp" and the spaces replaced by a dash ("-"). For example the man page ++@c name for "gprofng collect app" is "gp-collect-app". ++ ++Collect performance data: ++ ++@table @code ++ ++@item gprofng collect app ++collect application performance data. ++ ++@end table ++ ++Display the performance results: ++ ++@table @code ++ ++@item gprofng display text ++display the performance data in ASCII format. ++ ++@item gprofng display html ++generate an HTML file from one or more experiments. ++ ++@end table ++ ++Miscellaneous commands: ++ ++@table @code ++ ++@item gprofng display src ++display source or disassembly with compiler annotations. ++ ++@item gprofng archive ++include binaries and source code in an experiment directory. ++ ++@end table ++ ++It is also possible to invoke the lower level commands directly, but since ++these are subject to change, in particular the options, we recommend to ++use the driver. ++ ++@c man end ++ ++@c man begin ENVIRONMENT ++The following environment variables are supported: ++ ++@table @code ++ ++@item @env{GPROFNG_MAX_CALL_STACK_DEPTH} ++set the depth of the call stack (default is 256). ++ ++@item @env{GPROFNG_USE_JAVA_OPTIONS} ++may be set when profiling a C/C++ application that uses dlopen() to execute Java code. ++ ++@item @env{GPROFNG_SSH_REMOTE_DISPLAY} ++use this variable to define the ssh command executed by the remote display tool. ++ ++@item @env{GPROFNG_SKIP_VALIDATION} ++set this variable to disable checking hardware, system, and Java versions. ++ ++@item @env{GPROFNG_ALLOW_CORE_DUMP} ++set this variable to allow a core file to be generated; otherwise an error report is created on /tmp. ++ ++@item @env{GPROFNG_ARCHIVE} ++use this variable to define the settings for automatic archiving upon experiment recording completion. ++ ++@item @env{GPROFNG_ARCHIVE_COMMON_DIR} ++set this variable to the location of the common archive. ++ ++@item @env{GPROFNG_JAVA_MAX_CALL_STACK_DEPTH} ++set the depth of the Java call stack; the default is 256; set to 0 to disable capturing of call stacks. ++ ++@item @env{GPROFNG_JAVA_NATIVE_MAX_CALL_STACK_DEPTH} ++set the depth of the Java native call stack; the default is 256; set to 0 to disable capturing of call stacks (JNI and assembly call stacks are not captured). ++ ++@end table ++ ++@c man end ++ ++@c man begin SEEALSO ++The man pages for the various gprofng commands are not available yet, but ++the @option{--help} option supported on each of the commands lists the options ++and provides more information. ++ ++For example this displays the options supported on the @command{gprofng collect app} ++command: ++ ++@smallexample ++$ gprofng collect app --help ++@end smallexample ++ ++The user guide is available as an Info entry for @file{gprofng}. ++@c man end ++ ++@end ifset ++ ++@c man begin DESCRIPTION ++@c man end ++ + @c -- A new node -------------------------------------------------------------- + @node Introduction + @chapter Introduction +--- a/gprofng/src/Makefile.am ++++ b/gprofng/src/Makefile.am +@@ -160,7 +160,7 @@ gp_display_text_LDADD = $(LIBGPROFNG) $( + + if BUILD_MAN + +-man_MANS = gprofng.1 \ ++man_MANS = \ + gp-archive.1 \ + gp-collect-app.1 \ + gp-display-src.1 \ +@@ -191,10 +191,6 @@ H2M_FILTER = | sed 's/\.TP/\.TP\n.B/' | + | sed 's/See also:/\.SH SEE ALSO/' | sed 's/Documentation:/.SH DOCUMENTATION/' \ + | sed 's/Limitations:/.SH LIMITATIONS/' + +-gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT) +- $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ +- --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@ +- + gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT) + $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ + --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@ +@@ -223,3 +219,5 @@ dist-hook: $(LIBGPROFNG) + + install-data-local: install-pkglibLTLIBRARIES + rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a ++ ++$(srcdir)/DbeSession.cc: QLParser.tab.hh +--- a/gprofng/src/Makefile.in ++++ b/gprofng/src/Makefile.in +@@ -572,7 +572,7 @@ gp_display_src_SOURCES = gp-display-src. + gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB) + gp_display_text_SOURCES = gp-display-text.cc ipc.cc ipcio.cc + gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB) +-@BUILD_MAN_TRUE@man_MANS = gprofng.1 \ ++@BUILD_MAN_TRUE@man_MANS = \ + @BUILD_MAN_TRUE@ gp-archive.1 \ + @BUILD_MAN_TRUE@ gp-collect-app.1 \ + @BUILD_MAN_TRUE@ gp-display-src.1 \ +@@ -1176,10 +1176,6 @@ uninstall-man: uninstall-man1 + QLParser.tab.cc QLParser.tab.hh: QLParser.yy + $(BISON) $^ + +-@BUILD_MAN_TRUE@gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT) +-@BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ +-@BUILD_MAN_TRUE@ --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@ +- + @BUILD_MAN_TRUE@gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT) + @BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ + @BUILD_MAN_TRUE@ --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@ +@@ -1207,6 +1203,8 @@ dist-hook: $(LIBGPROFNG) + install-data-local: install-pkglibLTLIBRARIES + rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a + ++$(srcdir)/DbeSession.cc: QLParser.tab.hh ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch b/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch new file mode 100644 index 0000000000..d8d76a2961 --- /dev/null +++ b/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch @@ -0,0 +1,212 @@ +From edd36b26f3506eeb259534ba2493e15c728cd280 Mon Sep 17 00:00:00 2001 +From: Vladimir Mezentsev +Date: Wed, 25 Jan 2023 19:21:38 -0800 +Subject: [PATCH 20/50] gprofng: PR30043 libgprofng.so.* are installed to a + wrong location + +gprofng/ChangeLog +2023-01-25 Vladimir Mezentsev + + PR gprofng/30043 + PR gprofng/28972 + * src/Makefile.am: Use lib_LTLIBRARIES instead of pkglib_LTLIBRARIES. + * src/Makefile.in: Rebuild. +--- + gprofng/src/Makefile.am | 7 +--- + gprofng/src/Makefile.in | 76 +++++++++++++++++++---------------------- + 2 files changed, 37 insertions(+), 46 deletions(-) + +--- a/gprofng/src/Makefile.am ++++ b/gprofng/src/Makefile.am +@@ -124,7 +124,7 @@ BUILT_SOURCES = QLParser.tab.hh + EXTRA_DIST = QLParser.yy $(man_MANS) + + +-pkglib_LTLIBRARIES = $(LIBGPROFNG) ++lib_LTLIBRARIES = $(LIBGPROFNG) + libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES) + libgprofng_la_LDFLAGS = -version-info 0:0:0 + +@@ -215,9 +215,4 @@ endif + # so ensure that the necessary libraries are built at dist time. + dist-hook: $(LIBGPROFNG) + +-.PHONY: install-data-local +- +-install-data-local: install-pkglibLTLIBRARIES +- rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a +- + $(srcdir)/DbeSession.cc: QLParser.tab.hh +--- a/gprofng/src/Makefile.in ++++ b/gprofng/src/Makefile.in +@@ -155,9 +155,9 @@ am__uninstall_files_from_dir = { \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +-am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \ ++am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)" +-LTLIBRARIES = $(pkglib_LTLIBRARIES) ++LTLIBRARIES = $(lib_LTLIBRARIES) + am__DEPENDENCIES_1 = + libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la \ + $(top_builddir)/../bfd/libbfd.la $(am__DEPENDENCIES_1) +@@ -548,7 +548,7 @@ AM_CFLAGS = $(GPROFNG_CFLAGS) $(PTHREAD_ + AM_CXXFLAGS = $(AM_CFLAGS) + BUILT_SOURCES = QLParser.tab.hh + EXTRA_DIST = QLParser.yy $(man_MANS) +-pkglib_LTLIBRARIES = $(LIBGPROFNG) ++lib_LTLIBRARIES = $(LIBGPROFNG) + libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES) + libgprofng_la_LDFLAGS = -version-info 0:0:0 + +@@ -636,33 +636,33 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $( + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__aclocal_m4_deps): + +-install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) ++install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ ++ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ +- echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ +- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ +- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +-uninstall-pkglibLTLIBRARIES: ++uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) +- @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ ++ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ +- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ +- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +-clean-pkglibLTLIBRARIES: +- -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) +- @list='$(pkglib_LTLIBRARIES)'; \ ++clean-libLTLIBRARIES: ++ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) ++ @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ +@@ -672,7 +672,7 @@ clean-pkglibLTLIBRARIES: + } + + libgprofng.la: $(libgprofng_la_OBJECTS) $(libgprofng_la_DEPENDENCIES) $(EXTRA_libgprofng_la_DEPENDENCIES) +- $(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(pkglibdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS) ++ $(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(libdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS) + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ +@@ -1039,8 +1039,10 @@ check-am: all-am + check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am + all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) ++install-binPROGRAMS: install-libLTLIBRARIES ++ + installdirs: +- for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \ ++ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: $(BUILT_SOURCES) +@@ -1078,8 +1080,8 @@ maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + clean: clean-am + +-clean-am: clean-binPROGRAMS clean-generic clean-libtool \ +- clean-pkglibLTLIBRARIES mostlyclean-am ++clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ ++ clean-libtool mostlyclean-am + + distclean: distclean-am + -rm -rf ./$(DEPDIR) +@@ -1099,13 +1101,13 @@ info: info-am + + info-am: + +-install-data-am: install-data-local install-dbeDATA install-man ++install-data-am: install-dbeDATA install-man + + install-dvi: install-dvi-am + + install-dvi-am: + +-install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES ++install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + + install-html: install-html-am + +@@ -1145,30 +1147,29 @@ ps: ps-am + + ps-am: + +-uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA uninstall-man \ +- uninstall-pkglibLTLIBRARIES ++uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA \ ++ uninstall-libLTLIBRARIES uninstall-man + + uninstall-man: uninstall-man1 + + .MAKE: all check install install-am install-strip + + .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +- clean-binPROGRAMS clean-generic clean-libtool \ +- clean-pkglibLTLIBRARIES cscopelist-am ctags ctags-am dist-hook \ +- distclean distclean-compile distclean-generic \ +- distclean-libtool distclean-tags distdir dvi dvi-am html \ +- html-am info info-am install install-am install-binPROGRAMS \ +- install-data install-data-am install-data-local \ +- install-dbeDATA install-dvi install-dvi-am install-exec \ +- install-exec-am install-html install-html-am install-info \ +- install-info-am install-man install-man1 install-pdf \ +- install-pdf-am install-pkglibLTLIBRARIES install-ps \ ++ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ ++ clean-libtool cscopelist-am ctags ctags-am dist-hook distclean \ ++ distclean-compile distclean-generic distclean-libtool \ ++ distclean-tags distdir dvi dvi-am html html-am info info-am \ ++ install install-am install-binPROGRAMS install-data \ ++ install-data-am install-dbeDATA install-dvi install-dvi-am \ ++ install-exec install-exec-am install-html install-html-am \ ++ install-info install-info-am install-libLTLIBRARIES \ ++ install-man install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dbeDATA \ +- uninstall-man uninstall-man1 uninstall-pkglibLTLIBRARIES ++ uninstall-libLTLIBRARIES uninstall-man uninstall-man1 + + .PRECIOUS: Makefile + +@@ -1198,11 +1199,6 @@ QLParser.tab.cc QLParser.tab.hh: QLParse + # so ensure that the necessary libraries are built at dist time. + dist-hook: $(LIBGPROFNG) + +-.PHONY: install-data-local +- +-install-data-local: install-pkglibLTLIBRARIES +- rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a +- + $(srcdir)/DbeSession.cc: QLParser.tab.hh + + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch b/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch new file mode 100644 index 0000000000..4129a22906 --- /dev/null +++ b/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch @@ -0,0 +1,115 @@ +From 27f59ec47a18277b6ea3548f405263ef558f5217 Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Tue, 31 Jan 2023 09:47:22 +0100 +Subject: [PATCH 26/50] RISC-V: make C-extension JAL available again for + (32-bit) assembly + +Along with the normal JAL alias, the C-extension one should have been +moved as well by 839189bc932e ("RISC-V: re-arrange opcode table for +consistent alias handling"), for the assembler to actually be able to +use it where/when possible. + +Since neither this nor any other compressed branch insn was being tested +so far, take the opportunity and introduce a new testcase covering those. +--- + gas/config/tc-riscv.c | 3 +++ + gas/testsuite/gas/riscv/c-branch-na.d | 20 ++++++++++++++++++++ + gas/testsuite/gas/riscv/c-branch.d | 19 +++++++++++++++++++ + gas/testsuite/gas/riscv/c-branch.s | 11 +++++++++++ + opcodes/riscv-opc.c | 2 +- + 5 files changed, 54 insertions(+), 1 deletion(-) + create mode 100644 gas/testsuite/gas/riscv/c-branch-na.d + create mode 100644 gas/testsuite/gas/riscv/c-branch.d + create mode 100644 gas/testsuite/gas/riscv/c-branch.s + +--- a/gas/config/tc-riscv.c ++++ b/gas/config/tc-riscv.c +@@ -2762,6 +2762,8 @@ riscv_ip (char *str, struct riscv_cl_ins + case 'p': + goto branch; + case 'a': ++ if (oparg == insn->args + 1) ++ goto jump_check_gpr; + goto jump; + case 'S': /* Floating-point RS1 x8-x15. */ + if (!reg_lookup (&asarg, RCLASS_FPR, ®no) +@@ -3271,6 +3273,7 @@ riscv_ip (char *str, struct riscv_cl_ins + but the 2nd (with 2 operands) might. */ + if (oparg == insn->args) + { ++ jump_check_gpr: + asargStart = asarg; + if (reg_lookup (&asarg, RCLASS_GPR, NULL) + && (*asarg == ',' || (ISSPACE (*asarg) && asarg[1] == ','))) +--- /dev/null ++++ b/gas/testsuite/gas/riscv/c-branch-na.d +@@ -0,0 +1,20 @@ ++#as: -march=rv32ic ++#source: c-branch.s ++#objdump: -drw -Mno-aliases ++ ++.*:[ ]+file format .* ++ ++ ++Disassembly of section .text: ++ ++0+ : ++[ ]+[0-9a-f]+:[ ]+c001[ ]+c\.beqz[ ]+s0,0 [ ]+0: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+dcfd[ ]+c\.beqz[ ]+s1,0 [ ]+2: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fc75[ ]+c\.bnez[ ]+s0,0 [ ]+4: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fced[ ]+c\.bnez[ ]+s1,0 [ ]+6: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+bfe5[ ]+c\.j[ ]+0 [ ]+8: R_RISCV_RVC_JUMP .* ++[ ]+[0-9a-f]+:[ ]+3fdd[ ]+c\.jal[ ]+0 [ ]+a: R_RISCV_RVC_JUMP .* ++[ ]+[0-9a-f]+:[ ]+9302[ ]+c\.jalr[ ]+t1 ++[ ]+[0-9a-f]+:[ ]+8382[ ]+c\.jr[ ]+t2 ++[ ]+[0-9a-f]+:[ ]+8082[ ]+c\.jr[ ]+ra ++#... +--- /dev/null ++++ b/gas/testsuite/gas/riscv/c-branch.d +@@ -0,0 +1,19 @@ ++#as: -march=rv64ic ++#objdump: -drw ++ ++.*:[ ]+file format .* ++ ++ ++Disassembly of section .text: ++ ++0+ : ++[ ]+[0-9a-f]+:[ ]+c001[ ]+beqz[ ]+s0,0 [ ]+0: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+dcfd[ ]+beqz[ ]+s1,0 [ ]+2: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fc75[ ]+bnez[ ]+s0,0 [ ]+4: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fced[ ]+bnez[ ]+s1,0 [ ]+6: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+bfe5[ ]+j[ ]+0 [ ]+8: R_RISCV_RVC_JUMP .* ++[ ]+[0-9a-f]+:[ ]+ff7ff0ef[ ]+jal[ ]+0 [ ]+a: R_RISCV_JAL .* ++[ ]+[0-9a-f]+:[ ]+9302[ ]+jalr[ ]+t1 ++[ ]+[0-9a-f]+:[ ]+8382[ ]+jr[ ]+t2 ++[ ]+[0-9a-f]+:[ ]+8082[ ]+ret ++#... +--- /dev/null ++++ b/gas/testsuite/gas/riscv/c-branch.s +@@ -0,0 +1,11 @@ ++ .text ++target: ++ beq x8, x0, target ++ beqz x9, target ++ bne x8, x0, target ++ bnez x9, target ++ j target ++ jal target ++ jalr x6 ++ jr x7 ++ ret +--- a/opcodes/riscv-opc.c ++++ b/opcodes/riscv-opc.c +@@ -340,9 +340,9 @@ const struct riscv_opcode riscv_opcodes[ + {"jalr", 0, INSN_CLASS_I, "d,s,j", MATCH_JALR, MASK_JALR, match_opcode, INSN_JSR }, + {"j", 0, INSN_CLASS_C, "Ca", MATCH_C_J, MASK_C_J, match_opcode, INSN_ALIAS|INSN_BRANCH }, + {"j", 0, INSN_CLASS_I, "a", MATCH_JAL, MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_BRANCH }, ++{"jal", 32, INSN_CLASS_C, "Ca", MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR }, + {"jal", 0, INSN_CLASS_I, "a", MATCH_JAL|(X_RA << OP_SH_RD), MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_JSR }, + {"jal", 0, INSN_CLASS_I, "d,a", MATCH_JAL, MASK_JAL, match_opcode, INSN_JSR }, +-{"jal", 32, INSN_CLASS_C, "Ca", MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR }, + {"call", 0, INSN_CLASS_I, "d,c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO }, + {"call", 0, INSN_CLASS_I, "c", (X_RA << OP_SH_RS1)|(X_RA << OP_SH_RD), (int) M_CALL, match_never, INSN_MACRO }, + {"tail", 0, INSN_CLASS_I, "c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO }, diff --git a/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch b/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch new file mode 100644 index 0000000000..d4317cdb0f --- /dev/null +++ b/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch @@ -0,0 +1,209 @@ +From 3e888977f165594cf44dbe8f67e3a4960b22c11f Mon Sep 17 00:00:00 2001 +From: "Guillermo E. Martinez" +Date: Fri, 3 Feb 2023 11:17:49 -0600 +Subject: [PATCH 34/50] bpf: fix error conversion from long unsigned int to + unsigned int [-Werror=overflow] +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Regenerating BPF target using the maintainer mode emits: +.../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow] + 57 | 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + +The use of a narrow size to handle the mask CGEN in instruction format +is causing this error. Additionally eBPF `call' instructions +constructed by expressions using symbols (BPF_PSEUDO_CALL) emits +annotations in `src' field of the instruction, used to identify BPF +target endianness. + +cpu/ + * bpf.cpu (define-call-insn): Remove `src' field from + instruction mask. + +include/ + *opcode/cge.h (CGEN_IFMT): Adjust mask bit width. + +opcodes/ + * bpf-opc.c: Regenerate. + +(cherry picked from commit 7f6ebecd56e690012b05af0a492280765b17f186) +--- + cpu/bpf.cpu | 2 +- + include/opcode/cgen.h | 2 +- + opcodes/bpf-opc.c | 54 +++++++++++++++++++++++-------------------- + opcodes/cgen-dis.c | 2 +- + 4 files changed, 32 insertions(+), 28 deletions(-) + +--- a/cpu/bpf.cpu ++++ b/cpu/bpf.cpu +@@ -768,7 +768,7 @@ + "call" + (endian-isas x-endian) + "call $disp32" +- (+ disp32 (f-offset16 0) (f-regs 0) ++ (+ disp32 (f-offset16 0) (.sym src x-endian) ((.sym f-dst x-endian) 0) + OP_CLASS_JMP OP_SRC_K OP_CODE_CALL) + (c-call VOID + "bpfbf_call" disp32 (ifield (.sym f-src x-endian))) +--- a/include/opcode/cgen.h ++++ b/include/opcode/cgen.h +@@ -914,7 +914,7 @@ typedef struct + Each insn's value is stored with the insn. + The first step in recognizing an insn for disassembly is + (opcode & mask) == value. */ +- CGEN_INSN_INT mask; ++ CGEN_INSN_LGUINT mask; + #define CGEN_IFMT_MASK(ifmt) ((ifmt)->mask) + + /* Instruction fields. +--- a/opcodes/bpf-opc.c ++++ b/opcodes/bpf-opc.c +@@ -50,99 +50,103 @@ static const CGEN_IFMT ifmt_empty ATTRIB + }; + + static const CGEN_IFMT ifmt_addile ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_addrle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_negle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffffffffffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_addibe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_addrbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_negbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_endlele ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_endlebe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_lddwle ATTRIBUTE_UNUSED = { +- 64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 128, 0xfffff0ff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_lddwbe ATTRIBUTE_UNUSED = { +- 64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 128, 0xffff0fff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldabsw ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldindwle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldindwbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldxwle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldxwbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_stble ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_stbbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqile ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqrle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqibe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqrbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_callle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++}; ++ ++static const CGEN_IFMT ifmt_callbe ATTRIBUTE_UNUSED = { ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ja ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff0000ffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_exit ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + #undef F +@@ -1646,7 +1650,7 @@ static const CGEN_OPCODE bpf_cgen_insn_o + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (DISP32), 0 } }, +- & ifmt_callle, { 0x85 } ++ & ifmt_callbe, { 0x85 } + }, + /* call $dstle */ + { +--- a/opcodes/cgen-dis.c ++++ b/opcodes/cgen-dis.c +@@ -39,7 +39,7 @@ static void add_insn_to_hash_chain (CG + static int + count_decodable_bits (const CGEN_INSN *insn) + { +- unsigned mask = CGEN_INSN_BASE_MASK (insn); ++ CGEN_INSN_LGUINT mask = CGEN_INSN_BASE_MASK (insn); + #if GCC_VERSION >= 3004 + return __builtin_popcount (mask); + #else diff --git a/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch b/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch new file mode 100644 index 0000000000..3741c08a0c --- /dev/null +++ b/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch @@ -0,0 +1,50 @@ +From e1815414077347097e5bf0d75162add955e241d9 Mon Sep 17 00:00:00 2001 +From: Romain Geissler +Date: Sun, 5 Feb 2023 13:56:34 +0000 +Subject: [PATCH 35/50] Pass $JANSSON_LIBS and $ZSTD_LIBS to + ld-bootstrap/bootrap.exp + +--- + ld/Makefile.am | 1 + + ld/Makefile.in | 1 + + ld/testsuite/ld-bootstrap/bootstrap.exp | 4 ++-- + 3 files changed, 4 insertions(+), 2 deletions(-) + +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -992,6 +992,7 @@ check-DEJAGNU: site.exp + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \ + SFRAMELIB="$(TESTSFRAMELIB)" \ ++ JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \ + LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \ + DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \ + $(RUNTESTFLAGS); \ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -2645,6 +2645,7 @@ check-DEJAGNU: site.exp + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \ + SFRAMELIB="$(TESTSFRAMELIB)" \ ++ JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \ + LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \ + DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \ + $(RUNTESTFLAGS); \ +--- a/ld/testsuite/ld-bootstrap/bootstrap.exp ++++ b/ld/testsuite/ld-bootstrap/bootstrap.exp +@@ -162,13 +162,13 @@ foreach flags $test_flags { + } + + if { [lindex [remote_exec build grep "-q \"HAVE_ZSTD 1\" config.h" ] 0] == 0 } then { +- set extralibs "$extralibs -lzstd" ++ set extralibs "$extralibs $ZSTD_LIBS" + } + + # Check if the system's jansson library is used. If so, the object files will + # be using symbols from it, so link to it. + if { [lindex [remote_exec build grep "-q \"HAVE_JANSSON 1\" config.h" ] 0] == 0 } then { +- set extralibs "$extralibs -ljansson" ++ set extralibs "$extralibs $JANSSON_LIBS" + } + + # Plugin support requires linking with libdl. diff --git a/toolchain/binutils/patches/2.40/036-Regen-config-files.patch b/toolchain/binutils/patches/2.40/036-Regen-config-files.patch new file mode 100644 index 0000000000..1c80dde310 --- /dev/null +++ b/toolchain/binutils/patches/2.40/036-Regen-config-files.patch @@ -0,0 +1,714 @@ +From 1fc096a4c590f28e0efb1823cdca653f2db9de74 Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Mon, 6 Feb 2023 10:48:59 +1030 +Subject: [PATCH 36/50] Regen config files + +For the version update to 2.40.0 +--- + bfd/configure | 20 ++++++++++---------- + binutils/configure | 20 ++++++++++---------- + gas/configure | 20 ++++++++++---------- + gprof/configure | 20 ++++++++++---------- + gprofng/configure | 20 ++++++++++---------- + gprofng/doc/version.texi | 8 ++++---- + gprofng/libcollector/configure | 20 ++++++++++---------- + intl/configure | 3 +++ + ld/configure | 20 ++++++++++---------- + opcodes/configure | 20 ++++++++++---------- + 10 files changed, 87 insertions(+), 84 deletions(-) + +--- a/bfd/configure ++++ b/bfd/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for bfd 2.40. ++# Generated by GNU Autoconf 2.69 for bfd 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='bfd' + PACKAGE_TARNAME='bfd' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='bfd 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='bfd 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1400,7 +1400,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures bfd 2.40 to adapt to many kinds of systems. ++\`configure' configures bfd 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1471,7 +1471,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of bfd 2.40:";; ++ short | recursive ) echo "Configuration of bfd 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1608,7 +1608,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-bfd configure 2.40 ++bfd configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by bfd $as_me 2.40, which was ++It was created by bfd $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3184,7 +3184,7 @@ fi + + # Define the identity of the package. + PACKAGE='bfd' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -15906,7 +15906,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by bfd $as_me 2.40, which was ++This file was extended by bfd $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -15972,7 +15972,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-bfd config.status 2.40 ++bfd config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/binutils/configure ++++ b/binutils/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for binutils 2.40. ++# Generated by GNU Autoconf 2.69 for binutils 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='binutils' + PACKAGE_TARNAME='binutils' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='binutils 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='binutils 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures binutils 2.40 to adapt to many kinds of systems. ++\`configure' configures binutils 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1472,7 +1472,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of binutils 2.40:";; ++ short | recursive ) echo "Configuration of binutils 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1631,7 +1631,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-binutils configure 2.40 ++binutils configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by binutils $as_me 2.40, which was ++It was created by binutils $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3081,7 +3081,7 @@ fi + + # Define the identity of the package. + PACKAGE='binutils' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by binutils $as_me 2.40, which was ++This file was extended by binutils $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -15392,7 +15392,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-binutils config.status 2.40 ++binutils config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gas/configure ++++ b/gas/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gas 2.40. ++# Generated by GNU Autoconf 2.69 for gas 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gas' + PACKAGE_TARNAME='gas' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gas 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gas 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1381,7 +1381,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gas 2.40 to adapt to many kinds of systems. ++\`configure' configures gas 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1452,7 +1452,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gas 2.40:";; ++ short | recursive ) echo "Configuration of gas 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1600,7 +1600,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gas configure 2.40 ++gas configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2011,7 +2011,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gas $as_me 2.40, which was ++It was created by gas $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2990,7 +2990,7 @@ fi + + # Define the identity of the package. + PACKAGE='gas' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gas $as_me 2.40, which was ++This file was extended by gas $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -14976,7 +14976,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gas config.status 2.40 ++gas config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprof/configure ++++ b/gprof/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprof 2.40. ++# Generated by GNU Autoconf 2.69 for gprof 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprof' + PACKAGE_TARNAME='gprof' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gprof 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gprof 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprof 2.40 to adapt to many kinds of systems. ++\`configure' configures gprof 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1409,7 +1409,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprof 2.40:";; ++ short | recursive ) echo "Configuration of gprof 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1520,7 +1520,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprof configure 2.40 ++gprof configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprof $as_me 2.40, which was ++It was created by gprof $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2864,7 +2864,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprof' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprof $as_me 2.40, which was ++This file was extended by gprof $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -12638,7 +12638,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprof config.status 2.40 ++gprof config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/configure ++++ b/gprofng/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gprofng 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gprofng 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1364,7 +1364,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1435,7 +1435,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40:";; ++ short | recursive ) echo "Configuration of gprofng 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1549,7 +1549,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40 ++gprofng configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2081,7 +2081,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40, which was ++It was created by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3054,7 +3054,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -17528,7 +17528,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40, which was ++This file was extended by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -17594,7 +17594,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40 ++gprofng config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/doc/version.texi ++++ b/gprofng/doc/version.texi +@@ -1,4 +1,4 @@ +-@set UPDATED 5 January 2023 +-@set UPDATED-MONTH January 2023 +-@set EDITION 2.40 +-@set VERSION 2.40 ++@set UPDATED 1 February 2023 ++@set UPDATED-MONTH February 2023 ++@set EDITION 2.40.0 ++@set VERSION 2.40.0 +--- a/gprofng/libcollector/configure ++++ b/gprofng/libcollector/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gprofng 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gprofng 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1396,7 +1396,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40:";; ++ short | recursive ) echo "Configuration of gprofng 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1505,7 +1505,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40 ++gprofng configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40, which was ++It was created by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2968,7 +2968,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40, which was ++This file was extended by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -16164,7 +16164,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40 ++gprofng config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/intl/configure ++++ b/intl/configure +@@ -6857,6 +6857,9 @@ case "${host}" in + # sets the default TLS model and affects inlining. + PICFLAG=-fPIC + ;; ++ loongarch*-*-*) ++ PICFLAG=-fpic ++ ;; + mips-sgi-irix6*) + # PIC is the default. + ;; +--- a/ld/configure ++++ b/ld/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for ld 2.40. ++# Generated by GNU Autoconf 2.69 for ld 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='ld' + PACKAGE_TARNAME='ld' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='ld 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='ld 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures ld 2.40 to adapt to many kinds of systems. ++\`configure' configures ld 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1494,7 +1494,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of ld 2.40:";; ++ short | recursive ) echo "Configuration of ld 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1661,7 +1661,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-ld configure 2.40 ++ld configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by ld $as_me 2.40, which was ++It was created by ld $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3359,7 +3359,7 @@ fi + + # Define the identity of the package. + PACKAGE='ld' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by ld $as_me 2.40, which was ++This file was extended by ld $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -18149,7 +18149,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-ld config.status 2.40 ++ld config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/opcodes/configure ++++ b/opcodes/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for opcodes 2.40. ++# Generated by GNU Autoconf 2.69 for opcodes 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='opcodes' + PACKAGE_TARNAME='opcodes' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='opcodes 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='opcodes 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1360,7 +1360,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures opcodes 2.40 to adapt to many kinds of systems. ++\`configure' configures opcodes 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1431,7 +1431,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of opcodes 2.40:";; ++ short | recursive ) echo "Configuration of opcodes 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1545,7 +1545,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-opcodes configure 2.40 ++opcodes configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2139,7 +2139,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by opcodes $as_me 2.40, which was ++It was created by opcodes $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3118,7 +3118,7 @@ fi + + # Define the identity of the package. + PACKAGE='opcodes' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -13191,7 +13191,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by opcodes $as_me 2.40, which was ++This file was extended by opcodes $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -13257,7 +13257,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-opcodes config.status 2.40 ++opcodes config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + diff --git a/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch b/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch new file mode 100644 index 0000000000..261acb549e --- /dev/null +++ b/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch @@ -0,0 +1,51 @@ +From 17294931e3e361bee6810b1a39493e214b38c5e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= +Date: Tue, 3 Jan 2023 14:24:43 +0100 +Subject: [PATCH 40/50] configure: remove dependencies on gmp and mpfr when gdb + is disabled + +Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks +about GMP and MPFR for gdb builds have been moved to the toplevel +configure. +However, it doesn't take into account the --disable-gdb option. Meaning +that a build without gdb will require these libraries even if not +needed. + +ChangeLog: + + * configure.ac: Skip GMP and MPFR when --disable-gdb is + provided. + * configure: Regenerate. + +(cherry picked from commit 5fb0e308577143ceb313fde5538dc9ecb038f29f) +--- + configure | 4 +++- + configure.ac | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -8032,7 +8032,9 @@ if test -d ${srcdir}/gcc ; then + require_mpc=yes + fi + if test -d ${srcdir}/gdb ; then +- require_gmp=yes ++ if test "x$enable_gdb" != xno; then ++ require_gmp=yes ++ fi + fi + + gmplibs="-lmpfr -lgmp" +--- a/configure.ac ++++ b/configure.ac +@@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then + require_mpc=yes + fi + if test -d ${srcdir}/gdb ; then +- require_gmp=yes ++ if test "x$enable_gdb" != xno; then ++ require_gmp=yes ++ fi + fi + + gmplibs="-lmpfr -lgmp" diff --git a/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch b/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch new file mode 100644 index 0000000000..4e31bb43ed --- /dev/null +++ b/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch @@ -0,0 +1,46 @@ +From b2bc62b7b4e7638c3a249d2d2728ceb4d5f2b22c Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Tue, 14 Feb 2023 08:35:02 +0100 +Subject: [PATCH 46/50] gas: correct symbol name comparison in + .startof./.sizeof. handling + +In 162c6aef1f3a ("gas: fold symbol table entries generated for +.startof.() / .sizeof.()") I screwed up quite badly, inverting the case +sensitive and case insensitive comparison functions. +--- + gas/expr.c | 4 ++-- + gas/testsuite/gas/elf/startof.d | 2 ++ + gas/testsuite/gas/elf/startof.s | 3 +++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +--- a/gas/expr.c ++++ b/gas/expr.c +@@ -149,8 +149,8 @@ symbol_lookup_or_make (const char *name, + + name = S_GET_NAME (symbolP); + if ((symbols_case_sensitive +- ? strcasecmp (buf, name) +- : strcmp (buf, name)) == 0) ++ ? strcmp (buf, name) ++ : strcasecmp (buf, name)) == 0) + { + free (buf); + return symbolP; +--- a/gas/testsuite/gas/elf/startof.d ++++ b/gas/testsuite/gas/elf/startof.d +@@ -7,4 +7,6 @@ Symbol table .* + #... + [1-8]: 0+ .* UND \.startof\.\.text + [2-9]: 0+ .* UND \.sizeof\.\.text ++ +[1-9][0-9]*: 0+ .* UND \.startof\.\.Text ++ +[1-9][0-9]*: 0+ .* UND \.sizeof\.\.TEXT + #pass +--- a/gas/testsuite/gas/elf/startof.s ++++ b/gas/testsuite/gas/elf/startof.s +@@ -4,3 +4,6 @@ + .dc.a 0 + .dc.a .sizeof.(.text) + .dc.a .startof.(.text) ++ .dc.a 0 ++ .dc.a .startof.(.Text) ++ .dc.a .sizeof.(.TEXT)