generic: 6.1: manually refresh hack patches
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 18 Oct 2022 21:43:43 +0000 (23:43 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 22 May 2023 20:28:15 +0000 (22:28 +0200)
Refresh hack patches for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
28 files changed:
target/linux/generic/hack-6.1/204-module_strip.patch
target/linux/generic/hack-6.1/212-tools_portability.patch
target/linux/generic/hack-6.1/221-module_exports.patch
target/linux/generic/hack-6.1/230-openwrt_lzma_options.patch
target/linux/generic/hack-6.1/250-netfilter_depends.patch
target/linux/generic/hack-6.1/259-regmap_dynamic.patch
target/linux/generic/hack-6.1/321-powerpc_crtsavres_prereq.patch
target/linux/generic/hack-6.1/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch
target/linux/generic/hack-6.1/430-mtk-bmt-support.patch
target/linux/generic/hack-6.1/600-bridge_offload.patch
target/linux/generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
target/linux/generic/hack-6.1/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
target/linux/generic/hack-6.1/720-net-phy-add-aqr-phys.patch
target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch
target/linux/generic/hack-6.1/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
target/linux/generic/hack-6.1/723-net-phy-aquantia-fix-system-side-protocol-mi.patch
target/linux/generic/hack-6.1/724-net-phy-aquantia-Add-AQR113-driver-support.patch
target/linux/generic/hack-6.1/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
target/linux/generic/hack-6.1/765-mxl-gpy-control-LED-reg-from-DT.patch
target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch
target/linux/generic/hack-6.1/790-SFP-GE-T-ignore-TX_FAULT.patch
target/linux/generic/hack-6.1/795-backport-phylink_pcs-helpers.patch [deleted file]
target/linux/generic/hack-6.1/800-GPIO-add-named-gpio-exports.patch
target/linux/generic/hack-6.1/901-debloat_sock_diag.patch
target/linux/generic/hack-6.1/902-debloat_proc.patch
target/linux/generic/hack-6.1/904-debloat_dma_buf.patch
target/linux/generic/hack-6.1/920-device_tree_cmdline.patch

index dd5d93e22673e710e0966798802c2a2096639fe2..ee39d15095d9723d7d9d55c0d0989c5832720af7 100644 (file)
@@ -86,9 +86,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  struct kernel_param;
  
---- a/init/Kconfig
-+++ b/init/Kconfig
-@@ -2356,6 +2356,13 @@ config UNUSED_KSYMS_WHITELIST
+--- a/kernel/module/Kconfig
++++ b/kernel/module/Kconfig
+@@ -2352,6 +2352,13 @@ config UNUSED_KSYMS_WHITELIST
          one per line. The path can be absolute, or relative to the kernel
          source tree.
  
@@ -102,14 +102,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  endif # MODULES
  
  config MODULES_TREE_LOOKUP
---- a/kernel/module.c
-+++ b/kernel/module.c
+--- a/kernel/module/main.c
++++ b/kernel/module/main.c
 @@ -1218,6 +1218,7 @@ static struct module_attribute *modinfo_
  
  static const char vermagic[] = VERMAGIC_STRING;
  
 +#if defined(CONFIG_MODVERSIONS) || !defined(CONFIG_MODULE_STRIPPED)
static int try_to_force_load(struct module *mod, const char *reason)
+ int try_to_force_load(struct module *mod, const char *reason)
  {
  #ifdef CONFIG_MODULE_FORCE_LOAD
 @@ -1229,6 +1230,7 @@ static int try_to_force_load(struct modu
@@ -118,8 +118,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
 +#endif
  
- #ifdef CONFIG_MODVERSIONS
+ static char *get_modinfo(const struct load_info *info, const char *tag);
+ static char *get_next_modinfo(const struct load_info *info, const char *tag,
 @@ -3266,9 +3268,11 @@ static int setup_load_info(struct load_i
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
@@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/scripts/mod/modpost.c
 +++ b/scripts/mod/modpost.c
-@@ -2036,7 +2036,9 @@ static void read_symbols(const char *mod
+@@ -2034,7 +2034,9 @@ static void read_symbols(const char *mod
                symname = remove_dot(info.strtab + sym->st_name);
  
                handle_symbol(mod, &info, sym, symname);
@@ -153,7 +153,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }
  
        for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
-@@ -2215,8 +2217,10 @@ static void add_header(struct buffer *b,
+@@ -2213,8 +2215,10 @@ static void add_header(struct buffer *b,
        buf_printf(b, "BUILD_SALT;\n");
        buf_printf(b, "BUILD_LTO_INFO;\n");
        buf_printf(b, "\n");
@@ -164,29 +164,29 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        buf_printf(b, "\n");
        buf_printf(b, "__visible struct module __this_module\n");
        buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
-@@ -2233,8 +2237,10 @@ static void add_header(struct buffer *b,
+@@ -2231,8 +2235,10 @@ static void add_header(struct buffer *b,
+       buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n");
+       buf_printf(b, "};\n");
  
- static void add_intree_flag(struct buffer *b, int is_intree)
- {
 +#ifndef CONFIG_MODULE_STRIPPED
-       if (is_intree)
+       if (!external_module)
                buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n");
 +#endif
- }
  
- /* Cannot check for assembler */
-@@ -2247,8 +2253,10 @@ static void add_retpoline(struct buffer
+       buf_printf(b,
+                  "\n"
+@@ -2245,8 +2251,10 @@ static void add_retpoline(struct buffer
+                  "MODULE_INFO(retpoline, \"Y\");\n"
+                  "#endif\n");
  
- static void add_staging_flag(struct buffer *b, const char *name)
- {
 +#ifndef CONFIG_MODULE_STRIPPED
-       if (strstarts(name, "drivers/staging"))
+       if (strstarts(mod->name, "drivers/staging"))
                buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n");
 +#endif
- }
  
- /**
-@@ -2328,11 +2336,13 @@ static void add_depends(struct buffer *b
+       if (strstarts(mod->name, "tools/testing"))
+               buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n");
+@@ -2326,11 +2334,13 @@ static void add_depends(struct buffer *b
  
  static void add_srcversion(struct buffer *b, struct module *mod)
  {
@@ -200,13 +200,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  
  static void write_buf(struct buffer *b, const char *fname)
-@@ -2581,7 +2591,9 @@ int main(int argc, char **argv)
-               add_staging_flag(&buf, mod->name);
-               add_versions(&buf, mod);
-               add_depends(&buf, mod);
+@@ -2579,7 +2589,9 @@ int main(int argc, char **argv)
+       add_exported_symbols(&buf, mod);
+       add_versions(&buf, mod);
+       add_depends(&buf, mod);
 +#ifndef CONFIG_MODULE_STRIPPED
-               add_moddevtable(&buf, mod);
+       add_moddevtable(&buf, mod);
 +#endif
-               add_srcversion(&buf, mod);
+       add_srcversion(&buf, mod);
  
-               sprintf(fname, "%s.mod.c", mod->name);
+       ret = snprintf(fname, sizeof(fname), "%s.mod.c", mod->name);
index b488155f9425ad2bab5eccfc47cbf3f95c72330f..0b908f7c7d15f5e25906dd33cc49842612b1e1f2 100644 (file)
@@ -81,30 +81,40 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  struct page;
  struct kmem_cache;
---- a/tools/perf/pmu-events/jevents.c
-+++ b/tools/perf/pmu-events/jevents.c
-@@ -1,4 +1,6 @@
-+#ifdef __linux__
- #define  _XOPEN_SOURCE 500    /* needed for nftw() */
-+#endif
- #define  _GNU_SOURCE          /* needed for asprintf() */
- /* Parse event JSON files */
-@@ -35,6 +37,7 @@
- #include <stdlib.h>
- #include <errno.h>
+--- a/tools/perf/pmu-events/jevents.py
++++ b/tools/perf/pmu-events/jevents.py
+@@ -684,6 +684,7 @@
+ #include "util/header.h"
+ #include "util/pmu.h"
  #include <string.h>
 +#include <strings.h>
- #include <ctype.h>
- #include <unistd.h>
- #include <stdarg.h>
---- a/tools/perf/pmu-events/json.c
-+++ b/tools/perf/pmu-events/json.c
-@@ -38,7 +38,6 @@
- #include <unistd.h>
- #include "jsmn.h"
- #include "json.h"
--#include <linux/kernel.h>
+ #include <stddef.h>
+ struct compact_pmu_event {
+# --- a/tools/perf/pmu-events/jevents.c
+# +++ b/tools/perf/pmu-events/jevents.c
+# @@ -1,4 +1,6 @@
+# +#ifdef __linux__
+#  #define  _XOPEN_SOURCE 500  /* needed for nftw() */
+# +#endif
+#  #define  _GNU_SOURCE                /* needed for asprintf() */
+#  /* Parse event JSON files */
+# @@ -35,6 +37,7 @@
+#  #include <stdlib.h>
+#  #include <errno.h>
+#  #include <string.h>
+# +#include <strings.h>
+#  #include <ctype.h>
+#  #include <unistd.h>
+#  #include <stdarg.h>
+# --- a/tools/perf/pmu-events/json.c
+# +++ b/tools/perf/pmu-events/json.c
+# @@ -38,7 +38,6 @@
+#  #include <unistd.h>
+#  #include "jsmn.h"
+#  #include "json.h"
+# -#include <linux/kernel.h>
  
  
- static char *mapfile(const char *fn, size_t *size)
+ static char *mapfile(const char *fn, size_t *size)
index 87f541b46f2c0c536f4d4644323eca304e4c8142..adc2cefbd2e9e2e0111941d25f79d6b11deecae0 100644 (file)
@@ -56,10 +56,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }                                                               \
                                                                        \
        /* __*init sections */                                          \
-@@ -1022,6 +1032,8 @@
+@@ -1018,6 +1028,8 @@
  #define COMMON_DISCARDS                                                       \
        SANITIZER_DISCARDS                                              \
+       PATCHABLE_DISCARDS                                              \
 +      SYMTAB_DISCARD                                                  \
 +      SYMTAB_DISCARD_GPL                                              \
        *(.discard)                                                     \
@@ -81,9 +81,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   * For every exported symbol, do the following:
   *
 @@ -101,7 +107,7 @@ struct kernel_symbol {
+       extern typeof(sym) sym;                                                 \
        extern const char __kstrtab_##sym[];                                    \
        extern const char __kstrtabns_##sym[];                                  \
-       __CRC_SYMBOL(sym, sec);                                                 \
 -      asm("   .section \"__ksymtab_strings\",\"aMS\",%progbits,1      \n"     \
 +      asm("   .section \"__ksymtab_strings" __EXPORT_SUFFIX(sym) "\",\"aMS\",%progbits,1      \n"     \
            "__kstrtab_" #sym ":                                        \n"     \
index f9361b060bdd524ff8ee450e3e5ea5cb1c9988cb..a28878427a4360e2be8e464267e86bee8e197ebf 100644 (file)
@@ -23,12 +23,16 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
        { {0x02, 0x21}, "lz4", unlz4 },
 --- a/scripts/Makefile.lib
 +++ b/scripts/Makefile.lib
-@@ -402,7 +402,7 @@ quiet_cmd_bzip2 = BZIP2   $@
+@@ -402,10 +402,10 @@ quiet_cmd_bzip2 = BZIP2   $@
  # ---------------------------------------------------------------------------
  
  quiet_cmd_lzma = LZMA    $@
--      cmd_lzma = { cat $(real-prereqs) | $(LZMA) -9; $(size_append); } > $@
-+      cmd_lzma = { cat $(real-prereqs) | $(LZMA) e -d20 -lc1 -lp2 -pb2 -eos -si -so; $(size_append); } > $@
+-      cmd_lzma = cat $(real-prereqs) | $(LZMA) -9 > $@
++      cmd_lzma = cat $(real-prereqs) | $(LZMA) e -d20 -lc1 -lp2 -pb2 -eos -si -so > $@
+ quiet_cmd_lzma_with_size = LZMA    $@
+-      cmd_lzma_with_size = { cat $(real-prereqs) | $(LZMA) -9; $(size_append); } > $@
++      cmd_lzma_with_size = { cat $(real-prereqs) | $(LZMA) e -d20 -lc1 -lp2 -pb2 -eos -si -so; $(size_append); } > $@
  
  quiet_cmd_lzo = LZO     $@
        cmd_lzo = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@
index d9a2b81d743d8b36706a8021c266b64b8d4d603d..495c73ffa88f777b577be571a4e5f0f9797ef415 100644 (file)
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
-@@ -242,7 +242,6 @@ config NF_CONNTRACK_FTP
+@@ -243,7 +243,6 @@ config NF_CONNTRACK_FTP
  
  config NF_CONNTRACK_H323
        tristate "H.323 protocol support"
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        depends on NETFILTER_ADVANCED
        help
          H.323 is a VoIP signalling protocol from ITU-T. As one of the most
-@@ -1105,7 +1104,6 @@ config NETFILTER_XT_TARGET_SECMARK
+@@ -1106,7 +1105,6 @@ config NETFILTER_XT_TARGET_SECMARK
  
  config NETFILTER_XT_TARGET_TCPMSS
        tristate '"TCPMSS" target support'
index 76a5ace6f31536be890380e8e291e7e97d74662b..8cf6c035e50b75db031dafb931caf3fcd1c5a373 100644 (file)
@@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/property.h>
-@@ -3358,3 +3359,5 @@ static int __init regmap_initcall(void)
+@@ -3348,3 +3349,5 @@ static int __init regmap_initcall(void)
        return 0;
  }
  postcore_initcall(regmap_initcall);
index f1942e2037598df3b6c5d1407d8fb27d57229bbb..215528a90c53f37c3327b47700cf30dc1c37de89 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 
 --- a/arch/powerpc/Makefile
 +++ b/arch/powerpc/Makefile
-@@ -44,19 +44,6 @@ machine-$(CONFIG_PPC64) += 64
+@@ -61,19 +61,6 @@ machine-$(CONFIG_PPC64) += 64
  machine-$(CONFIG_CPU_LITTLE_ENDIAN) += le
  UTS_MACHINE := $(subst $(space),,$(machine-y))
  
index 32a7fb6266422f41d37551e038882ad79ad08050..7999f5ac6d8955eab46974edce9a0588b9bc1d12 100644 (file)
@@ -25,11 +25,13 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/mtd/mtd_blkdevs.c
 +++ b/drivers/mtd/mtd_blkdevs.c
-@@ -384,13 +384,6 @@ int add_mtd_blktrans_dev(struct mtd_blkt
+@@ -384,19 +384,8 @@ int add_mtd_blktrans_dev(struct mtd_blkt
        if (new->readonly)
                set_disk_ro(gd, 1);
  
--      device_add_disk(&new->mtd->dev, gd, NULL);
+-      ret = device_add_disk(&new->mtd->dev, gd, NULL);
+-      if (ret)
+-              goto out_cleanup_disk;
 -
 -      if (new->disk_attributes) {
 -              ret = sysfs_create_group(&disk_to_dev(gd)->kobj,
@@ -38,8 +40,12 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 -      }
        return 0;
  
+-out_cleanup_disk:
+-      put_disk(new->disk);
  out_free_tag_set:
-@@ -402,6 +395,27 @@ out_list_del:
+       blk_mq_free_tag_set(new->tag_set);
+ out_kfree_tag_set:
+@@ -402,6 +395,35 @@ out_list_del:
        return ret;
  }
  
@@ -54,7 +60,10 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +                      if (disk_live(dev->disk))
 +                              continue;
 +
-+                      device_add_disk(&dev->mtd->dev, dev->disk, NULL);
++                      ret = device_add_disk(&dev->mtd->dev, dev->disk, NULL);
++                      if (ret)
++                              goto out_cleanup_disk;
++
 +                      if (dev->disk_attributes) {
 +                              ret = sysfs_create_group(&disk_to_dev(dev->disk)->kobj,
 +                                                      dev->disk_attributes);
@@ -62,6 +71,11 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +                      }
 +              }
 +      }
++
++      return;
++
++out_cleanup_disk:
++      put_disk(dev->disk);
 +}
 +
  int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old)
index 96c89f41c48f7889728e03bde32777f2cee610c2..854621bb58fae7d05a47b9dcc7a144715e1c9b97 100644 (file)
@@ -179,29 +179,6 @@ Subject: [PATCH] kernel: add block fit partition parser
        {0, NULL},
  };
  
---- a/drivers/mtd/mtd_blkdevs.c
-+++ b/drivers/mtd/mtd_blkdevs.c
-@@ -345,6 +345,8 @@ int add_mtd_blktrans_dev(struct mtd_blkt
-       gd->first_minor = (new->devnum) << tr->part_bits;
-       gd->minors = 1 << tr->part_bits;
-       gd->fops = &mtd_block_ops;
-+      if (IS_ENABLED(CONFIG_FIT_PARTITION) && !mtd_type_is_nand(new->mtd))
-+              gd->flags |= GENHD_FL_EXT_DEVT;
-       if (tr->part_bits)
-               if (new->devnum < 26)
---- a/drivers/mtd/ubi/block.c
-+++ b/drivers/mtd/ubi/block.c
-@@ -428,6 +428,9 @@ int ubiblock_create(struct ubi_volume_in
-               goto out_cleanup_disk;
-       }
-       gd->private_data = dev;
-+#ifdef CONFIG_FIT_PARTITION
-+      gd->flags |= GENHD_FL_EXT_DEVT;
-+#endif
-       sprintf(gd->disk_name, "ubiblock%d_%d", dev->ubi_num, dev->vol_id);
-       set_capacity(gd, disk_capacity);
-       dev->gd = gd;
 --- a/include/linux/msdos_partition.h
 +++ b/include/linux/msdos_partition.h
 @@ -31,6 +31,7 @@ enum msdos_sys_ind {
index 2a83f46e0ee8af837b130334259ee332df58351b..1476f4fd562746a27699ff09ceb842c523e2fb76 100644 (file)
@@ -18,15 +18,15 @@ Subject: [PATCH] mtd/nand: add MediaTek NAND bad block managment table
 +      bool "Support MediaTek NAND Bad-block Management Table"
 +      default n
 +
- endmenu
- endmenu
+ config MTD_NAND_ECC_MXIC
+       bool "Macronix external hardware ECC engine"
+       depends on HAS_IOMEM
 --- a/drivers/mtd/nand/Makefile
 +++ b/drivers/mtd/nand/Makefile
 @@ -2,6 +2,7 @@
  nandcore-objs := core.o bbt.o
  obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
+ obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
 +obj-$(CONFIG_MTD_NAND_MTK_BMT)        += mtk_bmt.o mtk_bmt_v2.o mtk_bmt_bbt.o mtk_bmt_nmbm.o
  
  obj-y += onenand/
index 9d71a741b25d5cf4e97ec68de4028d60a749e399..6462044bbe3a7c1fce40200542c34514708e946e 100644 (file)
@@ -26,10 +26,10 @@ Subject: [PATCH] net/bridge: add bridge offload
 --- a/include/linux/if_bridge.h
 +++ b/include/linux/if_bridge.h
 @@ -59,6 +59,7 @@ struct br_ip_list {
- #define BR_MRP_LOST_IN_CONT   BIT(19)
  #define BR_TX_FWD_OFFLOAD     BIT(20)
- #define BR_BPDU_FILTER                BIT(21)
-+#define BR_OFFLOAD            BIT(22)
+ #define BR_PORT_LOCKED                BIT(21)
+ #define BR_BPDU_FILTER                BIT(22)
++#define BR_OFFLOAD            BIT(23)
  
  #define BR_DEFAULT_AGEING_TIME        (300 * HZ)
  
@@ -103,16 +103,7 @@ Subject: [PATCH] net/bridge: add bridge offload
  
  static const struct rhashtable_params br_fdb_rht_params = {
        .head_offset = offsetof(struct net_bridge_fdb_entry, rhnode),
-@@ -518,6 +519,8 @@ static struct net_bridge_fdb_entry *fdb_
-               fdb->key.vlan_id = vid;
-               fdb->flags = flags;
-               fdb->updated = fdb->used = jiffies;
-+              INIT_HLIST_HEAD(&fdb->offload_in);
-+              INIT_HLIST_HEAD(&fdb->offload_out);
-               if (rhashtable_lookup_insert_fast(&br->fdb_hash_tbl,
-                                                 &fdb->rhnode,
-                                                 br_fdb_rht_params)) {
-@@ -794,6 +797,8 @@ static void fdb_notify(struct net_bridge
+@@ -185,6 +185,8 @@ static void fdb_notify(struct net_bridge
        struct sk_buff *skb;
        int err = -ENOBUFS;
  
@@ -121,6 +112,15 @@ Subject: [PATCH] net/bridge: add bridge offload
        if (swdev_notify)
                br_switchdev_fdb_notify(br, fdb, type);
  
+@@ -518,6 +519,8 @@ static struct net_bridge_fdb_entry *fdb_
+       fdb->key.vlan_id = vid;
+       fdb->flags = flags;
+       fdb->updated = fdb->used = jiffies;
++      INIT_HLIST_HEAD(&fdb->offload_in);
++      INIT_HLIST_HEAD(&fdb->offload_out);
+       err = rhashtable_lookup_insert_fast(&br->fdb_hash_tbl, &fdb->rhnode,
+                                           br_fdb_rht_params);
+       if (err) {
 --- a/net/bridge/br_forward.c
 +++ b/net/bridge/br_forward.c
 @@ -16,6 +16,7 @@
index aa6c668558ab938f3c2aa3af1eb2b569f7d41eab..476c5948ab00f5b97c90998e1e6b3cb1cbed6032 100644 (file)
@@ -6,71 +6,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
  create mode 100644 net/netfilter/xt_OFFLOAD.c
 
---- a/net/ipv4/netfilter/Kconfig
-+++ b/net/ipv4/netfilter/Kconfig
-@@ -56,8 +56,6 @@ config NF_TABLES_ARP
-       help
-         This option enables the ARP support for nf_tables.
--endif # NF_TABLES
--
- config NF_FLOW_TABLE_IPV4
-       tristate "Netfilter flow table IPv4 module"
-       depends on NF_FLOW_TABLE
-@@ -66,6 +64,8 @@ config NF_FLOW_TABLE_IPV4
-         To compile it as a module, choose M here.
-+endif # NF_TABLES
-+
- config NF_DUP_IPV4
-       tristate "Netfilter IPv4 packet duplication to alternate destination"
-       depends on !NF_CONNTRACK || NF_CONNTRACK
---- a/net/ipv6/netfilter/Kconfig
-+++ b/net/ipv6/netfilter/Kconfig
-@@ -45,7 +45,6 @@ config NFT_FIB_IPV6
-         multicast or blackhole.
- endif # NF_TABLES_IPV6
--endif # NF_TABLES
- config NF_FLOW_TABLE_IPV6
-       tristate "Netfilter flow table IPv6 module"
-@@ -55,6 +54,8 @@ config NF_FLOW_TABLE_IPV6
-         To compile it as a module, choose M here.
-+endif # NF_TABLES
-+
- config NF_DUP_IPV6
-       tristate "Netfilter IPv6 packet duplication to alternate destination"
-       depends on !NF_CONNTRACK || NF_CONNTRACK
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
-@@ -707,8 +707,6 @@ config NFT_REJECT_NETDEV
- endif # NF_TABLES_NETDEV
--endif # NF_TABLES
--
- config NF_FLOW_TABLE_INET
-       tristate "Netfilter flow table mixed IPv4/IPv6 module"
-       depends on NF_FLOW_TABLE
-@@ -717,11 +715,12 @@ config NF_FLOW_TABLE_INET
-         To compile it as a module, choose M here.
-+endif # NF_TABLES
-+
- config NF_FLOW_TABLE
-       tristate "Netfilter flow table module"
-       depends on NETFILTER_INGRESS
-       depends on NF_CONNTRACK
--      depends on NF_TABLES
-       help
-         This option adds the flow table core infrastructure.
-@@ -1010,6 +1009,15 @@ config NETFILTER_XT_TARGET_NOTRACK
+@@ -1011,6 +1010,15 @@ config NETFILTER_XT_TARGET_NOTRACK
        depends on NETFILTER_ADVANCED
        select NETFILTER_XT_TARGET_CT
  
@@ -823,7 +761,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
 +EXPORT_SYMBOL_GPL(nf_flow_table_iterate);
  
void nf_flow_table_gc_run(struct nf_flowtable *flow_table)
static void nf_flow_offload_work_gc(struct work_struct *work)
  {
 --- /dev/null
 +++ b/include/uapi/linux/netfilter/xt_FLOWOFFLOAD.h
@@ -847,7 +785,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +#endif /* _XT_FLOWOFFLOAD_H */
 --- a/include/net/netfilter/nf_flow_table.h
 +++ b/include/net/netfilter/nf_flow_table.h
-@@ -276,6 +276,11 @@ void nf_flow_table_free(struct nf_flowta
+@@ -275,6 +275,11 @@ void nf_flow_table_free(struct nf_flowta
  
  void flow_offload_teardown(struct flow_offload *flow);
  
index e62f45f3c33c595b6bb0b4faacf5de68e1b9918d..8f2e6e0e0e8a165f3b53cfeae6c30b5fe3692d1b 100644 (file)
@@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -2985,6 +2985,9 @@ static int mv88e6xxx_setup_port(struct m
+@@ -2981,6 +2981,9 @@ static int mv88e6xxx_setup_port(struct m
        else
                reg = 1 << port;
  
index 29050d38ea22b065b719b7e94c0bd9f53277f87f..de6fdb3ceaad7fdcd28eb574c39e4ed05d2c4bcd 100644 (file)
@@ -9,18 +9,15 @@ Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
 
 --- a/drivers/net/phy/aquantia_main.c
 +++ b/drivers/net/phy/aquantia_main.c
-@@ -20,8 +20,10 @@
- #define PHY_ID_AQR105 0x03a1b4a2
- #define PHY_ID_AQR106 0x03a1b4d0
- #define PHY_ID_AQR107 0x03a1b4e0
-+#define PHY_ID_AQR113C        0x31c31c12
+@@ -20,6 +20,7 @@
  #define PHY_ID_AQCS109        0x03a1b5c2
  #define PHY_ID_AQR405 0x03a1b4b0
+ #define PHY_ID_AQR113C        0x31c31c12
 +#define PHY_ID_AQR813 0x31c31cb2
  
  #define MDIO_PHYXS_VEND_IF_STATUS             0xe812
  #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK   GENMASK(7, 3)
-@@ -381,6 +383,49 @@ static int aqr107_read_rate(struct phy_d
+@@ -372,6 +374,49 @@ static int aqr107_read_rate(struct phy_d
        return 0;
  }
  
@@ -70,7 +67,7 @@ Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
  static int aqr107_read_status(struct phy_device *phydev)
  {
        int val, ret;
-@@ -511,7 +556,7 @@ static void aqr107_chip_info(struct phy_
+@@ -502,7 +547,7 @@ static void aqr107_chip_info(struct phy_
        build_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_FW_BUILD_ID, val);
        prov_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_PROV_ID, val);
  
@@ -79,32 +76,16 @@ Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
                   fw_major, fw_minor, build_id, prov_id);
  }
  
-@@ -719,6 +764,24 @@ static struct phy_driver aqr_driver[] =
-       .link_change_notify = aqr107_link_change_notify,
- },
- {
-+      PHY_ID_MATCH_MODEL(PHY_ID_AQR113C),
-+      .name           = "Aquantia AQR113C",
-+      .probe          = aqr107_probe,
-+      .config_init    = aqr107_config_init,
-+      .config_aneg    = aqr_config_aneg,
-+      .config_intr    = aqr_config_intr,
-+      .handle_interrupt = aqr_handle_interrupt,
-+      .read_status    = aqr113c_read_status,
-+      .get_tunable    = aqr107_get_tunable,
-+      .set_tunable    = aqr107_set_tunable,
-+      .suspend        = aqr107_suspend,
-+      .resume         = aqr107_resume,
-+      .get_sset_count = aqr107_get_sset_count,
-+      .get_strings    = aqr107_get_strings,
-+      .get_stats      = aqr107_get_stats,
-+      .link_change_notify = aqr107_link_change_notify,
-+},
-+{
-       PHY_ID_MATCH_MODEL(PHY_ID_AQCS109),
-       .name           = "Aquantia AQCS109",
-       .probe          = aqr107_probe,
-@@ -744,6 +807,24 @@ static struct phy_driver aqr_driver[] =
+@@ -706,7 +706,7 @@ static struct phy_driver aqr_driver[] =
+       .config_aneg    = aqr_config_aneg,
+       .config_intr    = aqr_config_intr,
+       .handle_interrupt       = aqr_handle_interrupt,
+-      .read_status    = aqr107_read_status,
++      .read_status    = aqr113c_read_status,
+       .get_tunable    = aqr107_get_tunable,
+       .set_tunable    = aqr107_set_tunable,
+       .suspend        = aqr107_suspend,
+@@ -708,6 +762,24 @@ static struct phy_driver aqr_driver[] =
        .handle_interrupt = aqr_handle_interrupt,
        .read_status    = aqr_read_status,
  },
@@ -129,13 +110,10 @@ Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
  };
  
  module_phy_driver(aqr_driver);
-@@ -754,8 +835,10 @@ static struct mdio_device_id __maybe_unu
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
-+      { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
+@@ -709,6 +790,7 @@ static struct mdio_device_id __maybe_unu
        { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
+       { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
 +      { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
        { }
  };
index dbdb141c6dc449b90d5c571b351d844c605fb4b3..adb437548efc368f22bf6fb6ec8402f137d85f63 100644 (file)
@@ -19,34 +19,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1679,6 +1679,10 @@ enum netdev_priv_flags {
+@@ -1655,6 +1655,7 @@ enum netdev_priv_flags {
+       IFF_LIVE_RENAME_OK              = 1<<30,
        IFF_TX_SKB_NO_LINEAR            = BIT_ULL(31),
+       IFF_CHANGE_PROTO_DOWN           = BIT_ULL(32),
++      IFF_NO_IP_ALIGN                 = BIT_ULL(33),
  };
  
-+enum netdev_extra_priv_flags {
-+      IFF_NO_IP_ALIGN                 = 1<<0,
-+};
-+
  #define IFF_802_1Q_VLAN                       IFF_802_1Q_VLAN
- #define IFF_EBRIDGE                   IFF_EBRIDGE
- #define IFF_BONDING                   IFF_BONDING
-@@ -1711,6 +1715,7 @@ enum netdev_priv_flags {
+@@ -1687,6 +1691,7 @@ enum netdev_priv_flags {
  #define IFF_L3MDEV_RX_HANDLER         IFF_L3MDEV_RX_HANDLER
  #define IFF_LIVE_RENAME_OK            IFF_LIVE_RENAME_OK
  #define IFF_TX_SKB_NO_LINEAR          IFF_TX_SKB_NO_LINEAR
-+#define IFF_NO_IP_ALIGN                       IFF_NO_IP_ALIGN
++#define IFF_NO_IP_ALIGN               IFF_NO_IP_ALIGN
  
  /* Specifies the type of the struct net_device::ml_priv pointer */
  enum netdev_ml_priv_type {
-@@ -2012,6 +2017,7 @@ struct net_device {
-       /* Read-mostly cache-line for fast-path access */
-       unsigned int            flags;
-       unsigned int            priv_flags;
-+      unsigned int            extra_priv_flags;
-       const struct net_device_ops *netdev_ops;
-       int                     ifindex;
-       unsigned short          gflags;
-@@ -2072,6 +2078,11 @@ struct net_device {
+@@ -2048,6 +2054,11 @@ struct net_device {
        const struct tlsdev_ops *tlsdev_ops;
  #endif
  
@@ -58,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        const struct header_ops *header_ops;
  
        unsigned char           operstate;
-@@ -2146,6 +2157,10 @@ struct net_device {
+@@ -2122,6 +2133,10 @@ struct net_device {
        struct mctp_dev __rcu   *mctp_ptr;
  #endif
  
@@ -71,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -2855,6 +2855,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -2816,6 +2816,10 @@ static inline int pskb_trim(struct sk_bu
        return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -82,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /**
   *    pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *    @skb: buffer to alter
-@@ -3005,16 +3009,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -2966,16 +2970,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
@@ -126,8 +115,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +#endif
 +
        len = skb->len;
-       PRANDOM_ADD_NOISE(skb, dev, txq, len + jiffies);
        trace_net_dev_start_xmit(skb, dev);
+       rc = netdev_start_xmit(skb, dev, txq, more);
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
 @@ -61,6 +61,7 @@
@@ -148,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
 +
 +#ifdef CONFIG_ETHERNET_PACKET_MANGLE
-+      if (dev && (dev->extra_priv_flags & IFF_NO_IP_ALIGN))
++      if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
 +              return skb;
 +#endif
 +
index 211696c5688ec8173ee92ca909d698c6e5321512..d4024f1a4358bd64ac24addebf5e47dfccbd04d8 100644 (file)
@@ -15,21 +15,18 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
 
 --- a/drivers/net/phy/aquantia_main.c
 +++ b/drivers/net/phy/aquantia_main.c
-@@ -20,9 +20,11 @@
- #define PHY_ID_AQR105 0x03a1b4a2
- #define PHY_ID_AQR106 0x03a1b4d0
- #define PHY_ID_AQR107 0x03a1b4e0
-+#define PHY_ID_AQR112 0x03a1b662
- #define PHY_ID_AQR113C        0x31c31c12
- #define PHY_ID_AQCS109        0x03a1b5c2
+@@ -20,6 +20,8 @@
  #define PHY_ID_AQR405 0x03a1b4b0
-+#define PHY_ID_AQR412 0x03a1b712
+ #define PHY_ID_AQR113C        0x31c31c12
  #define PHY_ID_AQR813 0x31c31cb2
++#define PHY_ID_AQR112 0x03a1b662
++#define PHY_ID_AQR412 0x03a1b712
  
  #define MDIO_PHYXS_VEND_IF_STATUS             0xe812
-@@ -135,6 +137,29 @@
- #define AQR107_OP_IN_PROG_SLEEP               1000
- #define AQR107_OP_IN_PROG_TIMEOUT     100000
+ #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK   GENMASK(7, 3)
+@@ -126,6 +128,29 @@
+ #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL2    BIT(1)
+ #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL3    BIT(0)
  
 +/* registers in MDIO_MMD_VEND1 region */
 +#define AQUANTIA_VND1_GLOBAL_SC                       0x000
@@ -57,7 +54,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
  struct aqr107_hw_stat {
        const char *name;
        int reg;
-@@ -266,6 +291,51 @@ static int aqr_config_aneg(struct phy_de
+@@ -257,6 +282,51 @@ static int aqr_config_aneg(struct phy_de
        return genphy_c45_check_and_restart_aneg(phydev, changed);
  }
  
@@ -109,7 +106,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
  static int aqr_config_intr(struct phy_device *phydev)
  {
        bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED;
-@@ -825,6 +895,30 @@ static struct phy_driver aqr_driver[] =
+@@ -780,6 +850,30 @@ static struct phy_driver aqr_driver[] =
        .get_stats      = aqr107_get_stats,
        .link_change_notify = aqr107_link_change_notify,
  },
@@ -140,15 +137,11 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
  };
  
  module_phy_driver(aqr_driver);
-@@ -835,9 +929,11 @@ static struct mdio_device_id __maybe_unu
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
-+      { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
+@@ -790,5 +884,7 @@ static struct mdio_device_id __maybe_unu
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
-+      { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
+       { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
++      { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
++      { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
        { }
  };
index 7d16c8aa289a70866fc663e752c1ed5b9364deac..d99b4951b8266d91f90632e1319dd2b75ba01fed 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
 
 --- a/drivers/net/phy/aquantia_main.c
 +++ b/drivers/net/phy/aquantia_main.c
-@@ -324,10 +324,16 @@ static int aqr_config_aneg_set_prot(stru
+@@ -315,10 +315,16 @@ static int aqr_config_aneg_set_prot(stru
        phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GSTART_RATE,
                      aquantia_syscfg[if_type].start_rate);
  
index d03c3430fae296ed156f07ff9cd1ff6427351cae..dd32690048d3dd337765da6dcfdec2a14c589d74 100644 (file)
@@ -11,17 +11,18 @@ Add a new entry for AQR113 PHY_ID
 --- a/drivers/net/phy/aquantia_main.c
 +++ b/drivers/net/phy/aquantia_main.c
 @@ -21,6 +21,7 @@
- #define PHY_ID_AQR106 0x03a1b4d0
- #define PHY_ID_AQR107 0x03a1b4e0
+ #define PHY_ID_AQR813 0x31c31cb2
  #define PHY_ID_AQR112 0x03a1b662
+ #define PHY_ID_AQR412 0x03a1b712
 +#define PHY_ID_AQR113 0x31c31c40
- #define PHY_ID_AQR113C        0x31c31c12
- #define PHY_ID_AQCS109        0x03a1b5c2
- #define PHY_ID_AQR405 0x03a1b4b0
-@@ -914,6 +915,14 @@ static struct phy_driver aqr_driver[] =
+ #define MDIO_PHYXS_VEND_IF_STATUS             0xe812
+ #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK   GENMASK(7, 3)
+@@ -869,6 +870,14 @@ static struct phy_driver aqr_driver[] =
+       .get_strings    = aqr107_get_strings,
        .get_stats      = aqr107_get_stats,
  },
- {
++{
 +      PHY_ID_MATCH_MODEL(PHY_ID_AQR113),
 +      .name           = "Aquantia AQR113",
 +      .config_aneg    = aqr_config_aneg,
@@ -29,15 +30,13 @@ Add a new entry for AQR113 PHY_ID
 +      .handle_interrupt = aqr_handle_interrupt,
 +      .read_status    = aqr107_read_status,
 +},
-+{
-       PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
-       .name           = "Aquantia AQR412",
-       .probe          = aqr107_probe,
-@@ -936,6 +945,7 @@ static struct mdio_device_id __maybe_unu
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
+ };
+ module_phy_driver(aqr_driver);
+@@ -790,5 +884,6 @@ static struct mdio_device_id __maybe_unu
+       { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
+       { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
 +      { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
+       { }
+ };
index 9821c0c86ee22c331fa32102d9ae2171ae8412ea..57edfc118e42036d194c6b2fee18cbb011d176c2 100644 (file)
@@ -13,18 +13,19 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 --- a/drivers/net/phy/aquantia_main.c
 +++ b/drivers/net/phy/aquantia_main.c
 @@ -21,6 +21,8 @@
- #define PHY_ID_AQR106 0x03a1b4d0
- #define PHY_ID_AQR107 0x03a1b4e0
  #define PHY_ID_AQR112 0x03a1b662
+ #define PHY_ID_AQR412 0x03a1b712
+ #define PHY_ID_AQR113 0x31c31c40
 +#define PHY_ID_AQR112C        0x03a1b790
 +#define PHY_ID_AQR112R        0x31c31d12
- #define PHY_ID_AQR113 0x31c31c40
- #define PHY_ID_AQR113C        0x31c31c12
- #define PHY_ID_AQCS109        0x03a1b5c2
-@@ -915,6 +917,30 @@ static struct phy_driver aqr_driver[] =
-       .get_stats      = aqr107_get_stats,
+ #define MDIO_PHYXS_VEND_IF_STATUS             0xe812
+ #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK   GENMASK(7, 3)
+@@ -870,6 +872,30 @@ static struct phy_driver aqr_driver[] =
+       .handle_interrupt = aqr_handle_interrupt,
+       .read_status    = aqr107_read_status,
  },
- {
++{
 +      PHY_ID_MATCH_MODEL(PHY_ID_AQR112C),
 +      .name           = "Aquantia AQR112C",
 +      .probe          = aqr107_probe,
@@ -48,16 +49,14 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +      .get_strings    = aqr107_get_strings,
 +      .get_stats      = aqr107_get_stats,
 +},
-+{
-       PHY_ID_MATCH_MODEL(PHY_ID_AQR113),
-       .name           = "Aquantia AQR113",
-       .config_aneg    = aqr_config_aneg,
-@@ -945,6 +971,8 @@ static struct mdio_device_id __maybe_unu
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
+ };
+ module_phy_driver(aqr_driver);
+@@ -900,5 +926,7 @@ static struct mdio_device_id __maybe_unu
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
+       { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
+       { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
 +      { PHY_ID_MATCH_MODEL(PHY_ID_AQR112C) },
 +      { PHY_ID_MATCH_MODEL(PHY_ID_AQR112R) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
-       { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
+       { }
+ };
index 8de3668def224dca08e21ff28673ace8d397afd8..22fa7289fd38d1dec8865b058160d5adab5e2bcf 100644 (file)
@@ -24,13 +24,13 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 --- a/drivers/net/phy/mxl-gpy.c
 +++ b/drivers/net/phy/mxl-gpy.c
 @@ -8,6 +8,7 @@
- #include <linux/module.h>
  #include <linux/bitfield.h>
+ #include <linux/hwmon.h>
+ #include <linux/mutex.h>
 +#include <linux/of.h>
  #include <linux/phy.h>
+ #include <linux/polynomial.h>
  #include <linux/netdevice.h>
 @@ -30,6 +31,7 @@
  #define PHY_MIISTAT           0x18    /* MII state */
  #define PHY_IMASK             0x19    /* interrupt mask */
@@ -46,7 +46,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 +#define PHY_LED_NUM_LEDS      4
 +
  #define PHY_FWV_REL_MASK      BIT(15)
- #define PHY_FWV_TYPE_MASK     GENMASK(11, 8)
+ #define PHY_FWV_MAJOR_MASK    GENMASK(11, 8)
  #define PHY_FWV_MINOR_MASK    GENMASK(7, 0)
  
 +/* LED */
index 367d66fc666dc427b15f67bf68d6049bec5e701f..e3959658a3c09320345d620ff9319542b0036c21 100644 (file)
@@ -10,7 +10,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
 
 --- a/drivers/net/usb/qmi_wwan.c
 +++ b/drivers/net/usb/qmi_wwan.c
-@@ -1086,6 +1086,7 @@ static const struct usb_device_id produc
+@@ -1085,6 +1085,7 @@ static const struct usb_device_id produc
        {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)},   /* Quectel EM160R-GL */
        {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)},   /* Quectel RM500Q-GL */
        {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)},   /* Quectel RM520N */
@@ -29,8 +29,8 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID                     0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1169,6 +1171,11 @@ static const struct usb_device_id option
-         .driver_info = ZLP },
+@@ -1133,6 +1135,11 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) },
        { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
          .driver_info = RSVD(4) },
 +      /* Meiglink products using Qualcomm vendor ID */
index 10af22e52e050d536cb002ca9e9710d55ee32229..7131b61b35f9a9d0817b28b4c1c2c16c0c16c9d1 100644 (file)
@@ -26,19 +26,17 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -383,6 +383,11 @@ static const struct sfp_quirk sfp_quirks
-               .modes = sfp_quirk_2500basex,
-               .fixup = sfp_fixup_ignore_tx_fault,
-       }, {
-+              // OEM SFP-GE-T is 1000Base-T module
-+              .vendor = "OEM",
-+              .part = "SFP-GE-T",
-+              .fixup = sfp_fixup_ignore_tx_fault,
-+      }, {
-               // Lantech 8330-262D-E can operate at 2500base-X, but
-               // incorrectly report 2500MBd NRZ in their EEPROM
-               .vendor = "Lantech",
-@@ -2312,7 +2317,8 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -393,6 +393,9 @@ static const struct sfp_quirk sfp_quirks
+       // their EEPROM
+       SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex,
+                 sfp_fixup_ignore_tx_fault),
++
++      // OEM SFP-GE-T is 1000Base-T module
++      SFP_QUIRK_F("OEM", "SFP-GE-T", sfp_fixup_ignore_tx_fault),
+       // Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report
+       // 2500MBd NRZ in their EEPROM
+@@ -2303,7 +2308,8 @@ static void sfp_sm_main(struct sfp *sfp,
                         * or t_start_up, so assume there is a fault.
                         */
                        sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
diff --git a/target/linux/generic/hack-6.1/795-backport-phylink_pcs-helpers.patch b/target/linux/generic/hack-6.1/795-backport-phylink_pcs-helpers.patch
deleted file mode 100644 (file)
index b1e7065..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-From 027586ae8ecacff49757ed854c020f35d24a599c Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Sat, 11 Mar 2023 03:44:41 +0000
-Subject: [PATCH] generic: backport some phylink helper functions
-
-It isn't feasible to literally backport all upstream phylink_pcs changes
-down to Linux 5.15: It's just too many patches, and many downstream
-drivers and hacks are likely to break. We are too close to branching off
-to risk this, and it's also just too much work.
-Instead just add helper functions used by modern PCS drivers while keeping
-the original functions instact as well. While this may add a kilobyte or
-two of extra kernel size, it has the advantage that we get the best of both
-worlds: None of the existing codepaths are touched, but yet we have the
-option to backport singular improvements to Ethernet drivers where needed.
-
-Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-
---- a/include/linux/phylink.h
-+++ b/include/linux/phylink.h
-@@ -584,10 +584,37 @@ int phylink_speed_up(struct phylink *pl)
- #define phylink_test(bm, mode)        __phylink_do_bit(test_bit, bm, mode)
- void phylink_set_port_modes(unsigned long *bits);
-+
-+/**
-+ * phylink_get_link_timer_ns - return the PCS link timer value
-+ * @interface: link &typedef phy_interface_t mode
-+ *
-+ * Return the PCS link timer setting in nanoseconds for the PHY @interface
-+ * mode, or -EINVAL if not appropriate.
-+ */
-+static inline int phylink_get_link_timer_ns(phy_interface_t interface)
-+{
-+      switch (interface) {
-+      case PHY_INTERFACE_MODE_SGMII:
-+              return 1600000;
-+
-+      case PHY_INTERFACE_MODE_1000BASEX:
-+      case PHY_INTERFACE_MODE_2500BASEX:
-+              return 10000000;
-+
-+      default:
-+              return -EINVAL;
-+      }
-+}
-+
- void phylink_helper_basex_speed(struct phylink_link_state *state);
-+void phylink_mii_c22_pcs_decode_state(struct phylink_link_state *state,
-+                                    u16 bmsr, u16 lpa);
- void phylink_mii_c22_pcs_get_state(struct mdio_device *pcs,
-                                  struct phylink_link_state *state);
-+int phylink_mii_c22_pcs_encode_advertisement(phy_interface_t interface,
-+                                           const unsigned long *advertising);
- int phylink_mii_c22_pcs_set_advertisement(struct mdio_device *pcs,
-                                         phy_interface_t interface,
-                                         const unsigned long *advertising);
---- a/drivers/net/phy/phylink.c
-+++ b/drivers/net/phy/phylink.c
-@@ -885,7 +885,6 @@ static int phylink_change_inband_advert(
-       return 0;
- }
--
- static void phylink_mac_pcs_get_state(struct phylink *pl,
-                                     struct phylink_link_state *state)
- {
-@@ -2966,6 +2965,52 @@ void phylink_mii_c22_pcs_get_state(struc
- EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_get_state);
- /**
-+ * phylink_mii_c22_pcs_decode_state() - Decode MAC PCS state from MII registers
-+ * @state: a pointer to a &struct phylink_link_state.
-+ * @bmsr: The value of the %MII_BMSR register
-+ * @lpa: The value of the %MII_LPA register
-+ *
-+ * Helper for MAC PCS supporting the 802.3 clause 22 register set for
-+ * clause 37 negotiation and/or SGMII control.
-+ *
-+ * Parse the Clause 37 or Cisco SGMII link partner negotiation word into
-+ * the phylink @state structure. This is suitable to be used for implementing
-+ * the mac_pcs_get_state() member of the struct phylink_mac_ops structure if
-+ * accessing @bmsr and @lpa cannot be done with MDIO directly.
-+ */
-+void phylink_mii_c22_pcs_decode_state(struct phylink_link_state *state,
-+                                    u16 bmsr, u16 lpa)
-+{
-+      state->link = !!(bmsr & BMSR_LSTATUS);
-+      state->an_complete = !!(bmsr & BMSR_ANEGCOMPLETE);
-+      /* If there is no link or autonegotiation is disabled, the LP advertisement
-+       * data is not meaningful, so don't go any further.
-+       */
-+      if (!state->link || !state->an_enabled)
-+              return;
-+
-+      switch (state->interface) {
-+      case PHY_INTERFACE_MODE_1000BASEX:
-+              phylink_decode_c37_word(state, lpa, SPEED_1000);
-+              break;
-+
-+      case PHY_INTERFACE_MODE_2500BASEX:
-+              phylink_decode_c37_word(state, lpa, SPEED_2500);
-+              break;
-+
-+      case PHY_INTERFACE_MODE_SGMII:
-+      case PHY_INTERFACE_MODE_QSGMII:
-+              phylink_decode_sgmii_word(state, lpa);
-+              break;
-+
-+      default:
-+              state->link = false;
-+              break;
-+      }
-+}
-+EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_decode_state);
-+
-+/**
-  * phylink_mii_c22_pcs_set_advertisement() - configure the clause 37 PCS
-  *    advertisement
-  * @pcs: a pointer to a &struct mdio_device.
-@@ -3037,6 +3082,46 @@ int phylink_mii_c22_pcs_set_advertisemen
- EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_set_advertisement);
- /**
-+ * phylink_mii_c22_pcs_encode_advertisement() - configure the clause 37 PCS
-+ *    advertisement
-+ * @interface: the PHY interface mode being configured
-+ * @advertising: the ethtool advertisement mask
-+ *
-+ * Helper for MAC PCS supporting the 802.3 clause 22 register set for
-+ * clause 37 negotiation and/or SGMII control.
-+ *
-+ * Encode the clause 37 PCS advertisement as specified by @interface and
-+ * @advertising.
-+ *
-+ * Return: The new value for @adv, or ``-EINVAL`` if it should not be changed.
-+ */
-+int phylink_mii_c22_pcs_encode_advertisement(phy_interface_t interface,
-+                                           const unsigned long *advertising)
-+{
-+      u16 adv;
-+
-+      switch (interface) {
-+      case PHY_INTERFACE_MODE_1000BASEX:
-+      case PHY_INTERFACE_MODE_2500BASEX:
-+              adv = ADVERTISE_1000XFULL;
-+              if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
-+                                    advertising))
-+                      adv |= ADVERTISE_1000XPAUSE;
-+              if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
-+                                    advertising))
-+                      adv |= ADVERTISE_1000XPSE_ASYM;
-+              return adv;
-+      case PHY_INTERFACE_MODE_SGMII:
-+      case PHY_INTERFACE_MODE_QSGMII:
-+              return 0x0001;
-+      default:
-+              /* Nothing to do for other modes */
-+              return -EINVAL;
-+      }
-+}
-+EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_encode_advertisement);
-+
-+/**
-  * phylink_mii_c22_pcs_config() - configure clause 22 PCS
-  * @pcs: a pointer to a &struct mdio_device.
-  * @mode: link autonegotiation mode
index 0a2c82cacbc11f4ac0d1b5481e634ca40057f48a..4c2a37e3475f0885c9c42b63aa46408153cd1b19 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
  #include "gpiolib.h"
  #include "gpiolib-of.h"
-@@ -1059,3 +1061,72 @@ void of_gpio_dev_init(struct gpio_chip *
+@@ -1057,3 +1059,72 @@ void of_gpio_dev_init(struct gpio_chip *
        else
                gc->of_node = gdev->dev.of_node;
  }
index ac502bdd16d6668b1cc898c9fc360a6f4fde5ebd..247eb798b334b9b636168f13f6017b2228766944 100644 (file)
@@ -28,13 +28,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        help
 --- a/net/core/Makefile
 +++ b/net/core/Makefile
-@@ -10,9 +10,10 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.
+@@ -10,11 +10,12 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.
  
  obj-y              += dev.o dev_addr_lists.o dst.o netevent.o \
                        neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
 -                      sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
 +                      dev_ioctl.o tso.o sock_reuseport.o \
-                       fib_notifier.o xdp.o flow_offload.o
+                       fib_notifier.o xdp.o flow_offload.o gro.o
+ obj-$(CONFIG_NETDEV_ADDR_LIST_TEST) += dev_addr_lists_test.o
  
 +obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
  obj-y += net-sysfs.o
index 12e99280289159e8073931b7ab978b8f3be07ec1..d729b29015a8ca198f6e0d5256b5c97a3b77fee3 100644 (file)
@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -3866,6 +3866,8 @@ static __net_initdata struct pernet_oper
+@@ -3855,6 +3855,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
index 0291a5e9bd8c429d7a99cbf35f806e62d693ebf8..8eb705341d5d9017e8a645e9f6cd1aa5665752d0 100644 (file)
@@ -32,13 +32,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +dma-buf-objs-$(CONFIG_DMABUF_HEAPS_CMA)               += cma_heap.o
 --- a/drivers/dma-buf/Makefile
 +++ b/drivers/dma-buf/Makefile
-@@ -1,16 +1,20 @@
+@@ -1,18 +1,22 @@
  # SPDX-License-Identifier: GPL-2.0-only
 -obj-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
 +obj-$(CONFIG_DMA_SHARED_BUFFER) := dma-shared-buffer.o
 +
 +dma-buf-objs-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
-        dma-resv.o seqno-fence.o
+        dma-fence-unwrap.o dma-resv.o
 -obj-$(CONFIG_DMABUF_HEAPS)    += dma-heap.o
 -obj-$(CONFIG_DMABUF_HEAPS)    += heaps/
 -obj-$(CONFIG_SYNC_FILE)               += sync_file.o
@@ -50,12 +50,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +dma-buf-objs-$(CONFIG_SYNC_FILE)      += sync_file.o
 +dma-buf-objs-$(CONFIG_SW_SYNC)                += sw_sync.o sync_debug.o
 +dma-buf-objs-$(CONFIG_UDMABUF)                += udmabuf.o
-+dma-buf-objs-$(CONFIG_DMABUF_SYSFS_STATS) += udmabuf.o
++dma-buf-objs-$(CONFIG_DMABUF_SYSFS_STATS) += dma-buf-sysfs-stats.o
  
  dmabuf_selftests-y := \
        selftest.o \
        st-dma-fence.o \
-       st-dma-fence-chain.o
+       st-dma-fence-chain.o \
+       st-dma-fence-unwrap.o \
+       st-dma-resv.o
  
 -obj-$(CONFIG_DMABUF_SELFTESTS)        += dmabuf_selftests.o
 +dma-buf-objs-$(CONFIG_DMABUF_SELFTESTS)       += dmabuf_selftests.o
@@ -72,7 +74,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +MODULE_LICENSE("GPL");
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -4216,6 +4216,7 @@ int wake_up_state(struct task_struct *p,
+@@ -4175,6 +4175,7 @@ int wake_up_state(struct task_struct *p,
  {
        return try_to_wake_up(p, state, 0);
  }
index d1f36e716ed9bac812a61f535b40e9c920cfd648..2722266722eb9ab8ecaac6578c644915ba00729d 100644 (file)
@@ -12,10 +12,10 @@ Subject: [PATCH] of/ftd: add device tree cmdline
 @@ -1158,6 +1158,9 @@ int __init early_init_dt_scan_chosen(uns
        p = of_get_flat_dt_prop(node, "bootargs", &l);
        if (p != NULL && l > 0)
-               strlcpy(data, p, min(l, COMMAND_LINE_SIZE));
+               strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE));
 +      p = of_get_flat_dt_prop(node, "bootargs-append", &l);
 +      if (p != NULL && l > 0)
-+              strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE));
++              strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE));
  
        /*
         * CONFIG_CMDLINE is meant to be a default in case nothing else