generic: 5.15: rework pending patch
authorAnsuel Smith <ansuelsmth@gmail.com>
Thu, 4 Nov 2021 23:48:27 +0000 (00:48 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 27 Mar 2022 00:07:34 +0000 (00:07 +0000)
Rework pending patch for kernel 5.15

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
31 files changed:
target/linux/generic/pending-5.15/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch
target/linux/generic/pending-5.15/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch
target/linux/generic/pending-5.15/141-jffs2-add-RENAME_EXCHANGE-support.patch
target/linux/generic/pending-5.15/270-platform-mikrotik-build-bits.patch
target/linux/generic/pending-5.15/305-mips_module_reloc.patch
target/linux/generic/pending-5.15/309-MIPS-Add-CPU-option-reporting-to-proc-cpuinfo.patch
target/linux/generic/pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
target/linux/generic/pending-5.15/410-mtd-parsers-ofpart-fix-parsing-subpartitions.patch [deleted file]
target/linux/generic/pending-5.15/420-mtd-redboot_space.patch
target/linux/generic/pending-5.15/435-mtd-add-routerbootpart-parser-config.patch
target/linux/generic/pending-5.15/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch
target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch
target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch
target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
target/linux/generic/pending-5.15/682-of_net-add-mac-address-increment-support.patch
target/linux/generic/pending-5.15/683-of_net-add-mac-address-to-of-tree.patch
target/linux/generic/pending-5.15/703-phy-add-detach-callback-to-struct-phy_driver.patch
target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
target/linux/generic/pending-5.15/730-net-phy-at803x-fix-feature-detection.patch [deleted file]
target/linux/generic/pending-5.15/762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch [deleted file]
target/linux/generic/pending-5.15/763-net-bridge-switchdev-Include-local-flag-in-FDB-notif.patch [deleted file]
target/linux/generic/pending-5.15/764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch [deleted file]
target/linux/generic/pending-5.15/765-net-dsa-Include-local-addresses-in-assisted-CPU-port.patch [deleted file]
target/linux/generic/pending-5.15/766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch [deleted file]
target/linux/generic/pending-5.15/767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch [deleted file]
target/linux/generic/pending-5.15/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch
target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch
target/linux/generic/pending-5.15/834-ledtrig-libata.patch
target/linux/generic/pending-5.15/850-0005-PCI-aardvark-Check-return-value-of-generic_handle_do.patch
target/linux/generic/pending-5.15/920-mangle_bootargs.patch

index 282c8196e5fdb88c25374da4e7506b2854ab50ef..39b98eac1b055c4e4c1155e7bc97f26fa25b1416 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/compiler.h
 +++ b/include/linux/compiler.h
-@@ -213,6 +213,8 @@ void ftrace_likely_update(struct ftrace_
+@@ -211,6 +211,8 @@ void ftrace_likely_update(struct ftrace_
        __v;                                                            \
  })
  
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif /* __KERNEL__ */
  
  /*
-@@ -245,6 +247,4 @@ static inline void *offset_to_ptr(const
+@@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const
   */
  #define prevent_tail_call_optimization()      mb()
  
index 355e900a3b35db3b56260f78409af5a83bd8ff79..ca7b8a6bb156b80b4a317862e2b7ebcbc8b22eee 100644 (file)
@@ -9,9 +9,9 @@ Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
 --- a/drivers/spi/spidev.c
 +++ b/drivers/spi/spidev.c
 @@ -682,6 +682,7 @@ static const struct of_device_id spidev_
-       { .compatible = "lwn,bk4" },
-       { .compatible = "dh,dhcom-board" },
        { .compatible = "menlo,m53cpld" },
+       { .compatible = "cisco,spi-petra" },
+       { .compatible = "micron,spi-authenta" },
 +      { .compatible = "siliconlabs,si3210" },
        {},
  };
index e48da41faedb7ee46feb662b5006819943de432c..61e133e382032ae4b38d0d0ea03e134a7603e8b9 100644 (file)
@@ -8,13 +8,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/fs/jffs2/dir.c
 +++ b/fs/jffs2/dir.c
