]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
generic: 6.12: manually rebuild pending patches
authorMieczyslaw Nalewaj <namiltd@yahoo.com>
Tue, 29 Apr 2025 22:12:20 +0000 (00:12 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 30 Apr 2025 14:26:31 +0000 (16:26 +0200)
Manually rebuild pending patches:
 - 103-kbuild-export-SUBARCH.patch
 - 141-jffs2-add-RENAME_EXCHANGE-support.patch
 - 200-ARM-9404-1-arm32-fix-boot-hang-with-HAVE_LD_DEAD_COD.patch
 - 203-kallsyms_uncompressed.patch
 - 270-platform-mikrotik-build-bits.patch
 - 308-mips32r2_tune.patch
 - 330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 - 402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch
 - 451-block-partitions-populate-fwnode.patch
 - 476-mtd-spi-nor-add-eon-en25q128.patch
 - 477-mtd-spi-nor-add-eon-en25qx128a.patch
 - 479-mtd-spi-nor-add-xtx-xt25f128b.patch
 - 481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch
 - 482-mtd-spi-nor-add-gd25q512.patch
 - 484-mtd-spi-nor-add-esmt-f25l16pa.patch
 - 485-mtd-spi-nor-add-xmc-xm25qh128c.patch
 - 488-mtd-spi-nor-add-xmc-xm25qh64c.patch
 - 490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
 - 497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch
 - 498-mtd-spi-nor-locking-support-for-MX25L6405D.patch
 - 510-block-add-uImage.FIT-subimage-block-driver.patch
 - 530-jffs2_make_lzma_available.patch
 - 630-packet_socket_type.patch
 - 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
 - 681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
 - 700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
 - 702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
 - 706-net-phy-populate-host_interfaces-when-attaching-PHY.patch
 - 711-03-net-dsa-qca8k-add-support-for-port_change_master.patch
 - 734-net-ethernet-mediatek-enlarge-DMA-reserve-buffer.patch
 - 736-03-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch
 - 737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
 - 739-03-net-pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch
 - 801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch
 - 809-01-nvmem-core-generalize-mac-base-cells-handling.patch
 - 811-pci_disable_usb_common_quirks.patch
 - 834-ledtrig-libata.patch
 - 892-leds-Add-LED1202-I2C-driver.patch
 - 920-mangle_bootargs.patch

Co-authored-by: Aditya Nugraha <vortexilation@gmail.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[ improve commit title + minor fixes ]
Link: https://github.com/openwrt/openwrt/pull/16547
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
39 files changed:
target/linux/generic/pending-6.12/103-kbuild-export-SUBARCH.patch
target/linux/generic/pending-6.12/141-jffs2-add-RENAME_EXCHANGE-support.patch
target/linux/generic/pending-6.12/200-ARM-9404-1-arm32-fix-boot-hang-with-HAVE_LD_DEAD_COD.patch
target/linux/generic/pending-6.12/203-kallsyms_uncompressed.patch
target/linux/generic/pending-6.12/270-platform-mikrotik-build-bits.patch
target/linux/generic/pending-6.12/308-mips32r2_tune.patch
target/linux/generic/pending-6.12/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
target/linux/generic/pending-6.12/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch
target/linux/generic/pending-6.12/451-block-partitions-populate-fwnode.patch
target/linux/generic/pending-6.12/476-mtd-spi-nor-add-eon-en25q128.patch
target/linux/generic/pending-6.12/477-mtd-spi-nor-add-eon-en25qx128a.patch
target/linux/generic/pending-6.12/479-mtd-spi-nor-add-xtx-xt25f128b.patch
target/linux/generic/pending-6.12/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch
target/linux/generic/pending-6.12/482-mtd-spi-nor-add-gd25q512.patch
target/linux/generic/pending-6.12/484-mtd-spi-nor-add-esmt-f25l16pa.patch
target/linux/generic/pending-6.12/485-mtd-spi-nor-add-xmc-xm25qh128c.patch
target/linux/generic/pending-6.12/488-mtd-spi-nor-add-xmc-xm25qh64c.patch
target/linux/generic/pending-6.12/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
target/linux/generic/pending-6.12/497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch
target/linux/generic/pending-6.12/498-mtd-spi-nor-locking-support-for-MX25L6405D.patch
target/linux/generic/pending-6.12/510-block-add-uImage.FIT-subimage-block-driver.patch
target/linux/generic/pending-6.12/530-jffs2_make_lzma_available.patch
target/linux/generic/pending-6.12/630-packet_socket_type.patch
target/linux/generic/pending-6.12/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
target/linux/generic/pending-6.12/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
target/linux/generic/pending-6.12/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
target/linux/generic/pending-6.12/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
target/linux/generic/pending-6.12/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch
target/linux/generic/pending-6.12/711-03-net-dsa-qca8k-add-support-for-port_change_master.patch
target/linux/generic/pending-6.12/734-net-ethernet-mediatek-enlarge-DMA-reserve-buffer.patch
target/linux/generic/pending-6.12/736-03-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch
target/linux/generic/pending-6.12/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
target/linux/generic/pending-6.12/739-03-net-pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch
target/linux/generic/pending-6.12/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch
target/linux/generic/pending-6.12/809-01-nvmem-core-generalize-mac-base-cells-handling.patch
target/linux/generic/pending-6.12/811-pci_disable_usb_common_quirks.patch
target/linux/generic/pending-6.12/834-ledtrig-libata.patch
target/linux/generic/pending-6.12/892-leds-Add-LED1202-I2C-driver.patch
target/linux/generic/pending-6.12/920-mangle_bootargs.patch

index ea7a25d8a0c28406aa5d708c4a8d2a92a5ad7efd..0cedbeca40b6e05bfe5f420712b5c6bd76b66fca 100644 (file)
@@ -10,12 +10,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -599,7 +599,7 @@ endif
- # Allows the usage of unstable features in stable compilers.
- export RUSTC_BOOTSTRAP := 1
+@@ -589,7 +589,7 @@ export RUSTC_BOOTSTRAP := 1
+ # Allows finding `.clippy.toml` in out-of-srctree builds.
+ export CLIPPY_CONF_DIR := $(srctree)
  
 -export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
 +export ARCH SRCARCH SUBARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
- export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN CARGO
+ export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN
  export HOSTRUSTC KBUILD_HOSTRUSTFLAGS
  export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
index c3a528ec9026aa8bde34ed7af9b564d82aeb4823..44ba3bd959c6c630bc1934de2cb400624005c29e 100644 (file)
@@ -6,7 +6,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/fs/jffs2/dir.c
 +++ b/fs/jffs2/dir.c
-@@ -791,18 +791,31 @@ static int jffs2_rename (struct mnt_idma
+@@ -794,18 +794,31 @@ static int jffs2_rename (struct mnt_idma
        int ret;
        struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i->i_sb);
        struct jffs2_inode_info *victim_f = NULL;
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                victim_f = JFFS2_INODE_INFO(d_inode(new_dentry));
                if (d_is_dir(new_dentry)) {
                        struct jffs2_full_dirent *fd;
-@@ -837,7 +850,7 @@ static int jffs2_rename (struct mnt_idma
+@@ -840,7 +853,7 @@ static int jffs2_rename (struct mnt_idma
        if (ret)
                return ret;
  
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                /* There was a victim. Kill it off nicely */
                if (d_is_dir(new_dentry))
                        clear_nlink(d_inode(new_dentry));
-@@ -863,6 +876,12 @@ static int jffs2_rename (struct mnt_idma
+@@ -866,6 +879,12 @@ static int jffs2_rename (struct mnt_idma
        if (flags & RENAME_WHITEOUT)
                /* Replace with whiteout */
                ret = jffs2_whiteout(idmap, old_dir_i, old_dentry);
@@ -62,7 +62,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        else
                /* Unlink the original */
                ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i),
-@@ -895,7 +914,7 @@ static int jffs2_rename (struct mnt_idma
+@@ -898,7 +917,7 @@ static int jffs2_rename (struct mnt_idma
                return ret;
        }
  
@@ -70,4 +70,4 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      if (d_is_dir(old_dentry) && !(flags & RENAME_EXCHANGE))
                drop_nlink(old_dir_i);
  
-       old_dir_i->i_mtime = inode_set_ctime_to_ts(old_dir_i, ITIME(now));
+       inode_set_mtime_to_ts(old_dir_i,
index 2e5d1d914845cc5fa88e081cb285cb48f54eb64e..f36b1182ed27b98cacb977104cbec0f98181c5ca 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 
 --- a/arch/arm/include/asm/vmlinux.lds.h
 +++ b/arch/arm/include/asm/vmlinux.lds.h
-@@ -48,7 +48,7 @@
+@@ -54,7 +54,7 @@
  #define IDMAP_TEXT                                                    \
                ALIGN_FUNCTION();                                       \
                __idmap_text_start = .;                                 \
@@ -26,7 +26,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
                __idmap_text_end = .;                                   \
  
  #define ARM_DISCARD                                                   \
-@@ -108,12 +108,12 @@
+@@ -114,12 +114,12 @@
        . = ALIGN(8);                                                   \
        .ARM.unwind_idx : {                                             \
                __start_unwind_idx = .;                                 \
@@ -41,16 +41,16 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
                __stop_unwind_tab = .;                                  \
        }
  
-@@ -125,7 +125,7 @@
+@@ -131,7 +131,7 @@
        __vectors_lma = .;                                              \
        OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) {            \
                .vectors {                                              \
--                      *(.vectors)                                     \
+-                      OVERLAY_KEEP(*(.vectors))                       \
 +                      KEEP(*(.vectors))                               \
                }                                                       \
                .vectors.bhb.loop8 {                                    \
-                       *(.vectors.bhb.loop8)                           \
-@@ -143,7 +143,7 @@
+                       OVERLAY_KEEP(*(.vectors.bhb.loop8))             \
+@@ -149,7 +149,7 @@
                                                                        \
        __stubs_lma = .;                                                \
        .stubs ADDR(.vectors) + 0x1000 : AT(__stubs_lma) {              \
index 94b22603d8c261d4db30285cdb8d8eb29704832e..307acd4988da5964915409fa5c3a1ecd706251b4 100644 (file)
@@ -7,13 +7,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
  init/Kconfig            | 11 +++++++++++
  kernel/kallsyms.c       |  8 ++++++++
+ kernel/vmcore_info.c    |  2 ++
  scripts/kallsyms.c      | 12 ++++++++++++
  scripts/link-vmlinux.sh |  4 ++++
4 files changed, 35 insertions(+)
5 files changed, 37 insertions(+)
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1460,6 +1460,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1530,6 +1530,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
          the unaligned access emulation.
          see arch/parisc/kernel/unaligned.c for reference
  
@@ -55,6 +56,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        /*
         * Get just the first code, look it up in the token table,
         * and return the first char from this token.
+--- a/kernel/vmcore_info.c
++++ b/kernel/vmcore_info.c
+@@ -214,8 +214,10 @@ static int __init crash_save_vmcoreinfo_
+ #ifdef CONFIG_KALLSYMS
+       VMCOREINFO_SYMBOL(kallsyms_names);
+       VMCOREINFO_SYMBOL(kallsyms_num_syms);
++#ifndef CONFIG_KALLSYMS_UNCOMPRESSED
+       VMCOREINFO_SYMBOL(kallsyms_token_table);
+       VMCOREINFO_SYMBOL(kallsyms_token_index);
++#endif
+       VMCOREINFO_SYMBOL(kallsyms_offsets);
+       VMCOREINFO_SYMBOL(kallsyms_relative_base);
+ #endif /* CONFIG_KALLSYMS */
 --- a/scripts/kallsyms.c
 +++ b/scripts/kallsyms.c
 @@ -62,6 +62,7 @@ static struct addr_range percpu_range =
@@ -63,32 +77,34 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static int all_symbols;
 +static int uncompressed;
  static int absolute_percpu;
- static int base_relative;
- static int lto_clang;
-@@ -453,13 +454,15 @@ static void write_src(void)
-       }
-       printf("\n");
  
--      /*
--       * Now that we wrote out the compressed symbol names, restore the
--       * original names, which are needed in some of the later steps.
--       */
--      for (i = 0; i < table_cnt; i++) {
+ static int token_profit[0x10000];
+@@ -412,13 +413,17 @@ static void write_src(void)
+               for (k = 0; k < table[i]->len; k++)
+                       printf(", 0x%02x", table[i]->sym[k]);
+-              /*
+-               * Now that we wrote out the compressed symbol name, restore the
+-               * original name and print it in the comment.
+-               */
 -              expand_symbol(table[i]->sym, table[i]->len, buf);
 -              strcpy((char *)table[i]->sym, buf);
-+      if (!uncompressed) {
-+              /*
-+               * Now that we wrote out the compressed symbol names, restore the
-+               * original names, which are needed in some of the later steps.
-+               */
-+              for (i = 0; i < table_cnt; i++) {
+-              printf("\t/* %s */\n", table[i]->sym);
++              if (!uncompressed) {
++                      /*
++                       * Now that we wrote out the compressed symbol name, restore the
++                       * original name and print it in the comment.
++                       */
 +                      expand_symbol(table[i]->sym, table[i]->len, buf);
 +                      strcpy((char *)table[i]->sym, buf);
++                      printf("\t/* %s */\n", table[i]->sym);
++              } else {
++                      printf("\n");
 +              }
        }
+       printf("\n");
  
-       output_label("kallsyms_markers");
-@@ -469,20 +472,22 @@ static void write_src(void)
+@@ -429,20 +434,22 @@ static void write_src(void)
  
        free(markers);
  
@@ -99,8 +115,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -              expand_symbol(best_table[i], best_table_len[i], buf);
 -              printf("\t.asciz\t\"%s\"\n", buf);
 -              off += strlen(buf) + 1;
--      }
--      printf("\n");
 +      if (!uncompressed) {
 +              output_label("kallsyms_token_table");
 +              off = 0;
@@ -111,20 +125,22 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +                      off += strlen(buf) + 1;
 +              }
 +              printf("\n");
--      output_label("kallsyms_token_index");
--      for (i = 0; i < 256; i++)
--              printf("\t.short\t%d\n", best_idx[i]);
--      printf("\n");
++
 +              output_label("kallsyms_token_index");
 +              for (i = 0; i < 256; i++)
 +                      printf("\t.short\t%d\n", best_idx[i]);
 +              printf("\n");
-+      }
+       }
+-      printf("\n");
+-
+-      output_label("kallsyms_token_index");
+-      for (i = 0; i < 256; i++)
+-              printf("\t.short\t%d\n", best_idx[i]);
+-      printf("\n");
  
-       if (!base_relative)
-               output_label("kallsyms_addresses");
-@@ -582,6 +587,9 @@ static unsigned char *find_token(unsigne
+       output_label("kallsyms_offsets");
+@@ -532,6 +539,9 @@ static unsigned char *find_token(unsigne
  {
        int i;
  
@@ -134,7 +150,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        for (i = 0; i < len - 1; i++) {
                if (str[i] == token[0] && str[i+1] == token[1])
                        return &str[i];
-@@ -654,6 +662,9 @@ static void optimize_result(void)
+@@ -604,6 +614,9 @@ static void optimize_result(void)
  {
        int i, best;
  
@@ -144,24 +160,24 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        /* using the '\0' symbol last allows compress_symbols to use standard
         * fast string functions */
        for (i = 255; i >= 0; i--) {
-@@ -815,6 +826,7 @@ int main(int argc, char **argv)
+@@ -763,6 +776,7 @@ int main(int argc, char **argv)
+               static const struct option long_options[] = {
+                       {"all-symbols",     no_argument, &all_symbols,     1},
                        {"absolute-percpu", no_argument, &absolute_percpu, 1},
-                       {"base-relative",   no_argument, &base_relative,   1},
-                       {"lto-clang",       no_argument, &lto_clang,       1},
 +                      {"uncompressed",   no_argument, &uncompressed,   1},
                        {},
                };
  
 --- a/scripts/link-vmlinux.sh
 +++ b/scripts/link-vmlinux.sh
-@@ -165,6 +165,10 @@ kallsyms()
-               kallsymopt="${kallsymopt} --lto-clang"
+@@ -144,6 +144,10 @@ kallsyms()
+               kallsymopt="${kallsymopt} --absolute-percpu"
        fi
  
 +      if is_enabled CONFIG_KALLSYMS_UNCOMPRESSED; then
 +              kallsymopt="${kallsymopt} --uncompressed"
 +      fi
 +
-       info KSYMS ${2}
-       scripts/kallsyms ${kallsymopt} ${1} > ${2}
- }
+       info KSYMS "${2}.S"
+       scripts/kallsyms ${kallsymopt} "${1}" > "${2}.S"
index 7ca84e040def50640f8dcc36e726ebe3e8d84c2b..772d9feeb8b003cacf58a55f6937d2b6c972640e 100644 (file)
@@ -16,16 +16,16 @@ Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
 
 --- a/drivers/platform/Kconfig
 +++ b/drivers/platform/Kconfig
-@@ -14,3 +14,5 @@ source "drivers/platform/olpc/Kconfig"
- source "drivers/platform/surface/Kconfig"
+@@ -18,3 +18,5 @@ source "drivers/platform/surface/Kconfig
  source "drivers/platform/x86/Kconfig"
+ source "drivers/platform/arm64/Kconfig"
 +
 +source "drivers/platform/mikrotik/Kconfig"
 --- a/drivers/platform/Makefile
 +++ b/drivers/platform/Makefile
-@@ -11,3 +11,4 @@ obj-$(CONFIG_OLPC_EC)                += olpc/
- obj-$(CONFIG_GOLDFISH)                += goldfish/
- obj-$(CONFIG_CHROME_PLATFORMS)        += chrome/
+@@ -13,3 +13,4 @@ obj-$(CONFIG_CHROME_PLATFORMS)       += chrome
+ obj-$(CONFIG_CZNIC_PLATFORMS) += cznic/
  obj-$(CONFIG_SURFACE_PLATFORMS)       += surface/
+ obj-$(CONFIG_ARM64_PLATFORM_DEVICES)  += arm64/
 +obj-$(CONFIG_MIKROTIK)                += mikrotik/
index b12058053b1d63a8e436f63cdc1a733802a057c3..b9bd6104a4265d9b277e3d00c9282b8f8a96ecd3 100644 (file)
@@ -11,9 +11,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -163,7 +163,7 @@ cflags-$(CONFIG_CPU_R4300) += -march=r43
- cflags-$(CONFIG_CPU_R4X00)    += -march=r4600 -Wa,--trap
- cflags-$(CONFIG_CPU_TX49XX)   += -march=r4600 -Wa,--trap
+@@ -153,7 +153,7 @@ cflags-$(CONFIG_CPU_R4300) += $(call cc-
+ cflags-$(CONFIG_CPU_R4X00)    += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap
+ cflags-$(CONFIG_CPU_TX49XX)   += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap
  cflags-$(CONFIG_CPU_MIPS32_R1)        += -march=mips32 -Wa,--trap
 -cflags-$(CONFIG_CPU_MIPS32_R2)        += -march=mips32r2 -Wa,--trap
 +cflags-$(CONFIG_CPU_MIPS32_R2)        += -march=mips32r2 -mtune=34kc -Wa,--trap
index 3f553b28b34be7a292ccee52039609a777198cf8..a8c6b7a5da3a54c8505c204507c2208eda4698df 100644 (file)
@@ -11,9 +11,9 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
 
 --- a/arch/mips/kernel/machine_kexec.c
 +++ b/arch/mips/kernel/machine_kexec.c
-@@ -9,14 +9,11 @@
- #include <linux/delay.h>
+@@ -10,14 +10,11 @@
  #include <linux/libfdt.h>
+ #include <linux/reboot.h>
  
 +#include <asm/bootinfo.h>
  #include <asm/cacheflush.h>
@@ -29,7 +29,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
  static unsigned long reboot_code_buffer;
  
-@@ -30,6 +27,101 @@ void (*_crash_smp_send_stop)(void) = NUL
+@@ -31,6 +28,101 @@ void (*_crash_smp_send_stop)(void) = NUL
  void (*_machine_kexec_shutdown)(void) = NULL;
  void (*_machine_crash_shutdown)(struct pt_regs *regs) = NULL;
  
@@ -131,7 +131,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  static void kexec_image_info(const struct kimage *kimage)
  {
        unsigned long i;
-@@ -99,6 +191,18 @@ machine_kexec_prepare(struct kimage *kim
+@@ -100,6 +192,18 @@ machine_kexec_prepare(struct kimage *kim
  #endif
  
        kexec_image_info(kimage);
@@ -150,7 +150,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        if (_machine_kexec_prepare)
                return _machine_kexec_prepare(kimage);
-@@ -161,7 +265,7 @@ machine_crash_shutdown(struct pt_regs *r
+@@ -162,7 +266,7 @@ machine_crash_shutdown(struct pt_regs *r
  void kexec_nonboot_cpu_jump(void)
  {
        local_flush_icache_range((unsigned long)relocated_kexec_smp_wait,
@@ -159,7 +159,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        relocated_kexec_smp_wait(NULL);
  }
-@@ -199,7 +303,7 @@ void kexec_reboot(void)
+@@ -200,7 +304,7 @@ void kexec_reboot(void)
         * machine_kexec() CPU.
         */
        local_flush_icache_range(reboot_code_buffer,
@@ -168,7 +168,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        do_kexec = (void *)reboot_code_buffer;
        do_kexec();
-@@ -212,10 +316,12 @@ machine_kexec(struct kimage *image)
+@@ -213,10 +317,12 @@ machine_kexec(struct kimage *image)
        unsigned long *ptr;
  
        reboot_code_buffer =
@@ -182,7 +182,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        if (image->type == KEXEC_TYPE_DEFAULT) {
                kexec_indirection_page =
-@@ -223,9 +329,19 @@ machine_kexec(struct kimage *image)
+@@ -224,9 +330,19 @@ machine_kexec(struct kimage *image)
        } else {
                kexec_indirection_page = (unsigned long)&image->head;
        }
@@ -204,7 +204,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        /*
         * The generic kexec code builds a page list with physical
-@@ -256,7 +372,7 @@ machine_kexec(struct kimage *image)
+@@ -257,7 +373,7 @@ machine_kexec(struct kimage *image)
  #ifdef CONFIG_SMP
        /* All secondary cpus now may jump to kexec_wait cycle */
        relocated_kexec_smp_wait = reboot_code_buffer +
@@ -251,7 +251,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
        PTR_L a0,       arg0
        PTR_L a1,       arg1
        PTR_L a2,       arg2
-@@ -98,7 +99,7 @@ done:
+@@ -97,7 +98,7 @@ done:
  #endif
        /* jump to kexec_start_address */
        j               s1
@@ -260,7 +260,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
  #ifdef CONFIG_SMP
  /*
-@@ -177,8 +178,15 @@ EXPORT(kexec_indirection_page)
+@@ -176,8 +177,15 @@ EXPORT(kexec_indirection_page)
        PTR_WD          0
        .size           kexec_indirection_page, PTRSIZE
  
index 5a812b86bfeab41035f5b8db3f774bec899ca12b..e8ad20433730d43311bf6429b1f86bc30eb87af8 100644 (file)
@@ -80,7 +80,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
 
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
-@@ -198,6 +198,15 @@ static ssize_t mtd_erasesize_show(struct
+@@ -199,6 +199,15 @@ static ssize_t mtd_erasesize_show(struct
  }
  MTD_DEVICE_ATTR_RO(erasesize);
  
@@ -96,7 +96,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
  static ssize_t mtd_writesize_show(struct device *dev,
                struct device_attribute *attr, char *buf)
  {
-@@ -343,6 +352,7 @@ static struct attribute *mtd_attrs[] = {
+@@ -344,6 +353,7 @@ static struct attribute *mtd_attrs[] = {
        &dev_attr_flags.attr,
        &dev_attr_size.attr,
        &dev_attr_erasesize.attr,
@@ -193,24 +193,24 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
        default y
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -1150,6 +1150,8 @@ static u8 spi_nor_convert_3to4_erase(u8
+@@ -1158,6 +1158,8 @@ static u8 spi_nor_convert_3to4_erase(u8
  
  static bool spi_nor_has_uniform_erase(const struct spi_nor *nor)
  {
 +      if (IS_ENABLED(CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE))
 +              return false;
-       return !!nor->params->erase_map.uniform_erase_type;
+       return !!nor->params->erase_map.uniform_region.erase_mask;
  }
  
-@@ -2582,6 +2584,7 @@ static int spi_nor_select_erase(struct s
+@@ -2516,6 +2518,7 @@ static int spi_nor_select_erase(struct s
  {
        struct spi_nor_erase_map *map = &nor->params->erase_map;
        const struct spi_nor_erase_type *erase = NULL;
 +      const struct spi_nor_erase_type *erase_minor = NULL;
        struct mtd_info *mtd = &nor->mtd;
-       u32 wanted_size = nor->info->sector_size;
        int i;
-@@ -2614,8 +2617,9 @@ static int spi_nor_select_erase(struct s
+@@ -2542,8 +2545,9 @@ static int spi_nor_select_erase(struct s
         */
        for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {
                if (map->erase_type[i].size) {
@@ -222,7 +222,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
                }
        }
  
-@@ -2623,6 +2627,9 @@ static int spi_nor_select_erase(struct s
+@@ -2551,6 +2555,9 @@ static int spi_nor_select_erase(struct s
                return -EINVAL;
  
        mtd->erasesize = erase->size;
index 35b908ca6d6c31485ca3da42b95024a5a1538ff0..98c5de084457f532238e2d2aa31e032fd95234da 100644 (file)
@@ -49,7 +49,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  #include "check.h"
  
  static int (*const check_part[])(struct parsed_partitions *) = {
-@@ -295,6 +297,74 @@ static ssize_t whole_disk_show(struct de
+@@ -284,6 +286,74 @@ static ssize_t whole_disk_show(struct de
  }
  static const DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
  
@@ -108,7 +108,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +               * the specified partno needs to match.
 +               */
 +              got_partno = !fwnode_property_read_u32(fw_part, "partno", &partno);
-+              if (got_partno && bdev->bd_partno != partno)
++              if (got_partno && bdev_partno(bdev) != partno)
 +                      continue;
 +
 +              /* Skip if no matching criteria is present in firmware node */
@@ -124,7 +124,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  /*
   * Must be called either with open_mutex held, before a disk can be opened or
   * after all disk users are gone.
-@@ -377,6 +447,8 @@ static struct block_device *add_partitio
+@@ -358,6 +428,8 @@ static struct block_device *add_partitio
                        goto out_put;
        }
  
index 303e488433a07a36013f46d300e68e8e9138395f..afc5e48981e322fbb9a7ec0bf5d896f6450311d4 100644 (file)
@@ -8,12 +8,15 @@ Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
 
 --- a/drivers/mtd/spi-nor/eon.c
 +++ b/drivers/mtd/spi-nor/eon.c
-@@ -17,6 +17,8 @@ static const struct flash_info eon_nor_p
-       { "en25p64",    INFO(0x1c2017, 0, 64 * 1024,  128) },
-       { "en25q64",    INFO(0x1c3017, 0, 64 * 1024,  128)
-               NO_SFDP_FLAGS(SECT_4K) },
-+      { "en25q128",   INFO(0x1c3018, 0, 64 * 1024,  256)
-+              NO_SFDP_FLAGS(SECT_4K) },
-       { "en25q80a",   INFO(0x1c3014, 0, 64 * 1024,   16)
-               NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
-       { "en25qh16",   INFO(0x1c7015, 0, 64 * 1024,   32)
+@@ -18,6 +18,11 @@ static const struct flash_info eon_nor_p
+               .name = "en25p64",
+               .size = SZ_8M,
+       }, {
++              .id = SNOR_ID(0x1c, 0x30, 0x18),
++              .name = "en25q128",
++              .size = SZ_16M,
++              .no_sfdp_flags = SECT_4K,
++      }, {
+               .id = SNOR_ID(0x1c, 0x30, 0x14),
+               .name = "en25q80a",
+               .size = SZ_1M,
index 6740d1d7beb9f7b6463829d5bf1440ef6bd7f280..4dd229bde9d79f9f9bf5380a034d1c6f6f063dd0 100644 (file)
@@ -11,11 +11,14 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 
 --- a/drivers/mtd/spi-nor/eon.c
 +++ b/drivers/mtd/spi-nor/eon.c
-@@ -19,6 +19,7 @@ static const struct flash_info eon_nor_p
-               NO_SFDP_FLAGS(SECT_4K) },
-       { "en25q128",   INFO(0x1c3018, 0, 64 * 1024,  256)
-               NO_SFDP_FLAGS(SECT_4K) },
-+      { "en25qx128a", INFO(0x1c7118, 0, 64 * 1024, 256) },
-       { "en25q80a",   INFO(0x1c3014, 0, 64 * 1024,   16)
-               NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
-       { "en25qh16",   INFO(0x1c7015, 0, 64 * 1024,   32)
+@@ -23,6 +23,10 @@ static const struct flash_info eon_nor_p
+               .size = SZ_16M,
+               .no_sfdp_flags = SECT_4K,
+       }, {
++              .id = SNOR_ID(0x1c, 0x71, 0x18),
++              .name = "en25qx128a",
++              .size = SZ_16M,
++      }, {
+               .id = SNOR_ID(0x1c, 0x30, 0x14),
+               .name = "en25q80a",
+               .size = SZ_1M,
index 945f5baf1061c0fae038ecc5dd4719dd4c685a77..be8bafa76aff28083461f77075a54f5cc8368256 100644 (file)
@@ -31,9 +31,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/mtd/spi-nor/Makefile
 +++ b/drivers/mtd/spi-nor/Makefile
-@@ -17,6 +17,7 @@ spi-nor-objs                 += sst.o
+@@ -14,6 +14,7 @@ spi-nor-objs                 += spansion.o
+ spi-nor-objs                  += sst.o
  spi-nor-objs                  += winbond.o
- spi-nor-objs                  += xilinx.o
  spi-nor-objs                  += xmc.o
 +spi-nor-objs                  += xtx.o
  spi-nor-$(CONFIG_DEBUG_FS)    += debugfs.o
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- /dev/null
 +++ b/drivers/mtd/spi-nor/xtx.c
-@@ -0,0 +1,17 @@
+@@ -0,0 +1,20 @@
 +// SPDX-License-Identifier: GPL-2.0
 +#include <linux/mtd/spi-nor.h>
 +
@@ -49,9 +49,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +
 +static const struct flash_info xtx_parts[] = {
 +      /* XTX Technology (Shenzhen) Limited */
-+      { "xt25f128b", INFO(0x0B4018, 0, 64 * 1024, 256)
-+              NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+                            SPI_NOR_QUAD_READ) },
++      {
++              .id = SNOR_ID(0x0B, 0x40, 0x18),
++              .name = "xt25f128b",
++              .size = SZ_16M,
++              .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++      },
 +};
 +
 +const struct spi_nor_manufacturer spi_nor_xtx = {
@@ -61,9 +64,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +};
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -2017,6 +2017,7 @@ static const struct spi_nor_manufacturer
+@@ -1979,6 +1979,7 @@ static const struct spi_nor_manufacturer
+       &spi_nor_sst,
        &spi_nor_winbond,
-       &spi_nor_xilinx,
        &spi_nor_xmc,
 +      &spi_nor_xtx,
  };
@@ -71,9 +74,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static const struct flash_info spi_nor_generic_flash = {
 --- a/drivers/mtd/spi-nor/core.h
 +++ b/drivers/mtd/spi-nor/core.h
-@@ -647,6 +647,7 @@ extern const struct spi_nor_manufacturer
+@@ -593,6 +593,7 @@ extern const struct spi_nor_manufacturer
+ extern const struct spi_nor_manufacturer spi_nor_sst;
  extern const struct spi_nor_manufacturer spi_nor_winbond;
- extern const struct spi_nor_manufacturer spi_nor_xilinx;
  extern const struct spi_nor_manufacturer spi_nor_xmc;
 +extern const struct spi_nor_manufacturer spi_nor_xtx;
  
index 3fdd354e6b265acca5cdbb700c4c4cc15c3bdac0..c4caf732ab56059334546b48a778505021498b19 100644 (file)
@@ -10,14 +10,16 @@ Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
 
 --- a/drivers/mtd/spi-nor/gigadevice.c
 +++ b/drivers/mtd/spi-nor/gigadevice.c
-@@ -34,6 +34,10 @@ static const struct spi_nor_fixups gd25q
- };
+@@ -35,6 +35,12 @@ static const struct spi_nor_fixups gd25q
  
  static const struct flash_info gigadevice_nor_parts[] = {
-+      { "gd25q05", INFO(0xc84010, 0, 64 * 1024,  1)
-+              FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-+              NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+                            SPI_NOR_QUAD_READ) },
-       { "gd25q16", INFO(0xc84015, 0, 64 * 1024,  32)
-               FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-               NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+       {
++              .id = SNOR_ID(0xc8, 0x40, 0x10),
++              .name = "gd25q05",
++              .size = SZ_64K,
++              .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
++              .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++      }, {
+               .id = SNOR_ID(0xc8, 0x40, 0x15),
+               .name = "gd25q16",
+               .size = SZ_2M,
index ddd3405ae71dd9103925bf6d975a8372f5272dd7..2b34d145ee332140eab09858f72cbefe7275c0a3 100644 (file)
@@ -9,15 +9,17 @@ Subject: [PATCH] spi-nor/gigadevic: add gd25q512
 
 --- a/drivers/mtd/spi-nor/gigadevice.c
 +++ b/drivers/mtd/spi-nor/gigadevice.c
-@@ -71,6 +71,11 @@ static const struct flash_info gigadevic
-               FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6)
-               FIXUP_FLAGS(SPI_NOR_4B_OPCODES)
-               .fixups = &gd25q256_fixups },
-+      { "gd25q512", INFO(0xc84020, 0, 64 * 1024, 1024)
-+              FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-+              FIXUP_FLAGS(SPI_NOR_4B_OPCODES)
-+              NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+                            SPI_NOR_QUAD_READ) },
- };
- const struct spi_nor_manufacturer spi_nor_gigadevice = {
+@@ -71,6 +71,13 @@ static const struct flash_info gigadevic
+               .fixups = &gd25q256_fixups,
+               .fixup_flags = SPI_NOR_4B_OPCODES,
+       }, {
++              .id = SNOR_ID(0xc8, 0x40, 0x20),
++              .name = "gd25q512",
++              .size = SZ_64M,
++              .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
++              .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++              .fixup_flags = SPI_NOR_4B_OPCODES,
++      }, {
+               .id = SNOR_ID(0xc8, 0x60, 0x16),
+               .name = "gd25lq32",
+               .size = SZ_4M,
index d5ebe20309737601278a02e9a88b44ad7e5e1115..1e296eedceb1d7776b3755924591bdc2a36217b1 100644 (file)
@@ -12,13 +12,16 @@ flash.
 
 --- a/drivers/mtd/spi-nor/esmt.c
 +++ b/drivers/mtd/spi-nor/esmt.c
-@@ -10,6 +10,9 @@
+@@ -10,6 +10,12 @@
  
  static const struct flash_info esmt_nor_parts[] = {
-       /* ESMT */
-+      { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32)
-+                      FLAGS(SPI_NOR_HAS_LOCK)
-+                      NO_SFDP_FLAGS(SECT_4K) },
-       { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64)
-               FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE)
-               NO_SFDP_FLAGS(SECT_4K) },
+       {
++              .id = SNOR_ID(0x8c, 0x21, 0x15),
++              .name = "f25l16pa-2s",
++              .size = SZ_2M,
++              .flags = SPI_NOR_HAS_LOCK,
++              .no_sfdp_flags = SECT_4K,
++      }, {
+               .id = SNOR_ID(0x8c, 0x20, 0x16),
+               .name = "f25l32pa",
+               .size = SZ_4M,
index e8583cc2571abc5f031833cc391b81fe8efd727b..886d7558166253e1ab2334b260ede54da5b2c439 100644 (file)
@@ -13,13 +13,15 @@ Datasheet available at https://www.xmcwh.com/uploads/435/XM25QH128C.pdf
 
 --- a/drivers/mtd/spi-nor/xmc.c
 +++ b/drivers/mtd/spi-nor/xmc.c
-@@ -16,6 +16,9 @@ static const struct flash_info xmc_nor_p
-       { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
-               NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-                             SPI_NOR_QUAD_READ) },
-+      { "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
-+              NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+                            SPI_NOR_QUAD_READ) },
+@@ -19,6 +19,11 @@ static const struct flash_info xmc_nor_p
+               .name = "XM25QH128A",
+               .size = SZ_16M,
+               .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++      }, {
++              .id = SNOR_ID(0x20, 0x40, 0x18),
++              .name = "XM25QH128C",
++              .size = SZ_16M,
++              .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+       },
  };
  
- const struct spi_nor_manufacturer spi_nor_xmc = {
index e1e4f25e1192bc5407f21493b18f6721521cde0a..6e65c55b21e10f0c4d92ce1e7cd4091a47195d7b 100644 (file)
@@ -11,13 +11,15 @@ Signed-off-by: Joe Mullally <jwmullally@gmail.com>
 
 --- a/drivers/mtd/spi-nor/xmc.c
 +++ b/drivers/mtd/spi-nor/xmc.c
-@@ -13,6 +13,9 @@ static const struct flash_info xmc_nor_p
-       { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128)
-               NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-                             SPI_NOR_QUAD_READ) },
-+      { "XM25QH64C", INFO(0x204017, 0, 64 * 1024, 128)
-+              NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+                            SPI_NOR_QUAD_READ) },
-       { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
-               NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-                             SPI_NOR_QUAD_READ) },
+@@ -15,6 +15,11 @@ static const struct flash_info xmc_nor_p
+               .size = SZ_8M,
+               .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+       }, {
++              .id = SNOR_ID(0x20, 0x40, 0x17),
++              .name = "XM25QH64C",
++              .size = SZ_8M,
++              .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++      }, {
+               .id = SNOR_ID(0x20, 0x70, 0x18),
+               .name = "XM25QH128A",
+               .size = SZ_16M,
index defde3f4269c210693f48b8fa85a1f4aa7f6ff0f..27b861110045f74a3004acdc4302314178b56d57 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1258,6 +1258,80 @@ static struct mtd_notifier ubi_mtd_notif
+@@ -1263,6 +1263,80 @@ static struct mtd_notifier ubi_mtd_notif
        .remove = ubi_notify_remove,
  };
  
@@ -73,7 +73,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +
 +      mutex_lock(&ubi_devices_mutex);
 +      pr_notice("UBI: auto-attach mtd%d\n", mtd->index);
-+      err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0, false);
++      err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0, false, false);
 +      mutex_unlock(&ubi_devices_mutex);
 +      if (err < 0) {
 +              pr_err("UBI error: cannot attach mtd%d\n", mtd->index);
@@ -89,7 +89,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  static int __init ubi_init_attach(void)
  {
        int err, i, k;
-@@ -1308,6 +1382,12 @@ static int __init ubi_init_attach(void)
+@@ -1314,6 +1388,12 @@ static int __init ubi_init_attach(void)
                }
        }
  
index e0cbc4508b0607433cd9a6f4c0a586122787b067..3d5f5768bc1605bfdfc633839fe474a8320657c0 100644 (file)
@@ -85,7 +85,7 @@ Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
 +obj-$(CONFIG_MTD_VIRT_CONCAT)   += virt_concat.o
 --- /dev/null
 +++ b/drivers/mtd/composite/virt_concat.c
-@@ -0,0 +1,128 @@
+@@ -0,0 +1,127 @@
 +// SPDX-License-Identifier: GPL-2.0+
 +/*
 + * Virtual concat MTD device driver
@@ -94,6 +94,7 @@ Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
 + * Author: Bernhard Frauendienst, kernel@nospam.obeliks.de
 + */
 +
++#include <linux/platform_device.h>
 +#include <linux/module.h>
 +#include <linux/device.h>
 +#include <linux/mtd/concat.h>
@@ -115,14 +116,14 @@ Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
 +      struct mtd_info **devices;
 +};
 +
-+static int virt_concat_remove(struct platform_device *pdev)
++static void virt_concat_remove(struct platform_device *pdev)
 +{
 +      struct of_virt_concat *info;
 +      int i;
 +
 +      info = platform_get_drvdata(pdev);
 +      if (!info)
-+              return 0;
++              return;
 +
 +      // unset data for when this is called after a probe error
 +      platform_set_drvdata(pdev, NULL);
@@ -136,8 +137,6 @@ Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
 +              for (i = 0; i < info->num_devices; i++)
 +                      put_mtd_device(info->devices[i]);
 +      }
-+
-+      return 0;
 +}
 +
 +static int virt_concat_probe(struct platform_device *pdev)
index 1a4d5a766f2281c00e69cbeabc726bf26058ec6d..0cf5b02dafea8da69212e33e8b5fedb8a2374e07 100644 (file)
@@ -22,11 +22,11 @@ Signed-off-by: Nick Hainke <vincent@systemli.org>
 
 --- a/drivers/mtd/spi-nor/macronix.c
 +++ b/drivers/mtd/spi-nor/macronix.c
-@@ -48,6 +48,7 @@ static const struct flash_info macronix_
-       { "mx25l3255e",  INFO(0xc29e16, 0, 64 * 1024,  64)
-               NO_SFDP_FLAGS(SECT_4K) },
-       { "mx25l6405d",  INFO(0xc22017, 0, 64 * 1024, 128)
-+              FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP)
-               NO_SFDP_FLAGS(SECT_4K) },
-       { "mx25u2033e",  INFO(0xc22532, 0, 64 * 1024,   4)
-               NO_SFDP_FLAGS(SECT_4K) },
+@@ -66,6 +66,7 @@ static const struct flash_info macronix_
+               .id = SNOR_ID(0xc2, 0x20, 0x17),
+               .name = "mx25l6405d",
+               .size = SZ_8M,
++              .flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP,
+               .no_sfdp_flags = SECT_4K,
+       }, {
+               .id = SNOR_ID(0xc2, 0x20, 0x18),
index 056b49db3ef9c07034754efd573b6071bb856c82..e1acfa2babf962cae777d95afd007177cc0fc64e 100644 (file)
@@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -22016,6 +22016,12 @@ F:    Documentation/filesystems/ubifs-authe
+@@ -23666,6 +23666,12 @@ F:    Documentation/filesystems/ubifs-authe
  F:    Documentation/filesystems/ubifs.rst
  F:    fs/ubifs/
  
@@ -51,9 +51,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  L:    linux-block@vger.kernel.org
 --- a/drivers/block/Kconfig
 +++ b/drivers/block/Kconfig
-@@ -354,6 +354,18 @@ config VIRTIO_BLK
-         This is the virtual block driver for virtio.  It can be used with
-           QEMU based VMMs (like KVM or Xen).  Say Y or M.
+@@ -363,6 +363,18 @@ config BLK_DEV_RUST_NULL
+         If unsure, say N.
  
 +config UIMAGE_FIT_BLK
 +      bool "uImage.FIT block driver"
@@ -72,7 +72,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        depends on INET && BLOCK
 --- a/drivers/block/Makefile
 +++ b/drivers/block/Makefile
-@@ -39,4 +39,6 @@ obj-$(CONFIG_BLK_DEV_NULL_BLK)       += null_b
+@@ -42,4 +42,6 @@ obj-$(CONFIG_BLK_DEV_NULL_BLK)       += null_b
  
  obj-$(CONFIG_BLK_DEV_UBLK)                    += ublk_drv.o
  
index 66c458d7e6200f1a47a16dd78f58262d4349aeb6..213e6f1f24553b52a07b06cfc379b8d10811b7f5 100644 (file)
@@ -254,7 +254,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +}
 --- a/fs/jffs2/super.c
 +++ b/fs/jffs2/super.c
-@@ -375,14 +375,41 @@ static int __init init_jffs2_fs(void)
+@@ -376,14 +376,41 @@ static int __init init_jffs2_fs(void)
        BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68);
        BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32);
  
@@ -1097,7 +1097,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
  #define JFFS2_NODE_ACCURATE 0x2000
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
-@@ -356,6 +356,12 @@ config ZSTD_DECOMPRESS
+@@ -353,6 +353,12 @@ config ZSTD_DECOMPRESS
  
  source "lib/xz/Kconfig"
  
@@ -1112,7 +1112,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
  # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
 --- a/lib/Makefile
 +++ b/lib/Makefile
-@@ -145,6 +145,16 @@ CFLAGS_kobject.o += -DDEBUG
+@@ -126,6 +126,16 @@ CFLAGS_kobject.o += -DDEBUG
  CFLAGS_kobject_uevent.o += -DDEBUG
  endif
  
@@ -1129,7 +1129,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
  obj-$(CONFIG_DEBUG_INFO_REDUCED) += debug_info.o
  CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any)
  
-@@ -205,6 +215,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
+@@ -185,6 +195,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
  obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd/
  obj-$(CONFIG_XZ_DEC) += xz/
  obj-$(CONFIG_RAID6_PQ) += raid6/
@@ -1186,9 +1186,9 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +}
 +
 +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
-+Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
++static Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
 +
-+UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
++static UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
 +
 +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
 +{
@@ -2589,7 +2589,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  p->needFlush = 0;
 +}
 +
-+void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
++static void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
 +{
 +  p->needFlush = 1;
 +  p->remainLen = 0;
@@ -3016,7 +3016,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +#define kNumLogBits (9 + (int)sizeof(size_t) / 2)
 +#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
 +
-+void LzmaEnc_FastPosInit(Byte *g_FastPos)
++static void LzmaEnc_FastPosInit(Byte *g_FastPos)
 +{
 +  int c = 2, slotFast;
 +  g_FastPos[0] = 0;
@@ -3248,7 +3248,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  CSaveState saveState;
 +} CLzmaEnc;
 +
-+void LzmaEnc_SaveState(CLzmaEncHandle pp)
++/*void LzmaEnc_SaveState(CLzmaEncHandle pp)
 +{
 +  CLzmaEnc *p = (CLzmaEnc *)pp;
 +  CSaveState *dest = &p->saveState;
@@ -3272,9 +3272,9 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
 +  memcpy(dest->reps, p->reps, sizeof(p->reps));
 +  memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb));
-+}
++}*/
 +
-+void LzmaEnc_RestoreState(CLzmaEncHandle pp)
++/*void LzmaEnc_RestoreState(CLzmaEncHandle pp)
 +{
 +  CLzmaEnc *dest = (CLzmaEnc *)pp;
 +  const CSaveState *p = &dest->saveState;
@@ -3298,7 +3298,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
 +  memcpy(dest->reps, p->reps, sizeof(p->reps));
 +  memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb));
-+}
++}*/
 +
 +SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
 +{
@@ -3509,7 +3509,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  while (symbol < 0x10000);
 +}
 +
-+void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
++static void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
 +{
 +  UInt32 i;
 +  for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits))
@@ -4585,7 +4585,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  p->matchPriceCount = 0;
 +}
 +
-+void LzmaEnc_Construct(CLzmaEnc *p)
++static void LzmaEnc_Construct(CLzmaEnc *p)
 +{
 +  RangeEnc_Construct(&p->rc);
 +  MatchFinder_Construct(&p->matchFinderBase);
@@ -4618,7 +4618,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  return p;
 +}
 +
-+void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
++static void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
 +{
 +  alloc->Free(alloc, p->litProbs);
 +  alloc->Free(alloc, p->saveState.litProbs);
@@ -4626,7 +4626,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  p->saveState.litProbs = 0;
 +}
 +
-+void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
++static void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
 +{
 +  #ifndef _7ZIP_ST
 +  MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
@@ -4856,7 +4856,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  return SZ_OK;
 +}
 +
-+void LzmaEnc_Init(CLzmaEnc *p)
++static void LzmaEnc_Init(CLzmaEnc *p)
 +{
 +  UInt32 i;
 +  p->state = 0;
@@ -4914,7 +4914,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  p->lpMask = (1 << p->lp) - 1;
 +}
 +
-+void LzmaEnc_InitPrices(CLzmaEnc *p)
++static void LzmaEnc_InitPrices(CLzmaEnc *p)
 +{
 +  if (!p->fastMode)
 +  {
@@ -4956,7 +4956,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig);
 +}
 +
-+SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
++/*SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
 +    ISeqInStream *inStream, UInt32 keepWindowSize,
 +    ISzAlloc *alloc, ISzAlloc *allocBig)
 +{
@@ -4964,7 +4964,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  p->matchFinderBase.stream = inStream;
 +  p->needInit = 1;
 +  return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
-+}
++}*/
 +
 +static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
 +{
@@ -4973,7 +4973,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  p->matchFinderBase.directInputRem = srcLen;
 +}
 +
-+SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
++static SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
 +    UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
 +{
 +  CLzmaEnc *p = (CLzmaEnc *)pp;
@@ -4983,7 +4983,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +  return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
 +}
 +
-+void LzmaEnc_Finish(CLzmaEncHandle pp)
++static void LzmaEnc_Finish(CLzmaEncHandle pp)
 +{
 +  #ifndef _7ZIP_ST
 +  CLzmaEnc *p = (CLzmaEnc *)pp;
@@ -5017,19 +5017,19 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +}
 +
 +
-+UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
++/*UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
 +{
 +  const CLzmaEnc *p = (CLzmaEnc *)pp;
 +  return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
-+}
++}*/
 +
-+const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
++/*const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
 +{
 +  const CLzmaEnc *p = (CLzmaEnc *)pp;
 +  return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
-+}
++}*/
 +
-+SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
++/* SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
 +    Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
 +{
 +  CLzmaEnc *p = (CLzmaEnc *)pp;
@@ -5061,7 +5061,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 +    return SZ_ERROR_OUTPUT_EOF;
 +
 +  return res;
-+}
++}*/
 +
 +static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
 +{
index f5c15756c5eab96830e458f36df07a5c77b25d97..fff421bd3cea13d05178eabd6b0e1b4f287e40bc 100644 (file)
@@ -55,9 +55,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                goto out;
  
        if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2176,12 +2178,12 @@ static int packet_rcv(struct sk_buff *sk
+@@ -2175,12 +2177,12 @@ static int packet_rcv(struct sk_buff *sk
+       int skb_len = skb->len;
        unsigned int snaplen, res;
-       bool is_drop_n_account = false;
  
 -      if (skb->pkt_type == PACKET_LOOPBACK)
 -              goto drop;
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!net_eq(dev_net(dev), sock_net(sk)))
                goto drop;
  
-@@ -2308,12 +2310,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2304,12 +2306,12 @@ static int tpacket_rcv(struct sk_buff *s
        BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
        BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
  
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!net_eq(dev_net(dev), sock_net(sk)))
                goto drop;
  
-@@ -3437,6 +3439,7 @@ static int packet_create(struct net *net
+@@ -3430,6 +3432,7 @@ static int packet_create(struct net *net
        mutex_init(&po->pg_vec_lock);
        po->rollover = NULL;
        po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        if (sock->type == SOCK_PACKET)
                po->prot_hook.func = packet_rcv_spkt;
-@@ -4104,6 +4107,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -4097,6 +4100,16 @@ packet_setsockopt(struct socket *sock, i
                packet_sock_flag_set(po, PACKET_SOCK_QDISC_BYPASS, val);
                return 0;
        }
@@ -112,9 +112,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        default:
                return -ENOPROTOOPT;
        }
-@@ -4163,6 +4176,13 @@ static int packet_getsockopt(struct sock
-       case PACKET_VNET_HDR_SZ:
-               val = READ_ONCE(po->vnet_hdr_sz);
+@@ -4159,6 +4172,13 @@ static int packet_getsockopt(struct sock
+       case PACKET_COPY_THRESH:
+               val = READ_ONCE(pkt_sk(sk)->copy_thresh);
                break;
 +      case PACKET_RECV_TYPE:
 +              if (len > sizeof(unsigned int))
index 863372ea8749cacd65871f501ba0b9499b01eedd..f0e8a63a99d3da3b79f3b5d9f1cd5c7168fa6f87 100644 (file)
@@ -39,8 +39,8 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        struct in6_addr raddr;  /* remote tunnel end-point address */
 +      struct __ip6_tnl_fmr *fmrs;     /* FMRs */
  
-       __be16                  i_flags;
-       __be16                  o_flags;
+       IP_TUNNEL_DECLARE_FLAGS(i_flags);
+       IP_TUNNEL_DECLARE_FLAGS(o_flags);
 --- a/include/uapi/linux/if_tunnel.h
 +++ b/include/uapi/linux/if_tunnel.h
 @@ -77,10 +77,23 @@ enum {
@@ -79,7 +79,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
   */
  
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-@@ -67,9 +70,9 @@ static bool log_ecn_error = true;
+@@ -68,9 +71,9 @@ static bool log_ecn_error = true;
  module_param(log_ecn_error, bool, 0644);
  MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
  
@@ -91,7 +91,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  
        return hash_32(hash, IP6_TUNNEL_HASH_SIZE_SHIFT);
  }
-@@ -114,17 +117,33 @@ static struct ip6_tnl *
+@@ -115,17 +118,33 @@ static struct ip6_tnl *
  ip6_tnl_lookup(struct net *net, int link,
               const struct in6_addr *remote, const struct in6_addr *local)
  {
@@ -127,7 +127,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
                if (link == t->parms.link)
                        return t;
                else
-@@ -132,7 +151,7 @@ ip6_tnl_lookup(struct net *net, int link
+@@ -133,7 +152,7 @@ ip6_tnl_lookup(struct net *net, int link
        }
  
        memset(&any, 0, sizeof(any));
@@ -136,7 +136,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        for_each_ip6_tunnel_rcu(ip6n->tnls_r_l[hash]) {
                if (!ipv6_addr_equal(local, &t->parms.laddr) ||
                    !ipv6_addr_any(&t->parms.raddr) ||
-@@ -145,7 +164,7 @@ ip6_tnl_lookup(struct net *net, int link
+@@ -146,7 +165,7 @@ ip6_tnl_lookup(struct net *net, int link
                        cand = t;
        }
  
@@ -145,7 +145,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        for_each_ip6_tunnel_rcu(ip6n->tnls_r_l[hash]) {
                if (!ipv6_addr_equal(remote, &t->parms.raddr) ||
                    !ipv6_addr_any(&t->parms.laddr) ||
-@@ -194,7 +213,7 @@ ip6_tnl_bucket(struct ip6_tnl_net *ip6n,
+@@ -195,7 +214,7 @@ ip6_tnl_bucket(struct ip6_tnl_net *ip6n,
  
        if (!ipv6_addr_any(remote) || !ipv6_addr_any(local)) {
                prio = 1;
@@ -167,7 +167,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        if (dev == ip6n->fb_tnl_dev)
                RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL);
        else
-@@ -788,6 +813,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
+@@ -790,6 +815,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
  }
  EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl);
  
@@ -303,7 +303,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        __skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
  
        err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
-@@ -1002,6 +1149,7 @@ static void init_tel_txopt(struct ipv6_t
+@@ -1004,6 +1151,7 @@ static void init_tel_txopt(struct ipv6_t
        opt->ops.opt_nflen = 8;
  }
  
@@ -311,7 +311,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  /**
   * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
   *   @t: the outgoing tunnel device
-@@ -1292,6 +1440,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1294,6 +1442,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
                u8 protocol)
  {
        struct ip6_tnl *t = netdev_priv(dev);
@@ -319,7 +319,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        struct ipv6hdr *ipv6h;
        const struct iphdr  *iph;
        int encap_limit = -1;
-@@ -1391,6 +1540,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1393,6 +1542,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
        fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
        dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield);
  
@@ -338,7 +338,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
                return -1;
  
-@@ -1544,6 +1705,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
+@@ -1546,6 +1707,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
        t->parms.link = p->link;
        t->parms.proto = p->proto;
        t->parms.fwmark = p->fwmark;
@@ -353,7 +353,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        dst_cache_reset(&t->dst_cache);
        ip6_tnl_link_config(t);
  }
-@@ -1578,6 +1747,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
+@@ -1580,6 +1749,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
        p->flowinfo = u->flowinfo;
        p->link = u->link;
        p->proto = u->proto;
@@ -361,7 +361,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        memcpy(p->name, u->name, sizeof(u->name));
  }
  
-@@ -1966,6 +2136,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1963,6 +2133,15 @@ static int ip6_tnl_validate(struct nlatt
        return 0;
  }
  
@@ -377,7 +377,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  static void ip6_tnl_netlink_parms(struct nlattr *data[],
                                  struct __ip6_tnl_parm *parms)
  {
-@@ -2003,6 +2182,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -2000,6 +2179,46 @@ static void ip6_tnl_netlink_parms(struct
  
        if (data[IFLA_IPTUN_FWMARK])
                parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
@@ -424,7 +424,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  }
  
  static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
-@@ -2086,6 +2305,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2083,6 +2302,12 @@ static void ip6_tnl_dellink(struct net_d
  
  static size_t ip6_tnl_get_size(const struct net_device *dev)
  {
@@ -437,7 +437,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        return
                /* IFLA_IPTUN_LINK */
                nla_total_size(4) +
-@@ -2115,6 +2340,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2112,6 +2337,24 @@ static size_t ip6_tnl_get_size(const str
                nla_total_size(0) +
                /* IFLA_IPTUN_FWMARK */
                nla_total_size(4) +
@@ -462,7 +462,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
                0;
  }
  
-@@ -2122,6 +2365,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2119,6 +2362,9 @@ static int ip6_tnl_fill_info(struct sk_b
  {
        struct ip6_tnl *tunnel = netdev_priv(dev);
        struct __ip6_tnl_parm *parm = &tunnel->parms;
@@ -472,7 +472,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  
        if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
            nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
-@@ -2131,9 +2377,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2128,9 +2374,27 @@ static int ip6_tnl_fill_info(struct sk_b
            nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
            nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
            nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
@@ -501,7 +501,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
            nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
            nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
-@@ -2173,6 +2437,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2170,6 +2434,7 @@ static const struct nla_policy ip6_tnl_p
        [IFLA_IPTUN_ENCAP_DPORT]        = { .type = NLA_U16 },
        [IFLA_IPTUN_COLLECT_METADATA]   = { .type = NLA_FLAG },
        [IFLA_IPTUN_FWMARK]             = { .type = NLA_U32 },
index 58ccff247fb5c5fb2d83183731f5b705ff67b9ea..9788ded24c28d4e1f46d05019d21b6284c132bd5 100644 (file)
@@ -13,20 +13,20 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/net/dummy.c
 +++ b/drivers/net/dummy.c
-@@ -118,7 +118,7 @@ static void dummy_setup(struct net_devic
-       dev->flags &= ~IFF_MULTICAST;
+@@ -111,7 +111,7 @@ static void dummy_setup(struct net_devic
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+       dev->lltx = true;
        dev->features   |= NETIF_F_SG | NETIF_F_FRAGLIST;
 -      dev->features   |= NETIF_F_GSO_SOFTWARE;
 +      dev->features   |= NETIF_F_GSO_SOFTWARE_ALL;
-       dev->features   |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_LLTX;
+       dev->features   |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
        dev->features   |= NETIF_F_GSO_ENCAP_ALL;
        dev->hw_features |= dev->features;
 --- a/drivers/net/loopback.c
 +++ b/drivers/net/loopback.c
-@@ -176,7 +176,7 @@ static void gen_lo_setup(struct net_devi
-       dev->flags              = IFF_LOOPBACK;
-       dev->priv_flags         |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+@@ -174,7 +174,7 @@ static void gen_lo_setup(struct net_devi
+       dev->lltx               = true;
+       dev->netns_local        = true;
        netif_keep_dst(dev);
 -      dev->hw_features        = NETIF_F_GSO_SOFTWARE;
 +      dev->hw_features        = NETIF_F_GSO_SOFTWARE_ALL;
@@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                | NETIF_F_HW_CSUM
 --- a/drivers/net/macvlan.c
 +++ b/drivers/net/macvlan.c
-@@ -896,7 +896,7 @@ static int macvlan_hwtstamp_set(struct n
+@@ -897,7 +897,7 @@ static int macvlan_hwtstamp_set(struct n
  static struct lock_class_key macvlan_netdev_addr_lock_key;
  
  #define ALWAYS_ON_OFFLOADS \
@@ -43,10 +43,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE_ALL | \
         NETIF_F_GSO_ROBUST | NETIF_F_GSO_ENCAP_ALL)
  
- #define ALWAYS_ON_FEATURES (ALWAYS_ON_OFFLOADS | NETIF_F_LLTX)
+ #define ALWAYS_ON_FEATURES ALWAYS_ON_OFFLOADS
 --- a/include/linux/netdev_features.h
 +++ b/include/linux/netdev_features.h
-@@ -219,13 +219,14 @@ static inline int find_next_netdev_featu
+@@ -211,13 +211,14 @@ static inline int find_next_netdev_featu
  
  /* List of features with software fallbacks. */
  #define NETIF_F_GSO_SOFTWARE  (NETIF_F_ALL_TSO | NETIF_F_GSO_SCTP |        \
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if ((ret & NETIF_F_GSO_ENCAP_ALL) && (ret & NETIF_F_CSUM_MASK))
 --- a/net/8021q/vlan_dev.c
 +++ b/net/8021q/vlan_dev.c
-@@ -583,7 +583,7 @@ static int vlan_dev_init(struct net_devi
+@@ -538,7 +538,7 @@ static int vlan_dev_init(struct net_devi
                dev->state |= (1 << __LINK_STATE_NOCARRIER);
  
        dev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG |
@@ -84,19 +84,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +                         NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE_ALL |
                           NETIF_F_GSO_ENCAP_ALL |
                           NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC |
-                          NETIF_F_ALL_FCOE;
-@@ -676,7 +676,7 @@ static netdev_features_t vlan_dev_fix_fe
+                          NETIF_F_FCOE_CRC | NETIF_F_FSO;
+@@ -634,7 +634,7 @@ static netdev_features_t vlan_dev_fix_fe
        if (lower_features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))
                lower_features |= NETIF_F_HW_CSUM;
        features = netdev_intersect_features(features, lower_features);
 -      features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE);
 +      features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE_ALL);
-       features |= NETIF_F_LLTX;
  
        return features;
+ }
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -2444,7 +2444,7 @@ void sk_setup_caps(struct sock *sk, stru
+@@ -2533,7 +2533,7 @@ void sk_setup_caps(struct sock *sk, stru
        if (sk_is_tcp(sk))
                sk->sk_route_caps |= NETIF_F_GSO;
        if (sk->sk_route_caps & NETIF_F_GSO)
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (sk_can_gso(sk)) {
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1996,7 +1996,7 @@ void ieee80211_color_collision_detection
+@@ -2012,7 +2012,7 @@ void ieee80211_color_collision_detection
  /* interface handling */
  #define MAC80211_SUPPORTED_FEATURES_TX        (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
                                         NETIF_F_HW_CSUM | NETIF_F_SG | \
@@ -118,12 +118,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #define MAC80211_SUPPORTED_FEATURES   (MAC80211_SUPPORTED_FEATURES_TX | \
 --- a/net/openvswitch/vport-internal_dev.c
 +++ b/net/openvswitch/vport-internal_dev.c
-@@ -110,7 +110,7 @@ static void do_setup(struct net_device *
+@@ -109,7 +109,7 @@ static void do_setup(struct net_device *
+       netdev->rtnl_link_ops = &internal_dev_link_ops;
  
-       netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
-                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM |
--                         NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ENCAP_ALL;
-+                         NETIF_F_GSO_SOFTWARE_ALL | NETIF_F_GSO_ENCAP_ALL;
+       netdev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
+-                         NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
++                         NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE_ALL |
+                          NETIF_F_GSO_ENCAP_ALL;
  
        netdev->vlan_features = netdev->features;
-       netdev->hw_enc_features = netdev->features;
index 35e70787d5c8c707255d1fdc69e00032010a7a08..301defb49a7719106081a773a6f12ae81ebfa611 100644 (file)
@@ -34,22 +34,18 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  static int __init nf_flow_table_module_init(void)
  {
        int ret;
-@@ -670,8 +687,14 @@ static int __init nf_flow_table_module_i
+@@ -674,6 +691,10 @@ static int __init nf_flow_table_module_i
        if (ret)
-               goto out_offload;
+               goto out_bpf;
  
 +      ret = register_netdevice_notifier(&flow_offload_netdev_notifier);
 +      if (ret)
-+              goto out_offload_init;
++              goto out_bpf;
 +
        return 0;
  
-+out_offload_init:
-+      nf_flow_table_offload_exit();
- out_offload:
-       unregister_pernet_subsys(&nf_flow_table_net_ops);
-       return ret;
-@@ -679,6 +702,7 @@ out_offload:
+ out_bpf:
+@@ -685,6 +706,7 @@ out_offload:
  
  static void __exit nf_flow_table_module_exit(void)
  {
index a80433c98638fa2999028c2f80ae64d790a72706..61ec59b8712942db986991cb0eb628408141428b 100644 (file)
@@ -10,12 +10,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5105,6 +5105,8 @@ static int mtk_probe(struct platform_dev
-        * for NAPI to work
-        */
-       init_dummy_netdev(&eth->dummy_dev);
-+      eth->dummy_dev.threaded = 1;
-+      strcpy(eth->dummy_dev.name, "mtk_eth");
-       netif_napi_add(&eth->dummy_dev, &eth->tx_napi, mtk_napi_tx);
-       netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx);
+@@ -5119,6 +5119,8 @@ static int mtk_probe(struct platform_dev
+               dev_err(eth->dev, "failed to allocated dummy device\n");
+               goto err_unreg_netdev;
+       }
++      eth->dummy_dev->threaded = 1;
++      strcpy(eth->dummy_dev->name, "mtk_eth");
+       netif_napi_add(eth->dummy_dev, &eth->tx_napi, mtk_napi_tx);
+       netif_napi_add(eth->dummy_dev, &eth->rx_napi, mtk_napi_rx);
  
index 78e0049f05243fe7512301ca4a134184ef5d4e96..6b2b016881da8b1c0ab0f0e60bd2e4764a7b8a8a 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/net/phy/phylink.c
 +++ b/drivers/net/phy/phylink.c
-@@ -2017,7 +2017,7 @@ int phylink_fwnode_phy_connect(struct ph
+@@ -2086,7 +2086,7 @@ int phylink_fwnode_phy_connect(struct ph
  {
        struct fwnode_handle *phy_fwnode;
        struct phy_device *phy_dev;
@@ -29,9 +29,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
        /* Fixed links and 802.3z are handled without needing a PHY */
        if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
-@@ -2044,6 +2044,25 @@ int phylink_fwnode_phy_connect(struct ph
-               pl->link_config.interface = pl->link_interface;
-       }
+@@ -2116,6 +2116,25 @@ int phylink_fwnode_phy_connect(struct ph
+       if (pl->config->mac_requires_rxc)
+               flags |= PHY_F_RXC_ALWAYS_ON;
  
 +      /* Assume single-lane SerDes interface modes share the same
 +       * lanes and allow the PHY to switch to slower also supported modes
index 9b553e77cde569b9914b1d295cbbd7669e7d006f..25c6ae3f78bfb1f9ac6b637db89ecba4c8a3ec4f 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 
 --- a/drivers/net/dsa/qca/qca8k-8xxx.c
 +++ b/drivers/net/dsa/qca/qca8k-8xxx.c
-@@ -1738,6 +1738,117 @@ qca8k_get_tag_protocol(struct dsa_switch
+@@ -1750,6 +1750,117 @@ qca8k_get_tag_protocol(struct dsa_switch
        return DSA_TAG_PROTO_QCA;
  }
  
@@ -103,7 +103,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 +
 +      dsa_switch_for_each_user_port(dp, ds) {
 +              /* Skip if assigned master is not the LAG */
-+              if (dsa_port_to_master(dp) != lag_dev)
++              if (dsa_port_to_conduit(dp) != lag_dev)
 +                      continue;
 +
 +              ret = qca8k_port_change_master(ds, dp->index,
@@ -142,17 +142,17 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 +}
 +
  static void
- qca8k_master_change(struct dsa_switch *ds, const struct net_device *master,
-                   bool operational)
-@@ -2024,8 +2135,9 @@ static const struct dsa_switch_ops qca8k
-       .phylink_mac_link_down  = qca8k_phylink_mac_link_down,
-       .phylink_mac_link_up    = qca8k_phylink_mac_link_up,
+ qca8k_conduit_change(struct dsa_switch *ds, const struct net_device *conduit,
+                    bool operational)
+@@ -2039,8 +2150,9 @@ static const struct dsa_switch_ops qca8k
+       .port_vlan_del          = qca8k_port_vlan_del,
+       .phylink_get_caps       = qca8k_phylink_get_caps,
        .get_phy_flags          = qca8k_get_phy_flags,
 -      .port_lag_join          = qca8k_port_lag_join,
 -      .port_lag_leave         = qca8k_port_lag_leave,
 +      .port_lag_join          = qca8xxx_port_lag_join,
 +      .port_lag_leave         = qca8xxx_port_lag_leave,
-+      .port_change_master     = qca8k_port_change_master,
-       .master_state_change    = qca8k_master_change,
++      .port_change_conduit    = qca8k_port_change_master,
+       .conduit_state_change   = qca8k_conduit_change,
        .connect_tag_protocol   = qca8k_connect_tag_protocol,
  };
index ccb9d1bc1d06ebd0b346fc333fbbcc6a389dec8d..c12d608600c4270e73386a80394f7a3bcf0be5a2 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Chad Monroe <chad@monroe.io>
  /* QDMA Flow Control Register */
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3319,12 +3319,14 @@ static int mtk_start_dma(struct mtk_eth
+@@ -3324,12 +3324,14 @@ static int mtk_start_dma(struct mtk_eth
                       MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
                       MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE;
  
@@ -34,7 +34,7 @@ Signed-off-by: Chad Monroe <chad@monroe.io>
 +                      val &= ~MTK_RESV_BUF_MASK;
                        val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
                               MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
-                              MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN;
+                              MTK_CHK_DDONE_EN;
 -              else
 +              } else {
                        val |= MTK_RX_BT_32DWORDS;
index 632133c408947315eab563bc51dfd3a8f844728e..c50348382a680b909fc9b18f5663d7b918d64f00 100644 (file)
@@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
                idle = cur_idle;
                entry->data.ib1 &= ~ib1_ts_mask;
--              entry->data.ib1 |= hwe->ib1 & ib1_ts_mask;
+-              entry->data.ib1 |= ib1 & ib1_ts_mask;
 -      }
 -}
 -
index 067ea1f86db444148fcb2a469bd6170ff9981a79..ddde22eb6caa979364887acf71636e59397fa042 100644 (file)
@@ -490,7 +490,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        .mac_finish = mtk_mac_finish,
        .mac_link_down = mtk_mac_link_down,
        .mac_link_up = mtk_mac_link_up,
-@@ -3427,6 +3568,9 @@ static int mtk_open(struct net_device *d
+@@ -3432,6 +3573,9 @@ static int mtk_open(struct net_device *d
  
        ppe_num = eth->soc->ppe_num;
  
@@ -500,7 +500,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
        if (err) {
                netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
-@@ -3577,6 +3721,9 @@ static int mtk_stop(struct net_device *d
+@@ -3582,6 +3726,9 @@ static int mtk_stop(struct net_device *d
        for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
                mtk_ppe_stop(eth->ppe[i]);
  
@@ -510,7 +510,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        return 0;
  }
  
-@@ -4647,6 +4794,7 @@ static const struct net_device_ops mtk_n
+@@ -4656,6 +4803,7 @@ static const struct net_device_ops mtk_n
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
  {
        const __be32 *_id = of_get_property(np, "reg", NULL);
@@ -518,7 +518,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        phy_interface_t phy_mode;
        struct phylink *phylink;
        struct mtk_mac *mac;
-@@ -4685,16 +4833,41 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4694,16 +4842,41 @@ static int mtk_add_mac(struct mtk_eth *e
        mac->id = id;
        mac->hw = eth;
        mac->of_node = np;
@@ -568,7 +568,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        }
  
        memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip));
-@@ -4777,8 +4950,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4786,8 +4959,21 @@ static int mtk_add_mac(struct mtk_eth *e
                phy_interface_zero(mac->phylink_config.supported_interfaces);
                __set_bit(PHY_INTERFACE_MODE_INTERNAL,
                          mac->phylink_config.supported_interfaces);
@@ -590,7 +590,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        phylink = phylink_create(&mac->phylink_config,
                                 of_fwnode_handle(mac->of_node),
                                 phy_mode, &mtk_phylink_ops);
-@@ -4829,6 +5015,26 @@ free_netdev:
+@@ -4838,6 +5024,26 @@ free_netdev:
        return err;
  }
  
@@ -617,7 +617,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev)
  {
        struct net_device *dev, *tmp;
-@@ -4975,7 +5181,8 @@ static int mtk_probe(struct platform_dev
+@@ -4984,7 +5190,8 @@ static int mtk_probe(struct platform_dev
                        regmap_write(cci, 0, 3);
        }
  
@@ -627,7 +627,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
                err = mtk_sgmii_init(eth);
  
                if (err)
-@@ -5086,6 +5293,24 @@ static int mtk_probe(struct platform_dev
+@@ -5095,6 +5302,24 @@ static int mtk_probe(struct platform_dev
                }
        }
  
@@ -652,7 +652,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
                err = devm_request_irq(eth->dev, eth->irq[0],
                                       mtk_handle_irq, 0,
-@@ -5189,6 +5414,11 @@ static int mtk_remove(struct platform_de
+@@ -5205,6 +5430,11 @@ static void mtk_remove(struct platform_d
                mtk_stop(eth->netdev[i]);
                mac = netdev_priv(eth->netdev[i]);
                phylink_disconnect_phy(mac->phylink);
@@ -737,40 +737,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  #define MTK_MAC_FSM(x)                (0x1010C + ((x) * 0x100))
  
-@@ -735,12 +764,8 @@ enum mtk_clks_map {
-       MTK_CLK_ETHWARP_WOCPU2,
-       MTK_CLK_ETHWARP_WOCPU1,
-       MTK_CLK_ETHWARP_WOCPU0,
--      MTK_CLK_TOP_USXGMII_SBUS_0_SEL,
--      MTK_CLK_TOP_USXGMII_SBUS_1_SEL,
-       MTK_CLK_TOP_SGM_0_SEL,
-       MTK_CLK_TOP_SGM_1_SEL,
--      MTK_CLK_TOP_XFI_PHY_0_XTAL_SEL,
--      MTK_CLK_TOP_XFI_PHY_1_XTAL_SEL,
-       MTK_CLK_TOP_ETH_GMII_SEL,
-       MTK_CLK_TOP_ETH_REFCK_50M_SEL,
-       MTK_CLK_TOP_ETH_SYS_200M_SEL,
-@@ -811,19 +836,9 @@ enum mtk_clks_map {
-                                BIT_ULL(MTK_CLK_GP3) | BIT_ULL(MTK_CLK_XGP1) | \
-                                BIT_ULL(MTK_CLK_XGP2) | BIT_ULL(MTK_CLK_XGP3) | \
-                                BIT_ULL(MTK_CLK_CRYPTO) | \
--                               BIT_ULL(MTK_CLK_SGMII_TX_250M) | \
--                               BIT_ULL(MTK_CLK_SGMII_RX_250M) | \
--                               BIT_ULL(MTK_CLK_SGMII2_TX_250M) | \
--                               BIT_ULL(MTK_CLK_SGMII2_RX_250M) | \
-                                BIT_ULL(MTK_CLK_ETHWARP_WOCPU2) | \
-                                BIT_ULL(MTK_CLK_ETHWARP_WOCPU1) | \
-                                BIT_ULL(MTK_CLK_ETHWARP_WOCPU0) | \
--                               BIT_ULL(MTK_CLK_TOP_USXGMII_SBUS_0_SEL) | \
--                               BIT_ULL(MTK_CLK_TOP_USXGMII_SBUS_1_SEL) | \
--                               BIT_ULL(MTK_CLK_TOP_SGM_0_SEL) | \
--                               BIT_ULL(MTK_CLK_TOP_SGM_1_SEL) | \
--                               BIT_ULL(MTK_CLK_TOP_XFI_PHY_0_XTAL_SEL) | \
--                               BIT_ULL(MTK_CLK_TOP_XFI_PHY_1_XTAL_SEL) | \
-                                BIT_ULL(MTK_CLK_TOP_ETH_GMII_SEL) | \
-                                BIT_ULL(MTK_CLK_TOP_ETH_REFCK_50M_SEL) | \
-                                BIT_ULL(MTK_CLK_TOP_ETH_SYS_200M_SEL) | \
-@@ -957,6 +972,8 @@ enum mkt_eth_capabilities {
+@@ -943,6 +972,8 @@ enum mkt_eth_capabilities {
        MTK_RGMII_BIT = 0,
        MTK_TRGMII_BIT,
        MTK_SGMII_BIT,
@@ -779,7 +746,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        MTK_ESW_BIT,
        MTK_GEPHY_BIT,
        MTK_MUX_BIT,
-@@ -977,8 +994,11 @@ enum mkt_eth_capabilities {
+@@ -963,8 +994,11 @@ enum mkt_eth_capabilities {
        MTK_ETH_MUX_GDM1_TO_GMAC1_ESW_BIT,
        MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY_BIT,
        MTK_ETH_MUX_U3_GMAC2_TO_QPHY_BIT,
@@ -791,7 +758,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
        /* PATH BITS */
        MTK_ETH_PATH_GMAC1_RGMII_BIT,
-@@ -986,14 +1006,21 @@ enum mkt_eth_capabilities {
+@@ -972,14 +1006,21 @@ enum mkt_eth_capabilities {
        MTK_ETH_PATH_GMAC1_SGMII_BIT,
        MTK_ETH_PATH_GMAC2_RGMII_BIT,
        MTK_ETH_PATH_GMAC2_SGMII_BIT,
@@ -813,7 +780,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  #define MTK_ESW                       BIT_ULL(MTK_ESW_BIT)
  #define MTK_GEPHY             BIT_ULL(MTK_GEPHY_BIT)
  #define MTK_MUX                       BIT_ULL(MTK_MUX_BIT)
-@@ -1016,10 +1043,16 @@ enum mkt_eth_capabilities {
+@@ -1002,10 +1043,16 @@ enum mkt_eth_capabilities {
        BIT_ULL(MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY_BIT)
  #define MTK_ETH_MUX_U3_GMAC2_TO_QPHY          \
        BIT_ULL(MTK_ETH_MUX_U3_GMAC2_TO_QPHY_BIT)
@@ -830,7 +797,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  /* Supported path present on SoCs */
  #define MTK_ETH_PATH_GMAC1_RGMII      BIT_ULL(MTK_ETH_PATH_GMAC1_RGMII_BIT)
-@@ -1027,8 +1060,13 @@ enum mkt_eth_capabilities {
+@@ -1013,8 +1060,13 @@ enum mkt_eth_capabilities {
  #define MTK_ETH_PATH_GMAC1_SGMII      BIT_ULL(MTK_ETH_PATH_GMAC1_SGMII_BIT)
  #define MTK_ETH_PATH_GMAC2_RGMII      BIT_ULL(MTK_ETH_PATH_GMAC2_RGMII_BIT)
  #define MTK_ETH_PATH_GMAC2_SGMII      BIT_ULL(MTK_ETH_PATH_GMAC2_SGMII_BIT)
@@ -844,7 +811,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  #define MTK_GMAC1_RGMII               (MTK_ETH_PATH_GMAC1_RGMII | MTK_RGMII)
  #define MTK_GMAC1_TRGMII      (MTK_ETH_PATH_GMAC1_TRGMII | MTK_TRGMII)
-@@ -1036,7 +1074,12 @@ enum mkt_eth_capabilities {
+@@ -1022,7 +1074,12 @@ enum mkt_eth_capabilities {
  #define MTK_GMAC2_RGMII               (MTK_ETH_PATH_GMAC2_RGMII | MTK_RGMII)
  #define MTK_GMAC2_SGMII               (MTK_ETH_PATH_GMAC2_SGMII | MTK_SGMII)
  #define MTK_GMAC2_GEPHY               (MTK_ETH_PATH_GMAC2_GEPHY | MTK_GEPHY)
@@ -857,7 +824,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  /* MUXes present on SoCs */
  /* 0: GDM1 -> GMAC1, 1: GDM1 -> ESW */
-@@ -1055,10 +1098,20 @@ enum mkt_eth_capabilities {
+@@ -1041,10 +1098,20 @@ enum mkt_eth_capabilities {
        (MTK_ETH_MUX_GMAC1_GMAC2_TO_SGMII_RGMII | MTK_MUX | \
        MTK_SHARED_SGMII)
  
@@ -878,7 +845,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  #define MTK_HAS_CAPS(caps, _x)                (((caps) & (_x)) == (_x))
  
  #define MT7621_CAPS  (MTK_GMAC1_RGMII | MTK_GMAC1_TRGMII | \
-@@ -1090,8 +1143,12 @@ enum mkt_eth_capabilities {
+@@ -1076,8 +1143,12 @@ enum mkt_eth_capabilities {
                      MTK_MUX_GMAC12_TO_GEPHY_SGMII | MTK_QDMA | \
                      MTK_RSTCTRL_PPE1 | MTK_SRAM)
  
@@ -893,7 +860,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  struct mtk_tx_dma_desc_info {
        dma_addr_t      addr;
-@@ -1338,6 +1395,9 @@ struct mtk_mac {
+@@ -1325,6 +1396,9 @@ struct mtk_mac {
        struct device_node              *of_node;
        struct phylink                  *phylink;
        struct phylink_config           phylink_config;
@@ -903,7 +870,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        struct mtk_eth                  *hw;
        struct mtk_hw_stats             *hw_stats;
        __be32                          hwlro_ip[MTK_MAX_LRO_IP_CNT];
-@@ -1461,6 +1521,19 @@ static inline u32 mtk_get_ib2_multicast_
+@@ -1448,6 +1522,19 @@ static inline u32 mtk_get_ib2_multicast_
        return MTK_FOE_IB2_MULTICAST;
  }
  
@@ -923,7 +890,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  /* read the hardware status register */
  void mtk_stats_update_mac(struct mtk_mac *mac);
  
-@@ -1469,8 +1542,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
+@@ -1456,8 +1543,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
  u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg);
  
  int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id);
index faa7624307dfed9fc432c8af91a1561b9395f8dc..8eb9d35b5800eb526c1a03c1a40f4e68f85af1be 100644 (file)
@@ -206,7 +206,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  }
  EXPORT_SYMBOL(mtk_pcs_lynxi_create);
  
-@@ -303,4 +368,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
+@@ -303,5 +368,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
  }
  EXPORT_SYMBOL(mtk_pcs_lynxi_destroy);
  
@@ -347,7 +347,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +module_platform_driver(mtk_pcs_lynxi_driver);
 +
 +MODULE_AUTHOR("Daniel Golle <daniel@makrotopia.org>");
-+MODULE_DESCRIPTION("MediaTek LynxI HSGMII PCS");
+ MODULE_DESCRIPTION("MediaTek SGMII library for LynxI");
  MODULE_LICENSE("GPL");
 --- a/include/linux/pcs/pcs-mtk-lynxi.h
 +++ b/include/linux/pcs/pcs-mtk-lynxi.h
index 001be8183857f02c93905f6a6ce77d9d9fa8983e..e3b37eecc15563b4e88ba70be7cb8391c943ac50 100644 (file)
@@ -70,7 +70,7 @@ v1 -> v2:
 
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1820,4 +1820,19 @@ config GPIO_SIM
+@@ -1929,4 +1929,19 @@ config GPIO_VIRTUSER
  
  endmenu
  
@@ -92,14 +92,14 @@ v1 -> v2:
  endif
 --- a/drivers/gpio/Makefile
 +++ b/drivers/gpio/Makefile
-@@ -44,6 +44,7 @@ obj-$(CONFIG_GPIO_BD9571MWV)         += gpio-bd
+@@ -45,6 +45,7 @@ obj-$(CONFIG_GPIO_BD9571MWV)         += gpio-bd
  obj-$(CONFIG_GPIO_BRCMSTB)            += gpio-brcmstb.o
  obj-$(CONFIG_GPIO_BT8XX)              += gpio-bt8xx.o
  obj-$(CONFIG_GPIO_CADENCE)            += gpio-cadence.o
 +obj-$(CONFIG_GPIO_CASCADE)            += gpio-cascade.o
  obj-$(CONFIG_GPIO_CLPS711X)           += gpio-clps711x.o
  obj-$(CONFIG_GPIO_SNPS_CREG)          += gpio-creg-snps.o
- obj-$(CONFIG_GPIO_CRYSTAL_COVE)               += gpio-crystalcove.o
+ obj-$(CONFIG_GPIO_CROS_EC)            += gpio-cros-ec.o
 --- /dev/null
 +++ b/drivers/gpio/gpio-cascade.c
 @@ -0,0 +1,112 @@
index 525f131ea8880afb4b4beedcd44945d36fa1f0e7..139a925ccfdbf5f452c164e8f9fe124122ad1d01 100644 (file)
@@ -38,7 +38,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
  #include <linux/init.h>
  #include <linux/kref.h>
  #include <linux/module.h>
-@@ -799,62 +796,6 @@ static int nvmem_validate_keepouts(struc
+@@ -800,62 +797,6 @@ static int nvmem_validate_keepouts(struc
        return 0;
  }
  
@@ -101,7 +101,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
  static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
  {
        struct device *dev = &nvmem->dev;
-@@ -894,24 +835,8 @@ static int nvmem_add_cells_from_dt(struc
+@@ -895,24 +836,8 @@ static int nvmem_add_cells_from_dt(struc
                if (nvmem->fixup_dt_cell_info)
                        nvmem->fixup_dt_cell_info(nvmem, &info);
  
@@ -223,7 +223,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 +}
 +EXPORT_SYMBOL_GPL(nvmem_layout_parse_mac_base);
 +
- static int nvmem_layout_bus_match(struct device *dev, struct device_driver *drv)
+ static int nvmem_layout_bus_match(struct device *dev, const struct device_driver *drv)
  {
        return of_driver_match_device(dev, drv);
 --- a/include/linux/nvmem-provider.h
index 7ac5347031fa580e27c33bd443d7e5b5dec82a15..ddc15ed282c4ed875df695fff0050bd946ffb9ca 100644 (file)
@@ -1,16 +1,17 @@
+From 472e77e6edb548addfe9b1f71e307223e892b2a3 Mon Sep 17 00:00:00 2001
 From: Felix Fietkau <nbd@nbd.name>
-Subject: debloat: disable common USB quirks
+Date: Sat, 26 Apr 2025 21:10:40 +0200
+Subject: [PATCH] debloat: disable common USB quirks
 
 Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
- drivers/usb/host/pci-quirks.c | 16 ++++++++++++++++
- drivers/usb/host/pci-quirks.h | 18 +++++++++++++++++-
- include/linux/usb/hcd.h       |  7 +++++++
- 3 files changed, 40 insertions(+), 1 deletion(-)
+ drivers/usb/host/pci-quirks.c | 9 +++++++++
+ drivers/usb/host/pci-quirks.h | 6 +++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
 
 --- a/drivers/usb/host/pci-quirks.c
 +++ b/drivers/usb/host/pci-quirks.c
-@@ -128,6 +128,8 @@ struct amd_chipset_type {
+@@ -130,6 +130,8 @@ struct amd_chipset_type {
        u8 rev;
  };
  
@@ -19,97 +20,56 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static struct amd_chipset_info {
        struct pci_dev  *nb_dev;
        struct pci_dev  *smbus_dev;
-@@ -631,6 +633,10 @@ bool usb_amd_pt_check_port(struct device
- }
+@@ -590,6 +592,8 @@ bool usb_amd_pt_check_port(struct device
  EXPORT_SYMBOL_GPL(usb_amd_pt_check_port);
+ #endif /* CONFIG_USB_PCI_AMD */
  
 +#endif /* CONFIG_PCI_DISABLE_COMMON_QUIRKS */
 +
-+#if IS_ENABLED(CONFIG_USB_UHCI_HCD)
-+
- /*
-  * Make sure the controller is completely inactive, unable to
-  * generate interrupts or do DMA.
-@@ -710,8 +716,17 @@ reset_needed:
-       uhci_reset_hc(pdev, base);
+ static int usb_asmedia_wait_write(struct pci_dev *pdev)
+ {
+       unsigned long retry_count;
+@@ -724,6 +728,10 @@ reset_needed:
        return 1;
  }
-+#else
-+int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base)
-+{
-+      return 0;
-+}
-+
-+#endif
  EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc);
-+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
++#endif
 +
- static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
- {
-       u16 cmd;
-@@ -1292,3 +1307,4 @@ static void quirk_usb_early_handoff(stru
++#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
++#if defined(CONFIG_HAS_IOPORT) && IS_ENABLED(CONFIG_USB_UHCI_HCD)
+ #define pio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_IO)
+@@ -1304,3 +1312,4 @@ static void quirk_usb_early_handoff(stru
  }
  DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
                        PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);
 +#endif
 --- a/drivers/usb/host/pci-quirks.h
 +++ b/drivers/usb/host/pci-quirks.h
-@@ -5,6 +5,9 @@
+@@ -2,7 +2,7 @@
+ #ifndef __LINUX_USB_PCI_QUIRKS_H
+ #define __LINUX_USB_PCI_QUIRKS_H
+-#ifdef CONFIG_USB_PCI_AMD
++#if defined(CONFIG_USB_PCI_AMD) && !defined(CONFIG_PCI_DISABLE_COMMON_QUIRKS)
+ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev);
+ bool usb_amd_hang_symptom_quirk(void);
+ bool usb_amd_prefetch_quirk(void);
+@@ -38,12 +38,16 @@ static inline bool usb_amd_pt_check_port
  #ifdef CONFIG_USB_PCI
  void uhci_reset_hc(struct pci_dev *pdev, unsigned long base);
  int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base);
-+#endif  /* CONFIG_USB_PCI */
++#endif
 +
 +#if defined(CONFIG_USB_PCI) && !defined(CONFIG_PCI_DISABLE_COMMON_QUIRKS)
- int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev);
- bool usb_amd_hang_symptom_quirk(void);
- bool usb_amd_prefetch_quirk(void);
-@@ -19,6 +22,18 @@ void sb800_prefetch(struct device *dev,
- bool usb_amd_pt_check_port(struct device *device, int port);
+ void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
+ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
+ void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
  #else
  struct pci_dev;
-+static inline int usb_amd_quirk_pll_check(void)
-+{
-+      return 0;
-+}
-+static inline bool usb_amd_hang_symptom_quirk(void)
-+{
-+      return false;
-+}
-+static inline bool usb_amd_prefetch_quirk(void)
-+{
-+      return false;
-+}
- static inline void usb_amd_quirk_pll_disable(void) {}
- static inline void usb_amd_quirk_pll_enable(void) {}
  static inline void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) {}
-@@ -29,6 +44,11 @@ static inline bool usb_amd_pt_check_port
- {
-       return false;
- }
 +static inline void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev) {}
-+static inline bool usb_xhci_needs_pci_reset(struct pci_dev *pdev)
-+{
-+      return false;
-+}
+ static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
  #endif  /* CONFIG_USB_PCI */
  
- #endif  /*  __LINUX_USB_PCI_QUIRKS_H  */
---- a/include/linux/usb/hcd.h
-+++ b/include/linux/usb/hcd.h
-@@ -485,7 +485,14 @@ extern int usb_hcd_pci_probe(struct pci_
- extern void usb_hcd_pci_remove(struct pci_dev *dev);
- extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
-+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
- extern int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *dev);
-+#else
-+static inline int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *dev)
-+{
-+      return 0;
-+}
-+#endif
- extern const struct dev_pm_ops usb_hcd_pci_pm_ops;
- #endif /* CONFIG_USB_PCI */
index 75fe4dca900389208d22bea21c489e4fc818d0cc..72e2a76b6247f3429262a896a64c038aa28a6ff2 100644 (file)
@@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        depends on ACPI
 --- a/drivers/ata/libata-core.c
 +++ b/drivers/ata/libata-core.c
-@@ -685,6 +685,17 @@ static inline void ata_set_tf_cdl(struct
+@@ -703,6 +703,17 @@ static inline void ata_set_tf_cdl(struct
        qc->flags |= ATA_QCFLAG_HAS_CDL | ATA_QCFLAG_RESULT_TF;
  }
  
@@ -63,7 +63,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  /**
   *    ata_build_rw_tf - Build ATA taskfile for given read/write request
   *    @qc: Metadata associated with the taskfile to build
-@@ -4771,6 +4782,9 @@ void __ata_qc_complete(struct ata_queued
+@@ -4767,6 +4778,9 @@ void __ata_qc_complete(struct ata_queued
                link->active_tag = ATA_TAG_POISON;
                ap->nr_active_links--;
        }
@@ -73,7 +73,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
        /* clear exclusive status */
        if (unlikely(qc->flags & ATA_QCFLAG_CLEAR_EXCL &&
-@@ -5502,6 +5516,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5489,6 +5503,9 @@ struct ata_port *ata_port_alloc(struct a
        ap->stats.unhandled_irq = 1;
        ap->stats.idle_irq = 1;
  #endif
@@ -82,11 +82,11 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +#endif
        ata_sff_port_init(ap);
  
-       return ap;
-@@ -5515,6 +5532,12 @@ void ata_port_free(struct ata_port *ap)
+       ata_force_pflags(ap);
+@@ -5505,6 +5522,12 @@ void ata_port_free(struct ata_port *ap)
        kfree(ap->pmp_link);
        kfree(ap->slave_link);
-       kfree(ap->ncq_sense_buf);
+       ida_free(&ata_ida, ap->print_id);
 +#ifdef CONFIG_ATA_LEDS
 +      if (ap->ledtrig) {
 +              led_trigger_unregister(ap->ledtrig);
@@ -96,9 +96,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        kfree(ap);
  }
  EXPORT_SYMBOL_GPL(ata_port_free);
-@@ -5937,7 +5960,23 @@ int ata_host_register(struct ata_host *h
-               host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
-               host->ports[i]->local_port_no = i + 1;
+@@ -5909,7 +5932,23 @@ int ata_host_register(struct ata_host *h
+               WARN_ON(1);
+               return -EINVAL;
        }
 +#ifdef CONFIG_ATA_LEDS
 +      for (i = 0; i < host->n_ports; i++) {
@@ -132,16 +132,14 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -875,6 +878,12 @@ struct ata_port {
+@@ -934,6 +937,10 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
        struct ata_acpi_gtm     __acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
-+
 +#ifdef CONFIG_ATA_LEDS
 +      struct led_trigger      *ledtrig;
 +      char                    ledtrig_name[8];
 +#endif
-+
-       /* owned by EH */
-       u8                      *ncq_sense_buf;
-       u8                      sector_buf[ATA_SECT_SIZE] ____cacheline_aligned;
+ };
+ /* The following initializer overrides a method to NULL whether one of
index 0777c5ce2838f101aa25fcb2c82daa3d06e53c4f..089f0921ff02b6ab73d43c6081a3dd0369c283b1 100644 (file)
@@ -65,7 +65,7 @@ Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk>
 
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -865,6 +865,16 @@ config LEDS_LM36274
+@@ -931,6 +931,16 @@ config LEDS_LM36274
          Say Y to enable the LM36274 LED driver for TI LMU devices.
          This supports the LED device LM36274.
  
@@ -84,10 +84,10 @@ Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk>
        depends on LEDS_CLASS
 --- a/drivers/leds/Makefile
 +++ b/drivers/leds/Makefile
-@@ -78,6 +78,7 @@ obj-$(CONFIG_LEDS_POWERNV)           += leds-powe
- obj-$(CONFIG_LEDS_PWM)                        += leds-pwm.o
+@@ -82,6 +82,7 @@ obj-$(CONFIG_LEDS_PWM)                       += leds-pwm.o
  obj-$(CONFIG_LEDS_REGULATOR)          += leds-regulator.o
  obj-$(CONFIG_LEDS_SC27XX_BLTC)                += leds-sc27xx-bltc.o
+ obj-$(CONFIG_LEDS_SUN50I_A100)                += leds-sun50i-a100.o
 +obj-$(CONFIG_LEDS_ST1202)             += leds-st1202.o
  obj-$(CONFIG_LEDS_SUNFIRE)            += leds-sunfire.o
  obj-$(CONFIG_LEDS_SYSCON)             += leds-syscon.o
index 36e7c18324bdfbbe68b5ad08560a2235043f7ea8..11f2edf5f45fa63bf6ac4c49e3561de3f12e8939 100644 (file)
@@ -13,9 +13,9 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1820,6 +1820,15 @@ config DEBUG_RSEQ
-         If unsure, say N.
+@@ -1884,6 +1884,15 @@ config ARCH_HAS_MEMBARRIER_CALLBACKS
+ config ARCH_HAS_MEMBARRIER_SYNC_CORE
+       bool
  
 +config MANGLE_BOOTARGS
 +      bool "Rename offending bootargs"
@@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
        help
 --- a/init/main.c
 +++ b/init/main.c
-@@ -608,6 +608,29 @@ static inline void setup_nr_cpu_ids(void
+@@ -621,6 +621,29 @@ static inline void setup_nr_cpu_ids(void
  static inline void smp_prepare_cpus(unsigned int maxcpus) { }
  #endif
  
@@ -61,10 +61,10 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
  /*
   * We need to store the untouched command line for future reference.
   * We also need to store the touched command line since the parameter
-@@ -897,6 +920,7 @@ void start_kernel(void)
-       pr_notice("%s", linux_banner);
+@@ -927,6 +950,7 @@ void start_kernel(void)
+       jump_label_init();
+       static_call_init();
        early_security_init();
-       setup_arch(&command_line);
 +      mangle_bootargs(command_line);
        setup_boot_config();
        setup_command_line(command_line);