-@@ -609,7 +609,8 @@ static int jffs2_rmdir (struct inode *di
+@@ -609,8 +609,8 @@ static int jffs2_rmdir (struct inode *di
        return ret;
  }
  
--static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, umode_t mode, dev_t rdev)
-+static int __jffs2_mknod (struct inode *dir_i, struct dentry *dentry,
-+                        umode_t mode, dev_t rdev, bool whiteout)
+-static int jffs2_mknod (struct user_namespace *mnt_userns, struct inode *dir_i,
+-                      struct dentry *dentry, umode_t mode, dev_t rdev)
++static int __jffs2_mknod (struct user_namespace *mnt_userns, struct inode *dir_i,
++                        struct dentry *dentry, umode_t mode, dev_t rdev, bool whiteout)
  {
        struct jffs2_inode_info *f, *dir_f;
        struct jffs2_sb_info *c;
@@ -31,24 +32,26 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        return 0;
  
   fail:
-@@ -756,6 +761,17 @@ static int jffs2_mknod (struct inode *di
+@@ -756,6 +761,19 @@ static int jffs2_mknod (struct inode *di
        return ret;
  }
  
-+static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, umode_t mode, dev_t rdev)
++static int jffs2_mknod (struct user_namespace *mnt_userns, struct inode *dir_i,
++                        struct dentry *dentry, umode_t mode, dev_t rdev)
 +{
-+      return __jffs2_mknod(dir_i, dentry, mode, rdev, false);
++      return __jffs2_mknod(mnt_userns, dir_i, dentry, mode, rdev, false);
 +}
 +
-+static int jffs2_whiteout (struct inode *old_dir, struct dentry *old_dentry)
++static int jffs2_whiteout (struct user_namespace *mnt_userns, struct inode *old_dir,
++                          struct dentry *old_dentry)
 +{
-+      return __jffs2_mknod(old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE,
++      return __jffs2_mknod(mnt_userns, old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE,
 +                           WHITEOUT_DEV, true);
 +}
 +
- static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
+ static int jffs2_rename (struct user_namespace *mnt_userns,
+                        struct inode *old_dir_i, struct dentry *old_dentry,
                         struct inode *new_dir_i, struct dentry *new_dentry,
-                        unsigned int flags)
 @@ -766,7 +782,7 @@ static int jffs2_rename (struct inode *o
        uint8_t type;
        uint32_t now;
@@ -67,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -                            old_dentry->d_name.name, old_dentry->d_name.len, NULL, now);
 +      if (flags & RENAME_WHITEOUT)
 +              /* Replace with whiteout */
-+              ret = jffs2_whiteout(old_dir_i, old_dentry);
++              ret = jffs2_whiteout(mnt_userns, old_dir_i, old_dentry);
 +      else
 +              /* Unlink the original */
 +              ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i),
index dbc72339c6742f1644a8dc36dda7aedba6e9c456..7dc830ac373bdf416ea24b32d0639e2191a4f02b 100644 (file)
@@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 @@ -851,6 +864,12 @@ static int jffs2_rename (struct inode *o
        if (flags & RENAME_WHITEOUT)
                /* Replace with whiteout */
-               ret = jffs2_whiteout(old_dir_i, old_dentry);
+               ret = jffs2_whiteout(mnt_userns, old_dir_i, old_dentry);
 +      else if (flags & RENAME_EXCHANGE)
 +              /* Replace the original */
 +              ret = jffs2_do_link(c, JFFS2_INODE_INFO(old_dir_i),
index df738ef97b0a85532d8da89744ab4a99accdd488..3fd5c6e95d6473c76bbbabeaf349417d331f4db2 100644 (file)
@@ -17,15 +17,15 @@ Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
 --- a/drivers/platform/Kconfig
 +++ b/drivers/platform/Kconfig
 @@ -13,3 +13,5 @@ source "drivers/platform/chrome/Kconfig"
- source "drivers/platform/mellanox/Kconfig"
  source "drivers/platform/olpc/Kconfig"
+ source "drivers/platform/surface/Kconfig"
 +
 +source "drivers/platform/mikrotik/Kconfig"
 --- a/drivers/platform/Makefile
 +++ b/drivers/platform/Makefile
 @@ -9,3 +9,4 @@ obj-$(CONFIG_MIPS)             += mips/
- obj-$(CONFIG_OLPC_EC)         += olpc/
  obj-$(CONFIG_GOLDFISH)                += goldfish/
  obj-$(CONFIG_CHROME_PLATFORMS)        += chrome/
+ obj-$(CONFIG_SURFACE_PLATFORMS)       += surface/
 +obj-$(CONFIG_MIKROTIK)                += mikrotik/
index 839ba2429309610458c11b779848c1d40adcad50..153c463ca094269fee3870aadb1f75ad004d9213 100644 (file)
@@ -270,7 +270,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static int apply_r_mips_none(struct module *me, u32 *location,
                             u32 base, Elf_Addr v, bool rela)
 @@ -54,9 +261,40 @@ static int apply_r_mips_32(struct module
-       return 0;
+       *location = base + v;
  }
  
 +static Elf_Addr add_plt_entry_to(unsigned *plt_offset,
@@ -302,8 +302,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +
 +}
 +
- static int apply_r_mips_26(struct module *me, u32 *location,
-                          u32 base, Elf_Addr v, bool rela)
+ static int apply_r_mips_26(struct module *me, u32 *location, u32 base,
+                          Elf_Addr v)
  {
 +      u32 ofs = base & 0x03ffffff;
 +
index 794f027f181fefcfc61b289795c5b3b2db63ba45..318c0b1b258945a535d3a036a32a060d8b94e98c 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 
 --- a/arch/mips/kernel/proc.c
 +++ b/arch/mips/kernel/proc.c
-@@ -138,6 +138,120 @@ static int show_cpuinfo(struct seq_file
+@@ -138,6 +138,116 @@ static int show_cpuinfo(struct seq_file
                seq_printf(m, "micromips kernel\t: %s\n",
                      (read_c0_config3() & MIPS_CONF3_ISA_OE) ?  "yes" : "no");
        }
@@ -45,10 +45,6 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 +              seq_printf(m, "%s", " 3k_cache");
 +      if (cpu_has_4k_cache)
 +              seq_printf(m, "%s", " 4k_cache");
-+      if (cpu_has_6k_cache)
-+              seq_printf(m, "%s", " 6k_cache");
-+      if (cpu_has_8k_cache)
-+              seq_printf(m, "%s", " 8k_cache");
 +      if (cpu_has_tx39_cache)
 +              seq_printf(m, "%s", " tx39_cache");
 +      if (cpu_has_octeon_cache)
index 2808c9532296901c00107c36058131b4d81657c7..91e4b911495533bab7563b1b106d6e05c3bc8ed1 100644 (file)
@@ -238,12 +238,14 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
 +#endif
 --- a/arch/mips/kernel/relocate_kernel.S
 +++ b/arch/mips/kernel/relocate_kernel.S
-@@ -10,8 +10,9 @@
+@@ -10,10 +10,11 @@
  #include <asm/mipsregs.h>
  #include <asm/stackframe.h>
  #include <asm/addrspace.h>
 +#include "machine_kexec.h"
  
+ #include <kernel-entry-init.h>
 -LEAF(relocate_new_kernel)
 +LEAF(kexec_relocate_new_kernel)
        PTR_L a0,       arg0
@@ -259,7 +261,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  #ifdef CONFIG_SMP
  /*
 @@ -182,9 +183,15 @@ kexec_indirection_page:
-       PTR             0
+       PTR_WD          0
        .size           kexec_indirection_page, PTRSIZE
  
 -relocate_new_kernel_end:
@@ -275,7 +277,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
 -relocate_new_kernel_size:
 -      EXPORT(relocate_new_kernel_size)
--      PTR             relocate_new_kernel_end - relocate_new_kernel
+-      PTR_WD          relocate_new_kernel_end - relocate_new_kernel
 -      .size           relocate_new_kernel_size, PTRSIZE
 +kexec_relocate_new_kernel_end:
 +      EXPORT(kexec_relocate_new_kernel_end)
diff --git a/target/linux/generic/pending-5.15/410-mtd-parsers-ofpart-fix-parsing-subpartitions.patch b/target/linux/generic/pending-5.15/410-mtd-parsers-ofpart-fix-parsing-subpartitions.patch
deleted file mode 100644 (file)
index 353fa96..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Thu, 6 May 2021 12:33:58 +0200
-Subject: [PATCH] mtd: parsers: ofpart: fix parsing subpartitions
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-ofpart was recently patched to not scan random partition nodes as
-subpartitions. That change unfortunately broke scanning valid
-subpartitions like:
-
-partitions {
-       compatible = "fixed-partitions";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       partition@0 {
-               compatible = "fixed-partitions";
-               label = "bootloader";
-               reg = <0x0 0x100000>;
-
-               partition@0 {
-                       label = "config";
-                       reg = <0x80000 0x80000>;
-               };
-       };
-};
-
-Fix that regression by adding 1 more code path. We actually need 3
-conditional blocks to support 3 possible cases. This change also makes
-code easier to understand & follow.
-
-Reported-by: David Bauer <mail@david-bauer.net>
-Fixes: 2d751203aacf ("mtd: parsers: ofpart: limit parsing of deprecated DT syntax
-Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
----
- drivers/mtd/parsers/ofpart_core.c | 26 ++++++++++++++------------
- 1 file changed, 14 insertions(+), 12 deletions(-)
-
---- a/drivers/mtd/parsers/ofpart_core.c
-+++ b/drivers/mtd/parsers/ofpart_core.c
-@@ -57,20 +57,22 @@ static int parse_fixed_partitions(struct
-       if (!mtd_node)
-               return 0;
--      ofpart_node = of_get_child_by_name(mtd_node, "partitions");
--      if (!ofpart_node && !master->parent) {
--              /*
--               * We might get here even when ofpart isn't used at all (e.g.,
--               * when using another parser), so don't be louder than
--               * KERN_DEBUG
--               */
--              pr_debug("%s: 'partitions' subnode not found on %pOF. Trying to parse direct subnodes as partitions.\n",
--                       master->name, mtd_node);
-+      if (!master->parent) { /* Master */
-+              ofpart_node = of_get_child_by_name(mtd_node, "partitions");
-+              if (!ofpart_node) {
-+                      /*
-+                       * We might get here even when ofpart isn't used at all (e.g.,
-+                       * when using another parser), so don't be louder than
-+                       * KERN_DEBUG
-+                       */
-+                      pr_debug("%s: 'partitions' subnode not found on %pOF. Trying to parse direct subnodes as partitions.\n",
-+                              master->name, mtd_node);
-+                      ofpart_node = mtd_node;
-+                      dedicated = false;
-+              }
-+      } else { /* Partition */
-               ofpart_node = mtd_node;
--              dedicated = false;
-       }
--      if (!ofpart_node)
--              return 0;
-       of_id = of_match_node(parse_ofpart_match_table, ofpart_node);
-       if (dedicated && !of_id) {
index a3cd4ecf1f9bf799ad57f6d7892838df81bcaae4..2673d720e563688c612e872b30c0b82a31c8ad1e 100644 (file)
@@ -16,9 +16,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                names += strlen(names)+1;
  
 -#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
-               if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
+               if (fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
 -                      i++;
--                      parts[i].offset = parts[i-1].size + parts[i-1].offset;
+-                      parts[i].offset = parts[i - 1].size + parts[i - 1].offset;
 -                      parts[i].size = fl->next->img->flash_base - parts[i].offset;
 -                      parts[i].name = nullname;
 -              }
index ab1e09a5f129d991b87e75fea8a2750becb8d987..b258256db6c159ea8d2ebf165e5c8ddc44a66269 100644 (file)
@@ -17,9 +17,9 @@ Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
 --- a/drivers/mtd/parsers/Kconfig
 +++ b/drivers/mtd/parsers/Kconfig
 @@ -195,3 +195,12 @@ config MTD_REDBOOT_PARTS_READONLY
-         'FIS directory' images, enable this option.
- endif # MTD_REDBOOT_PARTS
+       help
+         This provides support for parsing partitions from Shared Memory (SMEM)
+         for NAND and SPI flash on Qualcomm platforms.
 +
 +config MTD_ROUTERBOOT_PARTS
 +      tristate "RouterBoot flash partition parser"
@@ -32,7 +32,7 @@ Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
 --- a/drivers/mtd/parsers/Makefile
 +++ b/drivers/mtd/parsers/Makefile
 @@ -13,3 +13,4 @@ obj-$(CONFIG_MTD_AFS_PARTS)          += afs.o
- obj-$(CONFIG_MTD_PARSER_TRX)          += parser_trx.o
  obj-$(CONFIG_MTD_SHARPSL_PARTS)               += sharpslpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS)               += redboot.o
+ obj-$(CONFIG_MTD_QCOMSMEM_PARTS)      += qcomsmempart.o
 +obj-$(CONFIG_MTD_ROUTERBOOT_PARTS)            += routerbootpart.o
index e3c4dd2ef48cb1a73e8db158fee1197cb8fff652..0efff2b52fbd49fdedab533d7e54263b0189053c 100644 (file)
@@ -48,6 +48,6 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +      if (!mount_ubi_rootfs())
 +              return;
 +#endif
- #ifdef CONFIG_BLOCK
-       {
-               int err = create_dev("/dev/root", ROOT_DEV);
+       if (ROOT_DEV == 0 && root_device_name && root_fs_names) {
+               if (mount_nodev_root() == 0)
+                       return;
index 20483a391dddbeacd3e7a44403a2e7789d31616f..a648b6c545f0c426c37402e1634ef375181563c7 100644 (file)
@@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +              LZMA_FREE(address);
 +}
 +
-+static ISzAlloc lzma_alloc = { .Alloc = p_lzma_malloc, .Free = p_lzma_free };
++static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};
 +
 +#endif
 --- /dev/null
index 97e449510da96835019a49c65e1048a84cddee4d..284ec073efba77fd7900edd79b6b0f6b74f7f0c6 100644 (file)
@@ -15,9 +15,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +/* Do not check the TCP window for incoming packets  */
 +static int nf_ct_tcp_no_window_check __read_mostly = 1;
 +
- /* "Be conservative in what you do,
-     be liberal in what you accept from others."
-     If it's non-zero, we mark only out of window RST segments as INVALID. */
+   /* FIXME: Examine ipfilter's timeouts and conntrack transitions more
+      closely.  They're more complex. --RR */
 @@ -476,6 +479,9 @@ static bool tcp_in_window(const struct n
        s32 receiver_offset;
        bool res, in_recv_win;
index d85735531bf2b443e46de6594711e1d19051c7a4..f3e7eae0ea5cd30606d2374a913da8ecb6b9e684 100644 (file)
@@ -110,7 +110,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
                return -EINVAL;
 --- a/net/ipv6/route.c
 +++ b/net/ipv6/route.c
-@@ -95,6 +95,8 @@ static int           ip6_pkt_discard(struct sk_bu
+@@ -94,6 +94,8 @@ static int           ip6_pkt_discard(struct sk_bu
  static int            ip6_pkt_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb);
  static int            ip6_pkt_prohibit(struct sk_buff *skb);
  static int            ip6_pkt_prohibit_out(struct net *net, struct sock *sk, struct sk_buff *skb);
@@ -119,7 +119,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  static void           ip6_link_failure(struct sk_buff *skb);
  static void           ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
                                           struct sk_buff *skb, u32 mtu,
-@@ -310,6 +312,18 @@ static const struct rt6_info ip6_prohibi
+@@ -309,6 +311,18 @@ static const struct rt6_info ip6_prohibi
        .rt6i_flags     = (RTF_REJECT | RTF_NONEXTHOP),
  };
  
@@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  static const struct rt6_info ip6_blk_hole_entry_template = {
        .dst = {
                .__refcnt       = ATOMIC_INIT(1),
-@@ -1031,6 +1045,7 @@ static const int fib6_prop[RTN_MAX + 1]
+@@ -1030,6 +1044,7 @@ static const int fib6_prop[RTN_MAX + 1]
        [RTN_BLACKHOLE] = -EINVAL,
        [RTN_UNREACHABLE] = -EHOSTUNREACH,
        [RTN_PROHIBIT]  = -EACCES,
@@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
        [RTN_THROW]     = -EAGAIN,
        [RTN_NAT]       = -EINVAL,
        [RTN_XRESOLVE]  = -EINVAL,
-@@ -1066,6 +1081,10 @@ static void ip6_rt_init_dst_reject(struc
+@@ -1065,6 +1080,10 @@ static void ip6_rt_init_dst_reject(struc
                rt->dst.output = ip6_pkt_prohibit_out;
                rt->dst.input = ip6_pkt_prohibit;
                break;
index 82e81f37c538b9811853bde4a469c3ec9ede0654..2753c76d54a7bf6eea5c94831d53ef7818bd24c9 100644 (file)
@@ -15,11 +15,11 @@ early has to be increased.
 
 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
 ---
drivers/of/of_net.c | 43 +++++++++++++++++++++++++++++++++++++++----
net/core/of_net.c | 43 +++++++++++++++++++++++++++++++++++++++----
  1 file changed, 39 insertions(+), 4 deletions(-)
 
---- a/drivers/of/of_net.c
-+++ b/drivers/of/of_net.c
+--- a/net/core/of_net.c
++++ b/net/core/of_net.c
 @@ -115,27 +115,62 @@ static int of_get_mac_addr_nvmem(struct
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
index 03cd763d9df590ef71874d39763041b1f02ac1ce..59dc30bb4751f9d767d9675940c87131609c9b78 100644 (file)
@@ -1,5 +1,5 @@
---- a/drivers/of/of_net.c
-+++ b/drivers/of/of_net.c
+--- a/net/core/of_net.c
++++ b/net/core/of_net.c
 @@ -95,6 +95,27 @@ static int of_get_mac_addr_nvmem(struct
        return 0;
  }
index 52350ecccc28b6fbbc0968fd85229e594da48cfd..9aa54082a51e78388367b13993fdb05480ecdea6 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
                        sysfs_remove_link(&dev->dev.kobj, "phydev");
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -765,6 +765,12 @@ struct phy_driver {
+@@ -761,6 +761,12 @@ struct phy_driver {
        /** @handle_interrupt: Override default interrupt handling */
        irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
  
index ecd6e9e7a2507d35a74985ee856c11feecb7f7b8..262f1aa35b543761db87d7bf3e0f731c2529ee37 100644 (file)
@@ -15,10 +15,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 --- a/include/linux/if_bridge.h
 +++ b/include/linux/if_bridge.h
 @@ -56,6 +56,7 @@ struct br_ip_list {
- #define BR_MRP_AWARE          BIT(17)
  #define BR_MRP_LOST_CONT      BIT(18)
  #define BR_MRP_LOST_IN_CONT   BIT(19)
-+#define BR_BPDU_FILTER                BIT(20)
+ #define BR_TX_FWD_OFFLOAD     BIT(20)
++#define BR_BPDU_FILTER                BIT(21)
  
  #define BR_DEFAULT_AGEING_TIME        (300 * HZ)
  
@@ -107,9 +107,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 --- a/include/uapi/linux/if_link.h
 +++ b/include/uapi/linux/if_link.h
 @@ -524,6 +524,7 @@ enum {
-       IFLA_BRPORT_BACKUP_PORT,
-       IFLA_BRPORT_MRP_RING_OPEN,
        IFLA_BRPORT_MRP_IN_OPEN,
+       IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT,
+       IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
 +      IFLA_BRPORT_BPDU_FILTER,
        __IFLA_BRPORT_MAX
  };
@@ -135,32 +135,29 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        timerval = br_timer_value(&p->message_age_timer);
 @@ -728,6 +730,7 @@ static const struct nla_policy br_port_p
-       [IFLA_BRPORT_NEIGH_SUPPRESS] = { .type = NLA_U8 },
        [IFLA_BRPORT_ISOLATED]  = { .type = NLA_U8 },
        [IFLA_BRPORT_BACKUP_PORT] = { .type = NLA_U32 },
+       [IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT] = { .type = NLA_U32 },
 +      [IFLA_BRPORT_BPDU_FILTER] = { .type = NLA_U8 },
  };
  
  /* Change the state of the port and notify spanning tree */
-@@ -826,6 +829,10 @@ static int br_setport(struct net_bridge_
-       if (err)
-               return err;
+@@ -826,6 +829,7 @@ static int br_setport(struct net_bridge_
+       br_set_port_flag(p, tb, IFLA_BRPORT_VLAN_TUNNEL, BR_VLAN_TUNNEL);
+       br_set_port_flag(p, tb, IFLA_BRPORT_NEIGH_SUPPRESS, BR_NEIGH_SUPPRESS);
+       br_set_port_flag(p, tb, IFLA_BRPORT_ISOLATED, BR_ISOLATED);
++      br_set_port_flag(p, tb, IFLA_BRPORT_BPDU_FILTER, BR_BPDU_FILTER);
+       changed_mask = old_flags ^ p->flags;
  
-+      err = br_set_port_flag(p, tb, IFLA_BRPORT_BPDU_FILTER, BR_BPDU_FILTER);
-+      if (err)
-+              return err;
-+
-       br_vlan_tunnel_old = (p->flags & BR_VLAN_TUNNEL) ? true : false;
-       err = br_set_port_flag(p, tb, IFLA_BRPORT_VLAN_TUNNEL, BR_VLAN_TUNNEL);
-       if (err)
 --- a/net/core/rtnetlink.c
 +++ b/net/core/rtnetlink.c
 @@ -55,7 +55,7 @@
  #include <net/net_namespace.h>
  
  #define RTNL_MAX_TYPE         50
--#define RTNL_SLAVE_MAX_TYPE   36
-+#define RTNL_SLAVE_MAX_TYPE   37
+-#define RTNL_SLAVE_MAX_TYPE   40
++#define RTNL_SLAVE_MAX_TYPE   41
  
  struct rtnl_link {
        rtnl_doit_func          doit;
diff --git a/target/linux/generic/pending-5.15/730-net-phy-at803x-fix-feature-detection.patch b/target/linux/generic/pending-5.15/730-net-phy-at803x-fix-feature-detection.patch
deleted file mode 100644 (file)
index c49bb19..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From 97ca310aa18a93329ef5cd68c20de89761962f45 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail@david-bauer.net>
-Date: Sun, 13 Jun 2021 12:19:36 +0200
-Subject: [PATCH] net: phy: at803x: fix feature detection
-
-AR8031/AR8033 have different status registers for copper
-and fiber operation. However, the extended status register
-is the same for both operation modes.
-
-As a result of that, ESTATUS_1000_XFULL is set to 1 even when
-operating in copper TP mode.
-
-Remove this mode from the supported link modes, as this driver
-currently only supports copper operation.
-
-Signed-off-by: David Bauer <mail@david-bauer.net>
----
- drivers/net/phy/at803x.c | 30 +++++++++++++++++++++++++++++-
- 1 file changed, 29 insertions(+), 1 deletion(-)
-
---- a/drivers/net/phy/at803x.c
-+++ b/drivers/net/phy/at803x.c
-@@ -1032,6 +1032,34 @@ static int at803x_set_tunable(struct phy
-       }
- }
-+static int at803x_get_features(struct phy_device *phydev)
-+{
-+      int err;
-+
-+      err = genphy_read_abilities(phydev);
-+      if (err)
-+              return err;
-+
-+      if (!at803x_match_phy_id(phydev, ATH8031_PHY_ID))
-+              return 0;
-+
-+      /* AR8031/AR8033 have different status registers
-+       * for copper and fiber operation. However, the
-+       * extended status register is the same for both
-+       * operation modes.
-+       *
-+       * As a result of that, ESTATUS_1000_XFULL is set
-+       * to 1 even when operating in copper TP mode.
-+       *
-+       * Remove this mode from the supported link modes,
-+       * as this driver currently only supports copper
-+       * operation.
-+       */
-+      linkmode_clear_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
-+                         phydev->supported);
-+      return 0;
-+}
-+
- static int at803x_cable_test_result_trans(u16 status)
- {
-       switch (FIELD_GET(AT803X_CDT_STATUS_STAT_MASK, status)) {
-@@ -1364,7 +1392,7 @@ static struct phy_driver at803x_driver[]
-       .resume                 = at803x_resume,
-       .read_page              = at803x_read_page,
-       .write_page             = at803x_write_page,
--      /* PHY_GBIT_FEATURES */
-+      .get_features           = at803x_get_features,
-       .read_status            = at803x_read_status,
-       .aneg_done              = at803x_aneg_done,
-       .ack_interrupt          = &at803x_ack_interrupt,
diff --git a/target/linux/generic/pending-5.15/762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch b/target/linux/generic/pending-5.15/762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch
deleted file mode 100644 (file)
index fbc8342..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-From 46fe6cecb296d850c1ee2b333e57093ac4b733f3 Mon Sep 17 00:00:00 2001
-From: Tobias Waldekranz <tobias@waldekranz.com>
-Date: Sat, 16 Jan 2021 02:25:09 +0100
-Subject: [PATCH] net: bridge: switchdev: Refactor br_switchdev_fdb_notify
-
-Instead of having to add more and more arguments to
-br_switchdev_fdb_call_notifiers, get rid of it and build the info
-struct directly in br_switchdev_fdb_notify.
-
-Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
-Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
----
- net/bridge/br_switchdev.c | 41 +++++++++++----------------------------
- 1 file changed, 11 insertions(+), 30 deletions(-)
-
---- a/net/bridge/br_switchdev.c
-+++ b/net/bridge/br_switchdev.c
-@@ -102,25 +102,16 @@ int br_switchdev_set_port_flag(struct ne
-       return 0;
- }
--static void
--br_switchdev_fdb_call_notifiers(bool adding, const unsigned char *mac,
--                              u16 vid, struct net_device *dev,
--                              bool added_by_user, bool offloaded)
--{
--      struct switchdev_notifier_fdb_info info;
--      unsigned long notifier_type;
--
--      info.addr = mac;
--      info.vid = vid;
--      info.added_by_user = added_by_user;
--      info.offloaded = offloaded;
--      notifier_type = adding ? SWITCHDEV_FDB_ADD_TO_DEVICE : SWITCHDEV_FDB_DEL_TO_DEVICE;
--      call_switchdev_notifiers(notifier_type, dev, &info.info, NULL);
--}
--
- void
- br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
- {
-+      struct switchdev_notifier_fdb_info info = {
-+              .addr = fdb->key.addr.addr,
-+              .vid = fdb->key.vlan_id,
-+              .added_by_user = test_bit(BR_FDB_ADDED_BY_USER, &fdb->flags),
-+              .offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
-+      };
-+
-       if (!fdb->dst)
-               return;
-       if (test_bit(BR_FDB_LOCAL, &fdb->flags))
-@@ -128,22 +119,12 @@ br_switchdev_fdb_notify(const struct net
-       switch (type) {
-       case RTM_DELNEIGH:
--              br_switchdev_fdb_call_notifiers(false, fdb->key.addr.addr,
--                                              fdb->key.vlan_id,
--                                              fdb->dst->dev,
--                                              test_bit(BR_FDB_ADDED_BY_USER,
--                                                       &fdb->flags),
--                                              test_bit(BR_FDB_OFFLOADED,
--                                                       &fdb->flags));
-+              call_switchdev_notifiers(SWITCHDEV_FDB_DEL_TO_DEVICE,
-+                                       fdb->dst->dev, &info.info, NULL);
-               break;
-       case RTM_NEWNEIGH:
--              br_switchdev_fdb_call_notifiers(true, fdb->key.addr.addr,
--                                              fdb->key.vlan_id,
--                                              fdb->dst->dev,
--                                              test_bit(BR_FDB_ADDED_BY_USER,
--                                                       &fdb->flags),
--                                              test_bit(BR_FDB_OFFLOADED,
--                                                       &fdb->flags));
-+              call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_DEVICE,
-+                                       fdb->dst->dev, &info.info, NULL);
-               break;
-       }
- }
diff --git a/target/linux/generic/pending-5.15/763-net-bridge-switchdev-Include-local-flag-in-FDB-notif.patch b/target/linux/generic/pending-5.15/763-net-bridge-switchdev-Include-local-flag-in-FDB-notif.patch
deleted file mode 100644 (file)
index 41374c8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From ec5be4f79026282925ae383caa431a8d41e3456a Mon Sep 17 00:00:00 2001
-From: Tobias Waldekranz <tobias@waldekranz.com>
-Date: Sat, 16 Jan 2021 02:25:10 +0100
-Subject: [PATCH] net: bridge: switchdev: Include local flag in FDB
- notifications
-
-Some switchdev drivers, notably DSA, ignore all dynamically learned
-address notifications (!added_by_user) as these are autonomously added
-by the switch. Previously, such a notification was indistinguishable
-from a local address notification. Include a local bit in the
-notification so that the two classes can be discriminated.
-
-This allows DSA-like devices to add local addresses to the hardware
-FDB (with the CPU as the destination), thereby avoiding flows towards
-the CPU being flooded by the switch as unknown unicast.
-
-Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
----
- include/net/switchdev.h   | 1 +
- net/bridge/br_switchdev.c | 1 +
- 2 files changed, 2 insertions(+)
-
---- a/include/net/switchdev.h
-+++ b/include/net/switchdev.h
-@@ -224,6 +224,7 @@ struct switchdev_notifier_fdb_info {
-       const unsigned char *addr;
-       u16 vid;
-       u8 added_by_user:1,
-+         local:1,
-          offloaded:1;
- };
---- a/net/bridge/br_switchdev.c
-+++ b/net/bridge/br_switchdev.c
-@@ -109,6 +109,7 @@ br_switchdev_fdb_notify(const struct net
-               .addr = fdb->key.addr.addr,
-               .vid = fdb->key.vlan_id,
-               .added_by_user = test_bit(BR_FDB_ADDED_BY_USER, &fdb->flags),
-+              .local = test_bit(BR_FDB_LOCAL, &fdb->flags),
-               .offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
-       };
diff --git a/target/linux/generic/pending-5.15/764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch b/target/linux/generic/pending-5.15/764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch
deleted file mode 100644 (file)
index 630e03b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-From 2e50fd9322047253c327550b4485cf8761035a8c Mon Sep 17 00:00:00 2001
-From: Tobias Waldekranz <tobias@waldekranz.com>
-Date: Sat, 16 Jan 2021 02:25:11 +0100
-Subject: [PATCH] net: bridge: switchdev: Send FDB notifications for host
- addresses
-
-Treat addresses added to the bridge itself in the same way as regular
-ports and send out a notification so that drivers may sync it down to
-the hardware FDB.
-
-Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
----
- net/bridge/br_fdb.c       |  4 ++--
- net/bridge/br_private.h   |  7 ++++---
- net/bridge/br_switchdev.c | 11 +++++------
- 3 files changed, 11 insertions(+), 11 deletions(-)
-
---- a/net/bridge/br_fdb.c
-+++ b/net/bridge/br_fdb.c
-@@ -602,7 +602,7 @@ void br_fdb_update(struct net_bridge *br
-                       /* fastpath: update of existing entry */
-                       if (unlikely(source != fdb->dst &&
-                                    !test_bit(BR_FDB_STICKY, &fdb->flags))) {
--                              br_switchdev_fdb_notify(fdb, RTM_DELNEIGH);
-+                              br_switchdev_fdb_notify(br, fdb, RTM_DELNEIGH);
-                               fdb->dst = source;
-                               fdb_modified = true;
-                               /* Take over HW learned entry */
-@@ -735,7 +735,7 @@ static void fdb_notify(struct net_bridge
-       int err = -ENOBUFS;
-       if (swdev_notify)
--              br_switchdev_fdb_notify(fdb, type);
-+              br_switchdev_fdb_notify(br, fdb, type);
-       skb = nlmsg_new(fdb_nlmsg_size(), GFP_ATOMIC);
-       if (skb == NULL)
---- a/net/bridge/br_private.h
-+++ b/net/bridge/br_private.h
-@@ -1525,8 +1525,8 @@ bool nbp_switchdev_allowed_egress(const
- int br_switchdev_set_port_flag(struct net_bridge_port *p,
-                              unsigned long flags,
-                              unsigned long mask);
--void br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb,
--                           int type);
-+void br_switchdev_fdb_notify(struct net_bridge *br,
-+                           const struct net_bridge_fdb_entry *fdb, int type);
- int br_switchdev_port_vlan_add(struct net_device *dev, u16 vid, u16 flags,
-                              struct netlink_ext_ack *extack);
- int br_switchdev_port_vlan_del(struct net_device *dev, u16 vid);
-@@ -1572,7 +1572,8 @@ static inline int br_switchdev_port_vlan
- }
- static inline void
--br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
-+br_switchdev_fdb_notify(struct net_bridge *br,
-+                      const struct net_bridge_fdb_entry *fdb, int type)
- {
- }
---- a/net/bridge/br_switchdev.c
-+++ b/net/bridge/br_switchdev.c
-@@ -103,7 +103,8 @@ int br_switchdev_set_port_flag(struct ne
- }
- void
--br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
-+br_switchdev_fdb_notify(struct net_bridge *br,
-+                      const struct net_bridge_fdb_entry *fdb, int type)
- {
-       struct switchdev_notifier_fdb_info info = {
-               .addr = fdb->key.addr.addr,
-@@ -112,20 +113,19 @@ br_switchdev_fdb_notify(const struct net
-               .local = test_bit(BR_FDB_LOCAL, &fdb->flags),
-               .offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
-       };
-+      struct net_device *dev = fdb->dst ? fdb->dst->dev : br->dev;
--      if (!fdb->dst)
--              return;
-       if (test_bit(BR_FDB_LOCAL, &fdb->flags))
-               return;
-       switch (type) {
-       case RTM_DELNEIGH:
-               call_switchdev_notifiers(SWITCHDEV_FDB_DEL_TO_DEVICE,
--                                       fdb->dst->dev, &info.info, NULL);
-+                                       dev, &info.info, NULL);
-               break;
-       case RTM_NEWNEIGH:
-               call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_DEVICE,
--                                       fdb->dst->dev, &info.info, NULL);
-+                                       dev, &info.info, NULL);
-               break;
-       }
- }
diff --git a/target/linux/generic/pending-5.15/765-net-dsa-Include-local-addresses-in-assisted-CPU-port.patch b/target/linux/generic/pending-5.15/765-net-dsa-Include-local-addresses-in-assisted-CPU-port.patch
deleted file mode 100644 (file)
index c0b4fd1..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From dd082716b43a3684b2f473ae5d1e76d1c076d86d Mon Sep 17 00:00:00 2001
-From: Tobias Waldekranz <tobias@waldekranz.com>
-Date: Sat, 16 Jan 2021 02:25:12 +0100
-Subject: [PATCH] net: dsa: Include local addresses in assisted CPU port
- learning
-
-Add local addresses (i.e. the ports' MAC addresses) to the hardware
-FDB when assisted CPU port learning is enabled.
-
-NOTE: The bridge's own MAC address is also "local". If that address is
-not shared with any port, the bridge's MAC is not be added by this
-functionality - but the following commit takes care of that case.
-
-Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
----
- net/dsa/slave.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
---- a/net/dsa/slave.c
-+++ b/net/dsa/slave.c
-@@ -2192,10 +2192,12 @@ static int dsa_slave_switchdev_event(str
-               fdb_info = ptr;
-               if (dsa_slave_dev_check(dev)) {
--                      if (!fdb_info->added_by_user)
--                              return NOTIFY_OK;
--
-                       dp = dsa_slave_to_port(dev);
-+
-+                      if (fdb_info->local && dp->ds->assisted_learning_on_cpu_port)
-+                              dp = dp->cpu_dp;
-+                      else if (!fdb_info->added_by_user)
-+                              return NOTIFY_OK;
-               } else {
-                       /* Snoop addresses learnt on foreign interfaces
-                        * bridged with us, for switches that don't
diff --git a/target/linux/generic/pending-5.15/766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch b/target/linux/generic/pending-5.15/766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch
deleted file mode 100644 (file)
index 0b644d8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 0663ebde114a6fb2c28c622ba5212b302d4d2581 Mon Sep 17 00:00:00 2001
-From: Tobias Waldekranz <tobias@waldekranz.com>
-Date: Sat, 16 Jan 2021 02:25:13 +0100
-Subject: [PATCH] net: dsa: Include bridge addresses in assisted CPU port
- learning
-
-Now that notifications are sent out for addresses added to the bridge
-itself, extend DSA to include those addresses in the hardware FDB when
-assisted CPU port learning is enabled.
-
-Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
----
- net/dsa/slave.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
---- a/net/dsa/slave.c
-+++ b/net/dsa/slave.c
-@@ -2206,7 +2206,11 @@ static int dsa_slave_switchdev_event(str
-                       struct net_device *br_dev;
-                       struct dsa_slave_priv *p;
--                      br_dev = netdev_master_upper_dev_get_rcu(dev);
-+                      if (netif_is_bridge_master(dev))
-+                              br_dev = dev;
-+                      else
-+                              br_dev = netdev_master_upper_dev_get_rcu(dev);
-+
-                       if (!br_dev)
-                               return NOTIFY_DONE;
diff --git a/target/linux/generic/pending-5.15/767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch b/target/linux/generic/pending-5.15/767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch
deleted file mode 100644 (file)
index f71ea16..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 81e39fd78db82fb51b05fff309b9c521f1a0bc5a Mon Sep 17 00:00:00 2001
-From: Tobias Waldekranz <tobias@waldekranz.com>
-Date: Sat, 16 Jan 2021 02:25:14 +0100
-Subject: [PATCH] net: dsa: Sync static FDB entries on foreign interfaces to
- hardware
-
-Reuse the "assisted_learning_on_cpu_port" functionality to always add
-entries for user-configured entries on foreign interfaces, even if
-assisted_learning_on_cpu_port is not enabled. E.g. in this situation:
-
-   br0
-   / \
-swp0 dummy0
-
-$ bridge fdb add 02:00:de:ad:00:01 dev dummy0 vlan 1 master
-
-Results in DSA adding an entry in the hardware FDB, pointing this
-address towards the CPU port.
-
-The same is true for entries added to the bridge itself, e.g:
-
-$ bridge fdb add 02:00:de:ad:00:01 dev br0 vlan 1 self
-
-Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
----
- net/dsa/slave.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
---- a/net/dsa/slave.c
-+++ b/net/dsa/slave.c
-@@ -2199,9 +2199,12 @@ static int dsa_slave_switchdev_event(str
-                       else if (!fdb_info->added_by_user)
-                               return NOTIFY_OK;
-               } else {
--                      /* Snoop addresses learnt on foreign interfaces
--                       * bridged with us, for switches that don't
--                       * automatically learn SA from CPU-injected traffic
-+                      /* Snoop addresses added to foreign interfaces
-+                       * bridged with us, or the bridge
-+                       * itself. Dynamically learned addresses can
-+                       * also be added for switches that don't
-+                       * automatically learn SA from CPU-injected
-+                       * traffic.
-                        */
-                       struct net_device *br_dev;
-                       struct dsa_slave_priv *p;
-@@ -2223,7 +2226,8 @@ static int dsa_slave_switchdev_event(str
-                       dp = p->dp->cpu_dp;
--                      if (!dp->ds->assisted_learning_on_cpu_port)
-+                      if (!fdb_info->added_by_user &&
-+                          !dp->ds->assisted_learning_on_cpu_port)
-                               return NOTIFY_DONE;
-               }
index 511a9f7555139437b1e0db8dbcdd00e9cbef2a5e..478a2cb27d80143a211491b63130290da45421e9 100644 (file)
@@ -50,14 +50,23 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
        if (err)
 --- a/drivers/bcma/main.c
 +++ b/drivers/bcma/main.c
-@@ -241,8 +241,10 @@ void bcma_prepare_core(struct bcma_bus *
+@@ -236,13 +236,17 @@ EXPORT_SYMBOL(bcma_core_irq);
+ void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
+ {
+-      device_initialize(&core->dev);
++      struct device *dev = &core->dev;
++
++      device_initialize(dev);
+       core->dev.release = bcma_release_core_dev;
        core->dev.bus = &bcma_bus_type;
-       dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
+-      dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
++      dev_set_name(dev, "bcma%d:%d", bus->num, core->core_index);
        core->dev.parent = bus->dev;
 -      if (bus->dev)
 +      if (bus->dev) {
                bcma_of_fill_device(bus->dev, core);
-+              dma_coerce_mask_and_coherent(&core->dev, bus->dev->coherent_dma_mask);
++              dma_coerce_mask_and_coherent(dev, bus->dev->coherent_dma_mask);
 +      }
  
        switch (bus->hosttype) {
index 62f6fed1262c33290cb4f1d61e63b56b15f47c34..f5e444fe46b5b719361750c017ce3d72cf9a5e06 100644 (file)
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /*
   * The Mellanox Tavor device gives false positive parity errors.  Mark this
   * device with a broken_parity_status to allow PCI scanning code to "skip"
-@@ -3323,6 +3324,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3322,6 +3323,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  
@@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /*
   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.
   * To work around this, query the size it should be configured to by the
-@@ -3348,6 +3351,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3347,6 +3350,8 @@ static void quirk_intel_ntb(struct pci_d
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb);
  
@@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /*
   * Some BIOS implementations leave the Intel GPU interrupts enabled, even
   * though no one is handling them (e.g., if the i915 driver is never
-@@ -3386,6 +3391,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3385,6 +3390,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
  
index 25cffb1444db784a60fa60764a27fdfc8e64bbca..95212138b65ea5dc110c341fbb1464c6bc7f4d01 100644 (file)
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -883,6 +886,12 @@ struct ata_port {
+@@ -882,6 +885,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
        struct ata_acpi_gtm     __acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
index 9cc37f727ee13b3942bae2099082bd961701b9d9..355c835a6ed46caed1e019709a9965506bfd4d4b 100644 (file)
@@ -19,11 +19,11 @@ Signed-off-by: Marek Behún <kabel@kernel.org>
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
 @@ -1439,7 +1439,9 @@ static void advk_pcie_handle_int(struct
+               advk_writel(pcie, PCIE_ISR1_INTX_ASSERT(i),
                            PCIE_ISR1_REG);
  
-               virq = irq_find_mapping(pcie->irq_domain, i);
--              generic_handle_irq(virq);
-+              if (generic_handle_irq(virq) == -EINVAL)
+-              generic_handle_domain_irq(pcie->irq_domain, i);
++              if (generic_handle_domain_irq(pcie->irq_domain, i) == -EINVAL)
 +                      dev_err_ratelimited(&pcie->pdev->dev, "unexpected INT%c IRQ\n",
 +                                          (char)i + 'A');
        }
index fc64a4205ef3f03208882f5eeb1940a5ce4a517c..bd9de92000ca32a16b3a8da09f11cc9df91af854 100644 (file)
@@ -66,6 +66,6 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
        early_security_init();
        setup_arch(&command_line);
 +      mangle_bootargs(command_line);
-       setup_boot_config(command_line);
+       setup_boot_config();
        setup_command_line(command_line);
        setup_nr_cpu_ids();