kernel: make patches/files apply/compile for kernel 5.1
authorMathias Kresin <dev@kresin.me>
Sun, 7 Jul 2019 09:15:05 +0000 (11:15 +0200)
committerMathias Kresin <dev@kresin.me>
Sat, 20 Jul 2019 21:49:31 +0000 (23:49 +0200)
backport
  047-v4.21-mtd-keep-original-flags-for-every-struct-mtd_info.patch
  048-v4.21-mtd-improve-calculating-partition-boundaries-when-ch.patch
  080-v5.1-0001-bcma-keep-a-direct-pointer-to-the-struct-device.patch
  080-v5.1-0002-bcma-use-dev_-printing-functions.patch
  095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch
  101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch
  391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
  392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
  393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch
  394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch
  450-v5.0-mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch
  451-v5.1-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch
  500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
    Applied upstream

pending
  103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch
    Applied upstream

  131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch
    Fixed upstream

  304-mips_disable_fpu.patch
    Dropped, CONFIG_MIPS_FP_SUPPORT should do the same

  341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
    Applied upstream

  419-mtd-redboot-add-of_match_table-with-DT-binding.patch
    Applied upstream but with compatible "redboot-fis" instead of "ecoscentric,redboot-fis-partitions"

  450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch
    Partitial fixed upstream

  479-mtd-spi-nor-add-eon-en25qh64.patch
    Fixed upstream but with following extra flags: SECT_4K | SPI_NOR_DUAL_READ

  613-netfilter_optional_tcp_window_check.patch
    Dropped, the whole proc interface is gone upstream and there doesn't seems to be sysfs support for the hack at all

  630-packet_socket_type.patch
    REQUIRES REVIEW: define PACKET_RECV_TYPE changed from 23 to 24

  640-netfilter-nf_flow_table-add-hardware-offload-support.patch
    REQUIRES REVIEW

  680-NET-skip-GRO-for-foreign-MAC-addresses.patch
    REQUIRES REVIEW: is GRO skip for PACKET_BROADCAST and PACKET_MULTICAST fine as well?

hack
  220-gc_sections.patch
    Partitial fixed upstream

  300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch
    REQUIRES REVIEW: Does it still work as intended without __##pfx##flush_[prologue|epilogue]

  649-Revert-netfilter-nf_flow_table-make-nf_flow_table_it.patch
    Added to make 650-netfilter-add-xt_OFFLOAD-target.patch happy
      REQUIRES REVIEW

  930-crashlog.patch
    REQUIRES FIX: Dropped due to to much changes upstream

Signed-off-by: Mathias Kresin <dev@kresin.me>
121 files changed:
target/linux/generic/backport-5.1/011-kbuild-export-SUBARCH.patch
target/linux/generic/backport-5.1/020-backport_netfilter_rtcache.patch
target/linux/generic/backport-5.1/047-v4.21-mtd-keep-original-flags-for-every-struct-mtd_info.patch [deleted file]
target/linux/generic/backport-5.1/048-v4.21-mtd-improve-calculating-partition-boundaries-when-ch.patch [deleted file]
target/linux/generic/backport-5.1/080-v5.1-0001-bcma-keep-a-direct-pointer-to-the-struct-device.patch [deleted file]
target/linux/generic/backport-5.1/080-v5.1-0002-bcma-use-dev_-printing-functions.patch [deleted file]
target/linux/generic/backport-5.1/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch [deleted file]
target/linux/generic/backport-5.1/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch [deleted file]
target/linux/generic/backport-5.1/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch
target/linux/generic/backport-5.1/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
target/linux/generic/backport-5.1/366-netfilter-nf_flow_table-clean-up-and-fix-dst-handlin.patch
target/linux/generic/backport-5.1/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch
target/linux/generic/backport-5.1/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
target/linux/generic/backport-5.1/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch [deleted file]
target/linux/generic/backport-5.1/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch [deleted file]
target/linux/generic/backport-5.1/393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch [deleted file]
target/linux/generic/backport-5.1/394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch [deleted file]
target/linux/generic/backport-5.1/450-v5.0-mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch [deleted file]
target/linux/generic/backport-5.1/451-v5.1-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch [deleted file]
target/linux/generic/backport-5.1/500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch [deleted file]
target/linux/generic/config-5.1
target/linux/generic/files/drivers/misc/owl-loader.c
target/linux/generic/files/drivers/net/phy/adm6996.c
target/linux/generic/files/drivers/net/phy/ar8216.c
target/linux/generic/files/drivers/net/phy/mvswitch.c
target/linux/generic/files/drivers/net/phy/psb6970.c
target/linux/generic/hack-5.1/204-module_strip.patch
target/linux/generic/hack-5.1/207-disable-modorder.patch
target/linux/generic/hack-5.1/220-gc_sections.patch
target/linux/generic/hack-5.1/221-module_exports.patch
target/linux/generic/hack-5.1/230-openwrt_lzma_options.patch
target/linux/generic/hack-5.1/250-netfilter_depends.patch
target/linux/generic/hack-5.1/251-sound_kconfig.patch
target/linux/generic/hack-5.1/259-regmap_dynamic.patch
target/linux/generic/hack-5.1/290-nvmem-make-CONFIG_NVMEM-tristate-again.patch
target/linux/generic/hack-5.1/300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch
target/linux/generic/hack-5.1/301-mips_image_cmdline_hack.patch
target/linux/generic/hack-5.1/321-powerpc_crtsavres_prereq.patch
target/linux/generic/hack-5.1/550-loop-better-discard-for-block-devices.patch
target/linux/generic/hack-5.1/647-netfilter-flow-acct.patch
target/linux/generic/hack-5.1/649-Revert-netfilter-nf_flow_table-make-nf_flow_table_it.patch [new file with mode: 0644]
target/linux/generic/hack-5.1/650-netfilter-add-xt_OFFLOAD-target.patch
target/linux/generic/hack-5.1/661-use_fq_codel_by_default.patch
target/linux/generic/hack-5.1/662-remove_pfifo_fast.patch
target/linux/generic/hack-5.1/700-swconfig_switch_drivers.patch
target/linux/generic/hack-5.1/702-phy_add_aneg_done_function.patch
target/linux/generic/hack-5.1/721-phy_packets.patch
target/linux/generic/hack-5.1/773-bgmac-add-srab-switch.patch
target/linux/generic/hack-5.1/901-debloat_sock_diag.patch
target/linux/generic/hack-5.1/902-debloat_proc.patch
target/linux/generic/hack-5.1/904-debloat_dma_buf.patch
target/linux/generic/hack-5.1/911-kobject_add_broadcast_uevent.patch
target/linux/generic/hack-5.1/930-crashlog.patch [deleted file]
target/linux/generic/hack-5.1/940-cleanup-offload-hooks-on-netdev-unregister.patch
target/linux/generic/pending-5.1/103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch [deleted file]
target/linux/generic/pending-5.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
target/linux/generic/pending-5.1/130-add-linux-spidev-compatible-si3210.patch
target/linux/generic/pending-5.1/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch [deleted file]
target/linux/generic/pending-5.1/150-bridge_allow_receiption_on_disabled_port.patch
target/linux/generic/pending-5.1/180-net-phy-at803x-add-support-for-AT8032.patch
target/linux/generic/pending-5.1/201-extra_optimization.patch
target/linux/generic/pending-5.1/203-kallsyms_uncompressed.patch
target/linux/generic/pending-5.1/205-backtrace_module_info.patch
target/linux/generic/pending-5.1/220-optimize_inlining.patch
target/linux/generic/pending-5.1/240-remove-unsane-filenames-from-deps_initramfs-list.patch
target/linux/generic/pending-5.1/300-mips_expose_boot_raw.patch
target/linux/generic/pending-5.1/302-mips_no_branch_likely.patch
target/linux/generic/pending-5.1/304-mips_disable_fpu.patch [deleted file]
target/linux/generic/pending-5.1/305-mips_module_reloc.patch
target/linux/generic/pending-5.1/306-mips_mem_functions_performance.patch
target/linux/generic/pending-5.1/308-mips32r2_tune.patch
target/linux/generic/pending-5.1/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
target/linux/generic/pending-5.1/332-arc-add-OWRTDTB-section.patch
target/linux/generic/pending-5.1/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch [deleted file]
target/linux/generic/pending-5.1/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch
target/linux/generic/pending-5.1/400-mtd-add-rootfs-split-support.patch
target/linux/generic/pending-5.1/401-mtd-add-support-for-different-partition-parser-types.patch
target/linux/generic/pending-5.1/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
target/linux/generic/pending-5.1/403-mtd-hook-mtdsplit-to-Kbuild.patch
target/linux/generic/pending-5.1/404-mtd-add-more-helper-functions.patch
target/linux/generic/pending-5.1/419-mtd-redboot-add-of_match_table-with-DT-binding.patch [deleted file]
target/linux/generic/pending-5.1/420-mtd-redboot_space.patch
target/linux/generic/pending-5.1/430-mtd-add-myloader-partition-parser.patch
target/linux/generic/pending-5.1/440-block2mtd_init.patch
target/linux/generic/pending-5.1/441-block2mtd_probe.patch
target/linux/generic/pending-5.1/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch
target/linux/generic/pending-5.1/465-m25p80-mx-disable-software-protection.patch
target/linux/generic/pending-5.1/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
target/linux/generic/pending-5.1/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
target/linux/generic/pending-5.1/475-mtd-spi-nor-Add-Winbond-w25q128jv-support.patch
target/linux/generic/pending-5.1/476-mtd-spi-nor-add-eon-en25q128.patch
target/linux/generic/pending-5.1/477-mtd-add-spi-nor-add-mx25u3235f.patch
target/linux/generic/pending-5.1/479-mtd-spi-nor-add-eon-en25qh64.patch [deleted file]
target/linux/generic/pending-5.1/480-mtd-set-rootfs-to-be-root-dev.patch
target/linux/generic/pending-5.1/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch
target/linux/generic/pending-5.1/495-mtd-core-add-get_mtd_device_by_node.patch
target/linux/generic/pending-5.1/497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch
target/linux/generic/pending-5.1/530-jffs2_make_lzma_available.patch
target/linux/generic/pending-5.1/553-ubifs-Add-option-to-create-UBI-FS-version-4-on-empty.patch
target/linux/generic/pending-5.1/600-netfilter_conntrack_flush.patch
target/linux/generic/pending-5.1/613-netfilter_optional_tcp_window_check.patch [deleted file]
target/linux/generic/pending-5.1/616-net_optimize_xfrm_calls.patch
target/linux/generic/pending-5.1/630-packet_socket_type.patch
target/linux/generic/pending-5.1/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
target/linux/generic/pending-5.1/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
target/linux/generic/pending-5.1/642-net-8021q-support-hardware-flow-table-offload.patch
target/linux/generic/pending-5.1/643-net-bridge-support-hardware-flow-table-offload.patch
target/linux/generic/pending-5.1/645-netfilter-nf_flow_table-rework-hardware-offload-time.patch
target/linux/generic/pending-5.1/655-increase_skb_pad.patch
target/linux/generic/pending-5.1/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
target/linux/generic/pending-5.1/671-net-provide-defines-for-_POLICY_FAILED-until-all-cod.patch
target/linux/generic/pending-5.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
target/linux/generic/pending-5.1/681-NET-add-of_get_mac_address_mtd.patch
target/linux/generic/pending-5.1/703-phy-add-detach-callback-to-struct-phy_driver.patch
target/linux/generic/pending-5.1/734-net-phy-at803x-allow-to-configure-via-pdata.patch
target/linux/generic/pending-5.1/735-net-phy-at803x-fix-at8033-sgmii-mode.patch
target/linux/generic/pending-5.1/736-net-phy-at803x-allow-to-configure-via-dt.patch
target/linux/generic/pending-5.1/810-pci_disable_common_quirks.patch
target/linux/generic/pending-5.1/811-pci_disable_usb_common_quirks.patch
target/linux/generic/pending-5.1/834-ledtrig-libata.patch
target/linux/generic/pending-5.1/920-mangle_bootargs.patch

index b5f654906a78766757f9ae21e02645a4d57d89b1..986cb7f430590a0840331c97efe4c7c5e29544a2 100644 (file)
@@ -10,14 +10,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -431,8 +431,8 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/s
+@@ -454,8 +454,8 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/s
  KBUILD_LDFLAGS :=
  GCC_PLUGINS_CFLAGS :=
  
 -export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
 -export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
-+export ARCH SRCARCH SUBARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD
++export ARCH SRCARCH SUBARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
 +export CC CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
- export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
+ export MAKE LEX YACC AWK INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
  export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
  
index 3a35381ce3008cc8c6362890b2c48a7276e0bd08..3c77deb6008f86f3332891be0ff356948e206ffb 100644 (file)
@@ -115,16 +115,16 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
        depends on NETFILTER_ADVANCED
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -25,6 +25,9 @@ obj-$(CONFIG_NETFILTER_NETLINK_OSF) += n
+@@ -26,6 +26,9 @@ obj-$(CONFIG_NETFILTER_NETLINK_OSF) += n
  # connection tracking
  obj-$(CONFIG_NF_CONNTRACK) += nf_conntrack.o
  
 +# optional conntrack route cache extension
 +obj-$(CONFIG_NF_CONNTRACK_RTCACHE) += nf_conntrack_rtcache.o
 +
- obj-$(CONFIG_NF_CT_PROTO_GRE) += nf_conntrack_proto_gre.o
  # netlink interface for nf_conntrack
+ obj-$(CONFIG_NF_CT_NETLINK) += nf_conntrack_netlink.o
+ obj-$(CONFIG_NF_CT_NETLINK_TIMEOUT) += nfnetlink_cttimeout.o
 --- /dev/null
 +++ b/net/netfilter/nf_conntrack_rtcache.c
 @@ -0,0 +1,428 @@
diff --git a/target/linux/generic/backport-5.1/047-v4.21-mtd-keep-original-flags-for-every-struct-mtd_info.patch b/target/linux/generic/backport-5.1/047-v4.21-mtd-keep-original-flags-for-every-struct-mtd_info.patch
deleted file mode 100644 (file)
index d587c9e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-From 1186af457cc186c5ed01708da71b1ffbdf0a2638 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Tue, 20 Nov 2018 09:55:45 +0100
-Subject: [PATCH] mtd: keep original flags for every struct mtd_info
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When allocating a new partition mtd subsystem runs internal tests in the
-allocate_partition(). They may result in modifying specified flags (e.g.
-dropping some /features/ like write access).
-
-Those constraints don't have to be necessary true for subpartitions. It
-may happen parent partition isn't block aligned (effectively disabling
-write access) while subpartition may fit blocks nicely. In such case all
-checks should be run again (starting with original flags value).
-
-Signed-off-by: RafaÅ‚ MiÅ‚ecki <rafal@milecki.pl>
-Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
----
- drivers/mtd/mtdcore.c   | 2 ++
- drivers/mtd/mtdpart.c   | 3 ++-
- include/linux/mtd/mtd.h | 1 +
- 3 files changed, 5 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/mtdcore.c
-+++ b/drivers/mtd/mtdcore.c
-@@ -665,6 +665,8 @@ static void mtd_set_dev_defaults(struct
-       } else {
-               pr_debug("mtd device won't show a device symlink in sysfs\n");
-       }
-+
-+      mtd->orig_flags = mtd->flags;
- }
- /**
---- a/drivers/mtd/mtdpart.c
-+++ b/drivers/mtd/mtdpart.c
-@@ -346,7 +346,8 @@ static struct mtd_part *allocate_partiti
-       /* set up the MTD object for this partition */
-       slave->mtd.type = parent->type;
--      slave->mtd.flags = parent->flags & ~part->mask_flags;
-+      slave->mtd.flags = parent->orig_flags & ~part->mask_flags;
-+      slave->mtd.orig_flags = slave->mtd.flags;
-       slave->mtd.size = part->size;
-       slave->mtd.writesize = parent->writesize;
-       slave->mtd.writebufsize = parent->writebufsize;
---- a/include/linux/mtd/mtd.h
-+++ b/include/linux/mtd/mtd.h
-@@ -207,6 +207,7 @@ struct mtd_debug_info {
- struct mtd_info {
-       u_char type;
-       uint32_t flags;
-+      uint32_t orig_flags; /* Flags as before running mtd checks */
-       uint64_t size;   // Total size of the MTD
-       /* "Major" erase size for the device. Naïve users may take this
diff --git a/target/linux/generic/backport-5.1/048-v4.21-mtd-improve-calculating-partition-boundaries-when-ch.patch b/target/linux/generic/backport-5.1/048-v4.21-mtd-improve-calculating-partition-boundaries-when-ch.patch
deleted file mode 100644 (file)
index 0229627..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 6750f61a13a0197c40e4a40739117493b15f19e8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Tue, 20 Nov 2018 10:24:09 +0100
-Subject: [PATCH] mtd: improve calculating partition boundaries when checking
- for alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When checking for alignment mtd should check absolute offsets. It's
-important for subpartitions as it doesn't make sense to check their
-relative addresses.
-
-Signed-off-by: RafaÅ‚ MiÅ‚ecki <rafal@milecki.pl>
-Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
----
- drivers/mtd/mtdpart.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
---- a/drivers/mtd/mtdpart.c
-+++ b/drivers/mtd/mtdpart.c
-@@ -61,6 +61,15 @@ static inline struct mtd_part *mtd_to_pa
-       return container_of(mtd, struct mtd_part, mtd);
- }
-+static u64 part_absolute_offset(struct mtd_info *mtd)
-+{
-+      struct mtd_part *part = mtd_to_part(mtd);
-+
-+      if (!mtd_is_partition(mtd))
-+              return 0;
-+
-+      return part_absolute_offset(part->parent) + part->offset;
-+}
- /*
-  * MTD methods which simply translate the effective address and pass through
-@@ -518,7 +527,7 @@ static struct mtd_part *allocate_partiti
-       if (!(slave->mtd.flags & MTD_NO_ERASE))
-               wr_alignment = slave->mtd.erasesize;
--      tmp = slave->offset;
-+      tmp = part_absolute_offset(parent) + slave->offset;
-       remainder = do_div(tmp, wr_alignment);
-       if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
-               /* Doesn't start on a boundary of major erase size */
-@@ -529,7 +538,7 @@ static struct mtd_part *allocate_partiti
-                       part->name);
-       }
--      tmp = slave->mtd.size;
-+      tmp = part_absolute_offset(parent) + slave->mtd.size;
-       remainder = do_div(tmp, wr_alignment);
-       if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
-               slave->mtd.flags &= ~MTD_WRITEABLE;
diff --git a/target/linux/generic/backport-5.1/080-v5.1-0001-bcma-keep-a-direct-pointer-to-the-struct-device.patch b/target/linux/generic/backport-5.1/080-v5.1-0001-bcma-keep-a-direct-pointer-to-the-struct-device.patch
deleted file mode 100644 (file)
index cc32aee..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-From 5a1c18b761ddb299a06746948b9ec2814b04fa92 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Wed, 2 Jan 2019 00:00:01 +0100
-Subject: [PATCH] bcma: keep a direct pointer to the struct device
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Accessing struct device is pretty useful/common so having a direct
-pointer:
-1) Simplifies some code
-2) Makes bcma_bus_get_host_dev() unneeded
-3) Allows further improvements like using dev_* printing helpers
-
-Signed-off-by: RafaÅ‚ MiÅ‚ecki <rafal@milecki.pl>
-Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
----
- drivers/bcma/bcma_private.h |  1 -
- drivers/bcma/driver_gpio.c  |  2 +-
- drivers/bcma/host_pci.c     |  2 ++
- drivers/bcma/host_soc.c     |  4 ++--
- drivers/bcma/main.c         | 45 +++++++++----------------------------
- include/linux/bcma/bcma.h   | 11 +++------
- 6 files changed, 18 insertions(+), 47 deletions(-)
-
---- a/drivers/bcma/bcma_private.h
-+++ b/drivers/bcma/bcma_private.h
-@@ -33,7 +33,6 @@ int __init bcma_bus_early_register(struc
- int bcma_bus_suspend(struct bcma_bus *bus);
- int bcma_bus_resume(struct bcma_bus *bus);
- #endif
--struct device *bcma_bus_get_host_dev(struct bcma_bus *bus);
- /* scan.c */
- void bcma_detect_chip(struct bcma_bus *bus);
---- a/drivers/bcma/driver_gpio.c
-+++ b/drivers/bcma/driver_gpio.c
-@@ -183,7 +183,7 @@ int bcma_gpio_init(struct bcma_drv_cc *c
-       chip->direction_input   = bcma_gpio_direction_input;
-       chip->direction_output  = bcma_gpio_direction_output;
-       chip->owner             = THIS_MODULE;
--      chip->parent            = bcma_bus_get_host_dev(bus);
-+      chip->parent            = bus->dev;
- #if IS_BUILTIN(CONFIG_OF)
-       chip->of_node           = cc->core->dev.of_node;
- #endif
---- a/drivers/bcma/host_pci.c
-+++ b/drivers/bcma/host_pci.c
-@@ -196,6 +196,8 @@ static int bcma_host_pci_probe(struct pc
-               goto err_pci_release_regions;
-       }
-+      bus->dev = &dev->dev;
-+
-       /* Map MMIO */
-       err = -ENOMEM;
-       bus->mmio = pci_iomap(dev, 0, ~0UL);
---- a/drivers/bcma/host_soc.c
-+++ b/drivers/bcma/host_soc.c
-@@ -179,7 +179,6 @@ int __init bcma_host_soc_register(struct
-       /* Host specific */
-       bus->hosttype = BCMA_HOSTTYPE_SOC;
-       bus->ops = &bcma_host_soc_ops;
--      bus->host_pdev = NULL;
-       /* Initialize struct, detect chip */
-       bcma_init_bus(bus);
-@@ -213,6 +212,8 @@ static int bcma_host_soc_probe(struct pl
-       if (!bus)
-               return -ENOMEM;
-+      bus->dev = dev;
-+
-       /* Map MMIO */
-       bus->mmio = of_iomap(np, 0);
-       if (!bus->mmio)
-@@ -221,7 +222,6 @@ static int bcma_host_soc_probe(struct pl
-       /* Host specific */
-       bus->hosttype = BCMA_HOSTTYPE_SOC;
-       bus->ops = &bcma_host_soc_ops;
--      bus->host_pdev = pdev;
-       /* Initialize struct, detect chip */
-       bcma_init_bus(bus);
---- a/drivers/bcma/main.c
-+++ b/drivers/bcma/main.c
-@@ -223,8 +223,8 @@ unsigned int bcma_core_irq(struct bcma_d
-                       mips_irq = bcma_core_mips_irq(core);
-                       return mips_irq <= 4 ? mips_irq + 2 : 0;
-               }
--              if (bus->host_pdev)
--                      return bcma_of_get_irq(&bus->host_pdev->dev, core, num);
-+              if (bus->dev)
-+                      return bcma_of_get_irq(bus->dev, core, num);
-               return 0;
-       case BCMA_HOSTTYPE_SDIO:
-               return 0;
-@@ -239,18 +239,18 @@ void bcma_prepare_core(struct bcma_bus *
-       core->dev.release = bcma_release_core_dev;
-       core->dev.bus = &bcma_bus_type;
-       dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
--      core->dev.parent = bcma_bus_get_host_dev(bus);
--      if (core->dev.parent)
--              bcma_of_fill_device(core->dev.parent, core);
-+      core->dev.parent = bus->dev;
-+      if (bus->dev)
-+              bcma_of_fill_device(bus->dev, core);
-       switch (bus->hosttype) {
-       case BCMA_HOSTTYPE_PCI:
--              core->dma_dev = &bus->host_pci->dev;
-+              core->dma_dev = bus->dev;
-               core->irq = bus->host_pci->irq;
-               break;
-       case BCMA_HOSTTYPE_SOC:
--              if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
--                      core->dma_dev = &bus->host_pdev->dev;
-+              if (IS_ENABLED(CONFIG_OF) && bus->dev) {
-+                      core->dma_dev = bus->dev;
-               } else {
-                       core->dev.dma_mask = &core->dev.coherent_dma_mask;
-                       core->dma_dev = &core->dev;
-@@ -261,28 +261,6 @@ void bcma_prepare_core(struct bcma_bus *
-       }
- }
--struct device *bcma_bus_get_host_dev(struct bcma_bus *bus)
--{
--      switch (bus->hosttype) {
--      case BCMA_HOSTTYPE_PCI:
--              if (bus->host_pci)
--                      return &bus->host_pci->dev;
--              else
--                      return NULL;
--      case BCMA_HOSTTYPE_SOC:
--              if (bus->host_pdev)
--                      return &bus->host_pdev->dev;
--              else
--                      return NULL;
--      case BCMA_HOSTTYPE_SDIO:
--              if (bus->host_sdio)
--                      return &bus->host_sdio->dev;
--              else
--                      return NULL;
--      }
--      return NULL;
--}
--
- void bcma_init_bus(struct bcma_bus *bus)
- {
-       mutex_lock(&bcma_buses_mutex);
-@@ -402,7 +380,6 @@ int bcma_bus_register(struct bcma_bus *b
- {
-       int err;
-       struct bcma_device *core;
--      struct device *dev;
-       /* Scan for devices (cores) */
-       err = bcma_bus_scan(bus);
-@@ -425,10 +402,8 @@ int bcma_bus_register(struct bcma_bus *b
-               bcma_core_pci_early_init(&bus->drv_pci[0]);
-       }
--      dev = bcma_bus_get_host_dev(bus);
--      if (dev) {
--              of_platform_default_populate(dev->of_node, NULL, dev);
--      }
-+      if (bus->dev)
-+              of_platform_default_populate(bus->dev->of_node, NULL, bus->dev);
-       /* Cores providing flash access go before SPROM init */
-       list_for_each_entry(core, &bus->cores, list) {
---- a/include/linux/bcma/bcma.h
-+++ b/include/linux/bcma/bcma.h
-@@ -332,6 +332,8 @@ extern int bcma_arch_register_fallback_s
-               struct ssb_sprom *out));
- struct bcma_bus {
-+      struct device *dev;
-+
-       /* The MMIO area. */
-       void __iomem *mmio;
-@@ -339,14 +341,7 @@ struct bcma_bus {
-       enum bcma_hosttype hosttype;
-       bool host_is_pcie2; /* Used for BCMA_HOSTTYPE_PCI only */
--      union {
--              /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */
--              struct pci_dev *host_pci;
--              /* Pointer to the SDIO device (only for BCMA_HOSTTYPE_SDIO) */
--              struct sdio_func *host_sdio;
--              /* Pointer to platform device (only for BCMA_HOSTTYPE_SOC) */
--              struct platform_device *host_pdev;
--      };
-+      struct pci_dev *host_pci; /* PCI bus pointer (BCMA_HOSTTYPE_PCI only) */
-       struct bcma_chipinfo chipinfo;
diff --git a/target/linux/generic/backport-5.1/080-v5.1-0002-bcma-use-dev_-printing-functions.patch b/target/linux/generic/backport-5.1/080-v5.1-0002-bcma-use-dev_-printing-functions.patch
deleted file mode 100644 (file)
index 7ce8ba8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From 777bc4801a6868fcbff09ffb6e30f023e7c5ed38 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Wed, 2 Jan 2019 00:00:02 +0100
-Subject: [PATCH] bcma: use dev_* printing functions
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It provides more meaningful messages.
-
-Signed-off-by: RafaÅ‚ MiÅ‚ecki <rafal@milecki.pl>
-Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
----
- drivers/bcma/bcma_private.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/drivers/bcma/bcma_private.h
-+++ b/drivers/bcma/bcma_private.h
-@@ -10,13 +10,13 @@
- #include <linux/delay.h>
- #define bcma_err(bus, fmt, ...) \
--      pr_err("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
-+      dev_err((bus)->dev, "bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
- #define bcma_warn(bus, fmt, ...) \
--      pr_warn("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
-+      dev_warn((bus)->dev, "bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
- #define bcma_info(bus, fmt, ...) \
--      pr_info("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
-+      dev_info((bus)->dev, "bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
- #define bcma_debug(bus, fmt, ...) \
--      pr_debug("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
-+      dev_dbg((bus)->dev, "bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
- struct bcma_bus;
diff --git a/target/linux/generic/backport-5.1/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch b/target/linux/generic/backport-5.1/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch
deleted file mode 100644 (file)
index 5d49a40..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-From 46bf067870156abd61fe24d14c2486d15b8b502c Mon Sep 17 00:00:00 2001
-From: Dave Taht <dave@taht.net>
-Date: Fri, 14 Dec 2018 18:38:40 +0000
-Subject: [PATCH 1/1] Allow class-e address assignment in ifconfig and early
- boot
-
-While the linux kernel became mostly "class-e clean" a decade ago,
-and most distributions long ago switched to the iproute2 suite
-of utilities, which allow class-e (240.0.0.0/4) address assignment,
-distributions relying on busybox, toybox and other forms of
-ifconfig cannot assign class-e addresses without this kernel patch.
-
-With this patch, also, a boot command line on these addresses is feasible:
-(ip=248.0.1.2::248.0.1.1:255.255.255.0).
-
-While CIDR has been obsolete for 2 decades, and a survey of all the
-userspace open source code in the world shows most IN_whatever macros
-are also obsolete... rather than obsolete CIDR from this ioctl entirely,
-this patch merely enables class-e assignment, sanely.
-
-H/T to Vince Fuller and his original patch here:
-    https://lkml.org/lkml/2008/1/7/370
-
-Signed-off-by: Dave Taht <dave.taht@gmail.com>
-Reviewed-by: John Gilmore <gnu@toad.com>
----
- include/uapi/linux/in.h | 8 ++++++--
- net/ipv4/devinet.c      | 4 +++-
- net/ipv4/ipconfig.c     | 2 ++
- 3 files changed, 11 insertions(+), 3 deletions(-)
-
---- a/include/uapi/linux/in.h
-+++ b/include/uapi/linux/in.h
-@@ -268,8 +268,12 @@ struct sockaddr_in {
- #define       IN_MULTICAST(a)         IN_CLASSD(a)
- #define IN_MULTICAST_NET      0xF0000000
--#define       IN_EXPERIMENTAL(a)      ((((long int) (a)) & 0xf0000000) == 0xf0000000)
--#define       IN_BADCLASS(a)          IN_EXPERIMENTAL((a))
-+#define       IN_BADCLASS(a)          (((long int) (a) ) == (long int)0xffffffff)
-+#define       IN_EXPERIMENTAL(a)      IN_BADCLASS((a))
-+
-+#define       IN_CLASSE(a)            ((((long int) (a)) & 0xf0000000) == 0xf0000000)
-+#define       IN_CLASSE_NET           0xffffffff
-+#define       IN_CLASSE_NSHIFT        0
- /* Address to accept any incoming messages. */
- #define       INADDR_ANY              ((unsigned long int) 0x00000000)
---- a/net/ipv4/devinet.c
-+++ b/net/ipv4/devinet.c
-@@ -941,7 +941,7 @@ static int inet_abc_len(__be32 addr)
- {
-       int rc = -1;    /* Something else, probably a multicast. */
--      if (ipv4_is_zeronet(addr))
-+      if (ipv4_is_zeronet(addr) || ipv4_is_lbcast(addr))
-               rc = 0;
-       else {
-               __u32 haddr = ntohl(addr);
-@@ -952,6 +952,8 @@ static int inet_abc_len(__be32 addr)
-                       rc = 16;
-               else if (IN_CLASSC(haddr))
-                       rc = 24;
-+              else if (IN_CLASSE(haddr))
-+                      rc = 32;
-       }
-       return rc;
---- a/net/ipv4/ipconfig.c
-+++ b/net/ipv4/ipconfig.c
-@@ -429,6 +429,8 @@ static int __init ic_defaults(void)
-                       ic_netmask = htonl(IN_CLASSB_NET);
-               else if (IN_CLASSC(ntohl(ic_myaddr)))
-                       ic_netmask = htonl(IN_CLASSC_NET);
-+              else if (IN_CLASSE(ntohl(ic_myaddr)))
-+                      ic_netmask = htonl(IN_CLASSE_NET);
-               else {
-                       pr_err("IP-Config: Unable to guess netmask for address %pI4\n",
-                              &ic_myaddr);
diff --git a/target/linux/generic/backport-5.1/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch b/target/linux/generic/backport-5.1/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch
deleted file mode 100644 (file)
index 2b33843..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 4cc30de79d293f1e8c5f50ae3a9c005def9564a0 Mon Sep 17 00:00:00 2001
-From: Koen Vandeputte <koen.vandeputte@ncentric.com>
-Date: Mon, 7 Jan 2019 14:14:27 +0100
-Subject: [PATCH 2/2] arm: cns3xxx: use actual size reads for PCIe
-
-commit 802b7c06adc7 ("ARM: cns3xxx: Convert PCI to use generic config accessors")
-reimplemented cns3xxx_pci_read_config() using pci_generic_config_read32(),
-which preserved the property of only doing 32-bit reads.
-
-It also replaced cns3xxx_pci_write_config() with pci_generic_config_write(),
-so it changed writes from always being 32 bits to being the actual size,
-which works just fine.
-
-Due to:
-- The documentation does not mention that only 32 bit access is allowed.
-- Writes are already executed using the actual size
-- Extensive testing shows that 8b, 16b and 32b reads work as intended
-
-It makes perfectly sense to also swap 32 bit reading in favor of actual size.
-
-Fixes: 802b7c06adc7 ("ARM: cns3xxx: Convert PCI to use generic config accessors")
-Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
-Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
-CC: Arnd Bergmann <arnd@arndb.de>
-CC: Krzysztof Halasa <khalasa@piap.pl>
-CC: Olof Johansson <olof@lixom.net>
-CC: Robin Leblon <robin.leblon@ncentric.com>
-CC: Rob Herring <robh@kernel.org>
-CC: Russell King <linux@armlinux.org.uk>
-CC: Tim Harvey <tharvey@gateworks.com>
-CC: stable@vger.kernel.org # v4.0+
----
- arch/arm/mach-cns3xxx/pcie.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm/mach-cns3xxx/pcie.c
-+++ b/arch/arm/mach-cns3xxx/pcie.c
-@@ -93,7 +93,7 @@ static int cns3xxx_pci_read_config(struc
-       u32 mask = (0x1ull << (size * 8)) - 1;
-       int shift = (where % 4) * 8;
--      ret = pci_generic_config_read32(bus, devfn, where, size, val);
-+      ret = pci_generic_config_read(bus, devfn, where, size, val);
-       if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
-           (where & 0xffc) == PCI_CLASS_REVISION)
index b41bbf5395c1ff55ea4502cf2708bac794449495..ba154048a02182f3ab0dd0e85152ad1f634d31d7 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
 
 --- a/drivers/usb/dwc2/params.c
 +++ b/drivers/usb/dwc2/params.c
-@@ -272,6 +272,23 @@ static void dwc2_set_param_power_down(st
+@@ -273,6 +273,23 @@ static void dwc2_set_param_power_down(st
        hsotg->params.power_down = val;
  }
  
@@ -41,7 +41,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  /**
   * dwc2_set_default_params() - Set all core parameters to their
   * auto-detected default values.
-@@ -290,6 +307,7 @@ static void dwc2_set_default_params(stru
+@@ -291,6 +308,7 @@ static void dwc2_set_default_params(stru
        dwc2_set_param_speed(hsotg);
        dwc2_set_param_phy_utmi_width(hsotg);
        dwc2_set_param_power_down(hsotg);
@@ -49,7 +49,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
        p->phy_ulpi_ddr = false;
        p->phy_ulpi_ext_vbus = false;
  
-@@ -302,11 +320,6 @@ static void dwc2_set_default_params(stru
+@@ -303,11 +321,6 @@ static void dwc2_set_default_params(stru
        p->reload_ctl = (hw->snpsid >= DWC2_CORE_REV_2_92a);
        p->uframe_sched = true;
        p->external_id_pin_ctl = false;
@@ -59,5 +59,5 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
 -      p->hird_threshold_en = true;
 -      p->hird_threshold = 4;
        p->ipg_isoc_en = false;
+       p->service_interval = false;
        p->max_packet_count = hw->max_packet_count;
-       p->max_transfer_size = hw->max_transfer_size;
index 17133d552f84d03654f28dcd0ffca923486a9edf..664be09ee6decd7ea2ae49b569a0655177acd691 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 
 --- a/net/netfilter/nf_flow_table_core.c
 +++ b/net/netfilter/nf_flow_table_core.c
-@@ -531,5 +531,35 @@ void nf_flow_table_free(struct nf_flowta
+@@ -501,5 +501,35 @@ void nf_flow_table_free(struct nf_flowta
  }
  EXPORT_SYMBOL_GPL(nf_flow_table_free);
  
@@ -22,7 +22,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 +      if (event != NETDEV_DOWN)
 +              return NOTIFY_DONE;
 +
-+      nf_flow_table_cleanup(dev_net(dev), dev);
++      nf_flow_table_cleanup(dev);
 +
 +      return NOTIFY_DONE;
 +}
@@ -60,7 +60,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 -      if (event != NETDEV_DOWN)
 -              return NOTIFY_DONE;
 -
--      nf_flow_table_cleanup(dev_net(dev), dev);
+-      nf_flow_table_cleanup(dev);
 -
 -      return NOTIFY_DONE;
 -}
index 23156b521c55da37c8b2eb22d0c5346ed30808ef..4a95a1afc4e3f2df5035e4ed1161863e903cb75f 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        if (unlikely(nf_flow_exceeds_mtu(skb, flow->tuplehash[dir].tuple.mtu)) &&
            (ip_hdr(skb)->frag_off & htons(IP_DF)) != 0)
-@@ -465,7 +465,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
+@@ -464,7 +464,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
  
        dir = tuplehash->tuple.dir;
        flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
index 07ef724094d8076ef40916af3ec73b8c8259abac..5d397bba524e56c3917ef2e8a57a524415790d3c 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/netfilter/nf_conntrack_core.c
 +++ b/net/netfilter/nf_conntrack_core.c
-@@ -1178,18 +1178,6 @@ static bool gc_worker_can_early_drop(con
+@@ -1209,18 +1209,6 @@ static bool gc_worker_can_early_drop(con
        return false;
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static void gc_worker(struct work_struct *work)
  {
        unsigned int min_interval = max(HZ / GC_MAX_BUCKETS_DIV, 1u);
-@@ -1226,10 +1214,8 @@ static void gc_worker(struct work_struct
+@@ -1257,10 +1245,8 @@ static void gc_worker(struct work_struct
                        tmp = nf_ct_tuplehash_to_ctrack(h);
  
                        scanned++;
@@ -87,29 +87,20 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        flow->timeout = (u32)jiffies;
        return 0;
  }
-@@ -316,6 +335,8 @@ static int nf_flow_offload_gc_step(struc
-       rhashtable_walk_start(&hti);
-       while ((tuplehash = rhashtable_walk_next(&hti))) {
-+              bool teardown;
+@@ -301,9 +320,14 @@ static inline bool nf_flow_has_expired(c
+ static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data)
+ {
+       struct nf_flowtable *flow_table = data;
++      bool teardown;
 +
-               if (IS_ERR(tuplehash)) {
-                       err = PTR_ERR(tuplehash);
-                       if (err != -EAGAIN)
-@@ -328,9 +349,13 @@ static int nf_flow_offload_gc_step(struc
++      teardown = flow->flags & (FLOW_OFFLOAD_DYING | FLOW_OFFLOAD_TEARDOWN);
++
++      if (!teardown)
++              nf_ct_offload_timeout(flow);
  
-               flow = container_of(tuplehash, struct flow_offload, tuplehash[0]);
+-      if (nf_flow_has_expired(flow) ||
+-          (flow->flags & (FLOW_OFFLOAD_DYING | FLOW_OFFLOAD_TEARDOWN)))
++      if (nf_flow_has_expired(flow) || teardown)
+               flow_offload_del(flow_table, flow);
+ }
  
--              if (nf_flow_has_expired(flow) ||
--                  (flow->flags & (FLOW_OFFLOAD_DYING |
--                                  FLOW_OFFLOAD_TEARDOWN)))
-+              teardown = flow->flags & (FLOW_OFFLOAD_DYING |
-+                                        FLOW_OFFLOAD_TEARDOWN);
-+
-+              if (!teardown)
-+                      nf_ct_offload_timeout(flow);
-+
-+              if (nf_flow_has_expired(flow) || teardown)
-                       flow_offload_del(flow_table, flow);
-       }
- out:
index d0047435fd5f3fc8ed1cf9ca862ebc973e8d5dde..cd877cfe8d5eb70bc916dc0ae7ebcb3b6eb4c43c 100644 (file)
@@ -109,16 +109,14 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
 +#endif /* __NET_TC_CTINFO_H */
 --- a/include/uapi/linux/pkt_cls.h
 +++ b/include/uapi/linux/pkt_cls.h
-@@ -68,7 +68,8 @@ enum {
-       TCA_ID_UNSPEC=0,
-       TCA_ID_POLICE=1,
+@@ -105,6 +105,7 @@ enum tca_id {
+       TCA_ID_IFE = TCA_ACT_IFE,
+       TCA_ID_SAMPLE = TCA_ACT_SAMPLE,
        /* other actions go here */
--      __TCA_ID_MAX=255
 +      TCA_ID_CTINFO,
-+      __TCA_ID_MAX = 255
+       __TCA_ID_MAX = 255
  };
  
- #define TCA_ID_MAX __TCA_ID_MAX
 --- /dev/null
 +++ b/include/uapi/linux/tc_act/tc_ctinfo.h
 @@ -0,0 +1,29 @@
@@ -153,7 +151,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
 +#endif
 --- a/net/sched/Kconfig
 +++ b/net/sched/Kconfig
-@@ -866,6 +866,23 @@ config NET_ACT_CONNMARK
+@@ -876,6 +876,23 @@ config NET_ACT_CONNMARK
          To compile this code as a module, choose M here: the
          module will be called act_connmark.
  
diff --git a/target/linux/generic/backport-5.1/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch b/target/linux/generic/backport-5.1/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
deleted file mode 100644 (file)
index f6de445..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From 8c6c37fdc20ec9ffaa342f827a8e20afe736fb0c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
-Date: Wed, 9 Jan 2019 17:09:44 +0100
-Subject: [PATCH] sch_cake: Correctly update parent qlen when splitting GSO
- packets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-To ensure parent qdiscs have the same notion of the number of enqueued
-packets even after splitting a GSO packet, update the qdisc tree with the
-number of packets that was added due to the split.
-
-Reported-by: Pete Heist <pete@heistp.net>
-Tested-by: Pete Heist <pete@heistp.net>
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
----
- net/sched/sch_cake.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/net/sched/sch_cake.c
-+++ b/net/sched/sch_cake.c
-@@ -1666,7 +1666,7 @@ static s32 cake_enqueue(struct sk_buff *
-       if (skb_is_gso(skb) && q->rate_flags & CAKE_FLAG_SPLIT_GSO) {
-               struct sk_buff *segs, *nskb;
-               netdev_features_t features = netif_skb_features(skb);
--              unsigned int slen = 0;
-+              unsigned int slen = 0, numsegs = 0;
-               segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
-               if (IS_ERR_OR_NULL(segs))
-@@ -1682,6 +1682,7 @@ static s32 cake_enqueue(struct sk_buff *
-                       flow_queue_add(flow, segs);
-                       sch->q.qlen++;
-+                      numsegs++;
-                       slen += segs->len;
-                       q->buffer_used += segs->truesize;
-                       b->packets++;
-@@ -1695,7 +1696,7 @@ static s32 cake_enqueue(struct sk_buff *
-               sch->qstats.backlog += slen;
-               q->avg_window_bytes += slen;
--              qdisc_tree_reduce_backlog(sch, 1, len);
-+              qdisc_tree_reduce_backlog(sch, 1-numsegs, len-slen);
-               consume_skb(skb);
-       } else {
-               /* not splitting */
diff --git a/target/linux/generic/backport-5.1/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch b/target/linux/generic/backport-5.1/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
deleted file mode 100644 (file)
index cd94600..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-From 712639929912c5eefb09facccb48d55b3f72c9f8 Mon Sep 17 00:00:00 2001
-From: George Amanakis <gamanakis@gmail.com>
-Date: Fri, 1 Mar 2019 16:04:05 +0100
-Subject: [PATCH] sch_cake: Make the dual modes fairer
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-CAKE host fairness does not work well with TCP flows in dual-srchost and
-dual-dsthost setup. The reason is that ACKs generated by TCP flows are
-classified as sparse flows, and affect flow isolation from other hosts. Fix
-this by calculating host_load based only on the bulk flows a host
-generates. In a hash collision the host_bulk_flow_count values must be
-decremented on the old hosts and incremented on the new ones *if* the queue
-is in the bulk set.
-
-Reported-by: Pete Heist <peteheist@gmail.com>
-Signed-off-by: George Amanakis <gamanakis@gmail.com>
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
----
- net/sched/sch_cake.c | 92 ++++++++++++++++++++++++++++++--------------
- 1 file changed, 63 insertions(+), 29 deletions(-)
-
---- a/net/sched/sch_cake.c
-+++ b/net/sched/sch_cake.c
-@@ -138,8 +138,8 @@ struct cake_flow {
- struct cake_host {
-       u32 srchost_tag;
-       u32 dsthost_tag;
--      u16 srchost_refcnt;
--      u16 dsthost_refcnt;
-+      u16 srchost_bulk_flow_count;
-+      u16 dsthost_bulk_flow_count;
- };
- struct cake_heap_entry {
-@@ -746,8 +746,10 @@ skip_hash:
-                * queue, accept the collision, update the host tags.
-                */
-               q->way_collisions++;
--              q->hosts[q->flows[reduced_hash].srchost].srchost_refcnt--;
--              q->hosts[q->flows[reduced_hash].dsthost].dsthost_refcnt--;
-+              if (q->flows[outer_hash + k].set == CAKE_SET_BULK) {
-+                      q->hosts[q->flows[reduced_hash].srchost].srchost_bulk_flow_count--;
-+                      q->hosts[q->flows[reduced_hash].dsthost].dsthost_bulk_flow_count--;
-+              }
-               allocate_src = cake_dsrc(flow_mode);
-               allocate_dst = cake_ddst(flow_mode);
- found:
-@@ -767,13 +769,14 @@ found:
-                       }
-                       for (i = 0; i < CAKE_SET_WAYS;
-                               i++, k = (k + 1) % CAKE_SET_WAYS) {
--                              if (!q->hosts[outer_hash + k].srchost_refcnt)
-+                              if (!q->hosts[outer_hash + k].srchost_bulk_flow_count)
-                                       break;
-                       }
-                       q->hosts[outer_hash + k].srchost_tag = srchost_hash;
- found_src:
-                       srchost_idx = outer_hash + k;
--                      q->hosts[srchost_idx].srchost_refcnt++;
-+                      if (q->flows[reduced_hash].set == CAKE_SET_BULK)
-+                              q->hosts[srchost_idx].srchost_bulk_flow_count++;
-                       q->flows[reduced_hash].srchost = srchost_idx;
-               }
-@@ -789,13 +792,14 @@ found_src:
-                       }
-                       for (i = 0; i < CAKE_SET_WAYS;
-                            i++, k = (k + 1) % CAKE_SET_WAYS) {
--                              if (!q->hosts[outer_hash + k].dsthost_refcnt)
-+                              if (!q->hosts[outer_hash + k].dsthost_bulk_flow_count)
-                                       break;
-                       }
-                       q->hosts[outer_hash + k].dsthost_tag = dsthost_hash;
- found_dst:
-                       dsthost_idx = outer_hash + k;
--                      q->hosts[dsthost_idx].dsthost_refcnt++;
-+                      if (q->flows[reduced_hash].set == CAKE_SET_BULK)
-+                              q->hosts[dsthost_idx].dsthost_bulk_flow_count++;
-                       q->flows[reduced_hash].dsthost = dsthost_idx;
-               }
-       }
-@@ -1793,20 +1797,30 @@ static s32 cake_enqueue(struct sk_buff *
-               b->sparse_flow_count++;
-               if (cake_dsrc(q->flow_mode))
--                      host_load = max(host_load, srchost->srchost_refcnt);
-+                      host_load = max(host_load, srchost->srchost_bulk_flow_count);
-               if (cake_ddst(q->flow_mode))
--                      host_load = max(host_load, dsthost->dsthost_refcnt);
-+                      host_load = max(host_load, dsthost->dsthost_bulk_flow_count);
-               flow->deficit = (b->flow_quantum *
-                                quantum_div[host_load]) >> 16;
-       } else if (flow->set == CAKE_SET_SPARSE_WAIT) {
-+              struct cake_host *srchost = &b->hosts[flow->srchost];
-+              struct cake_host *dsthost = &b->hosts[flow->dsthost];
-+
-               /* this flow was empty, accounted as a sparse flow, but actually
-                * in the bulk rotation.
-                */
-               flow->set = CAKE_SET_BULK;
-               b->sparse_flow_count--;
-               b->bulk_flow_count++;
-+
-+              if (cake_dsrc(q->flow_mode))
-+                      srchost->srchost_bulk_flow_count++;
-+
-+              if (cake_ddst(q->flow_mode))
-+                      dsthost->dsthost_bulk_flow_count++;
-+
-       }
-       if (q->buffer_used > q->buffer_max_used)
-@@ -1974,23 +1988,8 @@ retry:
-       dsthost = &b->hosts[flow->dsthost];
-       host_load = 1;
--      if (cake_dsrc(q->flow_mode))
--              host_load = max(host_load, srchost->srchost_refcnt);
--
--      if (cake_ddst(q->flow_mode))
--              host_load = max(host_load, dsthost->dsthost_refcnt);
--
--      WARN_ON(host_load > CAKE_QUEUES);
--
-       /* flow isolation (DRR++) */
-       if (flow->deficit <= 0) {
--              /* The shifted prandom_u32() is a way to apply dithering to
--               * avoid accumulating roundoff errors
--               */
--              flow->deficit += (b->flow_quantum * quantum_div[host_load] +
--                                (prandom_u32() >> 16)) >> 16;
--              list_move_tail(&flow->flowchain, &b->old_flows);
--
-               /* Keep all flows with deficits out of the sparse and decaying
-                * rotations.  No non-empty flow can go into the decaying
-                * rotation, so they can't get deficits
-@@ -1999,6 +1998,13 @@ retry:
-                       if (flow->head) {
-                               b->sparse_flow_count--;
-                               b->bulk_flow_count++;
-+
-+                              if (cake_dsrc(q->flow_mode))
-+                                      srchost->srchost_bulk_flow_count++;
-+
-+                              if (cake_ddst(q->flow_mode))
-+                                      dsthost->dsthost_bulk_flow_count++;
-+
-                               flow->set = CAKE_SET_BULK;
-                       } else {
-                               /* we've moved it to the bulk rotation for
-@@ -2008,6 +2014,22 @@ retry:
-                               flow->set = CAKE_SET_SPARSE_WAIT;
-                       }
-               }
-+
-+              if (cake_dsrc(q->flow_mode))
-+                      host_load = max(host_load, srchost->srchost_bulk_flow_count);
-+
-+              if (cake_ddst(q->flow_mode))
-+                      host_load = max(host_load, dsthost->dsthost_bulk_flow_count);
-+
-+              WARN_ON(host_load > CAKE_QUEUES);
-+
-+              /* The shifted prandom_u32() is a way to apply dithering to
-+               * avoid accumulating roundoff errors
-+               */
-+              flow->deficit += (b->flow_quantum * quantum_div[host_load] +
-+                                (prandom_u32() >> 16)) >> 16;
-+              list_move_tail(&flow->flowchain, &b->old_flows);
-+
-               goto retry;
-       }
-@@ -2028,6 +2050,13 @@ retry:
-                                              &b->decaying_flows);
-                               if (flow->set == CAKE_SET_BULK) {
-                                       b->bulk_flow_count--;
-+
-+                                      if (cake_dsrc(q->flow_mode))
-+                                              srchost->srchost_bulk_flow_count--;
-+
-+                                      if (cake_ddst(q->flow_mode))
-+                                              dsthost->dsthost_bulk_flow_count--;
-+
-                                       b->decaying_flow_count++;
-                               } else if (flow->set == CAKE_SET_SPARSE ||
-                                          flow->set == CAKE_SET_SPARSE_WAIT) {
-@@ -2041,14 +2070,19 @@ retry:
-                               if (flow->set == CAKE_SET_SPARSE ||
-                                   flow->set == CAKE_SET_SPARSE_WAIT)
-                                       b->sparse_flow_count--;
--                              else if (flow->set == CAKE_SET_BULK)
-+                              else if (flow->set == CAKE_SET_BULK) {
-                                       b->bulk_flow_count--;
--                              else
-+
-+                                      if (cake_dsrc(q->flow_mode))
-+                                              srchost->srchost_bulk_flow_count--;
-+
-+                                      if (cake_ddst(q->flow_mode))
-+                                              dsthost->dsthost_bulk_flow_count--;
-+
-+                              } else
-                                       b->decaying_flow_count--;
-                               flow->set = CAKE_SET_NONE;
--                              srchost->srchost_refcnt--;
--                              dsthost->dsthost_refcnt--;
-                       }
-                       goto begin;
-               }
diff --git a/target/linux/generic/backport-5.1/393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch b/target/linux/generic/backport-5.1/393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch
deleted file mode 100644 (file)
index 9ac1388..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-From 0b5c7efdfc6e389ec6840579fe90bdb6f42b08dc Mon Sep 17 00:00:00 2001
-From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
-Date: Fri, 1 Mar 2019 16:04:05 +0100
-Subject: [PATCH] sch_cake: Permit use of connmarks as tin classifiers
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Add flag 'FWMARK' to enable use of firewall connmarks as tin selector.
-The connmark (skbuff->mark) needs to be in the range 1->tin_cnt ie.
-for diffserv3 the mark needs to be 1->3.
-
-Background
-
-Typically CAKE uses DSCP as the basis for tin selection.  DSCP values
-are relatively easily changed as part of the egress path, usually with
-iptables & the mangle table, ingress is more challenging.  CAKE is often
-used on the WAN interface of a residential gateway where passthrough of
-DSCP from the ISP is either missing or set to unhelpful values thus use
-of ingress DSCP values for tin selection isn't helpful in that
-environment.
-
-An approach to solving the ingress tin selection problem is to use
-CAKE's understanding of tc filters.  Naive tc filters could match on
-source/destination port numbers and force tin selection that way, but
-multiple filters don't scale particularly well as each filter must be
-traversed whether it matches or not. e.g. a simple example to map 3
-firewall marks to tins:
-
-MAJOR=$( tc qdisc show dev $DEV | head -1 | awk '{print $3}' )
-tc filter add dev $DEV parent $MAJOR protocol all handle 0x01 fw action skbedit priority ${MAJOR}1
-tc filter add dev $DEV parent $MAJOR protocol all handle 0x02 fw action skbedit priority ${MAJOR}2
-tc filter add dev $DEV parent $MAJOR protocol all handle 0x03 fw action skbedit priority ${MAJOR}3
-
-Another option is to use eBPF cls_act with tc filters e.g.
-
-MAJOR=$( tc qdisc show dev $DEV | head -1 | awk '{print $3}' )
-tc filter add dev $DEV parent $MAJOR bpf da obj my-bpf-fwmark-to-class.o
-
-This has the disadvantages of a) needing someone to write & maintain
-the bpf program, b) a bpf toolchain to compile it and c) needing to
-hardcode the major number in the bpf program so it matches the cake
-instance (or forcing the cake instance to a particular major number)
-since the major number cannot be passed to the bpf program via tc
-command line.
-
-As already hinted at by the previous examples, it would be helpful
-to associate tins with something that survives the Internet path and
-ideally allows tin selection on both egress and ingress.  Netfilter's
-conntrack permits setting an identifying mark on a connection which
-can also be restored to an ingress packet with tc action connmark e.g.
-
-tc filter add dev eth0 parent ffff: protocol all prio 10 u32 \
-       match u32 0 0 flowid 1:1 action connmark action mirred egress redirect dev ifb1
-
-Since tc's connmark action has restored any connmark into skb->mark,
-any of the previous solutions are based upon it and in one form or
-another copy that mark to the skb->priority field where again CAKE
-picks this up.
-
-This change cuts out at least one of the (less intuitive &
-non-scalable) middlemen and permit direct access to skb->mark.
-
-Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- include/uapi/linux/pkt_sched.h |  1 +
- net/sched/sch_cake.c           | 34 +++++++++++++++++++++++++++-------
- 2 files changed, 28 insertions(+), 7 deletions(-)
-
---- a/include/uapi/linux/pkt_sched.h
-+++ b/include/uapi/linux/pkt_sched.h
-@@ -991,6 +991,7 @@ enum {
-       TCA_CAKE_INGRESS,
-       TCA_CAKE_ACK_FILTER,
-       TCA_CAKE_SPLIT_GSO,
-+      TCA_CAKE_FWMARK,
-       __TCA_CAKE_MAX
- };
- #define TCA_CAKE_MAX  (__TCA_CAKE_MAX - 1)
---- a/net/sched/sch_cake.c
-+++ b/net/sched/sch_cake.c
-@@ -258,7 +258,8 @@ enum {
-       CAKE_FLAG_AUTORATE_INGRESS = BIT(1),
-       CAKE_FLAG_INGRESS          = BIT(2),
-       CAKE_FLAG_WASH             = BIT(3),
--      CAKE_FLAG_SPLIT_GSO        = BIT(4)
-+      CAKE_FLAG_SPLIT_GSO        = BIT(4),
-+      CAKE_FLAG_FWMARK           = BIT(5)
- };
- /* COBALT operates the Codel and BLUE algorithms in parallel, in order to
-@@ -2623,6 +2624,13 @@ static int cake_change(struct Qdisc *sch
-                       q->rate_flags &= ~CAKE_FLAG_SPLIT_GSO;
-       }
-+      if (tb[TCA_CAKE_FWMARK]) {
-+              if (!!nla_get_u32(tb[TCA_CAKE_FWMARK]))
-+                      q->rate_flags |= CAKE_FLAG_FWMARK;
-+              else
-+                      q->rate_flags &= ~CAKE_FLAG_FWMARK;
-+      }
-+
-       if (q->tins) {
-               sch_tree_lock(sch);
-               cake_reconfigure(sch);
-@@ -2782,6 +2790,10 @@ static int cake_dump(struct Qdisc *sch,
-                       !!(q->rate_flags & CAKE_FLAG_SPLIT_GSO)))
-               goto nla_put_failure;
-+      if (nla_put_u32(skb, TCA_CAKE_FWMARK,
-+                      !!(q->rate_flags & CAKE_FLAG_FWMARK)))
-+              goto nla_put_failure;
-+
-       return nla_nest_end(skb, opts);
- nla_put_failure:
diff --git a/target/linux/generic/backport-5.1/394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch b/target/linux/generic/backport-5.1/394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch
deleted file mode 100644 (file)
index 325f571..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-From eab2fc822af38f31fd5f4e731b5d10b94904d919 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
-Date: Thu, 14 Mar 2019 23:08:22 +0100
-Subject: [PATCH] sch_cake: Interpret fwmark parameter as a bitmask
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-We initially interpreted the fwmark parameter as a flag that simply turned
-on the feature, using the whole skb->mark field as the index into the CAKE
-tin_order array. However, it is quite common for different applications to
-use different parts of the mask field for their own purposes, each using a
-different mask.
-
-Support this use of subsets of the mark by interpreting the TCA_CAKE_FWMARK
-parameter as a bitmask to apply to the fwmark field when reading it. The
-result will be right-shifted by the number of unset lower bits of the mask
-before looking up the tin.
-
-In the original commit message we also failed to credit Felix Resch with
-originally suggesting the fwmark feature back in 2017; so the Suggested-By
-in this commit covers the whole fwmark feature.
-
-Fixes: 0b5c7efdfc6e ("sch_cake: Permit use of connmarks as tin classifiers")
-Suggested-by: Felix Resch <fuller@beif.de>
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
----
- net/sched/sch_cake.c | 25 ++++++++++++-------------
- 1 file changed, 12 insertions(+), 13 deletions(-)
-
---- a/net/sched/sch_cake.c
-+++ b/net/sched/sch_cake.c
-@@ -211,6 +211,9 @@ struct cake_sched_data {
-       u8              ack_filter;
-       u8              atm_mode;
-+      u32             fwmark_mask;
-+      u16             fwmark_shft;
-+
-       /* time_next = time_this + ((len * rate_ns) >> rate_shft) */
-       u16             rate_shft;
-       ktime_t         time_next_packet;
-@@ -258,8 +261,7 @@ enum {
-       CAKE_FLAG_AUTORATE_INGRESS = BIT(1),
-       CAKE_FLAG_INGRESS          = BIT(2),
-       CAKE_FLAG_WASH             = BIT(3),
--      CAKE_FLAG_SPLIT_GSO        = BIT(4),
--      CAKE_FLAG_FWMARK           = BIT(5)
-+      CAKE_FLAG_SPLIT_GSO        = BIT(4)
- };
- /* COBALT operates the Codel and BLUE algorithms in parallel, in order to
-@@ -1554,7 +1556,7 @@ static struct cake_tin_data *cake_select
-                                            struct sk_buff *skb)
- {
-       struct cake_sched_data *q = qdisc_priv(sch);
--      u32 tin;
-+      u32 tin, mark;
-       u8 dscp;
-       /* Tin selection: Default to diffserv-based selection, allow overriding
-@@ -1562,6 +1564,7 @@ static struct cake_tin_data *cake_select
-        */
-       dscp = cake_handle_diffserv(skb,
-                                   q->rate_flags & CAKE_FLAG_WASH);
-+      mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft;
-       if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT)
-               tin = 0;
-@@ -2178,6 +2181,7 @@ static const struct nla_policy cake_poli
-       [TCA_CAKE_MPU]           = { .type = NLA_U32 },
-       [TCA_CAKE_INGRESS]       = { .type = NLA_U32 },
-       [TCA_CAKE_ACK_FILTER]    = { .type = NLA_U32 },
-+      [TCA_CAKE_FWMARK]        = { .type = NLA_U32 },
- };
- static void cake_set_rate(struct cake_tin_data *b, u64 rate, u32 mtu,
-@@ -2625,10 +2629,8 @@ static int cake_change(struct Qdisc *sch
-       }
-       if (tb[TCA_CAKE_FWMARK]) {
--              if (!!nla_get_u32(tb[TCA_CAKE_FWMARK]))
--                      q->rate_flags |= CAKE_FLAG_FWMARK;
--              else
--                      q->rate_flags &= ~CAKE_FLAG_FWMARK;
-+              q->fwmark_mask = nla_get_u32(tb[TCA_CAKE_FWMARK]);
-+              q->fwmark_shft = q->fwmark_mask ? __ffs(q->fwmark_mask) : 0;
-       }
-       if (q->tins) {
-@@ -2790,8 +2792,7 @@ static int cake_dump(struct Qdisc *sch,
-                       !!(q->rate_flags & CAKE_FLAG_SPLIT_GSO)))
-               goto nla_put_failure;
--      if (nla_put_u32(skb, TCA_CAKE_FWMARK,
--                      !!(q->rate_flags & CAKE_FLAG_FWMARK)))
-+      if (nla_put_u32(skb, TCA_CAKE_FWMARK, q->fwmark_mask))
-               goto nla_put_failure;
-       return nla_nest_end(skb, opts);
diff --git a/target/linux/generic/backport-5.1/450-v5.0-mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch b/target/linux/generic/backport-5.1/450-v5.0-mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch
deleted file mode 100644 (file)
index 15f761a..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-From c93c613214ac70c87beab5422a60077bf126b855 Mon Sep 17 00:00:00 2001
-From: Chuanhong Guo <gch981213@gmail.com>
-Date: Wed, 28 Nov 2018 21:07:25 +0800
-Subject: [PATCH] mtd: spinand: add support for GigaDevice GD5FxGQ4xA
-
-Add support for GigaDevice GD5F1G/2G/4GQ4xA SPI NAND.
-
-Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
-Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
-Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
----
- drivers/mtd/nand/spi/Makefile     |   2 +-
- drivers/mtd/nand/spi/core.c       |   1 +
- drivers/mtd/nand/spi/gigadevice.c | 148 ++++++++++++++++++++++++++++++++++++++
- include/linux/mtd/spinand.h       |   1 +
- 4 files changed, 151 insertions(+), 1 deletion(-)
- create mode 100644 drivers/mtd/nand/spi/gigadevice.c
-
---- a/drivers/mtd/nand/spi/Makefile
-+++ b/drivers/mtd/nand/spi/Makefile
-@@ -1,3 +1,3 @@
- # SPDX-License-Identifier: GPL-2.0
--spinand-objs := core.o macronix.o micron.o winbond.o
-+spinand-objs := core.o gigadevice.o macronix.o micron.o winbond.o
- obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
---- a/drivers/mtd/nand/spi/core.c
-+++ b/drivers/mtd/nand/spi/core.c
-@@ -762,6 +762,7 @@ static const struct nand_ops spinand_ops
- };
- static const struct spinand_manufacturer *spinand_manufacturers[] = {
-+      &gigadevice_spinand_manufacturer,
-       &macronix_spinand_manufacturer,
-       &micron_spinand_manufacturer,
-       &winbond_spinand_manufacturer,
---- /dev/null
-+++ b/drivers/mtd/nand/spi/gigadevice.c
-@@ -0,0 +1,148 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/*
-+ * Author:
-+ *    Chuanhong Guo <gch981213@gmail.com>
-+ */
-+
-+#include <linux/device.h>
-+#include <linux/kernel.h>
-+#include <linux/mtd/spinand.h>
-+
-+#define SPINAND_MFR_GIGADEVICE                        0xC8
-+#define GD5FXGQ4XA_STATUS_ECC_1_7_BITFLIPS    (1 << 4)
-+#define GD5FXGQ4XA_STATUS_ECC_8_BITFLIPS      (3 << 4)
-+
-+static SPINAND_OP_VARIANTS(read_cache_variants,
-+              SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0),
-+              SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
-+              SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0),
-+              SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
-+              SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
-+              SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
-+
-+static SPINAND_OP_VARIANTS(write_cache_variants,
-+              SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
-+              SPINAND_PROG_LOAD(true, 0, NULL, 0));
-+
-+static SPINAND_OP_VARIANTS(update_cache_variants,
-+              SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
-+              SPINAND_PROG_LOAD(false, 0, NULL, 0));
-+
-+static int gd5fxgq4xa_ooblayout_ecc(struct mtd_info *mtd, int section,
-+                                struct mtd_oob_region *region)
-+{
-+      if (section > 3)
-+              return -ERANGE;
-+
-+      region->offset = (16 * section) + 8;
-+      region->length = 8;
-+
-+      return 0;
-+}
-+
-+static int gd5fxgq4xa_ooblayout_free(struct mtd_info *mtd, int section,
-+                                 struct mtd_oob_region *region)
-+{
-+      if (section > 3)
-+              return -ERANGE;
-+
-+      if (section) {
-+              region->offset = 16 * section;
-+              region->length = 8;
-+      } else {
-+              /* section 0 has one byte reserved for bad block mark */
-+              region->offset = 1;
-+              region->length = 7;
-+      }
-+      return 0;
-+}
-+
-+static int gd5fxgq4xa_ecc_get_status(struct spinand_device *spinand,
-+                                       u8 status)
-+{
-+      switch (status & STATUS_ECC_MASK) {
-+      case STATUS_ECC_NO_BITFLIPS:
-+              return 0;
-+
-+      case GD5FXGQ4XA_STATUS_ECC_1_7_BITFLIPS:
-+              /* 1-7 bits are flipped. return the maximum. */
-+              return 7;
-+
-+      case GD5FXGQ4XA_STATUS_ECC_8_BITFLIPS:
-+              return 8;
-+
-+      case STATUS_ECC_UNCOR_ERROR:
-+              return -EBADMSG;
-+
-+      default:
-+              break;
-+      }
-+
-+      return -EINVAL;
-+}
-+
-+static const struct mtd_ooblayout_ops gd5fxgq4xa_ooblayout = {
-+      .ecc = gd5fxgq4xa_ooblayout_ecc,
-+      .free = gd5fxgq4xa_ooblayout_free,
-+};
-+
-+static const struct spinand_info gigadevice_spinand_table[] = {
-+      SPINAND_INFO("GD5F1GQ4xA", 0xF1,
-+                   NAND_MEMORG(1, 2048, 64, 64, 1024, 1, 1, 1),
-+                   NAND_ECCREQ(8, 512),
-+                   SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
-+                                            &write_cache_variants,
-+                                            &update_cache_variants),
-+                   0,
-+                   SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout,
-+                                   gd5fxgq4xa_ecc_get_status)),
-+      SPINAND_INFO("GD5F2GQ4xA", 0xF2,
-+                   NAND_MEMORG(1, 2048, 64, 64, 2048, 1, 1, 1),
-+                   NAND_ECCREQ(8, 512),
-+                   SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
-+                                            &write_cache_variants,
-+                                            &update_cache_variants),
-+                   0,
-+                   SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout,
-+                                   gd5fxgq4xa_ecc_get_status)),
-+      SPINAND_INFO("GD5F4GQ4xA", 0xF4,
-+                   NAND_MEMORG(1, 2048, 64, 64, 4096, 1, 1, 1),
-+                   NAND_ECCREQ(8, 512),
-+                   SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
-+                                            &write_cache_variants,
-+                                            &update_cache_variants),
-+                   0,
-+                   SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout,
-+                                   gd5fxgq4xa_ecc_get_status)),
-+};
-+
-+static int gigadevice_spinand_detect(struct spinand_device *spinand)
-+{
-+      u8 *id = spinand->id.data;
-+      int ret;
-+
-+      /*
-+       * For GD NANDs, There is an address byte needed to shift in before IDs
-+       * are read out, so the first byte in raw_id is dummy.
-+       */
-+      if (id[1] != SPINAND_MFR_GIGADEVICE)
-+              return 0;
-+
-+      ret = spinand_match_and_init(spinand, gigadevice_spinand_table,
-+                                   ARRAY_SIZE(gigadevice_spinand_table),
-+                                   id[2]);
-+      if (ret)
-+              return ret;
-+
-+      return 1;
-+}
-+
-+static const struct spinand_manufacturer_ops gigadevice_spinand_manuf_ops = {
-+      .detect = gigadevice_spinand_detect,
-+};
-+
-+const struct spinand_manufacturer gigadevice_spinand_manufacturer = {
-+      .id = SPINAND_MFR_GIGADEVICE,
-+      .name = "GigaDevice",
-+      .ops = &gigadevice_spinand_manuf_ops,
-+};
---- a/include/linux/mtd/spinand.h
-+++ b/include/linux/mtd/spinand.h
-@@ -194,6 +194,7 @@ struct spinand_manufacturer {
- };
- /* SPI NAND manufacturers */
-+extern const struct spinand_manufacturer gigadevice_spinand_manufacturer;
- extern const struct spinand_manufacturer macronix_spinand_manufacturer;
- extern const struct spinand_manufacturer micron_spinand_manufacturer;
- extern const struct spinand_manufacturer winbond_spinand_manufacturer;
diff --git a/target/linux/generic/backport-5.1/451-v5.1-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch b/target/linux/generic/backport-5.1/451-v5.1-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch
deleted file mode 100644 (file)
index f6d6764..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-From c40c7a990a46e5102a1cc4190557bf315d32d80d Mon Sep 17 00:00:00 2001
-From: Stefan Roese <sr@denx.de>
-Date: Thu, 24 Jan 2019 13:48:06 +0100
-Subject: [PATCH] mtd: spinand: Add support for GigaDevice GD5F1GQ4UExxG
-
-Add support for GigaDevice GD5F1GQ4UExxG SPI NAND chip.
-
-Signed-off-by: Stefan Roese <sr@denx.de>
-Cc: Chuanhong Guo <gch981213@gmail.com>
-Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
-Cc: Miquel Raynal <miquel.raynal@bootlin.com>
-Cc: Boris Brezillon <bbrezillon@kernel.org>
-Reviewed-by: Boris Brezillon <bbrezillon@kernel.org>
-Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
----
- drivers/mtd/nand/spi/gigadevice.c | 83 +++++++++++++++++++++++++++++++++++++++
- 1 file changed, 83 insertions(+)
-
---- a/drivers/mtd/nand/spi/gigadevice.c
-+++ b/drivers/mtd/nand/spi/gigadevice.c
-@@ -12,6 +12,8 @@
- #define GD5FXGQ4XA_STATUS_ECC_1_7_BITFLIPS    (1 << 4)
- #define GD5FXGQ4XA_STATUS_ECC_8_BITFLIPS      (3 << 4)
-+#define GD5FXGQ4UEXXG_REG_STATUS2             0xf0
-+
- static SPINAND_OP_VARIANTS(read_cache_variants,
-               SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0),
-               SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
-@@ -81,11 +83,83 @@ static int gd5fxgq4xa_ecc_get_status(str
-       return -EINVAL;
- }
-+static int gd5fxgq4uexxg_ooblayout_ecc(struct mtd_info *mtd, int section,
-+                                     struct mtd_oob_region *region)
-+{
-+      if (section)
-+              return -ERANGE;
-+
-+      region->offset = 64;
-+      region->length = 64;
-+
-+      return 0;
-+}
-+
-+static int gd5fxgq4uexxg_ooblayout_free(struct mtd_info *mtd, int section,
-+                                      struct mtd_oob_region *region)
-+{
-+      if (section)
-+              return -ERANGE;
-+
-+      /* Reserve 1 bytes for the BBM. */
-+      region->offset = 1;
-+      region->length = 63;
-+
-+      return 0;
-+}
-+
-+static int gd5fxgq4uexxg_ecc_get_status(struct spinand_device *spinand,
-+                                      u8 status)
-+{
-+      u8 status2;
-+      struct spi_mem_op op = SPINAND_GET_FEATURE_OP(GD5FXGQ4UEXXG_REG_STATUS2,
-+                                                    &status2);
-+      int ret;
-+
-+      switch (status & STATUS_ECC_MASK) {
-+      case STATUS_ECC_NO_BITFLIPS:
-+              return 0;
-+
-+      case GD5FXGQ4XA_STATUS_ECC_1_7_BITFLIPS:
-+              /*
-+               * Read status2 register to determine a more fine grained
-+               * bit error status
-+               */
-+              ret = spi_mem_exec_op(spinand->spimem, &op);
-+              if (ret)
-+                      return ret;
-+
-+              /*
-+               * 4 ... 7 bits are flipped (1..4 can't be detected, so
-+               * report the maximum of 4 in this case
-+               */
-+              /* bits sorted this way (3...0): ECCS1,ECCS0,ECCSE1,ECCSE0 */
-+              return ((status & STATUS_ECC_MASK) >> 2) |
-+                      ((status2 & STATUS_ECC_MASK) >> 4);
-+
-+      case GD5FXGQ4XA_STATUS_ECC_8_BITFLIPS:
-+              return 8;
-+
-+      case STATUS_ECC_UNCOR_ERROR:
-+              return -EBADMSG;
-+
-+      default:
-+              break;
-+      }
-+
-+      return -EINVAL;
-+}
-+
- static const struct mtd_ooblayout_ops gd5fxgq4xa_ooblayout = {
-       .ecc = gd5fxgq4xa_ooblayout_ecc,
-       .free = gd5fxgq4xa_ooblayout_free,
- };
-+static const struct mtd_ooblayout_ops gd5fxgq4uexxg_ooblayout = {
-+      .ecc = gd5fxgq4uexxg_ooblayout_ecc,
-+      .free = gd5fxgq4uexxg_ooblayout_free,
-+};
-+
- static const struct spinand_info gigadevice_spinand_table[] = {
-       SPINAND_INFO("GD5F1GQ4xA", 0xF1,
-                    NAND_MEMORG(1, 2048, 64, 64, 1024, 1, 1, 1),
-@@ -114,6 +188,15 @@ static const struct spinand_info gigadev
-                    0,
-                    SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout,
-                                    gd5fxgq4xa_ecc_get_status)),
-+      SPINAND_INFO("GD5F1GQ4UExxG", 0xd1,
-+                   NAND_MEMORG(1, 2048, 128, 64, 1024, 1, 1, 1),
-+                   NAND_ECCREQ(8, 512),
-+                   SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
-+                                            &write_cache_variants,
-+                                            &update_cache_variants),
-+                   0,
-+                   SPINAND_ECCINFO(&gd5fxgq4uexxg_ooblayout,
-+                                   gd5fxgq4uexxg_ecc_get_status)),
- };
- static int gigadevice_spinand_detect(struct spinand_device *spinand)
diff --git a/target/linux/generic/backport-5.1/500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch b/target/linux/generic/backport-5.1/500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
deleted file mode 100644 (file)
index 7bd3ed9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From d62e98ed1efcaa94caa004f622944afdce5f1c3c Mon Sep 17 00:00:00 2001
-From: Gabor Juhos <juhosg@openwrt.org>
-Date: Sun, 9 Dec 2018 18:12:13 +0100
-Subject: [PATCH] ubifs: Fix default compression selection in ubifs
-
-When ubifs is build without the LZO compressor and no compressor is
-given the creation of the default file system will fail. before
-selection the LZO compressor check if it is present and if not fall back
-to the zlib or none.
-
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-Signed-off-by: Richard Weinberger <richard@nod.at>
----
- fs/ubifs/sb.c | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
---- a/fs/ubifs/sb.c
-+++ b/fs/ubifs/sb.c
-@@ -63,6 +63,17 @@
- /* Default time granularity in nanoseconds */
- #define DEFAULT_TIME_GRAN 1000000000
-+static int get_default_compressor(struct ubifs_info *c)
-+{
-+      if (ubifs_compr_present(c, UBIFS_COMPR_LZO))
-+              return UBIFS_COMPR_LZO;
-+
-+      if (ubifs_compr_present(c, UBIFS_COMPR_ZLIB))
-+              return UBIFS_COMPR_ZLIB;
-+
-+      return UBIFS_COMPR_NONE;
-+}
-+
- /**
-  * create_default_filesystem - format empty UBI volume.
-  * @c: UBIFS file-system description object
-@@ -186,7 +197,7 @@ static int create_default_filesystem(str
-       if (c->mount_opts.override_compr)
-               sup->default_compr = cpu_to_le16(c->mount_opts.compr_type);
-       else
--              sup->default_compr = cpu_to_le16(UBIFS_COMPR_LZO);
-+              sup->default_compr = cpu_to_le16(get_default_compressor(c));
-       generate_random_uuid(sup->uuid);
index 5b8a6d35d96e308f81eb796548f0ca01a30eeab9..c122bbdd3ca976e2806c8927b1b914202a4c6fd2 100644 (file)
@@ -1,5 +1,6 @@
 # CONFIG_104_QUAD_8 is not set
 CONFIG_32BIT=y
+CONFIG_64BIT_TIME=y
 # CONFIG_6LOWPAN is not set
 # CONFIG_6LOWPAN_DEBUGFS is not set
 # CONFIG_6PACK is not set
@@ -158,6 +159,7 @@ CONFIG_ANON_INODES=y
 # CONFIG_AR7 is not set
 # CONFIG_AR8216_PHY is not set
 # CONFIG_AR8216_PHY_LEDS is not set
+CONFIG_ARCH_32BIT_OFF_T=y
 # CONFIG_ARCH_ACTIONS is not set
 # CONFIG_ARCH_ALPINE is not set
 # CONFIG_ARCH_ARTPEC is not set
@@ -749,8 +751,10 @@ CONFIG_CARDBUS=y
 # CONFIG_CB710_CORE is not set
 # CONFIG_CC10001_ADC is not set
 # CONFIG_CCS811 is not set
+CONFIG_CC_HAS_ASM_GOTO=y
 CONFIG_CC_HAS_SANCOV_TRACE_PC=y
 CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
+CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
 CONFIG_CC_IS_GCC=y
 CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -854,6 +858,7 @@ CONFIG_CMDLINE=""
 CONFIG_COMPACTION=y
 # CONFIG_COMPAL_LAPTOP is not set
 # CONFIG_COMPAT is not set
+CONFIG_COMPAT_32BIT_TIME=y
 # CONFIG_COMPAT_BRK is not set
 # CONFIG_COMPILE_TEST is not set
 # CONFIG_CONFIGFS_FS is not set
@@ -908,6 +913,7 @@ CONFIG_CROSS_COMPILE=""
 # CONFIG_CROSS_MEMORY_ATTACH is not set
 CONFIG_CRYPTO=y
 # CONFIG_CRYPTO_842 is not set
+# CONFIG_CRYPTO_ADIANTUM is not set
 # CONFIG_CRYPTO_AEAD is not set
 # CONFIG_CRYPTO_AEGIS128 is not set
 # CONFIG_CRYPTO_AEGIS128L is not set
@@ -1015,6 +1021,7 @@ CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
 # CONFIG_CRYPTO_MORUS640 is not set
 # CONFIG_CRYPTO_MORUS640_SSE2 is not set
 # CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_OFB is not set
 # CONFIG_CRYPTO_PCBC is not set
 # CONFIG_CRYPTO_PCOMP is not set
 # CONFIG_CRYPTO_PCOMP2 is not set
@@ -1039,6 +1046,7 @@ CONFIG_CRYPTO_PCRYPT=y
 # CONFIG_CRYPTO_SM3 is not set
 # CONFIG_CRYPTO_SM4 is not set
 # CONFIG_CRYPTO_SPECK is not set
+# CONFIG_CRYPTO_STREEBOG is not set
 # CONFIG_CRYPTO_TEA is not set
 # CONFIG_CRYPTO_TEST is not set
 # CONFIG_CRYPTO_TGR192 is not set
@@ -1355,6 +1363,7 @@ CONFIG_DUMMY_CONSOLE_ROWS=25
 # CONFIG_EEPROM_MAX6875 is not set
 # CONFIG_EFI is not set
 CONFIG_EFI_PARTITION=y
+CONFIG_EFI_EARLYCON=y
 # CONFIG_EFS_FS is not set
 CONFIG_ELFCORE=y
 # CONFIG_ELF_CORE is not set
@@ -1554,6 +1563,9 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_FM10K is not set
 # CONFIG_FMC is not set
+CONFIG_FONT_8x16=y
+CONFIG_FONT_AUTOSELECT=y
+CONFIG_FONT_SUPPORT=y
 # CONFIG_FORCEDETH is not set
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_FORTIFY_SOURCE=y
@@ -1638,10 +1650,12 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
 # CONFIG_GPIO_ADNP is not set
 # CONFIG_GPIO_ADP5588 is not set
 # CONFIG_GPIO_ALTERA is not set
+# CONFIG_GPIO_AMD_FCH is not set
 # CONFIG_GPIO_AMD8111 is not set
 # CONFIG_GPIO_AMDPT is not set
 # CONFIG_GPIO_BCM_KONA is not set
 # CONFIG_GPIO_BT8XX is not set
+# CONFIG_GPIO_CADENCE is not set
 # CONFIG_GPIO_CS5535 is not set
 # CONFIG_GPIO_DWAPB is not set
 # CONFIG_GPIO_EM is not set
@@ -1674,6 +1688,7 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
 # CONFIG_GPIO_PL061 is not set
 # CONFIG_GPIO_RCAR is not set
 # CONFIG_GPIO_RDC321X is not set
+# CONFIG_GPIO_SAMA5D2_PIOBU is not set
 # CONFIG_GPIO_SCH is not set
 # CONFIG_GPIO_SCH311X is not set
 # CONFIG_GPIO_SX150X is not set
@@ -1696,6 +1711,7 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
 # CONFIG_GS_FPGABOOT is not set
 # CONFIG_GTP is not set
 # CONFIG_GUP_BENCHMARK is not set
+# CONFIG_HABANA_AI is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
@@ -1986,6 +2002,7 @@ CONFIG_HZ_100=y
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
 # CONFIG_I2C_XILINX is not set
+# CONFIG_I3C is not set
 # CONFIG_I40E is not set
 # CONFIG_I40EVF is not set
 # CONFIG_I6300ESB_WDT is not set
@@ -2019,6 +2036,7 @@ CONFIG_HZ_100=y
 # CONFIG_IFB is not set
 # CONFIG_IGB is not set
 # CONFIG_IGBVF is not set
+# CONFIG_IGC is not set
 # CONFIG_IIO is not set
 # CONFIG_IIO_BUFFER_CB is not set
 # CONFIG_IIO_BUFFER_HW_CONSUMER is not set
@@ -2140,6 +2158,7 @@ CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_MPU3050 is not set
+# CONFIG_INPUT_MSM_VIBRATOR is not set
 # CONFIG_INPUT_PALMAS_PWRBUTTON is not set
 # CONFIG_INPUT_PCF8574 is not set
 # CONFIG_INPUT_PCSPKR is not set
@@ -2184,6 +2203,7 @@ CONFIG_INPUT_MISC=y
 # CONFIG_INTEL_TH is not set
 # CONFIG_INTEL_VBTN is not set
 # CONFIG_INTEL_XWAY_PHY is not set
+# CONFIG_INTERCONNECT is not set
 # CONFIG_INTERVAL_TREE_TEST is not set
 # CONFIG_INV_MPU6050_I2C is not set
 # CONFIG_INV_MPU6050_IIO is not set
@@ -2194,6 +2214,7 @@ CONFIG_INPUT_MISC=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_NOOP=y
 CONFIG_IO_STRICT_DEVMEM=y
+CONFIG_IO_URING=y
 # CONFIG_IP17XX_PHY is not set
 # CONFIG_IP6_NF_FILTER is not set
 # CONFIG_IP6_NF_IPTABLES is not set
@@ -2372,6 +2393,7 @@ CONFIG_KALLSYMS_BASE_RELATIVE=y
 # CONFIG_KALLSYMS_UNCOMPRESSED is not set
 # CONFIG_KARMA_PARTITION is not set
 # CONFIG_KASAN is not set
+CONFIG_KASAN_STACK=1
 # CONFIG_KCOV is not set
 # CONFIG_KERNEL_BZIP2 is not set
 # CONFIG_KERNEL_CAT is not set
@@ -2506,6 +2528,7 @@ CONFIG_LEDS_CLASS=y
 # CONFIG_LEDS_TLC591XX is not set
 CONFIG_LEDS_TRIGGERS=y
 # CONFIG_LEDS_TRIGGER_ACTIVITY is not set
+# CONFIG_LEDS_TRIGGER_AUDIO is not set
 # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 # CONFIG_LEDS_TRIGGER_CAMERA is not set
 # CONFIG_LEDS_TRIGGER_CPU is not set
@@ -2518,6 +2541,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 CONFIG_LEDS_TRIGGER_NETDEV=y
 # CONFIG_LEDS_TRIGGER_ONESHOT is not set
 # CONFIG_LEDS_TRIGGER_PANIC is not set
+# CONFIG_LEDS_TRIGGER_PATTERN is not set
 CONFIG_LEDS_TRIGGER_TIMER=y
 # CONFIG_LEDS_TRIGGER_TRANSIENT is not set
 # CONFIG_LEDS_USER is not set
@@ -2567,6 +2591,7 @@ CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
 # CONFIG_LPC_SCH is not set
 # CONFIG_LP_CONSOLE is not set
 # CONFIG_LSI_ET1011C_PHY is not set
+CONFIG_LSM="yama,loadpin,safesetid,integrity"
 # CONFIG_LTC2471 is not set
 # CONFIG_LTC2485 is not set
 # CONFIG_LTC2497 is not set
@@ -2649,6 +2674,7 @@ CONFIG_MAY_USE_DEVLINK=y
 # CONFIG_MDIO_BITBANG is not set
 # CONFIG_MDIO_BUS_MUX_GPIO is not set
 # CONFIG_MDIO_BUS_MUX_MMIOREG is not set
+# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set
 # CONFIG_MDIO_DEVICE is not set
 # CONFIG_MDIO_HISI_FEMAC is not set
 # CONFIG_MDIO_MSCC_MIIM is not set
@@ -2772,6 +2798,7 @@ CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
 # CONFIG_MFD_TPS65912_SPI is not set
 # CONFIG_MFD_TPS68470 is not set
 # CONFIG_MFD_TPS80031 is not set
+# CONFIG_MFD_TQMX86 is not set
 # CONFIG_MFD_VIPERBOARD is not set
 # CONFIG_MFD_VX855 is not set
 # CONFIG_MFD_WL1273_CORE is not set
@@ -2797,13 +2824,14 @@ CONFIG_MII=y
 # CONFIG_MIPS_ALCHEMY is not set
 # CONFIG_MIPS_CDMM is not set
 # CONFIG_MIPS_COBALT is not set
-# CONFIG_MIPS_FPU_EMULATOR is not set
+CONFIG_MIPS_FP_SUPPORT=y
 # CONFIG_MIPS_GENERIC is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_O32_FP64_SUPPORT is not set
 # CONFIG_MIPS_PARAVIRT is not set
 # CONFIG_MIPS_PLATFORM_DEVICES is not set
 # CONFIG_MIPS_SEAD3 is not set
+# CONFIG_MISC_ALCOR_PCI is not set
 CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_MISC_RTSX_PCI is not set
 # CONFIG_MISC_RTSX_USB is not set
@@ -3285,6 +3313,7 @@ CONFIG_NET_SCH_FQ_CODEL=y
 # CONFIG_NET_SCH_SFB is not set
 # CONFIG_NET_SCH_SFQ is not set
 # CONFIG_NET_SCH_SKBPRIO is not set
+# CONFIG_NET_SCH_TAPRIO is not set
 # CONFIG_NET_SCH_TBF is not set
 # CONFIG_NET_SCH_TEQL is not set
 # CONFIG_NET_SCTPPROBE is not set
@@ -3463,6 +3492,7 @@ CONFIG_NF_TABLES_NETDEV=y
 # CONFIG_NF_TABLES_SET is not set
 # CONFIG_NF_TPROXY_IPV4 is not set
 # CONFIG_NF_TPROXY_IPV6 is not set
+# CONFIG_NI_XGE_MANAGEMENT_ENET is not set
 # CONFIG_NI65 is not set
 # CONFIG_NI903X_WDT is not set
 # CONFIG_NIC7018_WDT is not set
@@ -3669,6 +3699,7 @@ CONFIG_PARTITION_ADVANCED=y
 # CONFIG_PCIEPORTBUS is not set
 # CONFIG_PCIE_ALTERA is not set
 # CONFIG_PCIE_ARMADA_8K is not set
+# CONFIG_PCIE_BW is not set
 # CONFIG_PCIE_CADENCE_HOST is not set
 # CONFIG_PCIE_DPC is not set
 # CONFIG_PCIE_DW_PLAT is not set
@@ -3739,10 +3770,15 @@ CONFIG_PCI_SYSCALL=y
 # CONFIG_PHONET is not set
 # CONFIG_PHYLIB is not set
 # CONFIG_PHYS_ADDR_T_64BIT is not set
+# CONFIG_PHY_CADENCE_DP is not set
+# CONFIG_PHY_CADENCE_DPHY is not set
+# CONFIG_PHY_CADENCE_SIERRA is not set
 # CONFIG_PHY_CPCAP_USB is not set
 # CONFIG_PHY_EXYNOS_DP_VIDEO is not set
 # CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set
+# CONFIG_PHY_FSL_IMX8MQ_USB is not set
 # CONFIG_PHY_MAPPHONE_MDM6600 is not set
+# CONFIG_PHY_OCELOT_SERDES is not set
 # CONFIG_PHY_PXA_28NM_HSIC is not set
 # CONFIG_PHY_PXA_28NM_USB2 is not set
 # CONFIG_PHY_QCOM_DWC3 is not set
@@ -3762,8 +3798,10 @@ CONFIG_PINCONF=y
 # CONFIG_PINCTRL_EXYNOS is not set
 # CONFIG_PINCTRL_EXYNOS5440 is not set
 # CONFIG_PINCTRL_ICELAKE is not set
+# CONFIG_PINCTRL_INGENIC is not set
 # CONFIG_PINCTRL_MCP23S08 is not set
 # CONFIG_PINCTRL_MSM8X74 is not set
+# CONFIG_PINCTRL_OCELOT is not set
 CONFIG_PINCTRL_SINGLE=y
 # CONFIG_PINCTRL_SX150X is not set
 CONFIG_PINMUX=y
@@ -3835,6 +3873,7 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPTIRQ_DELAY_TEST is not set
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_PRINTK=y
+# CONFIG_PRINTK_CALLER is not set
 CONFIG_PRINTK_NMI=y
 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
 # CONFIG_PRINTK_TIME is not set
@@ -3856,12 +3895,14 @@ CONFIG_PROC_SYSCTL=y
 # CONFIG_PROVE_RCU_REPEATEDLY is not set
 # CONFIG_PSAMPLE is not set
 # CONFIG_PSB6970_PHY is not set
+# CONFIG_PSI is not set
 # CONFIG_PSTORE is not set
 # CONFIG_PTP_1588_CLOCK is not set
 # CONFIG_PTP_1588_CLOCK_IXP46X is not set
 # CONFIG_PTP_1588_CLOCK_KVM is not set
 # CONFIG_PTP_1588_CLOCK_PCH is not set
 # CONFIG_PUBLIC_KEY_ALGO_RSA is not set
+# CONFIG_PVPANIC is not set
 # CONFIG_PWM is not set
 # CONFIG_PWM_FSL_FTM is not set
 # CONFIG_PWM_PCA9685 is not set
@@ -4253,6 +4294,7 @@ CONFIG_SCSI_MOD=y
 # CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_MVSAS_DEBUG is not set
 # CONFIG_SCSI_MVUMI is not set
+# CONFIG_SCSI_MYRB is not set
 # CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NETLINK is not set
 # CONFIG_SCSI_NSP32 is not set
@@ -4997,6 +5039,9 @@ CONFIG_SND_X86=y
 # CONFIG_SPI_MEM is not set
 # CONFIG_SPI_MPC52xx is not set
 # CONFIG_SPI_MPC52xx_PSC is not set
+# CONFIG_SPI_MTK_QUADSPI is not set
+# CONFIG_SPI_MXIC is not set
+# CONFIG_SPI_NXP_FLEXSPI is not set
 # CONFIG_SPI_OCTEON is not set
 # CONFIG_SPI_OC_TINY is not set
 # CONFIG_SPI_ORION is not set
@@ -5007,6 +5052,7 @@ CONFIG_SND_X86=y
 # CONFIG_SPI_ROCKCHIP is not set
 # CONFIG_SPI_S3C64XX is not set
 # CONFIG_SPI_SC18IS602 is not set
+# CONFIG_SPI_SIFIVE is not set
 # CONFIG_SPI_SLAVE is not set
 # CONFIG_SPI_SPIDEV is not set
 # CONFIG_SPI_THUNDERX is not set
@@ -5181,17 +5227,21 @@ CONFIG_TCP_CONG_CUBIC=y
 # CONFIG_TEST_KSTRTOX is not set
 # CONFIG_TEST_LIST_SORT is not set
 # CONFIG_TEST_LKM is not set
+# CONFIG_TEST_MEMCAT_P is not set
 # CONFIG_TEST_OVERFLOW is not set
 # CONFIG_TEST_POWER is not set
 # CONFIG_TEST_PRINTF is not set
 # CONFIG_TEST_RHASHTABLE is not set
 # CONFIG_TEST_SORT is not set
+# CONFIG_TEST_STACKINIT is not set
 # CONFIG_TEST_STATIC_KEYS is not set
 # CONFIG_TEST_STRING_HELPERS is not set
 # CONFIG_TEST_SYSCTL is not set
 # CONFIG_TEST_UDELAY is not set
 # CONFIG_TEST_USER_COPY is not set
 # CONFIG_TEST_UUID is not set
+# CONFIG_TEST_VMALLOC is not set
+# CONFIG_TEST_XARRAY is not set
 CONFIG_TEXTSEARCH=y
 # CONFIG_TEXTSEARCH_BM is not set
 # CONFIG_TEXTSEARCH_FSM is not set
@@ -5238,6 +5288,7 @@ CONFIG_TINY_RCU=y
 # CONFIG_TI_AM335X_ADC is not set
 # CONFIG_TI_CPSW is not set
 # CONFIG_TI_CPSW_ALE is not set
+# CONFIG_TI_CPSW_PHY_SEL is not set
 # CONFIG_TI_CPTS is not set
 # CONFIG_TI_DAC082S085 is not set
 # CONFIG_TI_DAC5571 is not set
@@ -5460,6 +5511,7 @@ CONFIG_USB_AN2720=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARMLINUX=y
 # CONFIG_USB_ATM is not set
+CONFIG_USB_AUTOSUSPEND_DELAY=2
 # CONFIG_USB_BDC_UDC is not set
 CONFIG_USB_BELKIN=y
 # CONFIG_USB_C67X00_HCD is not set
@@ -5796,6 +5848,7 @@ CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
 # CONFIG_UTS_NS is not set
 # CONFIG_UWB is not set
 # CONFIG_U_SERIAL_CONSOLE is not set
+CONFIG_VALIDATE_FS_PARSER=y
 # CONFIG_V4L_MEM2MEM_DRIVERS is not set
 # CONFIG_V4L_TEST_DRIVERS is not set
 # CONFIG_VBOXGUEST is not set
index a4e55ad7b199b164f260aca6f4d3bec157911c70..a3c21241eae7de5ac7fe3c1348f1e1469b05f559 100644 (file)
@@ -89,11 +89,7 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
                        val = swahb32(val);
                }
 
-#ifdef CONFIG_LANTIQ
-               val = swab32(val);
-#endif
-
-               __raw_writel(val, mem + reg);
+               writel(val, mem + reg);
                udelay(100);
        }
 
index 42928bab075dd04607e8699135d7a04126d486fd..c4393c1ef9c082a72ff0733b09dc2a7de3d6094f 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/ethtool.h>
 #include <linux/phy.h>
 #include <linux/switch.h>
+#include <linux/version.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -1044,11 +1045,20 @@ static int adm6996_switch_init(struct adm6996_priv *priv, const char *alias, str
 
 static int adm6996_config_init(struct phy_device *pdev)
 {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+       __ETHTOOL_DECLARE_LINK_MODE_MASK(linkmode) = { 0, };
+#endif
        struct adm6996_priv *priv;
        int ret;
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+       linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, linkmode);
+       linkmode_copy(pdev->supported, linkmode);
+       linkmode_copy(pdev->advertising, pdev->supported);
+#else
        pdev->supported = ADVERTISED_100baseT_Full;
        pdev->advertising = ADVERTISED_100baseT_Full;
+#endif
 
        if (pdev->mdio.addr != 0) {
                pr_info ("%s: PHY overlaps ADM6996, providing fixed PHY 0x%x.\n"
index 683241cf1cee041ace2934b5963f63a68e44ec2f..b95fd960d2e9e5e9539068e5255bda36461d7f40 100644 (file)
@@ -2487,7 +2487,11 @@ ar8xxx_phy_read_status(struct phy_device *phydev)
        struct switch_port_link link;
 
        /* check for switch port link changes */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,20,0)
+       if ((phydev->state == PHY_RUNNING) || (phydev->state == PHY_NOLINK))
+#else
        if (phydev->state == PHY_CHANGELINK)
+#endif
                ar8xxx_check_link_states(priv);
 
        if (phydev->mdio.addr != 0)
@@ -2574,6 +2578,9 @@ ar8xxx_is_possible(struct mii_bus *bus)
 static int
 ar8xxx_phy_probe(struct phy_device *phydev)
 {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+       __ETHTOOL_DECLARE_LINK_MODE_MASK(linkmode) = { 0, };
+#endif
        struct ar8xxx_priv *priv;
        struct switch_dev *swdev;
        int ret;
@@ -2629,13 +2636,28 @@ found:
 
        if (phydev->mdio.addr == 0) {
                if (ar8xxx_has_gige(priv)) {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+                       linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+                                        linkmode);
+#else
                        phydev->supported = SUPPORTED_1000baseT_Full;
                        phydev->advertising = ADVERTISED_1000baseT_Full;
+#endif
                } else {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+                       linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
+                                        linkmode);
+#else
                        phydev->supported = SUPPORTED_100baseT_Full;
                        phydev->advertising = ADVERTISED_100baseT_Full;
+#endif
                }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+               linkmode_copy(phydev->supported, linkmode);
+               linkmode_copy(phydev->advertising, phydev->supported);
+#endif
+
                if (priv->chip->config_at_probe) {
                        priv->phy = phydev;
 
@@ -2645,8 +2667,15 @@ found:
                }
        } else {
                if (ar8xxx_has_gige(priv)) {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+                       linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+                                        linkmode);
+                       linkmode_copy(phydev->supported, linkmode);
+                       linkmode_copy(phydev->advertising, phydev->supported);
+#else
                        phydev->supported |= SUPPORTED_1000baseT_Full;
                        phydev->advertising |= ADVERTISED_1000baseT_Full;
+#endif
                }
                if (priv->chip->phy_rgmii_set)
                        priv->chip->phy_rgmii_set(priv, phydev);
index 043978feb9da213d241862a12ad55b2ecb174a98..320a4b42771d4889230bb2ab3c959cd9e5c03ef0 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/ethtool.h>
 #include <linux/phy.h>
 #include <linux/if_vlan.h>
+#include <linux/version.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -198,6 +199,9 @@ mvswitch_wait_mask(struct phy_device *pdev, int addr, int reg, u16 mask, u16 val
 static int
 mvswitch_config_init(struct phy_device *pdev)
 {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+       __ETHTOOL_DECLARE_LINK_MODE_MASK(linkmode) = { 0, };
+#endif
        struct mvswitch_priv *priv = to_mvsw(pdev);
        struct net_device *dev = pdev->attached_dev;
        u8 vlmap = 0;
@@ -207,8 +211,14 @@ mvswitch_config_init(struct phy_device *pdev)
                return -EINVAL;
 
        printk("%s: Marvell 88E6060 PHY driver attached.\n", dev->name);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+       linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, linkmode);
+       linkmode_copy(pdev->supported, linkmode);
+       linkmode_copy(pdev->advertising, pdev->supported);
+#else
        pdev->supported = ADVERTISED_100baseT_Full;
        pdev->advertising = ADVERTISED_100baseT_Full;
+#endif
        dev->phy_ptr = priv;
        pdev->irq = PHY_POLL;
 #ifdef HEADER_MODE
index c1a381c0528d94b0b2b385c0152734af49f3c98c..dfe6e8e59a9452d729f767ecf756a037a46ed6f8 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/netdevice.h>
 #include <linux/switch.h>
 #include <linux/phy.h>
+#include <linux/version.h>
 
 #define PSB6970_MAX_VLANS              16
 #define PSB6970_NUM_PORTS              7
@@ -305,6 +306,9 @@ static const struct switch_dev_ops psb6970_ops = {
 
 static int psb6970_config_init(struct phy_device *pdev)
 {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+       __ETHTOOL_DECLARE_LINK_MODE_MASK(linkmode) = { 0, };
+#endif
        struct psb6970_priv *priv;
        struct net_device *dev = pdev->attached_dev;
        struct switch_dev *swdev;
@@ -325,7 +329,13 @@ static int psb6970_config_init(struct phy_device *pdev)
                return 0;
        }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,19,0)
+       linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, linkmode);
+       linkmode_copy(pdev->supported, linkmode);
+       linkmode_copy(pdev->advertising, pdev->supported);
+#else
        pdev->supported = pdev->advertising = SUPPORTED_100baseT_Full;
+#endif
 
        mutex_init(&priv->reg_mutex);
        priv->read = psb6970_mii_read;
index c0650b3670f8ba0117a2d7f99d80215f8158ba55..7a285760ae70eb2b47a4063a18e46d86cbc84419 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
-@@ -160,6 +160,7 @@ extern void cleanup_module(void);
+@@ -159,6 +159,7 @@ extern void cleanup_module(void);
  
  /* Generic info of form tag = "info" */
  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  /* For userspace: you can also call me... */
  #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
-@@ -203,12 +204,12 @@ extern void cleanup_module(void);
+@@ -218,12 +219,12 @@ extern void cleanup_module(void);
   * Author(s), use "Name <email>" or just "Name", for multiple
   * authors use multiple MODULE_AUTHOR() statements/lines.
   */
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /* Creates an alias so file2alias.c can find device table. */
  #define MODULE_DEVICE_TABLE(type, name)                                       \
  extern typeof(name) __mod_##type##__##name##_device_table             \
-@@ -235,7 +236,9 @@ extern typeof(name) __mod_##type##__##na
+@@ -250,7 +251,9 @@ extern typeof(name) __mod_##type##__##na
   */
  
  #if defined(MODULE) || !defined(CONFIG_SYSFS)
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #else
  #define MODULE_VERSION(_version)                                      \
        static struct module_version_attribute ___modver_attr = {       \
-@@ -257,7 +260,7 @@ extern typeof(name) __mod_##type##__##na
+@@ -272,7 +275,7 @@ extern typeof(name) __mod_##type##__##na
  /* Optional firmware file (or files) needed by the module
   * format is simply firmware file name.  Multiple firmware
   * files require multiple MODULE_FIRMWARE() specifiers */
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1997,6 +1997,13 @@ config TRIM_UNUSED_KSYMS
+@@ -2054,6 +2054,13 @@ config TRIM_UNUSED_KSYMS
  
          If unsure, or if you need to build out-of-tree modules, say N.
  
@@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  config MODULES_TREE_LOOKUP
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -3009,9 +3009,11 @@ static int setup_load_info(struct load_i
+@@ -3007,9 +3007,11 @@ static int setup_load_info(struct load_i
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
@@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (flags & MODULE_INIT_IGNORE_VERMAGIC)
                modmagic = NULL;
  
-@@ -3032,6 +3034,7 @@ static int check_modinfo(struct module *
+@@ -3030,6 +3032,7 @@ static int check_modinfo(struct module *
                                mod->name);
                add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
        }
@@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/scripts/mod/modpost.c
 +++ b/scripts/mod/modpost.c
-@@ -1971,7 +1971,9 @@ static void read_symbols(const char *mod
+@@ -1978,7 +1978,9 @@ static void read_symbols(const char *mod
                symname = remove_dot(info.strtab + sym->st_name);
  
                handle_modversions(mod, &info, sym, symname);
@@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }
        if (!is_vmlinux(modname) || vmlinux_section_warnings)
                check_sec_ref(mod, modname, &info);
-@@ -2134,8 +2136,10 @@ static void add_header(struct buffer *b,
+@@ -2155,8 +2157,10 @@ static void add_header(struct buffer *b,
        buf_printf(b, "\n");
        buf_printf(b, "BUILD_SALT;\n");
        buf_printf(b, "\n");
@@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        buf_printf(b, "\n");
        buf_printf(b, "__visible struct module __this_module\n");
        buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
-@@ -2152,8 +2156,10 @@ static void add_header(struct buffer *b,
+@@ -2173,8 +2177,10 @@ static void add_header(struct buffer *b,
  
  static void add_intree_flag(struct buffer *b, int is_intree)
  {
@@ -169,7 +169,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  
  /* Cannot check for assembler */
-@@ -2166,8 +2172,10 @@ static void add_retpoline(struct buffer
+@@ -2187,8 +2193,10 @@ static void add_retpoline(struct buffer
  
  static void add_staging_flag(struct buffer *b, const char *name)
  {
@@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  
  /**
-@@ -2266,11 +2274,13 @@ static void add_depends(struct buffer *b
+@@ -2276,11 +2284,13 @@ static void add_depends(struct buffer *b
  
  static void add_srcversion(struct buffer *b, struct module *mod)
  {
@@ -194,10 +194,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  
  static void write_if_changed(struct buffer *b, const char *fname)
-@@ -2507,7 +2517,9 @@ int main(int argc, char **argv)
+@@ -2509,7 +2519,9 @@ int main(int argc, char **argv)
                add_staging_flag(&buf, mod->name);
                err |= add_versions(&buf, mod);
-               add_depends(&buf, mod, modules);
+               add_depends(&buf, mod);
 +#ifndef CONFIG_MODULE_STRIPPED
                add_moddevtable(&buf, mod);
 +#endif
index 7d7b6a8dfb670a59653be3d00ebca5b077592357..2d72129880d40d3832ee089f15f0586902d7b367 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1224,7 +1224,6 @@ all: modules
+@@ -1263,7 +1263,6 @@ all: modules
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  
-@@ -1253,7 +1252,6 @@ _modinst_:
+@@ -1292,7 +1291,6 @@ _modinst_:
                rm -f $(MODLIB)/build ; \
                ln -s $(CURDIR) $(MODLIB)/build ; \
        fi
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/scripts/Makefile.build
 +++ b/scripts/Makefile.build
-@@ -78,7 +78,7 @@ modorder-target := $(obj)/modules.order
+@@ -70,7 +70,7 @@ endif
  # We keep a list of all modules in $(MODVERDIR)
  
  __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
index d6fc94646e438258a500512cc3e6297989725fd9..fd36fc521a221ed4edda37d11be71a8d73f5744d 100644 (file)
@@ -21,8 +21,8 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -294,6 +294,11 @@ else
- scripts/Kbuild.include: ;
+@@ -318,6 +318,11 @@ else
  include scripts/Kbuild.include
  
 +ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -780,11 +785,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -806,11 +811,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  endif
  
@@ -47,17 +47,17 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -98,6 +98,7 @@ config ARM
+@@ -101,6 +101,7 @@ config ARM
        select HAVE_UID16
        select HAVE_VIRT_CPU_ACCOUNTING_GEN
        select IRQ_FORCED_THREADING
 +      select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
        select MODULES_USE_ELF_REL
        select NEED_DMA_MAP_STATE
-       select NO_BOOTMEM
+       select OF_EARLY_FLATTREE if OF
 --- a/arch/arm/boot/compressed/Makefile
 +++ b/arch/arm/boot/compressed/Makefile
-@@ -106,6 +106,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y)
+@@ -107,6 +107,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y)
  ORIG_CFLAGS := $(KBUILD_CFLAGS)
  KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
  endif
@@ -162,7 +162,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
        __stubs_end = .;                                                \
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -43,6 +43,7 @@ config MIPS
+@@ -46,6 +46,7 @@ config MIPS
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT
        select HAVE_CBPF_JIT if (!64BIT && !CPU_MICROMIPS)
        select HAVE_EBPF_JIT if (64BIT && !CPU_MICROMIPS)
@@ -170,23 +170,3 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
        select HAVE_CONTEXT_TRACKING
        select HAVE_COPY_THREAD_TLS
        select HAVE_C_RECORDMCOUNT
---- a/arch/mips/kernel/vmlinux.lds.S
-+++ b/arch/mips/kernel/vmlinux.lds.S
-@@ -72,7 +72,7 @@ SECTIONS
-       /* Exception table for data bus errors */
-       __dbe_table : {
-               __start___dbe_table = .;
--              *(__dbe_table)
-+              KEEP(*(__dbe_table))
-               __stop___dbe_table = .;
-       }
-@@ -123,7 +123,7 @@ SECTIONS
-       . = ALIGN(4);
-       .mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
-               __mips_machines_start = .;
--              *(.mips.machines.init)
-+              KEEP(*(.mips.machines.init))
-               __mips_machines_end = .;
-       }
index cd5ae5830c5f392425e0efc6e6ad1336a1f4f88c..60cc406efc31a6fc447c4cad65f858aa83cc1ff5 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /* Align . to a 8 byte boundary equals to maximum function alignment. */
  #define ALIGN_FUNCTION()  . = ALIGN(8)
  
-@@ -372,14 +382,14 @@
+@@ -384,14 +394,14 @@
        /* Kernel symbol table: Normal symbols */                       \
        __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
                __start___ksymtab = .;                                  \
@@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                __stop___ksymtab_gpl = .;                               \
        }                                                               \
                                                                        \
-@@ -441,7 +451,7 @@
+@@ -453,7 +463,7 @@
                                                                        \
        /* Kernel symbol table: strings */                              \
          __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {       \
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }                                                               \
                                                                        \
        /* __*init sections */                                          \
-@@ -841,6 +851,8 @@
+@@ -842,6 +852,8 @@
        EXIT_TEXT                                                       \
        EXIT_DATA                                                       \
        EXIT_CALL                                                       \
@@ -90,7 +90,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/scripts/Makefile.build
 +++ b/scripts/Makefile.build
-@@ -408,7 +408,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
+@@ -371,7 +371,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
  # Linker scripts preprocessor (.lds.S -> .lds)
  # ---------------------------------------------------------------------------
  quiet_cmd_cpp_lds_S = LDS     $@
index b45ed1184f151f1997b7bb8d2ec971c3b15acfde..5487439df0dc0cd8436e1dfb628f7c68aa727ce7 100644 (file)
@@ -23,15 +23,15 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
        { {0x02, 0x21}, "lz4", unlz4 },
 --- a/scripts/Makefile.lib
 +++ b/scripts/Makefile.lib
-@@ -324,7 +324,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
+@@ -347,7 +347,7 @@ quiet_cmd_bzip2 = BZIP2   $@
+ # ---------------------------------------------------------------------------
  
  quiet_cmd_lzma = LZMA    $@
- cmd_lzma = (cat $(filter-out FORCE,$^) | \
--      lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
-+      lzma e -d20 -lc1 -lp2 -pb2 -eos -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
-       (rm -f $@ ; false)
+-      cmd_lzma = { cat $(real-prereqs) | lzma -9 && $(size_append); } > $@
++      cmd_lzma = { cat $(real-prereqs) | lzma e -d20 -lc1 -lp2 -pb2 -eos -si -so && $(size_append); } > $@
  
  quiet_cmd_lzo = LZO     $@
+       cmd_lzo = { cat $(real-prereqs) | lzop -9 && $(size_append); } > $@
 --- a/usr/gen_initramfs_list.sh
 +++ b/usr/gen_initramfs_list.sh
 @@ -229,7 +229,7 @@ cpio_list=
index cb744bd8abfdc2c355d22a5691c8423576a14cb3..0723c5bc53271f1b199146f36629958c19d3d0ea 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        depends on NETFILTER_ADVANCED
        help
          H.323 is a VoIP signalling protocol from ITU-T. As one of the most
-@@ -1077,7 +1076,6 @@ config NETFILTER_XT_TARGET_SECMARK
+@@ -1081,7 +1080,6 @@ config NETFILTER_XT_TARGET_SECMARK
  
  config NETFILTER_XT_TARGET_TCPMSS
        tristate '"TCPMSS" target support'
index 2cfc2fab3a1e42a755315f39aeefe73d9b8025a6..f0a3bbde4d6350414ecd5ac7f1d1a712d0c5330d 100644 (file)
@@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
        bool
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
-@@ -377,16 +377,16 @@ config BCH_CONST_T
+@@ -385,16 +385,16 @@ config BCH_CONST_T
  # Textsearch support is select'ed if needed
  #
  config TEXTSEARCH
index 335ec4afc581c62779cbf86306fcb0e668833988..e0eb760429a03c4935488740672ce838de6113b8 100644 (file)
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/of.h>
-@@ -3037,3 +3038,5 @@ static int __init regmap_initcall(void)
+@@ -3120,3 +3121,5 @@ static int __init regmap_initcall(void)
        return 0;
  }
  postcore_initcall(regmap_initcall);
index ad45dc9168542d7f3b1ecc6e86f11e4274760c0b..fc15c17e03ae16660b3c0c7373999bec58868e94 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  
 --- a/drivers/of/Kconfig
 +++ b/drivers/of/Kconfig
-@@ -71,6 +71,7 @@ config OF_IRQ
+@@ -72,6 +72,7 @@ config OF_IRQ
  
  config OF_NET
        depends on NETDEVICES
index c07ccf9474e0e9947f97ce68c9eeee0b02204ace..aed08a5ec9d86fbbf4f3f83527b5395916057c24 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
 --- a/arch/mips/include/asm/r4kcache.h
 +++ b/arch/mips/include/asm/r4kcache.h
-@@ -683,16 +683,48 @@ static inline void prot##extra##blast_##
+@@ -617,14 +617,46 @@ static inline void prot##extra##blast_##
                                                    unsigned long end)  \
  {                                                                     \
        unsigned long lsize = cpu_##desc##_line_size();                 \
@@ -26,8 +26,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      unsigned long aend = (end + lsize - 1) & ~(lsize - 1);          \
 +      int lines = (aend - addr) / lsize;                              \
                                                                        \
-       __##pfx##flush_prologue                                         \
-                                                                       \
 -      while (1) {                                                     \
 +      while (lines >= 8) {                                            \
 +              prot##cache_op(hitop, addr);                            \
@@ -62,5 +60,5 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -                      break;                                          \
 -              addr += lsize;                                          \
        }                                                               \
-                                                                       \
-       __##pfx##flush_epilogue                                         \
+ }
index 7a6948d481d9e813646dd62e606bda8d6ad501be..960625c2d82a781fe22389220a6f9502d6159fb0 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1143,6 +1143,10 @@ config SYNC_R4K
+@@ -1148,6 +1148,10 @@ config SYNC_R4K
  config MIPS_MACHINE
        def_bool n
  
@@ -25,7 +25,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +++ b/arch/mips/kernel/head.S
 @@ -79,6 +79,12 @@ FEXPORT(__kernel_entry)
        j       kernel_entry
- #endif
+ #endif /* CONFIG_BOOT_RAW */
  
 +#ifdef CONFIG_IMAGE_CMDLINE_HACK
 +      .ascii  "CMDLINE:"
index 26c385f011404d24b5d2b34b6a3d7ddd0d751935..9e032445ab80e528be729c095cb381a33383114b 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 
 --- a/arch/powerpc/Makefile
 +++ b/arch/powerpc/Makefile
-@@ -60,20 +60,6 @@ machine-$(CONFIG_PPC64) += 64
+@@ -64,20 +64,6 @@ machine-$(CONFIG_PPC64) += 64
  machine-$(CONFIG_CPU_LITTLE_ENDIAN) += le
  UTS_MACHINE := $(subst $(space),,$(machine-y))
  
index d6f0f3df0a7af0675aad3a5d25d2e06b6e1102cf..39be213ccab733738b98a71f54cf34dc4ebd5140 100644 (file)
@@ -43,7 +43,7 @@ Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
 
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
-@@ -416,19 +416,14 @@ out_free_page:
+@@ -417,19 +417,14 @@ out_free_page:
        return ret;
  }
  
@@ -67,7 +67,7 @@ Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
                ret = -EOPNOTSUPP;
                goto out;
        }
-@@ -457,7 +452,9 @@ static void lo_complete_rq(struct reques
+@@ -458,7 +453,9 @@ static void lo_complete_rq(struct reques
  
        if (!cmd->use_aio || cmd->ret < 0 || cmd->ret == blk_rq_bytes(rq) ||
            req_op(rq) != REQ_OP_READ) {
@@ -93,7 +93,7 @@ Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
        case REQ_OP_WRITE:
                if (lo->transfer)
                        return lo_write_transfer(lo, rq, pos);
-@@ -853,6 +855,21 @@ static void loop_config_discard(struct l
+@@ -852,6 +854,21 @@ static void loop_config_discard(struct l
        struct file *file = lo->lo_backing_file;
        struct inode *inode = file->f_mapping->host;
        struct request_queue *q = lo->lo_queue;
@@ -115,7 +115,7 @@ Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
  
        /*
         * We use punch hole to reclaim the free space used by the
-@@ -860,22 +877,24 @@ static void loop_config_discard(struct l
+@@ -859,22 +876,24 @@ static void loop_config_discard(struct l
         * encryption is enabled, because it may give an attacker
         * useful information.
         */
@@ -150,7 +150,7 @@ Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
  }
  
  static void loop_unprepare_queue(struct loop_device *lo)
-@@ -1893,7 +1912,10 @@ static void loop_handle_cmd(struct loop_
+@@ -1892,7 +1911,10 @@ static void loop_handle_cmd(struct loop_
   failed:
        /* complete non-aio request */
        if (!cmd->use_aio || ret) {
index aa842015fc2d12b963d0ccd07caa9787bb487d75..77c278a2bac0cd8a9c2bc40b8e87c18c96783ed6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/include/net/netfilter/nf_flow_table.h
 +++ b/include/net/netfilter/nf_flow_table.h
-@@ -163,6 +163,8 @@ struct nf_flow_table_hw {
+@@ -159,6 +159,8 @@ struct nf_flow_table_hw {
  int nf_flow_table_hw_register(const struct nf_flow_table_hw *offload);
  void nf_flow_table_hw_unregister(const struct nf_flow_table_hw *offload);
  
@@ -52,7 +52,7 @@
  /* For layer 4 checksum field offset. */
  #include <linux/tcp.h>
  #include <linux/udp.h>
-@@ -268,6 +269,7 @@ nf_flow_offload_ip_hook(void *priv, stru
+@@ -267,6 +268,7 @@ nf_flow_offload_ip_hook(void *priv, stru
        skb->dev = outdev;
        nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr);
        skb_dst_set_noref(skb, &rt->dst);
@@ -60,7 +60,7 @@
        neigh_xmit(NEIGH_ARP_TABLE, outdev, &nexthop, skb);
  
        return NF_STOLEN;
-@@ -488,6 +490,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
+@@ -486,6 +488,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
        skb->dev = outdev;
        nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6);
        skb_dst_set_noref(skb, &rt->dst);
diff --git a/target/linux/generic/hack-5.1/649-Revert-netfilter-nf_flow_table-make-nf_flow_table_it.patch b/target/linux/generic/hack-5.1/649-Revert-netfilter-nf_flow_table-make-nf_flow_table_it.patch
new file mode 100644 (file)
index 0000000..a0abe60
--- /dev/null
@@ -0,0 +1,49 @@
+From f116460ff4e55b4ea3c648486fb33bfa83408a39 Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev@kresin.me>
+Date: Sun, 7 Jul 2019 11:47:33 +0200
+Subject: [PATCH] Revert "netfilter: nf_flow_table: make
+ nf_flow_table_iterate() static"
+
+This reverts commit 49de9c090f3cc747cb7f2dc79c175d7bd1d3f1e7.
+---
+ include/net/netfilter/nf_flow_table.h | 4 ++++
+ net/netfilter/nf_flow_table_core.c    | 8 ++++----
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+--- a/include/net/netfilter/nf_flow_table.h
++++ b/include/net/netfilter/nf_flow_table.h
+@@ -118,6 +118,10 @@ void flow_offload_free(struct flow_offlo
+ int flow_offload_add(struct nf_flowtable *flow_table, struct flow_offload *flow);
+ struct flow_offload_tuple_rhash *flow_offload_lookup(struct nf_flowtable *flow_table,
+                                                    struct flow_offload_tuple *tuple);
++int nf_flow_table_iterate(struct nf_flowtable *flow_table,
++                        void (*iter)(struct flow_offload *flow, void *data),
++                        void *data);
++
+ void nf_flow_table_cleanup(struct net_device *dev);
+ int nf_flow_table_init(struct nf_flowtable *flow_table);
+--- a/net/netfilter/nf_flow_table_core.c
++++ b/net/netfilter/nf_flow_table_core.c
+@@ -307,10 +307,9 @@ flow_offload_lookup(struct nf_flowtable
+ }
+ EXPORT_SYMBOL_GPL(flow_offload_lookup);
+-static int
+-nf_flow_table_iterate(struct nf_flowtable *flow_table,
+-                    void (*iter)(struct flow_offload *flow, void *data),
+-                    void *data)
++int nf_flow_table_iterate(struct nf_flowtable *flow_table,
++                        void (*iter)(struct flow_offload *flow, void *data),
++                        void *data)
+ {
+       struct flow_offload_tuple_rhash *tuplehash;
+       struct rhashtable_iter hti;
+@@ -340,6 +339,7 @@ nf_flow_table_iterate(struct nf_flowtabl
+       return err;
+ }
++EXPORT_SYMBOL_GPL(nf_flow_table_iterate);
+ static inline bool nf_flow_has_expired(const struct flow_offload *flow)
+ {
index b207f9d084a7243d65d1fd185cc649b584fffc29..e72b4eba0111127bda907aac9e54a3e3a429e3df 100644 (file)
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        depends on !NF_CONNTRACK || NF_CONNTRACK
 --- a/net/ipv6/netfilter/Kconfig
 +++ b/net/ipv6/netfilter/Kconfig
-@@ -80,7 +80,6 @@ config NFT_FIB_IPV6
+@@ -52,7 +52,6 @@ config NFT_FIB_IPV6
          multicast or blackhole.
  
  endif # NF_TABLES_IPV6
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  config NF_FLOW_TABLE_IPV6
        tristate "Netfilter flow table IPv6 module"
-@@ -90,6 +89,8 @@ config NF_FLOW_TABLE_IPV6
+@@ -62,6 +61,8 @@ config NF_FLOW_TABLE_IPV6
  
          To compile it as a module, choose M here.
  
@@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        depends on !NF_CONNTRACK || NF_CONNTRACK
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
-@@ -693,8 +693,6 @@ config NFT_FIB_NETDEV
+@@ -697,8 +697,6 @@ config NFT_FIB_NETDEV
  
  endif # NF_TABLES_NETDEV
  
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  config NF_FLOW_TABLE_INET
        tristate "Netfilter flow table mixed IPv4/IPv6 module"
        depends on NF_FLOW_TABLE
-@@ -703,11 +701,12 @@ config NF_FLOW_TABLE_INET
+@@ -707,11 +705,12 @@ config NF_FLOW_TABLE_INET
  
          To compile it as a module, choose M here.
  
@@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        help
          This option adds the flow table core infrastructure.
  
-@@ -996,6 +995,15 @@ config NETFILTER_XT_TARGET_NOTRACK
+@@ -1000,6 +999,15 @@ config NETFILTER_XT_TARGET_NOTRACK
        depends on NETFILTER_ADVANCED
        select NETFILTER_XT_TARGET_CT
  
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        depends on NETFILTER_ADVANCED
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -144,6 +144,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
+@@ -142,6 +142,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
  obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
index 817c41801f12bc7768296e2172ab7b15caba23c8..7c7c01957d8173abd019d5b8e2586d5f5e32a40e 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
-@@ -481,12 +481,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
+@@ -564,12 +564,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
  extern struct Qdisc_ops pfifo_fast_ops;
  extern struct Qdisc_ops mq_qdisc_ops;
  extern struct Qdisc_ops noqueue_qdisc_ops;
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
          device, it has to decide which ones to send first, which ones to
 --- a/net/sched/sch_api.c
 +++ b/net/sched/sch_api.c
-@@ -2157,7 +2157,7 @@ static int __init pktsched_init(void)
+@@ -2238,7 +2238,7 @@ static int __init pktsched_init(void)
                return err;
        }
  
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  EXPORT_SYMBOL(default_qdisc_ops);
  
  /* Main transmission queue. */
-@@ -1004,7 +1004,7 @@ static void attach_one_default_qdisc(str
+@@ -1044,7 +1044,7 @@ static void attach_one_default_qdisc(str
                                     void *_unused)
  {
        struct Qdisc *qdisc;
index 0009940cd140c3097aab98fcab6bad86f9ae3555..9e308815afae9ba80657f9bd39c6141e2678e7ef 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/sched/sch_generic.c
 +++ b/net/sched/sch_generic.c
-@@ -595,207 +595,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
+@@ -607,207 +607,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
        .owner          =       THIS_MODULE,
  };
  
index ebfcfe81c722b5d68739b28abe3cea98b10b256b..b87869843bfe556d4724a92c8d624bb7e61e6b6c 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -209,6 +209,89 @@ config LED_TRIGGER_PHY
+@@ -224,6 +224,89 @@ config LED_TRIGGER_PHY
                for any speed known to the PHY.
  
  
index 6fbcd43d66bf398a4757eee9ff1d4a162bd4fc78..9c69ccb7a5532752dcb062841d4d06b2ce33591f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -548,6 +548,12 @@ struct phy_driver {
+@@ -526,6 +526,12 @@ struct phy_driver {
        /* Determines the negotiated speed and duplex */
        int (*read_status)(struct phy_device *phydev);
  
@@ -15,7 +15,7 @@
  
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1506,6 +1506,9 @@ int genphy_update_link(struct phy_device
+@@ -1707,6 +1707,9 @@ int genphy_update_link(struct phy_device
  {
        int status;
  
index 640ef3776975261c6d9f35ff238283945ee052dc..5354722147bc0ed8f3e152f0938c44c1c8ae2929 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1514,6 +1514,7 @@ enum netdev_priv_flags {
+@@ -1558,6 +1558,7 @@ enum netdev_priv_flags {
        IFF_FAILOVER_SLAVE              = 1<<28,
        IFF_L3MDEV_RX_HANDLER           = 1<<29,
        IFF_LIVE_RENAME_OK              = 1<<30,
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  };
  
  #define IFF_802_1Q_VLAN                       IFF_802_1Q_VLAN
-@@ -1546,6 +1547,7 @@ enum netdev_priv_flags {
+@@ -1590,6 +1591,7 @@ enum netdev_priv_flags {
  #define IFF_FAILOVER_SLAVE            IFF_FAILOVER_SLAVE
  #define IFF_L3MDEV_RX_HANDLER         IFF_L3MDEV_RX_HANDLER
  #define IFF_LIVE_RENAME_OK            IFF_LIVE_RENAME_OK
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  /**
   *    struct net_device - The DEVICE structure.
-@@ -1844,6 +1846,11 @@ struct net_device {
+@@ -1885,6 +1887,11 @@ struct net_device {
        const struct tlsdev_ops *tlsdev_ops;
  #endif
  
@@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        const struct header_ops *header_ops;
  
        unsigned int            flags;
-@@ -1919,6 +1926,10 @@ struct net_device {
+@@ -1960,6 +1967,10 @@ struct net_device {
        struct mpls_dev __rcu   *mpls_ptr;
  #endif
  
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -2529,6 +2529,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -2625,6 +2625,10 @@ static inline int pskb_trim(struct sk_bu
        return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /**
   *    pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *    @skb: buffer to alter
-@@ -2660,16 +2664,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -2756,16 +2760,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
@@ -101,8 +101,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        help
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3252,10 +3252,20 @@ static int xmit_one(struct sk_buff *skb,
-       if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
+@@ -3287,10 +3287,20 @@ static int xmit_one(struct sk_buff *skb,
+       if (dev_nit_active(dev))
                dev_queue_xmit_nit(skb, dev);
  
 -      len = skb->len;
@@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  #include <net/protocol.h>
  #include <net/dst.h>
-@@ -503,6 +504,22 @@ skb_fail:
+@@ -506,6 +507,22 @@ skb_fail:
  }
  EXPORT_SYMBOL(__napi_alloc_skb);
  
@@ -161,7 +161,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  {
 --- a/net/ethernet/eth.c
 +++ b/net/ethernet/eth.c
-@@ -172,6 +172,12 @@ __be16 eth_type_trans(struct sk_buff *sk
+@@ -173,6 +173,12 @@ __be16 eth_type_trans(struct sk_buff *sk
        const struct ethhdr *eth;
  
        skb->dev = dev;
index 3b4781657ee592eadce9bc9559a95833a12a20b5..89e0df460671a18f4a3bae3484120be9a4299933 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  #include <linux/bcm47xx_nvram.h>
  #include <linux/phy.h>
  #include <linux/phy_fixed.h>
-@@ -1409,6 +1410,17 @@ static const struct ethtool_ops bgmac_et
+@@ -1407,6 +1408,17 @@ static const struct ethtool_ops bgmac_et
        .set_link_ksettings     = phy_ethtool_set_link_ksettings,
  };
  
@@ -50,7 +50,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  /**************************************************
   * MII
   **************************************************/
-@@ -1540,6 +1552,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
+@@ -1538,6 +1550,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
        net_dev->hw_features = net_dev->features;
        net_dev->vlan_features = net_dev->features;
  
@@ -65,7 +65,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
        err = register_netdev(bgmac->net_dev);
        if (err) {
                dev_err(bgmac->dev, "Cannot register net device\n");
-@@ -1562,6 +1582,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
+@@ -1560,6 +1580,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
  
  void bgmac_enet_remove(struct bgmac *bgmac)
  {
index 9f7ead6b1182b35891a25e51098b20ee10b108e8..519c5a7dd2d5f5328e3fa61eb582219bd096bcec 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/Kconfig
 +++ b/net/Kconfig
-@@ -98,6 +98,9 @@ source "net/netlabel/Kconfig"
+@@ -101,6 +101,9 @@ source "net/netlabel/Kconfig"
  
  endif # if INET
  
@@ -33,8 +33,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  obj-y              += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
                        neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
 -                      sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
-+                      dev_ioctl.o tso.o sock_reuseport.o \
-                       fib_notifier.o xdp.o
++                      dev_ioctl.o tso.o sock_reuseport.o \
+                       fib_notifier.o xdp.o flow_offload.o
  
 +obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
  obj-y += net-sysfs.o
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  obj-$(CONFIG_PROC_FS) += net-procfs.o
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -490,6 +490,18 @@ discard_and_relse:
+@@ -544,6 +544,18 @@ discard_and_relse:
  }
  EXPORT_SYMBOL(__sk_receive_skb);
  
@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
  {
        struct dst_entry *dst = __sk_dst_get(sk);
-@@ -1598,9 +1610,11 @@ static void __sk_free(struct sock *sk)
+@@ -1736,9 +1748,11 @@ static void __sk_free(struct sock *sk)
        if (likely(sk->sk_net_refcnt))
                sock_inuse_add(sock_net(sk), -1);
  
@@ -126,7 +126,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
          Support for PF_PACKET sockets monitoring interface used by the ss tool.
 --- a/net/unix/Kconfig
 +++ b/net/unix/Kconfig
-@@ -22,6 +22,7 @@ config UNIX
+@@ -27,6 +27,7 @@ config UNIX_SCM
  config UNIX_DIAG
        tristate "UNIX: socket monitoring interface"
        depends on UNIX
index 77de3c67e9ad7ad4fef1cbf8d92940e813f6c625..97fe549fe972721b86ae7826fb840e29e422a6c8 100644 (file)
@@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/fs/locks.c
 +++ b/fs/locks.c
-@@ -2786,6 +2786,8 @@ static const struct seq_operations locks
+@@ -2881,6 +2881,8 @@ static const struct seq_operations locks
  
  static int __init proc_locks_init(void)
  {
@@ -132,7 +132,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        do {                                                            \
 --- a/ipc/msg.c
 +++ b/ipc/msg.c
-@@ -1291,6 +1291,9 @@ void __init msg_init(void)
+@@ -1316,6 +1316,9 @@ void __init msg_init(void)
  {
        msg_init_ns(&init_ipc_ns);
  
@@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!root_irq_dir)
 --- a/kernel/time/timer_list.c
 +++ b/kernel/time/timer_list.c
-@@ -374,6 +374,8 @@ static int __init init_timer_list_procfs
+@@ -369,6 +369,8 @@ static int __init init_timer_list_procfs
  {
        struct proc_dir_entry *pe;
  
@@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!pe)
 --- a/mm/vmalloc.c
 +++ b/mm/vmalloc.c
-@@ -2740,6 +2740,8 @@ static const struct seq_operations vmall
+@@ -2770,6 +2770,8 @@ static const struct seq_operations vmall
  
  static int __init proc_vmalloc_init(void)
  {
@@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                                &vmalloc_op,
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1971,10 +1971,12 @@ void __init init_mm_internals(void)
+@@ -1968,10 +1968,12 @@ void __init init_mm_internals(void)
        start_shepherd_timer();
  #endif
  #ifdef CONFIG_PROC_FS
@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -3480,6 +3480,8 @@ static __net_initdata struct pernet_oper
+@@ -3557,6 +3557,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
@@ -338,7 +338,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/ipv4/fib_trie.c
 +++ b/net/ipv4/fib_trie.c
-@@ -2717,11 +2717,13 @@ static const struct seq_operations fib_r
+@@ -2732,11 +2732,13 @@ static const struct seq_operations fib_r
  
  int __net_init fib_proc_init(struct net *net)
  {
@@ -354,7 +354,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                        fib_triestat_seq_show, NULL))
                goto out2;
  
-@@ -2732,17 +2734,21 @@ int __net_init fib_proc_init(struct net
+@@ -2747,17 +2749,21 @@ int __net_init fib_proc_init(struct net
        return 0;
  
  out3:
@@ -382,7 +382,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/ipv4/proc.c
 +++ b/net/ipv4/proc.c
-@@ -524,5 +524,8 @@ static __net_initdata struct pernet_oper
+@@ -525,5 +525,8 @@ static __net_initdata struct pernet_oper
  
  int __init ip_misc_proc_init(void)
  {
index a4b6e36d07e679d4d2be8c9c05499355a416637c..4ed5c2ef23575e29d8536fc42feaddaddc47d489 100644 (file)
@@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        select IRQ_WORK
 --- a/drivers/dma-buf/Makefile
 +++ b/drivers/dma-buf/Makefile
-@@ -1,3 +1,7 @@
+@@ -1,4 +1,8 @@
 -obj-y := dma-buf.o dma-fence.o dma-fence-array.o reservation.o seqno-fence.o
 -obj-$(CONFIG_SYNC_FILE)               += sync_file.o
 -obj-$(CONFIG_SW_SYNC)         += sw_sync.o sync_debug.o
@@ -35,6 +35,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +dma-buf-objs-$(CONFIG_SW_SYNC)                += sw_sync.o sync_debug.o
 +
 +dma-shared-buffer-objs :=  $(dma-buf-objs-y)
+ obj-$(CONFIG_UDMABUF)         += udmabuf.o
 --- a/drivers/dma-buf/dma-buf.c
 +++ b/drivers/dma-buf/dma-buf.c
 @@ -34,6 +34,7 @@
@@ -45,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  #include <uapi/linux/dma-buf.h>
  
-@@ -1158,4 +1159,5 @@ static void __exit dma_buf_deinit(void)
+@@ -1147,4 +1148,5 @@ static void __exit dma_buf_deinit(void)
  {
        dma_buf_uninit_debugfs();
  }
@@ -54,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +MODULE_LICENSE("GPL");
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -2129,6 +2129,7 @@ int wake_up_state(struct task_struct *p,
+@@ -2177,6 +2177,7 @@ int wake_up_state(struct task_struct *p,
  {
        return try_to_wake_up(p, state, 0);
  }
index 06b94117c111b927c4a9c9992b0e59087096d2c7..b11b6c9913f26561c675a7e0540ec439e448af71 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif /* _KOBJECT_H_ */
 --- a/lib/kobject_uevent.c
 +++ b/lib/kobject_uevent.c
-@@ -688,6 +688,43 @@ int add_uevent_var(struct kobj_uevent_en
+@@ -690,6 +690,43 @@ int add_uevent_var(struct kobj_uevent_en
  EXPORT_SYMBOL_GPL(add_uevent_var);
  
  #if defined(CONFIG_NET)
diff --git a/target/linux/generic/hack-5.1/930-crashlog.patch b/target/linux/generic/hack-5.1/930-crashlog.patch
deleted file mode 100644 (file)
index 0088b7a..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-From 6b1ab74a9917012d0c559edc4ed299d9228ac89f Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd@nbd.name>
-Date: Sat, 8 Jul 2017 08:26:47 +0200
-Subject: kernel: add the new 'crashlog' feature
-
-this tries to store kernel oops/panic logs in a fixed location in RAM to
-recover them available to user space using debugfs
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- include/linux/crashlog.h |  17 ++++
- init/Kconfig             |   4 +
- kernel/Makefile          |   1 +
- kernel/crashlog.c        | 213 +++++++++++++++++++++++++++++++++++++++++++++++
- kernel/module.c          |   3 +
- mm/bootmem.c             |   2 +
- mm/memblock.c            |   5 ++
- 7 files changed, 245 insertions(+)
- create mode 100644 include/linux/crashlog.h
- create mode 100644 kernel/crashlog.c
-
---- /dev/null
-+++ b/include/linux/crashlog.h
-@@ -0,0 +1,17 @@
-+#ifndef __CRASHLOG_H
-+#define __CRASHLOG_H
-+
-+#ifdef CONFIG_CRASHLOG
-+void crashlog_init_bootmem(struct bootmem_data *bdata);
-+void crashlog_init_memblock(phys_addr_t addr, phys_addr_t size);
-+#else
-+static inline void crashlog_init_bootmem(struct bootmem_data *bdata)
-+{
-+}
-+
-+static inline void crashlog_init_memblock(phys_addr_t addr, phys_addr_t size)
-+{
-+}
-+#endif
-+
-+#endif
---- a/init/Kconfig
-+++ b/init/Kconfig
-@@ -1049,6 +1049,10 @@ config RELAY
-         If unsure, say N.
-+config CRASHLOG
-+      bool "Crash logging"
-+      depends on (!NO_BOOTMEM || HAVE_MEMBLOCK)
-+
- config BLK_DEV_INITRD
-       bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
-       help
---- a/kernel/Makefile
-+++ b/kernel/Makefile
-@@ -117,6 +117,7 @@ obj-$(CONFIG_TORTURE_TEST) += torture.o
- obj-$(CONFIG_HAS_IOMEM) += iomem.o
- obj-$(CONFIG_ZONE_DEVICE) += memremap.o
- obj-$(CONFIG_RSEQ) += rseq.o
-+obj-$(CONFIG_CRASHLOG) += crashlog.o
- $(obj)/configs.o: $(obj)/config_data.h
---- /dev/null
-+++ b/kernel/crashlog.c
-@@ -0,0 +1,213 @@
-+/*
-+ * Crash information logger
-+ * Copyright (C) 2010 Felix Fietkau <nbd@nbd.name>
-+ *
-+ * Based on ramoops.c
-+ *   Copyright (C) 2010 Marco Stornelli <marco.stornelli@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-+ * 02110-1301 USA
-+ *
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/bootmem.h>
-+#include <linux/memblock.h>
-+#include <linux/debugfs.h>
-+#include <linux/crashlog.h>
-+#include <linux/kmsg_dump.h>
-+#include <linux/module.h>
-+#include <linux/pfn.h>
-+#include <linux/vmalloc.h>
-+#include <asm/io.h>
-+
-+#define CRASHLOG_PAGES        4
-+#define CRASHLOG_SIZE (CRASHLOG_PAGES * PAGE_SIZE)
-+#define CRASHLOG_MAGIC        0xa1eedead
-+
-+/*
-+ * Start the log at 1M before the end of RAM, as some boot loaders like
-+ * to use the end of the RAM for stack usage and other things
-+ * If this fails, fall back to using the last part.
-+ */
-+#define CRASHLOG_OFFSET       (1024 * 1024)
-+
-+struct crashlog_data {
-+      u32 magic;
-+      u32 len;
-+      u8 data[];
-+};
-+
-+static struct debugfs_blob_wrapper crashlog_blob;
-+static unsigned long crashlog_addr = 0;
-+static struct crashlog_data *crashlog_buf;
-+static struct kmsg_dumper dump;
-+static bool first = true;
-+
-+extern struct list_head *crashlog_modules;
-+
-+static bool crashlog_set_addr(phys_addr_t addr, phys_addr_t size)
-+{
-+      /* Limit to lower 64 MB to avoid highmem */
-+      phys_addr_t limit = 64 * 1024 * 1024;
-+
-+      if (crashlog_addr)
-+              return false;
-+
-+      if (addr > limit)
-+              return false;
-+
-+      if (addr + size > limit)
-+              size = limit - addr;
-+
-+      crashlog_addr = addr;
-+
-+      if (addr + size > CRASHLOG_OFFSET)
-+              crashlog_addr += size - CRASHLOG_OFFSET;
-+
-+      return true;
-+}
-+
-+#ifndef CONFIG_NO_BOOTMEM
-+void __init crashlog_init_bootmem(bootmem_data_t *bdata)
-+{
-+      phys_addr_t start, end;
-+
-+      start = PFN_PHYS(bdata->node_low_pfn);
-+      end = PFN_PHYS(bdata->node_min_pfn);
-+      if (!crashlog_set_addr(start, end - start))
-+              return;
-+
-+      if (reserve_bootmem(crashlog_addr, CRASHLOG_SIZE, BOOTMEM_EXCLUSIVE) < 0) {
-+              printk("Crashlog failed to allocate RAM at address 0x%lx\n",
-+                     crashlog_addr);
-+              crashlog_addr = 0;
-+      }
-+}
-+#endif
-+
-+#ifdef CONFIG_HAVE_MEMBLOCK
-+void __init_memblock crashlog_init_memblock(phys_addr_t addr, phys_addr_t size)
-+{
-+      if (!crashlog_set_addr(addr, size))
-+              return;
-+
-+      if (memblock_reserve(crashlog_addr, CRASHLOG_SIZE)) {
-+              printk("Crashlog failed to allocate RAM at address 0x%lx\n",
-+                     crashlog_addr);
-+              crashlog_addr = 0;
-+      }
-+}
-+#endif
-+
-+static void __init crashlog_copy(void)
-+{
-+      if (crashlog_buf->magic != CRASHLOG_MAGIC)
-+              return;
-+
-+      if (!crashlog_buf->len || crashlog_buf->len >
-+          CRASHLOG_SIZE - sizeof(*crashlog_buf))
-+              return;
-+
-+      crashlog_blob.size = crashlog_buf->len;
-+      crashlog_blob.data = kmemdup(crashlog_buf->data,
-+              crashlog_buf->len, GFP_KERNEL);
-+
-+      debugfs_create_blob("crashlog", 0700, NULL, &crashlog_blob);
-+}
-+
-+static int get_maxlen(void)
-+{
-+      return CRASHLOG_SIZE - sizeof(*crashlog_buf) - crashlog_buf->len;
-+}
-+
-+static void crashlog_printf(const char *fmt, ...)
-+{
-+      va_list args;
-+      int len = get_maxlen();
-+
-+      if (!len)
-+              return;
-+
-+      va_start(args, fmt);
-+      crashlog_buf->len += vscnprintf(
-+              &crashlog_buf->data[crashlog_buf->len],
-+              len, fmt, args);
-+      va_end(args);
-+}
-+
-+static void crashlog_do_dump(struct kmsg_dumper *dumper,
-+              enum kmsg_dump_reason reason)
-+{
-+      struct timeval tv;
-+      struct module *m;
-+      char *buf;
-+      size_t len;
-+
-+      if (!first)
-+              crashlog_printf("\n===================================\n");
-+
-+      do_gettimeofday(&tv);
-+      crashlog_printf("Time: %lu.%lu\n",
-+              (long)tv.tv_sec, (long)tv.tv_usec);
-+
-+      if (first) {
-+              crashlog_printf("Modules:");
-+              list_for_each_entry(m, crashlog_modules, list) {
-+                      crashlog_printf("\t%s@%p+%x", m->name,
-+                      m->core_layout.base, m->core_layout.size,
-+                      m->init_layout.base, m->init_layout.size);
-+              }
-+              crashlog_printf("\n");
-+              first = false;
-+      }
-+
-+      buf = (char *)&crashlog_buf->data[crashlog_buf->len];
-+
-+      kmsg_dump_get_buffer(dumper, true, buf, get_maxlen(), &len);
-+
-+      crashlog_buf->len += len;
-+}
-+
-+
-+int __init crashlog_init_fs(void)
-+{
-+      struct page *pages[CRASHLOG_PAGES];
-+      pgprot_t prot;
-+      int i;
-+
-+      if (!crashlog_addr) {
-+              printk("No memory allocated for crashlog\n");
-+              return -ENOMEM;
-+      }
-+
-+      printk("Crashlog allocated RAM at address 0x%lx\n", (unsigned long) crashlog_addr);
-+      for (i = 0; i < CRASHLOG_PAGES; i++)
-+              pages[i] = pfn_to_page((crashlog_addr >> PAGE_SHIFT) + i);
-+
-+      prot = pgprot_writecombine(PAGE_KERNEL);
-+      crashlog_buf = vmap(pages, CRASHLOG_PAGES, VM_MAP, prot);
-+
-+      crashlog_copy();
-+
-+      crashlog_buf->magic = CRASHLOG_MAGIC;
-+      crashlog_buf->len = 0;
-+
-+      dump.max_reason = KMSG_DUMP_OOPS;
-+      dump.dump = crashlog_do_dump;
-+      kmsg_dump_register(&dump);
-+
-+      return 0;
-+}
-+module_init(crashlog_init_fs);
---- a/kernel/module.c
-+++ b/kernel/module.c
-@@ -256,6 +256,9 @@ static void mod_update_bounds(struct mod
- #ifdef CONFIG_KGDB_KDB
- struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
- #endif /* CONFIG_KGDB_KDB */
-+#ifdef CONFIG_CRASHLOG
-+struct list_head *crashlog_modules = &modules;
-+#endif
- static void module_assert_mutex(void)
- {
---- a/mm/bootmem.c
-+++ b/mm/bootmem.c
-@@ -15,6 +15,7 @@
- #include <linux/export.h>
- #include <linux/kmemleak.h>
- #include <linux/range.h>
-+#include <linux/crashlog.h>
- #include <linux/bug.h>
- #include <linux/io.h>
- #include <linux/bootmem.h>
-@@ -215,6 +216,7 @@ static unsigned long __init free_all_boo
-       if (!bdata->node_bootmem_map)
-               return 0;
-+      crashlog_init_bootmem(bdata);
-       map = bdata->node_bootmem_map;
-       start = bdata->node_min_pfn;
-       end = bdata->node_low_pfn;
---- a/mm/memblock.c
-+++ b/mm/memblock.c
-@@ -21,6 +21,7 @@
- #include <linux/seq_file.h>
- #include <linux/memblock.h>
- #include <linux/bootmem.h>
-+#include <linux/crashlog.h>
- #include <asm/sections.h>
- #include <linux/io.h>
-@@ -547,6 +548,8 @@ static void __init_memblock memblock_ins
-       memblock_set_region_node(rgn, nid);
-       type->cnt++;
-       type->total_size += size;
-+      if (type == &memblock.memory)
-+              crashlog_init_memblock(base, size);
- }
- /**
-@@ -586,6 +589,8 @@ int __init_memblock memblock_add_range(s
-               type->regions[0].flags = flags;
-               memblock_set_region_node(&type->regions[0], nid);
-               type->total_size = size;
-+              if (type == &memblock.memory)
-+                      crashlog_init_memblock(base, size);
-               return 0;
-       }
- repeat:
index 1079d94fe300f0b6c251866fb24d6129f0280ad9..ee73c301137f43f6b7c717411c634155b6e64232 100644 (file)
@@ -63,7 +63,7 @@ Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
 +              kfree(hook);
 +      }
 +
-+      nf_flow_table_cleanup(dev_net(dev), dev);
++      nf_flow_table_cleanup(dev);
 +
 +      return NOTIFY_DONE;
 +}
diff --git a/target/linux/generic/pending-5.1/103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch b/target/linux/generic/pending-5.1/103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch
deleted file mode 100644 (file)
index 6b74c7d..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-From 852a88f35f4b7e5ebb717fed3c3a3330d5ad4336 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
-Date: Wed, 10 Apr 2019 16:43:27 +0200
-Subject: [PATCH v2] MIPS: perf: ath79: Fix perfcount IRQ assignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Currently it's not possible to use perf on ath79 due to genirq flags
-mismatch happening on static virtual IRQ 13 which is used for
-performance counters hardware IRQ 5.
-
-On TP-Link Archer C7v5:
-
-           CPU0
-  2:          0      MIPS   2  ath9k
-  4:        318      MIPS   4  19000000.eth
-  7:      55034      MIPS   7  timer
-  8:       1236      MISC   3  ttyS0
- 12:          0      INTC   1  ehci_hcd:usb1
- 13:          0  gpio-ath79   2  keys
- 14:          0  gpio-ath79   5  keys
- 15:         31  AR724X PCI    1  ath10k_pci
-
- $ perf top
- genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)
-
-On TP-Link Archer C7v4:
-
-         CPU0
-  4:          0      MIPS   4  19000000.eth
-  5:       7135      MIPS   5  1a000000.eth
-  7:      98379      MIPS   7  timer
-  8:         30      MISC   3  ttyS0
- 12:      90028      INTC   0  ath9k
- 13:       5520      INTC   1  ehci_hcd:usb1
- 14:       4623      INTC   2  ehci_hcd:usb2
- 15:      32844  AR724X PCI    1  ath10k_pci
- 16:          0  gpio-ath79  16  keys
- 23:          0  gpio-ath79  23  keys
-
- $ perf top
- genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)
-
-This problem is happening, because currently statically assigned virtual
-IRQ 13 for performance counters is not claimed during the initialization
-of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
-this interrupt isn't available for further use.
-
-So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.
-
-Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
-Signed-off-by: Petr Å tetiar <ynezz@true.cz>
----
-
-Changes since v1:
-
- I've incorporated two comments which I've received on IRC from blogic and
- I've also reworded the commit message to match the changes in v2 of this
- patch.
-
-  * use actual hardware perfcount IRQ 5 instead of the virtual IRQ 13
-  * dropped the CONFIG_PERF_EVENTS ifdef around irq_create_mapping
-
- arch/mips/ath79/setup.c          |  6 ------
- drivers/irqchip/irq-ath79-misc.c | 11 +++++++++++
- 2 files changed, 11 insertions(+), 6 deletions(-)
-
---- a/arch/mips/ath79/setup.c
-+++ b/arch/mips/ath79/setup.c
-@@ -211,12 +211,6 @@ const char *get_system_type(void)
-       return ath79_sys_type;
- }
--int get_c0_perfcount_int(void)
--{
--      return ATH79_MISC_IRQ(5);
--}
--EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
--
- unsigned int get_c0_compare_int(void)
- {
-       return CP0_LEGACY_COMPARE_IRQ;
---- a/drivers/irqchip/irq-ath79-misc.c
-+++ b/drivers/irqchip/irq-ath79-misc.c
-@@ -22,6 +22,15 @@
- #define AR71XX_RESET_REG_MISC_INT_ENABLE      4
- #define ATH79_MISC_IRQ_COUNT                  32
-+#define ATH79_MISC_PERF_IRQ                   5
-+
-+static int ath79_perfcount_irq;
-+
-+int get_c0_perfcount_int(void)
-+{
-+      return ath79_perfcount_irq;
-+}
-+EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
- static void ath79_misc_irq_handler(struct irq_desc *desc)
- {
-@@ -113,6 +122,8 @@ static void __init ath79_misc_intc_domai
- {
-       void __iomem *base = domain->host_data;
-+      ath79_perfcount_irq = irq_create_mapping(domain, ATH79_MISC_PERF_IRQ);
-+
-       /* Disable and clear all interrupts */
-       __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
-       __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
index 429cd3c334cfbe6a803ed8a8736f060969875be2..c168b66a37a505cc840a456bebc2b39952350272 100644 (file)
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -6395,7 +6395,7 @@ static void __ref alloc_node_mem_map(str
+@@ -6710,7 +6710,7 @@ static void __ref alloc_node_mem_map(str
                mem_map = NODE_DATA(0)->node_mem_map;
  #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
                if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
index b00fb8ee2e2830cc9c6f0e8595cdc767f846e12f..14875696408a0882bebc4a842a3e862c1821c29c 100644 (file)
@@ -8,11 +8,11 @@ Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
 
 --- a/drivers/spi/spidev.c
 +++ b/drivers/spi/spidev.c
-@@ -669,6 +669,7 @@ static const struct of_device_id spidev_
+@@ -668,6 +668,7 @@ static const struct of_device_id spidev_
+       { .compatible = "rohm,dh2228fv" },
        { .compatible = "lineartechnology,ltc2488" },
        { .compatible = "ge,achc" },
-       { .compatible = "semtech,sx1301" },
 +      { .compatible = "siliconlabs,si3210" },
+       { .compatible = "semtech,sx1301" },
+       { .compatible = "lwn,bk4" },
        {},
- };
- MODULE_DEVICE_TABLE(of, spidev_dt_ids);
diff --git a/target/linux/generic/pending-5.1/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch b/target/linux/generic/pending-5.1/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch
deleted file mode 100644 (file)
index bd5ed6f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Subject: spi: use gpio_set_value_cansleep for setting chipselect GPIO
-
-Sleeping is safe inside spi_transfer_one_message, and some GPIO chips
-need to sleep for setting values
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -733,7 +733,7 @@ static void spi_set_cs(struct spi_device
-               enable = !enable;
-       if (gpio_is_valid(spi->cs_gpio)) {
--              gpio_set_value(spi->cs_gpio, !enable);
-+              gpio_set_value_cansleep(spi->cs_gpio, !enable);
-               /* Some SPI masters need both GPIO CS & slave_select */
-               if ((spi->controller->flags & SPI_MASTER_GPIO_SS) &&
-                   spi->controller->set_cs)
index 2afdeef41ae31517b50a01a4e2eb54dfc2bd4e7a..62660632e7ca132504ccc97b4cf4f343e84ac565 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -195,6 +195,9 @@ static void __br_handle_local_finish(str
+@@ -197,6 +197,9 @@ static void __br_handle_local_finish(str
  /* note: already called with rcu_read_lock */
  static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
  {
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        __br_handle_local_finish(skb);
  
        /* return 1 to signal the okfn() was called so it's ok to use the skb */
-@@ -291,6 +294,17 @@ rx_handler_result_t br_handle_frame(stru
+@@ -293,6 +296,17 @@ rx_handler_result_t br_handle_frame(stru
  
  forward:
        switch (p->state) {
index e496301e4e30b8d8b8c4d7cbefb4cac7d2df6cdd..5419ccd4cba6c6db4adde8be8670fb42069c1a5c 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/net/phy/at803x.c
 +++ b/drivers/net/phy/at803x.c
-@@ -62,8 +62,10 @@
+@@ -55,8 +55,10 @@
  
  #define ATH8030_PHY_ID 0x004dd076
  #define ATH8031_PHY_ID 0x004dd074
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  MODULE_DESCRIPTION("Atheros 803x PHY driver");
  MODULE_AUTHOR("Matus Ujhelyi");
-@@ -308,7 +310,7 @@ static void at803x_link_change_notify(st
+@@ -327,7 +329,7 @@ static void at803x_link_change_notify(st
        struct at803x_priv *priv = phydev->priv;
  
        /*
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
         * signalled. This is necessary to circumvent a hardware bug that
         * occurs when the cable is unplugged while TX packets are pending
         * in the FIFO. In such cases, the FIFO enters an error mode it
-@@ -414,6 +416,24 @@ static struct phy_driver at803x_driver[]
+@@ -430,6 +432,23 @@ static struct phy_driver at803x_driver[]
        .aneg_done              = at803x_aneg_done,
        .ack_interrupt          = &at803x_ack_interrupt,
        .config_intr            = &at803x_config_intr,
@@ -45,7 +45,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      .suspend                = at803x_suspend,
 +      .resume                 = at803x_resume,
 +      .features               = PHY_BASIC_FEATURES,
-+      .flags                  = PHY_HAS_INTERRUPT,
 +      .config_aneg            = genphy_config_aneg,
 +      .read_status            = genphy_read_status,
 +      .ack_interrupt          = at803x_ack_interrupt,
@@ -53,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  } };
  
  module_phy_driver(at803x_driver);
-@@ -421,6 +441,7 @@ module_phy_driver(at803x_driver);
+@@ -437,6 +456,7 @@ module_phy_driver(at803x_driver);
  static struct mdio_device_id __maybe_unused atheros_tbl[] = {
        { ATH8030_PHY_ID, AT803X_PHY_ID_MASK },
        { ATH8031_PHY_ID, AT803X_PHY_ID_MASK },
index d8ad40be615cac961ccfea15e48ecb5d6a1bc70a..7a13efc8a5fb3b270547780e58387d1d80694657 100644 (file)
@@ -14,19 +14,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -655,12 +655,12 @@ KBUILD_CFLAGS    += $(call cc-disable-warni
+@@ -681,9 +681,9 @@ KBUILD_CFLAGS      += $(call cc-disable-warni
  KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
--KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
- else
- ifdef CONFIG_PROFILE_ALL_BRANCHES
--KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
+-KBUILD_CFLAGS += -Os
++KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION)
  else
 -KBUILD_CFLAGS   += -O2
-+KBUILD_CFLAGS   += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION)
- endif
++KBUILD_CFLAGS   += -O2 $(EXTRA_OPTIMIZATION)
  endif
  
+ ifdef CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED
index 79e991022aaac4a058d15b0d89120a51eb6b370c..996678dee5429f130bddd64785544f7e2ea39bda 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1149,6 +1149,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1197,6 +1197,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
          the unaligned access emulation.
          see arch/parisc/kernel/unaligned.c for reference
  
@@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
         * and return the first char from this token.
 --- a/scripts/kallsyms.c
 +++ b/scripts/kallsyms.c
-@@ -61,6 +61,7 @@ static struct addr_range percpu_range =
+@@ -59,6 +59,7 @@ static struct addr_range percpu_range =
  static struct sym_entry *table;
  static unsigned int table_size, table_cnt;
  static int all_symbols = 0;
@@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static int absolute_percpu = 0;
  static int base_relative = 0;
  
-@@ -439,6 +440,9 @@ static void write_src(void)
+@@ -437,6 +438,9 @@ static void write_src(void)
  
        free(markers);
  
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        output_label("kallsyms_token_table");
        off = 0;
        for (i = 0; i < 256; i++) {
-@@ -497,6 +501,9 @@ static void *find_token(unsigned char *s
+@@ -495,6 +499,9 @@ static void *find_token(unsigned char *s
  {
        int i;
  
@@ -85,7 +85,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];
-@@ -569,6 +576,9 @@ static void optimize_result(void)
+@@ -567,6 +574,9 @@ static void optimize_result(void)
  {
        int i, best;
  
@@ -95,7 +95,7 @@ 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--) {
-@@ -751,6 +761,8 @@ int main(int argc, char **argv)
+@@ -746,6 +756,8 @@ int main(int argc, char **argv)
                                absolute_percpu = 1;
                        else if (strcmp(argv[i], "--base-relative") == 0)
                                base_relative = 1;
@@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                }
 --- a/scripts/link-vmlinux.sh
 +++ b/scripts/link-vmlinux.sh
-@@ -133,6 +133,10 @@ kallsyms()
+@@ -110,6 +110,10 @@ kallsyms()
                kallsymopt="${kallsymopt} --base-relative"
        fi
  
index 5671173d453d3d9852f679a0e200e8bffef6a06a..a71207057bcf65f9f659bbe95cdde3f4ca7940a2 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/lib/vsprintf.c
 +++ b/lib/vsprintf.c
-@@ -681,8 +681,10 @@ char *symbol_string(char *buf, char *end
+@@ -786,8 +786,10 @@ char *symbol_string(char *buf, char *end
                    struct printf_spec spec, const char *fmt)
  {
        unsigned long value;
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif
  
        if (fmt[1] == 'R')
-@@ -696,11 +698,16 @@ char *symbol_string(char *buf, char *end
+@@ -801,11 +803,16 @@ char *symbol_string(char *buf, char *end
                sprint_symbol(sym, value);
        else
                sprint_symbol_no_offset(sym, value);
index c493742eeeaa808711f49a6da3df3b0d86d17af4..d91302c07346c745e1ee504042aa2096459f6c88 100644 (file)
@@ -11,7 +11,7 @@
        early_print("no ATAGS support: can't continue\n");
 --- a/arch/arm64/include/asm/cpufeature.h
 +++ b/arch/arm64/include/asm/cpufeature.h
-@@ -365,7 +365,7 @@ static inline bool cpu_have_feature(unsi
+@@ -406,7 +406,7 @@ static inline bool cpu_have_feature(unsi
  }
  
  /* System capability check for constant caps */
@@ -20,7 +20,7 @@
  {
        if (num >= ARM64_NCAPS)
                return false;
-@@ -379,7 +379,7 @@ static inline bool cpus_have_cap(unsigne
+@@ -420,7 +420,7 @@ static inline bool cpus_have_cap(unsigne
        return test_bit(num, cpu_hwcaps);
  }
  
@@ -31,7 +31,7 @@
                return __cpus_have_const_cap(num);
 --- a/arch/mips/include/asm/bitops.h
 +++ b/arch/mips/include/asm/bitops.h
-@@ -463,7 +463,7 @@ static inline void __clear_bit_unlock(un
+@@ -482,7 +482,7 @@ static inline void __clear_bit_unlock(un
   * Return the bit position (0..63) of the most significant 1 bit in a word
   * Returns -1 if no 1 bit exists
   */
@@ -40,7 +40,7 @@
  {
        int num;
  
-@@ -529,7 +529,7 @@ static inline unsigned long __fls(unsign
+@@ -548,7 +548,7 @@ static inline unsigned long __fls(unsign
   * Returns 0..SZLONG-1
   * Undefined if no bit exists, so code should check against 0 first.
   */
@@ -52,7 +52,7 @@
 --- a/arch/mips/kernel/cpu-bugs64.c
 +++ b/arch/mips/kernel/cpu-bugs64.c
 @@ -42,8 +42,8 @@ static inline void align_mod(const int a
-               : GCC_IMM_ASM() (align), GCC_IMM_ASM() (mod));
+               : "n"(align), "n"(mod));
  }
  
 -static inline void mult_sh_align_mod(long *v1, long *v2, long *w,
@@ -64,7 +64,7 @@
        int m1, m2;
 --- a/arch/powerpc/kernel/prom_init.c
 +++ b/arch/powerpc/kernel/prom_init.c
-@@ -498,14 +498,14 @@ static int __init prom_next_node(phandle
+@@ -501,14 +501,14 @@ static int __init prom_next_node(phandle
        }
  }
  
  {
        int set;
  
-@@ -918,7 +918,7 @@ void radix__tlb_flush(struct mmu_gather
+@@ -928,7 +928,7 @@ void radix__tlb_flush(struct mmu_gather
        tlb->need_flush_all = 0;
  }
  
                __cpacf_query(opcode, mask);
 --- a/arch/x86/Kconfig.debug
 +++ b/arch/x86/Kconfig.debug
-@@ -276,20 +276,6 @@ config CPA_DEBUG
+@@ -266,20 +266,6 @@ config CPA_DEBUG
        ---help---
          Do change_page_attr() self-tests every 30 seconds.
  
        depends on DEBUG_KERNEL
 --- a/drivers/mtd/nand/raw/vf610_nfc.c
 +++ b/drivers/mtd/nand/raw/vf610_nfc.c
-@@ -373,7 +373,7 @@ static int vf610_nfc_cmd(struct nand_chi
+@@ -364,7 +364,7 @@ static int vf610_nfc_cmd(struct nand_chi
  {
        const struct nand_op_instr *instr;
        struct vf610_nfc *nfc = chip_to_nfc(chip);
  
 --- a/lib/Kconfig.debug
 +++ b/lib/Kconfig.debug
-@@ -309,6 +309,20 @@ config HEADERS_CHECK
+@@ -310,6 +310,20 @@ config HEADERS_CHECK
          exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
          your build tree), to make sure they're suitable.
  
        help
 --- a/arch/x86/Kconfig
 +++ b/arch/x86/Kconfig
-@@ -306,9 +306,6 @@ config ZONE_DMA32
+@@ -310,9 +310,6 @@ config ZONE_DMA32
  config AUDIT_ARCH
        def_bool y if X86_64
  
  
 --- a/include/linux/compiler_types.h
 +++ b/include/linux/compiler_types.h
-@@ -268,8 +268,7 @@ struct ftrace_likely_data {
-  * of extern inline functions at link time.
-  * A lot of inline functions can cause havoc with function tracing.
+@@ -140,8 +140,7 @@ struct ftrace_likely_data {
+  * Do not use __always_inline here, since currently it expands to inline again
+  * (which would break users of __always_inline).
   */
 -#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
 -      !defined(CONFIG_OPTIMIZE_INLINING)
 +#if !defined(CONFIG_OPTIMIZE_INLINING)
- #define inline \
-       inline __attribute__((always_inline, unused)) notrace __gnu_inline
+ #define inline inline __attribute__((__always_inline__)) __gnu_inline \
+       __maybe_unused notrace
  #else
index f440305c9bfdcbd5efef05ea91514b5dfd0b6cf9..319804efe434a263b0c7adde06f61bbed3444b1f 100644 (file)
@@ -36,10 +36,10 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 -$(deps_initramfs): klibcdirs
 +$(deps_initramfs_sane): klibcdirs
  # We rebuild initramfs_data.cpio if:
- # 1) Any included file is newer then initramfs_data.cpio
+ # 1) Any included file is newer than initramfs_data.cpio
  # 2) There are changes in which files are included (added or deleted)
  # 3) If gen_init_cpio are newer than initramfs_data.cpio
- # 4) arguments to gen_initramfs.sh changes
+ # 4) Arguments to gen_initramfs.sh changes
 -$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
 +$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs_sane) klibcdirs
        $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y)
index 5d10cae86cef4042b1bda766626a31f1eb0288c6..30c13c8c06677060b6604690f52c0cebe82fda1f 100644 (file)
@@ -9,7 +9,7 @@ Acked-by: Rob Landley <rob@landley.net>
 ---
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1062,9 +1062,6 @@ config FW_ARC
+@@ -1065,9 +1065,6 @@ config FW_ARC
  config ARCH_MAY_HAVE_PC_FDC
        bool
  
@@ -19,7 +19,7 @@ Acked-by: Rob Landley <rob@landley.net>
  config CEVT_BCM1480
        bool
  
-@@ -2968,6 +2965,18 @@ choice
+@@ -3060,6 +3057,18 @@ choice
                bool "Extend builtin kernel arguments with bootloader arguments"
  endchoice
  
index 0e4600237d6b18d942c4a58b4f127453e08a1628..6192c417d3df50f81008cc816e36e363d79d1110 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -90,7 +90,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
+@@ -91,7 +91,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
  # machines may also.  Since BFD is incredibly buggy with respect to
  # crossformat linking we rely on the elf2ecoff tool for format conversion.
  #
diff --git a/target/linux/generic/pending-5.1/304-mips_disable_fpu.patch b/target/linux/generic/pending-5.1/304-mips_disable_fpu.patch
deleted file mode 100644 (file)
index 6e71c68..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-From:   Manuel Lauss <manuel.lauss@gmail.com>
-Subject: [RFC PATCH v4 2/2] MIPS: make FPU emulator optional
-
-This small patch makes the MIPS FPU emulator optional. The kernel
-kills float-users on systems without a hardware FPU by sending a SIGILL.
-
-Disabling the emulator shrinks vmlinux by about 54kBytes (32bit,
-optimizing for size).
-
-Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
----
-v4: rediffed because of patch 1/2, should now work with micromips as well
-v3: updated patch description with size savings.
-v2: incorporated changes suggested by Jonas Gorski
-    force the fpu emulator on for micromips: relocating the parts
-    of the mmips code in the emulator to other areas would be a
-    much larger change; I went the cheap route instead with this.
-
- arch/mips/Kbuild                     |  2 +-
- arch/mips/Kconfig                    | 14 ++++++++++++++
- arch/mips/include/asm/fpu.h          |  5 +++--
- arch/mips/include/asm/fpu_emulator.h | 15 +++++++++++++++
- 4 files changed, 33 insertions(+), 3 deletions(-)
-
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -2892,6 +2892,20 @@ config MIPS_O32_FP64_SUPPORT
-         If unsure, say N.
-+config MIPS_FPU_EMULATOR
-+      bool "MIPS FPU Emulator"
-+      default y
-+      help
-+        This option lets you disable the built-in MIPS FPU (Coprocessor 1)
-+        emulator, which handles floating-point instructions on processors
-+        without a hardware FPU.  It is generally a good idea to keep the
-+        emulator built-in, unless you are perfectly sure you have a
-+        complete soft-float environment.  With the emulator disabled, all
-+        users of float operations will be killed with an illegal instr-
-+        uction exception.
-+
-+        Say Y, please.
-+
- config USE_OF
-       bool
-       select OF
---- a/arch/mips/Makefile
-+++ b/arch/mips/Makefile
-@@ -322,7 +322,7 @@ OBJCOPYFLAGS               += --remove-section=.regin
- head-y := arch/mips/kernel/head.o
- libs-y                        += arch/mips/lib/
--libs-y                        += arch/mips/math-emu/
-+libs-$(CONFIG_MIPS_FPU_EMULATOR)      += arch/mips/math-emu/
- # See arch/mips/Kbuild for content of core part of the kernel
- core-y += arch/mips/
---- a/arch/mips/include/asm/fpu.h
-+++ b/arch/mips/include/asm/fpu.h
-@@ -230,8 +230,10 @@ static inline int init_fpu(void)
-               /* Restore FRE */
-               write_c0_config5(config5);
-               enable_fpu_hazard();
--      } else
-+      } else if (IS_ENABLED(CONFIG_MIPS_FPU_EMULATOR))
-               fpu_emulator_init_fpu();
-+      else
-+              ret = SIGILL;
-       return ret;
- }
---- a/arch/mips/include/asm/fpu_emulator.h
-+++ b/arch/mips/include/asm/fpu_emulator.h
-@@ -30,6 +30,7 @@
- #include <asm/local.h>
- #include <asm/processor.h>
-+#ifdef CONFIG_MIPS_FPU_EMULATOR
- #ifdef CONFIG_DEBUG_FS
- struct mips_fpu_emulator_stats {
-@@ -179,6 +180,16 @@ do {                                                                      \
- extern int fpu_emulator_cop1Handler(struct pt_regs *xcp,
-                                   struct mips_fpu_struct *ctx, int has_fpu,
-                                   void __user **fault_addr);
-+#else /* no CONFIG_MIPS_FPU_EMULATOR */
-+static inline int fpu_emulator_cop1Handler(struct pt_regs *xcp,
-+                              struct mips_fpu_struct *ctx, int has_fpu,
-+                              void __user **fault_addr)
-+{
-+      *fault_addr = NULL;
-+      return SIGILL;  /* we don't speak MIPS FPU */
-+}
-+#endif        /* CONFIG_MIPS_FPU_EMULATOR */
-+
- void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr,
-                    struct task_struct *tsk);
- int process_fpemu_return(int sig, void __user *fault_addr,
---- a/arch/mips/include/asm/dsemul.h
-+++ b/arch/mips/include/asm/dsemul.h
-@@ -41,6 +41,7 @@ struct task_struct;
- extern int mips_dsemul(struct pt_regs *regs, mips_instruction ir,
-                      unsigned long branch_pc, unsigned long cont_pc);
-+#ifdef CONFIG_MIPS_FPU_EMULATOR
- /**
-  * do_dsemulret() - Return from a delay slot 'emulation' frame
-  * @xcp:      User thread register context.
-@@ -88,5 +89,27 @@ extern bool dsemul_thread_rollback(struc
-  * before @mm is freed in order to avoid memory leaks.
-  */
- extern void dsemul_mm_cleanup(struct mm_struct *mm);
-+#else
-+static inline bool do_dsemulret(struct pt_regs *xcp)
-+{
-+      return false;
-+}
-+
-+static inline bool dsemul_thread_cleanup(struct task_struct *tsk)
-+{
-+      return false;
-+}
-+
-+static inline bool dsemul_thread_rollback(struct pt_regs *regs)
-+{
-+      return false;
-+}
-+
-+static inline void dsemul_mm_cleanup(struct mm_struct *mm)
-+{
-+
-+}
-+
-+#endif
- #endif /* __MIPS_ASM_DSEMUL_H__ */
index 609a96db492e4fafa03edd2c228dbe7b5dcdb244..a8e4e78c91e4689e5577a4e3abbb2ee7b4b86092 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -93,8 +93,18 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
+@@ -94,8 +94,18 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
  cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
  cflags-y                      += -msoft-float
  LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib
index e73cfd61b39373e8e6e4a1d32ecdf6cbe44d881b..4e6b7b5cd3a18a0ced5e0a62397d097ed8dec365 100644 (file)
@@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -         strnlen_user.o uncached.o
 +         strnlen_user.o uncached.o memcmp.o
  
- obj-y                 += iomap.o iomap_copy.o
+ obj-y                 += iomap_copy.o
  obj-$(CONFIG_PCI)     += iomap-pci.o
 --- /dev/null
 +++ b/arch/mips/lib/memcmp.c
index d9a2a92f5c55b9529fd6aeedca3ccdc668616c80..8636511464e9b35203773ec107a12a9719b3e2ab 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -176,7 +176,7 @@ cflags-$(CONFIG_CPU_VR41XX)        += -march=r4
+@@ -177,7 +177,7 @@ cflags-$(CONFIG_CPU_VR41XX)        += -march=r4
  cflags-$(CONFIG_CPU_R4X00)    += -march=r4600 -Wa,--trap
  cflags-$(CONFIG_CPU_TX49XX)   += -march=r4600 -Wa,--trap
  cflags-$(CONFIG_CPU_MIPS32_R1)        += -march=mips32 -Wa,--trap
index 1187543a46f1ddbd4aad2e5c77e790cda531b9b6..2c7fbdbd7173d833c2e893de45186e4a0f170e1e 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
-@@ -10,14 +10,11 @@
- #include <linux/mm.h>
+@@ -11,14 +11,11 @@
  #include <linux/delay.h>
+ #include <linux/libfdt.h>
  
 +#include <asm/bootinfo.h>
  #include <asm/cacheflush.h>
@@ -27,11 +27,11 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
 +#include <linux/uaccess.h>
 +#include "machine_kexec.h"
  
- int (*_machine_kexec_prepare)(struct kimage *) = NULL;
+ static unsigned long reboot_code_buffer;
+@@ -32,6 +29,99 @@ void (*_crash_smp_send_stop)(void) = NUL
  void (*_machine_kexec_shutdown)(void) = NULL;
-@@ -28,6 +25,99 @@ atomic_t kexec_ready_to_reboot = ATOMIC_
- void (*_crash_smp_send_stop)(void) = NULL;
- #endif
+ void (*_machine_crash_shutdown)(struct pt_regs *regs) = NULL;
  
 +static void machine_kexec_print_args(void)
 +{
@@ -129,9 +129,9 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  static void kexec_image_info(const struct kimage *kimage)
  {
        unsigned long i;
-@@ -52,6 +142,18 @@ int
- machine_kexec_prepare(struct kimage *kimage)
- {
+@@ -101,6 +191,18 @@ machine_kexec_prepare(struct kimage *kim
+ #endif
        kexec_image_info(kimage);
 +      /*
 +       * Whenever arguments passed from kexec-tools, Init the arguments as
@@ -148,7 +148,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        if (_machine_kexec_prepare)
                return _machine_kexec_prepare(kimage);
-@@ -89,10 +191,12 @@ machine_kexec(struct kimage *image)
+@@ -214,10 +316,12 @@ machine_kexec(struct kimage *image)
        unsigned long *ptr;
  
        reboot_code_buffer =
@@ -162,7 +162,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        if (image->type == KEXEC_TYPE_DEFAULT) {
                kexec_indirection_page =
-@@ -100,9 +204,19 @@ machine_kexec(struct kimage *image)
+@@ -225,9 +329,19 @@ machine_kexec(struct kimage *image)
        } else {
                kexec_indirection_page = (unsigned long)&image->head;
        }
@@ -184,7 +184,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  
        /*
         * The generic kexec code builds a page list with physical
-@@ -124,15 +238,16 @@ machine_kexec(struct kimage *image)
+@@ -249,16 +363,17 @@ machine_kexec(struct kimage *image)
        /*
         * we do not want to be bothered.
         */
@@ -195,6 +195,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
 -      printk("Bye ...\n");
 +      pr_info("Will call new kernel at %08lx\n", image->start);
 +      pr_info("Bye ...\n");
+       /* Make reboot code buffer available to the boot CPU. */
        __flush_cache_all();
  #ifdef CONFIG_SMP
        /* All secondary cpus now may jump to kexec_wait cycle */
index 6fea6f0b666e361244cb77923b190bfdd2f3c11a..14ec9b989e225b6853a5e209ffa4e49f2a10eb99 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
 
 --- a/arch/arc/kernel/head.S
 +++ b/arch/arc/kernel/head.S
-@@ -59,6 +59,16 @@
+@@ -64,6 +64,16 @@
  #endif
  .endm
  
@@ -42,8 +42,8 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
  ;----------------------------------------------------------------
 --- a/arch/arc/kernel/setup.c
 +++ b/arch/arc/kernel/setup.c
-@@ -528,7 +528,7 @@ ignore_uboot_args:
- #endif
+@@ -532,7 +532,7 @@ void __init handle_uboot_args(void)
+ ignore_uboot_args:
  
        if (use_embedded_dtb) {
 -              machine_desc = setup_machine_fdt(__dtb_start);
@@ -51,7 +51,7 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
                if (!machine_desc)
                        panic("Embedded DT invalid\n");
        }
-@@ -544,6 +544,8 @@ ignore_uboot_args:
+@@ -548,6 +548,8 @@ ignore_uboot_args:
        }
  }
  
diff --git a/target/linux/generic/pending-5.1/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch b/target/linux/generic/pending-5.1/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
deleted file mode 100644 (file)
index d28bc7b..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 203f17906ff45705fbdaa0430dbbc71142c2640f Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Sat, 8 Dec 2018 21:45:53 +0100
-Subject: [PATCH 1/3] MIPS: Compile post DMA flush only when needed
-
-dma_sync_phys() is only called for some CPUs when a mapping is removed.
-Add ARCH_HAS_SYNC_DMA_FOR_CPU only for the CPUs listed in
-cpu_needs_post_dma_flush() which need this extra call and do not compile
-this code in for other CPUs. We need this for R10000, R12000, BMIPS5000
-CPUs and CPUs supporting MAAR which was introduced in MIPS32r5.
-
-This will hopefully improve the performance of the not affected devices.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- arch/mips/Kconfig              | 6 +++++-
- arch/mips/mm/dma-noncoherent.c | 2 ++
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -1116,7 +1116,6 @@ config DMA_PERDEV_COHERENT
- config DMA_NONCOHERENT
-       bool
-       select ARCH_HAS_SYNC_DMA_FOR_DEVICE
--      select ARCH_HAS_SYNC_DMA_FOR_CPU
-       select NEED_DMA_MAP_STATE
-       select DMA_NONCOHERENT_MMAP
-       select DMA_NONCOHERENT_CACHE_SYNC
-@@ -1897,9 +1896,11 @@ config SYS_HAS_CPU_MIPS32_R3_5
- config SYS_HAS_CPU_MIPS32_R5
-       bool
-+      select ARCH_HAS_SYNC_DMA_FOR_CPU
- config SYS_HAS_CPU_MIPS32_R6
-       bool
-+      select ARCH_HAS_SYNC_DMA_FOR_CPU
- config SYS_HAS_CPU_MIPS64_R1
-       bool
-@@ -1909,6 +1910,7 @@ config SYS_HAS_CPU_MIPS64_R2
- config SYS_HAS_CPU_MIPS64_R6
-       bool
-+      select ARCH_HAS_SYNC_DMA_FOR_CPU
- config SYS_HAS_CPU_R3000
-       bool
-@@ -1945,6 +1947,7 @@ config SYS_HAS_CPU_R8000
- config SYS_HAS_CPU_R10000
-       bool
-+      select ARCH_HAS_SYNC_DMA_FOR_CPU
- config SYS_HAS_CPU_RM7000
-       bool
-@@ -1973,6 +1976,7 @@ config SYS_HAS_CPU_BMIPS4380
- config SYS_HAS_CPU_BMIPS5000
-       bool
-       select SYS_HAS_CPU_BMIPS
-+      select ARCH_HAS_SYNC_DMA_FOR_CPU
- config SYS_HAS_CPU_XLR
-       bool
---- a/arch/mips/mm/dma-noncoherent.c
-+++ b/arch/mips/mm/dma-noncoherent.c
-@@ -191,12 +191,14 @@ void arch_sync_dma_for_device(struct dev
-               dma_sync_phys(paddr, size, dir);
- }
-+#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU
- void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
-               size_t size, enum dma_data_direction dir)
- {
-       if (cpu_needs_post_dma_flush(dev))
-               dma_sync_phys(paddr, size, dir);
- }
-+#endif
- void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
-               enum dma_data_direction direction)
index 035a84b1e49062c029fb5252ad22702cd3a91fc7..bc8a437e6333e624154a0753f1eacbd3c663286e 100644 (file)
@@ -14,12 +14,12 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
 
 --- a/arch/powerpc/Kconfig
 +++ b/arch/powerpc/Kconfig
-@@ -197,7 +197,7 @@ config PPC
+@@ -200,7 +200,7 @@ config PPC
        select HAVE_IOREMAP_PROT
        select HAVE_IRQ_EXIT_ON_IRQ_STACK
        select HAVE_KERNEL_GZIP
--      select HAVE_KERNEL_XZ                   if PPC_BOOK3S
-+      select HAVE_KERNEL_XZ                   if PPC_BOOK3S || PPC_85xx
+-      select HAVE_KERNEL_XZ                   if PPC_BOOK3S || 44x
++      select HAVE_KERNEL_XZ                   if PPC_BOOK3S || 44x || PPC_85xx
        select HAVE_KPROBES
        select HAVE_KPROBES_ON_FTRACE
        select HAVE_KRETPROBES
index e646224df28f045da678eacec4aca9825c38571c..aea9f200b3846db1573e5f83a4573a66036f2a85 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -11,6 +11,23 @@ menuconfig MTD
+@@ -12,6 +12,23 @@ menuconfig MTD
  
  if MTD
  
@@ -59,15 +59,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /*
   * Given a pointer to the MTD object in the mtd_part structure, we can retrieve
   * the pointer to that structure.
-@@ -623,6 +627,7 @@ int mtd_add_partition(struct mtd_info *p
-       mutex_unlock(&mtd_partitions_mutex);
+@@ -626,6 +630,7 @@ int mtd_add_partition(struct mtd_info *p
+       if (ret)
+               goto err_remove_part;
  
-       add_mtd_device(&new->mtd);
 +      mtd_partition_split(parent, new);
        mtd_add_partition_attrs(new);
  
-@@ -701,6 +706,29 @@ int mtd_del_partition(struct mtd_info *m
+       return 0;
+@@ -712,6 +717,29 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -97,10 +97,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /*
   * This function, given a master MTD object and a partition table, creates
   * and registers slave MTD objects which are bound to the master according to
-@@ -732,6 +760,7 @@ int add_mtd_partitions(struct mtd_info *
-               mutex_unlock(&mtd_partitions_mutex);
+@@ -752,6 +780,7 @@ int add_mtd_partitions(struct mtd_info *
+                       goto err_del_partitions;
+               }
  
-               add_mtd_device(&slave->mtd);
 +              mtd_partition_split(master, slave);
                mtd_add_partition_attrs(slave);
                /* Look for subpartitions */
index 4026a2050b9e5db4c36ad8986dbb463be0996793..a59659cda6a9d7cd68251ff676283a71660a6aff 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
  /*
   * Given a pointer to the MTD object in the mtd_part structure, we can retrieve
-@@ -706,6 +710,36 @@ int mtd_del_partition(struct mtd_info *m
+@@ -717,6 +721,36 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -57,7 +57,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #define SPLIT_FIRMWARE_NAME   CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #else
-@@ -1041,6 +1075,61 @@ void mtd_part_parser_cleanup(struct mtd_
+@@ -1066,6 +1100,61 @@ void mtd_part_parser_cleanup(struct mtd_
        }
  }
  
index 8a90ce6a8b75874fe4a10f0f20b1c60290622386..58d2e445745416302f3cbdfd638b3dbef14d4c93 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -748,6 +748,7 @@ run_parsers_by_type(struct mtd_part *sla
+@@ -759,6 +759,7 @@ run_parsers_by_type(struct mtd_part *sla
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
@@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  }
  
  static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
-@@ -757,6 +758,12 @@ static void mtd_partition_split(struct m
+@@ -768,6 +769,12 @@ static void mtd_partition_split(struct m
        if (rootfs_found)
                return;
  
index 60cf043e9ba9b0f2b617b01069bfca791aad5282..9fa24ce0467f9d39be8cd7d6a7d129c412c11d98 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -26,6 +26,8 @@ config MTD_SPLIT_FIRMWARE_NAME
+@@ -27,6 +27,8 @@ config MTD_SPLIT_FIRMWARE_NAME
        depends on MTD_SPLIT_FIRMWARE
        default "firmware"
  
@@ -28,5 +28,5 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +obj-$(CONFIG_MTD_SPLIT)               += mtdsplit/
 +
  obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
  obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
+ obj-$(CONFIG_MTD_AFS_PARTS)   += afs.o
index 2e95e99f6d1cdc4d20ecde9de3141401dfe20193..3e1a65137910aafd7579fef7d2ef799384a0f4f4 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -1154,6 +1154,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1179,6 +1179,24 @@ int mtd_is_partition(const struct mtd_in
  }
  EXPORT_SYMBOL_GPL(mtd_is_partition);
  
@@ -38,7 +38,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  {
 --- a/include/linux/mtd/mtd.h
 +++ b/include/linux/mtd/mtd.h
-@@ -507,6 +507,24 @@ static inline void mtd_align_erase_req(s
+@@ -509,6 +509,24 @@ static inline void mtd_align_erase_req(s
                req->len += mtd->erasesize - mod;
  }
  
diff --git a/target/linux/generic/pending-5.1/419-mtd-redboot-add-of_match_table-with-DT-binding.patch b/target/linux/generic/pending-5.1/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
deleted file mode 100644 (file)
index fbf9a05..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Subject: [PATCH] mtd: redboot: add of_match_table with DT binding
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This allows parsing RedBoot compatible partitions for properly described
-flash device in DT.
-
-Signed-off-by: RafaÅ‚ MiÅ‚ecki <rafal@milecki.pl>
----
-
---- a/drivers/mtd/redboot.c
-+++ b/drivers/mtd/redboot.c
-@@ -289,9 +289,16 @@ static int parse_redboot_partitions(stru
-       return ret;
- }
-+static const struct of_device_id redboot_parser_of_match_table[] = {
-+      { .compatible = "ecoscentric,redboot-fis-partitions" },
-+      {},
-+};
-+MODULE_DEVICE_TABLE(of, redboot_parser_of_match_table);
-+
- static struct mtd_part_parser redboot_parser = {
-       .parse_fn = parse_redboot_partitions,
-       .name = "RedBoot",
-+      .of_match_table = redboot_parser_of_match_table,
- };
- module_mtd_part_parser(redboot_parser);
index 85fbe0512d614ea26ced30c2c12ab053ec154925..84d463868ba192e3bf404e1c27614f983ea4c203 100644 (file)
@@ -9,9 +9,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  drivers/mtd/redboot.c | 19 +++++++++++++------
  1 file changed, 13 insertions(+), 6 deletions(-)
 
---- a/drivers/mtd/redboot.c
-+++ b/drivers/mtd/redboot.c
-@@ -265,14 +265,21 @@ static int parse_redboot_partitions(stru
+--- a/drivers/mtd/parsers/redboot.c
++++ b/drivers/mtd/parsers/redboot.c
+@@ -288,14 +288,21 @@ static int parse_redboot_partitions(stru
  #endif
                names += strlen(names)+1;
  
index bd49893dd852b334b5343022eb3a98cecefd15b9..b6afc2800ef6c7296dacfb849f6d59050eb025d8 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
 
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -177,6 +177,22 @@ menu "Partition parsers"
+@@ -128,6 +128,22 @@ menu "Partition parsers"
  source "drivers/mtd/parsers/Kconfig"
  endmenu
  
@@ -37,7 +37,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
  #
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -16,6 +16,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
+@@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
  obj-$(CONFIG_MTD_AR7_PARTS)   += ar7part.o
  obj-$(CONFIG_MTD_BCM63XX_PARTS)       += bcm63xxpart.o
  obj-$(CONFIG_MTD_BCM47XX_PARTS)       += bcm47xxpart.o
index b8ec11f3dd0776a79c4257e9d2494e0a34b9eeac..d88c226233a96ea5ea6ce45050fce9b5cc77d2f8 100644 (file)
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        return dev;
  
  err_destroy_mutex:
-@@ -379,7 +387,7 @@ static int block2mtd_setup2(const char *
+@@ -381,7 +389,7 @@ static int block2mtd_setup2(const char *
        /* 80 for device, 12 for erase size, 80 for name, 8 for timeout */
        char buf[80 + 12 + 80 + 8];
        char *str = buf;
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        char *name;
        size_t erase_size = PAGE_SIZE;
        unsigned long timeout = MTD_DEFAULT_TIMEOUT;
-@@ -393,7 +401,7 @@ static int block2mtd_setup2(const char *
+@@ -395,7 +403,7 @@ static int block2mtd_setup2(const char *
        strcpy(str, val);
        kill_final_newline(str);
  
@@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                token[i] = strsep(&str, ",");
  
        if (str) {
-@@ -419,8 +427,10 @@ static int block2mtd_setup2(const char *
+@@ -421,8 +429,10 @@ static int block2mtd_setup2(const char *
                        return 0;
                }
        }
@@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        return 0;
  }
-@@ -454,7 +464,7 @@ static int block2mtd_setup(const char *v
+@@ -456,7 +466,7 @@ static int block2mtd_setup(const char *v
  
  
  module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
index 7e974e01ed90467f26dfaa59ced41b0146c42c64..cba17a57f3f61161b67d575649b9817973ac3cad 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/mtd/devices/block2mtd.c
 +++ b/drivers/mtd/devices/block2mtd.c
-@@ -387,7 +387,7 @@ static int block2mtd_setup2(const char *
+@@ -389,7 +389,7 @@ static int block2mtd_setup2(const char *
        /* 80 for device, 12 for erase size, 80 for name, 8 for timeout */
        char buf[80 + 12 + 80 + 8];
        char *str = buf;
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        char *name;
        size_t erase_size = PAGE_SIZE;
        unsigned long timeout = MTD_DEFAULT_TIMEOUT;
-@@ -401,7 +401,7 @@ static int block2mtd_setup2(const char *
+@@ -403,7 +403,7 @@ static int block2mtd_setup2(const char *
        strcpy(str, val);
        kill_final_newline(str);
  
@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                token[i] = strsep(&str, ",");
  
        if (str) {
-@@ -430,6 +430,9 @@ static int block2mtd_setup2(const char *
+@@ -432,6 +432,9 @@ static int block2mtd_setup2(const char *
        if (token[2] && (strlen(token[2]) + 1 > 80))
                pr_err("mtd device name too long\n");
  
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        add_device(name, erase_size, token[2], timeout);
  
        return 0;
-@@ -464,7 +467,7 @@ static int block2mtd_setup(const char *v
+@@ -466,7 +469,7 @@ static int block2mtd_setup(const char *v
  
  
  module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
index ecc3ea1de60297e5e9a432810897f9d45a4c11cb..df6bf0aa5e076d0c0bba662ab104804c1509c1a0 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1455,7 +1455,7 @@ static int spi_nor_write(struct mtd_info
+@@ -2241,7 +2241,7 @@ static int spi_nor_write(struct mtd_info
  
                write_enable(nor);
                ret = nor->write(nor, addr, page_remain, buf + i);
@@ -20,17 +20,3 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                        goto write_err;
                written = ret;
  
-@@ -1464,13 +1464,6 @@ static int spi_nor_write(struct mtd_info
-                       goto write_err;
-               *retlen += written;
-               i += written;
--              if (written != page_remain) {
--                      dev_err(nor->dev,
--                              "While writing %zu bytes written %zd bytes\n",
--                              page_remain, written);
--                      ret = -EIO;
--                      goto write_err;
--              }
-       }
- write_err:
index fa25c655645da4facc31d33b4ca9ab9485cf6e6a..1f210c313c94ecc3b5914a808f026b7348499048 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2733,6 +2733,7 @@ static int spi_nor_init(struct spi_nor *
+@@ -3916,6 +3916,7 @@ static int spi_nor_init(struct spi_nor *
         */
        if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
            JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
index dcb86f69bf5a12e1bfcd542d9565f6c431032a55..c6931f6014149d8313d4eb677883c84eb61cb909 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
 
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2735,6 +2735,7 @@ static int spi_nor_init(struct spi_nor *
+@@ -3918,6 +3918,7 @@ static int spi_nor_init(struct spi_nor *
            JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
            JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX ||
            JEDEC_MFR(nor->info) == SNOR_MFR_SST ||
@@ -25,13 +25,11 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
            nor->info->flags & SPI_NOR_HAS_LOCK) {
                write_enable(nor);
                write_sr(nor, 0);
-@@ -2871,7 +2872,8 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -4065,6 +4066,7 @@ int spi_nor_scan(struct spi_nor *nor, co
        /* NOR protection support for STmicro/Micron chips and similar */
-       if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
--                      info->flags & SPI_NOR_HAS_LOCK) {
+       if (JEDEC_MFR(info) == SNOR_MFR_ST ||
+           JEDEC_MFR(info) == SNOR_MFR_MICRON ||
 +          JEDEC_MFR(info) == SNOR_MFR_WINBOND ||
-+          info->flags & SPI_NOR_HAS_LOCK) {
+           info->flags & SPI_NOR_HAS_LOCK) {
                nor->flash_lock = stm_lock;
                nor->flash_unlock = stm_unlock;
-               nor->flash_is_locked = stm_is_locked;
index a2ab6f3da5025366710f69a19c78dc6bec98d0f4..2abd3bbbd5b5439ede62dc7d18af3228239c12ec 100644 (file)
@@ -19,14 +19,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/mtd/spi-nor/Kconfig
 +++ b/drivers/mtd/spi-nor/Kconfig
-@@ -39,6 +39,17 @@ config SPI_ASPEED_SMC
-         and support for the SPI flash memory controller (SPI) for
-         the host firmware. The implementation only supports SPI NOR.
+@@ -21,6 +21,17 @@ config MTD_SPI_NOR_USE_4K_SECTORS
+         Please note that some tools/drivers/filesystems may not work with
+         4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).
  
 +config MTD_SPI_NOR_USE_4K_SECTORS_LIMIT
 +      int "Maximum flash chip size to use 4K sectors on (in KiB)"
 +      depends on MTD_SPI_NOR_USE_4K_SECTORS
-+      default "4096"
++      default 4096
 +      help
 +        There are many flash chips that support 4K sectors, but are so large
 +        that using them significantly slows down writing large amounts of
@@ -34,23 +34,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +        Any flash chip larger than the size specified in this option will
 +        not use 4K sectors.
 +
- config SPI_ATMEL_QUADSPI
-       tristate "Atmel Quad SPI Controller"
-       depends on ARCH_AT91 || (ARM && COMPILE_TEST && !ARCH_EBSA110)
+ config SPI_ASPEED_SMC
+       tristate "Aspeed flash controllers in SPI mode"
+       depends on ARCH_ASPEED || COMPILE_TEST
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2647,10 +2647,12 @@ static int spi_nor_select_erase(struct s
+@@ -3815,7 +3815,8 @@ static int spi_nor_select_erase(struct s
+        */
  #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
        /* prefer "small sector" erase if possible */
--      if (info->flags & SECT_4K) {
-+      if ((info->flags & SECT_4K) && (mtd->size <=
-+          CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT * 1024)) {
-               nor->erase_opcode = SPINOR_OP_BE_4K;
-               mtd->erasesize = 4096;
--      } else if (info->flags & SECT_4K_PMC) {
-+      } else if ((info->flags & SECT_4K_PMC) && (mtd->size <=
-+                 CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT * 1024)) {
-               nor->erase_opcode = SPINOR_OP_BE_4K_PMC;
-               mtd->erasesize = 4096;
-       } else
+-      wanted_size = 4096u;
++      if (mtd.size <= CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT * 1024)
++              wanted_size = 4096u;
+ #endif
+       if (spi_nor_has_uniform_erase(nor)) {
index 8b5dc4eb010d4d9887f25c99512c5987cf55ef2f..624e4d2601db5ddb73842268a1bdf20243898f27 100644 (file)
@@ -20,7 +20,7 @@ Changes in v2:
 
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1239,6 +1239,11 @@ static const struct flash_info spi_nor_i
+@@ -2025,6 +2025,11 @@ static const struct flash_info spi_nor_i
                        SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
                        SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
        },
index 69ac17ce4c04a999ed0fb6d3a8305197f5b93a6f..f096a7626eb6bb76d1faf4924764307490920f3c 100644 (file)
@@ -8,11 +8,11 @@ Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
 
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -994,6 +994,7 @@ static const struct flash_info spi_nor_i
+@@ -1745,6 +1745,7 @@ static const struct flash_info spi_nor_i
        { "en25q32b",   INFO(0x1c3016, 0, 64 * 1024,   64, 0) },
        { "en25p64",    INFO(0x1c2017, 0, 64 * 1024,  128, 0) },
        { "en25q64",    INFO(0x1c3017, 0, 64 * 1024,  128, SECT_4K) },
 +      { "en25q128",   INFO(0x1c3018, 0, 64 * 1024,  256, SECT_4K) },
+       { "en25q80a",   INFO(0x1c3014, 0, 64 * 1024,   16,
+                       SECT_4K | SPI_NOR_DUAL_READ) },
        { "en25qh32",   INFO(0x1c7016, 0, 64 * 1024,   64, 0) },
-       { "en25qh128",  INFO(0x1c7018, 0, 64 * 1024,  256, 0) },
-       { "en25qh256",  INFO(0x1c7019, 0, 64 * 1024,  512, 0) },
index 0648b12e129b09b4af99e62e05cf166824cc36af..dbe35071761b03f3760068496ebb71d51333daca 100644 (file)
@@ -8,11 +8,11 @@ Signed-off-by: André Valentin <avalentin@marcant.net>
 
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1083,6 +1083,7 @@ static const struct flash_info spi_nor_i
+@@ -1845,6 +1845,7 @@ static const struct flash_info spi_nor_i
        { "mx25l3205d",  INFO(0xc22016, 0, 64 * 1024,  64, SECT_4K) },
        { "mx25l3255e",  INFO(0xc29e16, 0, 64 * 1024,  64, SECT_4K) },
        { "mx25l6405d",  INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) },
 +      { "mx25u3235f",  INFO(0xc22536, 0, 64 * 1024, 64, 0) },
        { "mx25u2033e",  INFO(0xc22532, 0, 64 * 1024,   4, SECT_4K) },
-       { "mx25u4035",   INFO(0xc22533, 0, 64 * 1024,   8, SECT_4K) },
-       { "mx25u8035",   INFO(0xc22534, 0, 64 * 1024,  16, SECT_4K) },
+       { "mx25u3235f",  INFO(0xc22536, 0, 64 * 1024,  64,
+                        SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
diff --git a/target/linux/generic/pending-5.1/479-mtd-spi-nor-add-eon-en25qh64.patch b/target/linux/generic/pending-5.1/479-mtd-spi-nor-add-eon-en25qh64.patch
deleted file mode 100644 (file)
index 6bb7754..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/drivers/mtd/spi-nor/spi-nor.c
-+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -996,6 +996,7 @@ static const struct flash_info spi_nor_i
-       { "en25q64",    INFO(0x1c3017, 0, 64 * 1024,  128, SECT_4K) },
-       { "en25q128",   INFO(0x1c3018, 0, 64 * 1024,  256, SECT_4K) },
-       { "en25qh32",   INFO(0x1c7016, 0, 64 * 1024,   64, 0) },
-+      { "en25qh64",   INFO(0x1c7017, 0, 64 * 1024,   128, 0) },
-       { "en25qh128",  INFO(0x1c7018, 0, 64 * 1024,  256, 0) },
-       { "en25qh256",  INFO(0x1c7019, 0, 64 * 1024,  512, 0) },
-       { "en25s64",    INFO(0x1c3817, 0, 64 * 1024,  128, SECT_4K) },
index dce0432fac130ddfd397fb5e0ad8c44edb72f6a7..51608585053b15e337e8a61940078aa6bcdcb670 100644 (file)
@@ -12,15 +12,15 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
-@@ -41,6 +41,7 @@
- #include <linux/reboot.h>
+@@ -42,6 +42,7 @@
  #include <linux/leds.h>
  #include <linux/debugfs.h>
+ #include <linux/nvmem-provider.h>
 +#include <linux/root_dev.h>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
-@@ -593,6 +594,15 @@ int add_mtd_device(struct mtd_info *mtd)
+@@ -644,6 +645,15 @@ int add_mtd_device(struct mtd_info *mtd)
           of this try_ nonsense, and no bitching about it
           either. :) */
        __module_get(THIS_MODULE);
@@ -35,4 +35,4 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +
        return 0;
  
- fail_added:
+ fail_nvmem_add:
index b76e83e4a37db174396650290578c0a259e77120..c392819bfcc7105287cda667bb76eeaeb7ade68d 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/init/do_mounts.c
 +++ b/init/do_mounts.c
-@@ -427,7 +427,28 @@ retry:
+@@ -459,7 +459,28 @@ retry:
  out:
        put_page(page);
  }
@@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  #ifdef CONFIG_ROOT_NFS
  
  #define NFSROOT_TIMEOUT_MIN   5
-@@ -521,6 +542,10 @@ void __init mount_root(void)
+@@ -553,6 +574,10 @@ void __init mount_root(void)
                        change_floppy("root floppy");
        }
  #endif
index 1446ca2abc3a33b085b7f3db582a0165b11abd16..ea638c653c847ba1b265845675c195321d8997ba 100644 (file)
@@ -17,7 +17,7 @@ Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
 
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
-@@ -938,6 +938,44 @@ out_unlock:
+@@ -995,6 +995,44 @@ out_unlock:
  }
  EXPORT_SYMBOL_GPL(get_mtd_device_nm);
  
@@ -64,7 +64,7 @@ Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
        mutex_lock(&mtd_table_mutex);
 --- a/include/linux/mtd/mtd.h
 +++ b/include/linux/mtd/mtd.h
-@@ -589,6 +589,8 @@ extern struct mtd_info *get_mtd_device(s
+@@ -591,6 +591,8 @@ extern struct mtd_info *get_mtd_device(s
  extern int __get_mtd_device(struct mtd_info *mtd);
  extern void __put_mtd_device(struct mtd_info *mtd);
  extern struct mtd_info *get_mtd_device_nm(const char *name);
index 6584e22882e5df5eef3582eb4f70cf5b21f12fc5..3313845963ccf6e57f74dd814947f199cb63f723 100644 (file)
@@ -43,7 +43,7 @@ Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
 
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -374,4 +374,6 @@ source "drivers/mtd/spi-nor/Kconfig"
+@@ -325,4 +325,6 @@ source "drivers/mtd/spi-nor/Kconfig"
  
  source "drivers/mtd/ubi/Kconfig"
  
@@ -52,7 +52,7 @@ Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
  endif # MTD
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -39,3 +39,6 @@ obj-y                += chips/ lpddr/ maps/ devices/ n
+@@ -38,3 +38,6 @@ obj-y                += chips/ lpddr/ maps/ devices/ n
  
  obj-$(CONFIG_MTD_SPI_NOR)     += spi-nor/
  obj-$(CONFIG_MTD_UBI)         += ubi/
index f28186a40c37505380f922568a2ff31bcf2101f4..680d33d85b68d7e51895004ff666d508c0cd0625 100644 (file)
@@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
  #define JFFS2_NODE_ACCURATE 0x2000
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
-@@ -278,6 +278,12 @@ config ZSTD_DECOMPRESS
+@@ -286,6 +286,12 @@ config ZSTD_DECOMPRESS
  
  source "lib/xz/Kconfig"
  
@@ -1119,7 +1119,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
  ifdef CONFIG_FUNCTION_TRACER
  ORIG_CFLAGS := $(KBUILD_CFLAGS)
  KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))
-@@ -139,6 +149,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
+@@ -149,6 +159,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
  obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd/
  obj-$(CONFIG_XZ_DEC) += xz/
  obj-$(CONFIG_RAID6_PQ) += raid6/
index 02c9b4c0fa7a444baa1101703ca87c7f9dedfc4d..f952312c1c60685ac61b143f3712a88e8b422318 100644 (file)
@@ -20,11 +20,10 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 
 --- a/fs/ubifs/Kconfig
 +++ b/fs/ubifs/Kconfig
-@@ -85,3 +85,16 @@ config UBIFS_FS_SECURITY
-         the extended attribute support in advance.
+@@ -85,4 +85,17 @@ config UBIFS_FS_AUTHENTICATION
+         sha256, these are not selected automatically since there are many
+         different options.
  
-         If you are not using a security module, say N.
-+
 +config UBIFS_FS_FORMAT4
 +      bool "Use file system format version 4 for new file systems"
 +      depends on UBIFS_FS
@@ -37,9 +36,11 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 +        format version 5 for ubifs file systems created with version 5.
 +
 +        If you are unsure, say N.
++
+ endif # UBIFS_FS
 --- a/fs/ubifs/sb.c
 +++ b/fs/ubifs/sb.c
-@@ -176,7 +176,9 @@ static int create_default_filesystem(str
+@@ -187,7 +187,9 @@ static int create_default_filesystem(str
        tmp64 = (long long)max_buds * c->leb_size;
        if (big_lpt)
                sup_flags |= UBIFS_FLG_BIGLPT;
@@ -47,9 +48,9 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
        sup_flags |= UBIFS_FLG_DOUBLE_HASH;
 +#endif
  
-       sup->ch.node_type  = UBIFS_SB_NODE;
-       sup->key_hash      = UBIFS_KEY_HASH_R5;
-@@ -192,7 +194,11 @@ static int create_default_filesystem(str
+       if (ubifs_authenticated(c)) {
+               sup_flags |= UBIFS_FLG_AUTHENTICATION;
+@@ -213,7 +215,11 @@ static int create_default_filesystem(str
        sup->jhead_cnt     = cpu_to_le32(DEFAULT_JHEADS_CNT);
        sup->fanout        = cpu_to_le32(DEFAULT_FANOUT);
        sup->lsave_cnt     = cpu_to_le32(c->lsave_cnt);
index fa32f88e17929f6585560c0651cf4bfb0c141212..14d3a37a8ccb2d0a1512c488abf7ae7bd62a0998 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #include <net/net_namespace.h>
  #ifdef CONFIG_SYSCTL
  #include <linux/sysctl.h>
-@@ -433,6 +434,56 @@ static int ct_cpu_seq_show(struct seq_fi
+@@ -454,6 +455,56 @@ static int ct_cpu_seq_show(struct seq_fi
        return 0;
  }
  
@@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static const struct seq_operations ct_cpu_seq_ops = {
        .start  = ct_cpu_seq_start,
        .next   = ct_cpu_seq_next,
-@@ -446,8 +497,9 @@ static int nf_conntrack_standalone_init_
+@@ -467,8 +518,9 @@ static int nf_conntrack_standalone_init_
        kuid_t root_uid;
        kgid_t root_gid;
  
diff --git a/target/linux/generic/pending-5.1/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-5.1/613-netfilter_optional_tcp_window_check.patch
deleted file mode 100644 (file)
index 2bc48f8..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Subject: netfilter: optional tcp window check
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- net/netfilter/nf_conntrack_proto_tcp.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
---- a/net/netfilter/nf_conntrack_proto_tcp.c
-+++ b/net/netfilter/nf_conntrack_proto_tcp.c
-@@ -34,6 +34,9 @@
- #include <net/netfilter/ipv4/nf_conntrack_ipv4.h>
- #include <net/netfilter/ipv6/nf_conntrack_ipv6.h>
-+/* Do not check the TCP window for incoming packets  */
-+static int nf_ct_tcp_no_window_check __read_mostly = 1;
-+
- /* "Be conservative in what you do,
-     be liberal in what you accept from others."
-     If it's non-zero, we mark only out of window RST segments as INVALID. */
-@@ -483,6 +486,9 @@ static bool tcp_in_window(const struct n
-       s32 receiver_offset;
-       bool res, in_recv_win;
-+      if (nf_ct_tcp_no_window_check)
-+              return true;
-+
-       /*
-        * Get the required data from the packet.
-        */
-@@ -1057,7 +1063,7 @@ static int tcp_packet(struct nf_conn *ct
-                IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED &&
-                timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK])
-               timeout = timeouts[TCP_CONNTRACK_UNACK];
--      else if (ct->proto.tcp.last_win == 0 &&
-+      else if (!nf_ct_tcp_no_window_check && ct->proto.tcp.last_win == 0 &&
-                timeouts[new_state] > timeouts[TCP_CONNTRACK_RETRANS])
-               timeout = timeouts[TCP_CONNTRACK_RETRANS];
-       else
-@@ -1506,6 +1512,13 @@ static struct ctl_table tcp_sysctl_table
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
-+      {
-+              .procname       = "nf_conntrack_tcp_no_window_check",
-+              .data           = &nf_ct_tcp_no_window_check,
-+              .maxlen         = sizeof(unsigned int),
-+              .mode           = 0644,
-+              .proc_handler   = proc_dointvec,
-+      },
-       { }
- };
- #endif /* CONFIG_SYSCTL */
index 6a5801027c6eda02160ce95f871d6e65e20b3124..b92934423dd1fab83893c0fd98898adb42aa7fbc 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/netfilter/nf_nat_core.c
 +++ b/net/netfilter/nf_nat_core.c
-@@ -110,6 +110,9 @@ int nf_xfrm_me_harder(struct net *net, s
+@@ -158,6 +158,9 @@ int nf_xfrm_me_harder(struct net *net, s
        struct sock *sk = skb->sk;
        int err;
  
index 1e4b075e8d8a1648d1bb993f6303ddfc82a43a9e..221f06fee713446288394c8be6d76daec5679de8 100644 (file)
@@ -20,11 +20,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  /* Packet socket options */
  
-@@ -57,6 +59,7 @@ struct sockaddr_ll {
- #define PACKET_QDISC_BYPASS           20
+@@ -58,6 +60,7 @@ struct sockaddr_ll {
  #define PACKET_ROLLOVER_STATS         21
  #define PACKET_FANOUT_DATA            22
-+#define PACKET_RECV_TYPE              23
+ #define PACKET_IGNORE_OUTGOING                23
++#define PACKET_RECV_TYPE              24
  
  #define PACKET_FANOUT_HASH            0
  #define PACKET_FANOUT_LB              1
@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                goto out;
  
        if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2036,12 +2038,12 @@ static int packet_rcv(struct sk_buff *sk
+@@ -2046,12 +2048,12 @@ static int packet_rcv(struct sk_buff *sk
        unsigned int snaplen, res;
        bool is_drop_n_account = false;
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!net_eq(dev_net(dev), sock_net(sk)))
                goto drop;
  
-@@ -2167,12 +2169,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2177,12 +2179,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;
  
-@@ -3251,6 +3253,7 @@ static int packet_create(struct net *net
+@@ -3250,6 +3252,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;
-@@ -3862,6 +3865,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3884,6 +3887,16 @@ packet_setsockopt(struct socket *sock, i
                po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
                return 0;
        }
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        default:
                return -ENOPROTOOPT;
        }
-@@ -3914,6 +3927,13 @@ static int packet_getsockopt(struct sock
+@@ -3936,6 +3949,13 @@ static int packet_getsockopt(struct sock
        case PACKET_VNET_HDR:
                val = po->has_vnet_hdr;
                break;
index afe5d32b3fce854bd27394c68ccd3000e3704317..58a71f0b9cfe0460a08bd7a5fcd0e2785c28c366 100644 (file)
@@ -23,9 +23,9 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -918,6 +918,13 @@ struct dev_ifalias {
-       char ifalias[];
};
+@@ -943,6 +943,13 @@ struct dev_ifalias {
struct devlink;
  
 +struct flow_offload;
 +
@@ -37,7 +37,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  /*
   * This structure defines the management hooks for network devices.
   * The following hooks can be defined; unless noted otherwise, they are
-@@ -1150,6 +1157,10 @@ struct dev_ifalias {
+@@ -1176,6 +1183,10 @@ struct devlink;
   * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
   *                         u16 flags);
   *
@@ -48,7 +48,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
   * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
   *    Called to change device carrier. Soft-devices (like dummy, team, etc)
   *    which do not represent real hardware may define this to allow their
-@@ -1377,6 +1388,8 @@ struct net_device_ops {
+@@ -1418,6 +1429,8 @@ struct net_device_ops {
        int                     (*ndo_bridge_dellink)(struct net_device *dev,
                                                      struct nlmsghdr *nlh,
                                                      u16 flags);
@@ -85,7 +85,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
  struct flow_offload {
        struct flow_offload_tuple_rhash         tuplehash[FLOW_OFFLOAD_DIR_MAX];
-@@ -125,6 +132,22 @@ unsigned int nf_flow_offload_ip_hook(voi
+@@ -121,6 +128,22 @@ unsigned int nf_flow_offload_ip_hook(voi
  unsigned int nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb,
                                       const struct nf_hook_state *state);
  
@@ -110,7 +110,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
 --- a/include/uapi/linux/netfilter/nf_tables.h
 +++ b/include/uapi/linux/netfilter/nf_tables.h
-@@ -1464,6 +1464,7 @@ enum nft_object_attributes {
+@@ -1488,6 +1488,7 @@ enum nft_object_attributes {
   * @NFTA_FLOWTABLE_HOOK: netfilter hook configuration(NLA_U32)
   * @NFTA_FLOWTABLE_USE: number of references to this flow table (NLA_U32)
   * @NFTA_FLOWTABLE_HANDLE: object handle (NLA_U64)
@@ -118,7 +118,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
   */
  enum nft_flowtable_attributes {
        NFTA_FLOWTABLE_UNSPEC,
-@@ -1473,6 +1474,7 @@ enum nft_flowtable_attributes {
+@@ -1497,6 +1498,7 @@ enum nft_flowtable_attributes {
        NFTA_FLOWTABLE_USE,
        NFTA_FLOWTABLE_HANDLE,
        NFTA_FLOWTABLE_PAD,
@@ -128,7 +128,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  #define NFTA_FLOWTABLE_MAX    (__NFTA_FLOWTABLE_MAX - 1)
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
-@@ -714,6 +714,15 @@ config NF_FLOW_TABLE
+@@ -718,6 +718,15 @@ config NF_FLOW_TABLE
  
          To compile it as a module, choose M here.
  
@@ -146,7 +146,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        default m if NETFILTER_ADVANCED=n
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -126,6 +126,7 @@ obj-$(CONFIG_NF_FLOW_TABLE)        += nf_flow_t
+@@ -124,6 +124,7 @@ obj-$(CONFIG_NF_FLOW_TABLE)        += nf_flow_t
  nf_flow_table-objs := nf_flow_table_core.o nf_flow_table_ip.o
  
  obj-$(CONFIG_NF_FLOW_TABLE_INET) += nf_flow_table_inet.o
@@ -183,17 +183,17 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        flow_offload_free(flow);
  }
  
-@@ -358,6 +367,9 @@ static int nf_flow_offload_gc_step(struc
-               if (!teardown)
-                       nf_ct_offload_timeout(flow);
+@@ -330,6 +339,9 @@ static void nf_flow_offload_gc_step(stru
+       if (!teardown)
+               nf_ct_offload_timeout(flow);
  
-+              if (nf_flow_in_hw(flow) && !teardown)
-+                      continue;
++      if (nf_flow_in_hw(flow) && !teardown)
++              return;
 +
-               if (nf_flow_has_expired(flow) || teardown)
-                       flow_offload_del(flow_table, flow);
      }
-@@ -493,10 +505,43 @@ int nf_flow_dnat_port(const struct flow_
+       if (nf_flow_has_expired(flow) || teardown)
+               flow_offload_del(flow_table, flow);
+ }
+@@ -459,10 +471,43 @@ int nf_flow_dnat_port(const struct flow_
  }
  EXPORT_SYMBOL_GPL(nf_flow_dnat_port);
  
@@ -237,7 +237,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        INIT_DEFERRABLE_WORK(&flowtable->gc_work, nf_flow_offload_work_gc);
  
        err = rhashtable_init(&flowtable->rhashtable,
-@@ -534,6 +579,8 @@ static void nf_flow_table_iterate_cleanu
+@@ -503,6 +548,8 @@ static void nf_flow_table_iterate_cleanu
  {
        nf_flow_table_iterate(flowtable, nf_flow_table_do_cleanup, dev);
        flush_delayed_work(&flowtable->gc_work);
@@ -245,8 +245,8 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 +              flush_work(&nf_flow_offload_hw_work);
  }
  
- void nf_flow_table_cleanup(struct net *net, struct net_device *dev)
-@@ -547,6 +594,26 @@ void nf_flow_table_cleanup(struct net *n
+ void nf_flow_table_cleanup(struct net_device *dev)
+@@ -516,6 +563,26 @@ void nf_flow_table_cleanup(struct net_de
  }
  EXPORT_SYMBOL_GPL(nf_flow_table_cleanup);
  
@@ -273,9 +273,9 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  void nf_flow_table_free(struct nf_flowtable *flow_table)
  {
        mutex_lock(&flowtable_lock);
-@@ -556,9 +623,58 @@ void nf_flow_table_free(struct nf_flowta
+@@ -525,9 +592,58 @@ void nf_flow_table_free(struct nf_flowta
        nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL);
-       WARN_ON(!nf_flow_offload_gc_step(flow_table));
+       nf_flow_table_iterate(flow_table, nf_flow_offload_gc_step, flow_table);
        rhashtable_destroy(&flow_table->rhashtable);
 +      if (flow_table->flags & NF_FLOWTABLE_F_HW)
 +              nf_flow_offload_hw_free(flow_table);
@@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 +MODULE_ALIAS("nf-flow-table-hw");
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -5463,6 +5463,13 @@ static int nf_tables_flowtable_parse_hoo
+@@ -5580,6 +5580,13 @@ static int nf_tables_flowtable_parse_hoo
        if (err < 0)
                return err;
  
@@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
        if (!ops)
                return -ENOMEM;
-@@ -5594,10 +5601,19 @@ static int nf_tables_newflowtable(struct
+@@ -5711,10 +5718,19 @@ static int nf_tables_newflowtable(struct
        }
  
        flowtable->data.type = type;
@@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
                                             flowtable);
        if (err < 0)
-@@ -5723,7 +5739,8 @@ static int nf_tables_fill_flowtable_info
+@@ -5840,7 +5856,8 @@ static int nf_tables_fill_flowtable_info
            nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
            nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
            nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),
index 87ff634793e326cf7bb36d184b329ba3c175a009..d49e93637af7b0aa17204e1568e545b64d36fedd 100644 (file)
@@ -15,15 +15,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -919,6 +919,7 @@ struct dev_ifalias {
};
+@@ -944,6 +944,7 @@ struct dev_ifalias {
struct devlink;
  
  struct flow_offload;
 +struct flow_offload_hw_path;
  
  enum flow_offload_type {
        FLOW_OFFLOAD_ADD        = 0,
-@@ -1157,8 +1158,15 @@ enum flow_offload_type {
+@@ -1183,8 +1184,15 @@ enum flow_offload_type {
   * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
   *                         u16 flags);
   *
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   *    Adds/deletes flow entry to/from net device flowtable.
   *
   * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
-@@ -1388,8 +1396,11 @@ struct net_device_ops {
+@@ -1429,8 +1437,11 @@ struct net_device_ops {
        int                     (*ndo_bridge_dellink)(struct net_device *dev,
                                                      struct nlmsghdr *nlh,
                                                      u16 flags);
index 724f1c46caedeb50fbce9e517d1d99526f6017b2..571330f7a034a1f8e36bd0a462b3d727732dd9fa 100644 (file)
@@ -9,10 +9,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/8021q/vlan_dev.c
 +++ b/net/8021q/vlan_dev.c
-@@ -32,6 +32,10 @@
+@@ -31,6 +31,10 @@
+ #include <linux/ethtool.h>
  #include <linux/phy.h>
  #include <net/arp.h>
- #include <net/switchdev.h>
 +#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
 +#include <linux/netfilter.h>
 +#include <net/netfilter/nf_flow_table.h>
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  #include "vlan.h"
  #include "vlanproc.h"
-@@ -770,6 +774,27 @@ static int vlan_dev_get_iflink(const str
+@@ -772,6 +776,27 @@ static int vlan_dev_get_iflink(const str
        return real_dev->ifindex;
  }
  
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static const struct ethtool_ops vlan_ethtool_ops = {
        .get_link_ksettings     = vlan_ethtool_get_link_ksettings,
        .get_drvinfo            = vlan_ethtool_get_drvinfo,
-@@ -807,6 +832,9 @@ static const struct net_device_ops vlan_
+@@ -811,6 +836,9 @@ static const struct net_device_ops vlan_
        .ndo_fix_features       = vlan_dev_fix_features,
        .ndo_get_lock_subclass  = vlan_dev_get_lock_subclass,
        .ndo_get_iflink         = vlan_dev_get_iflink,
index 7d9c8abe9cafa9f1802068d356ce566a05de8b8b..2cdff541f311a898ef7e4e6a01e343fc6837eb98 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  #include <linux/uaccess.h>
  #include "br_private.h"
-@@ -370,6 +374,28 @@ static const struct ethtool_ops br_ethto
+@@ -380,6 +384,28 @@ static const struct ethtool_ops br_ethto
        .get_link       = ethtool_op_get_link,
  };
  
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static const struct net_device_ops br_netdev_ops = {
        .ndo_open                = br_dev_open,
        .ndo_stop                = br_dev_stop,
-@@ -397,6 +423,9 @@ static const struct net_device_ops br_ne
+@@ -408,6 +434,9 @@ static const struct net_device_ops br_ne
        .ndo_bridge_setlink      = br_setlink,
        .ndo_bridge_dellink      = br_dellink,
        .ndo_features_check      = passthru_features_check,
index 8d2f2039d156e5b1d81517ea114d26d0be1067a3..edc3cd20ef5ae704cc0ba64ba09c204d7232e79a 100644 (file)
@@ -26,12 +26,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        struct flow_offload_tuple_rhash         tuplehash[FLOW_OFFLOAD_DIR_MAX];
 --- a/net/netfilter/nf_flow_table_core.c
 +++ b/net/netfilter/nf_flow_table_core.c
-@@ -367,7 +367,7 @@ static int nf_flow_offload_gc_step(struc
-               if (!teardown)
-                       nf_ct_offload_timeout(flow);
+@@ -339,7 +339,7 @@ static void nf_flow_offload_gc_step(stru
+       if (!teardown)
+               nf_ct_offload_timeout(flow);
  
--              if (nf_flow_in_hw(flow) && !teardown)
-+              if ((flow->flags & FLOW_OFFLOAD_KEEP) && !teardown)
-                       continue;
+-      if (nf_flow_in_hw(flow) && !teardown)
++      if ((flow->flags & FLOW_OFFLOAD_KEEP) && !teardown)
+               return;
  
-               if (nf_flow_has_expired(flow) || teardown)
+       if (nf_flow_has_expired(flow) || teardown)
index db79a6db22e70312062c02ed91bbc99b1a26bcb9..24bf14c1b4db62a0f421af6fc9872d6cc7011934 100644 (file)
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -2493,7 +2493,7 @@ static inline int pskb_network_may_pull(
+@@ -2591,7 +2591,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
index 9e8bc10fd67f8d7ad74ba8096a65231fed99c492..b14d758c5f7b421ef504794f9a77658bd49ac9f6 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 
 --- a/include/net/netns/ipv6.h
 +++ b/include/net/netns/ipv6.h
-@@ -78,6 +78,7 @@ struct netns_ipv6 {
+@@ -79,6 +79,7 @@ struct netns_ipv6 {
        unsigned int            fib6_rules_require_fldissect;
        bool                    fib6_has_custom_rules;
        struct rt6_info         *ip6_prohibit_entry;
@@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  static void rt_fibinfo_free(struct rtable __rcu **rtp)
 --- a/net/ipv4/fib_trie.c
 +++ b/net/ipv4/fib_trie.c
-@@ -2474,6 +2474,7 @@ static const char *const rtn_type_names[
+@@ -2489,6 +2489,7 @@ static const char *const rtn_type_names[
        [RTN_THROW] = "THROW",
        [RTN_NAT] = "NAT",
        [RTN_XRESOLVE] = "XRESOLVE",
@@ -76,7 +76,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  static inline const char *rtn_type(char *buf, size_t len, unsigned int t)
 --- a/net/ipv4/ipmr.c
 +++ b/net/ipv4/ipmr.c
-@@ -179,6 +179,7 @@ static int ipmr_rule_action(struct fib_r
+@@ -178,6 +178,7 @@ static int ipmr_rule_action(struct fib_r
        case FR_ACT_UNREACHABLE:
                return -ENETUNREACH;
        case FR_ACT_PROHIBIT:
@@ -99,7 +99,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
        tb_id = fib_rule_get_table(rule, arg);
 --- a/net/ipv6/ip6mr.c
 +++ b/net/ipv6/ip6mr.c
-@@ -162,6 +162,8 @@ static int ip6mr_rule_action(struct fib_
+@@ -166,6 +166,8 @@ static int ip6mr_rule_action(struct fib_
                return -ENETUNREACH;
        case FR_ACT_PROHIBIT:
                return -EACCES;
@@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  static const struct rt6_info ip6_blk_hole_entry_template = {
        .dst = {
                .__refcnt       = ATOMIC_INIT(1),
-@@ -900,6 +914,7 @@ static const int fib6_prop[RTN_MAX + 1]
+@@ -897,6 +911,7 @@ static const int fib6_prop[RTN_MAX + 1]
        [RTN_BLACKHOLE] = -EINVAL,
        [RTN_UNREACHABLE] = -EHOSTUNREACH,
        [RTN_PROHIBIT]  = -EACCES,
@@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
        [RTN_THROW]     = -EAGAIN,
        [RTN_NAT]       = -EINVAL,
        [RTN_XRESOLVE]  = -EINVAL,
-@@ -937,6 +952,10 @@ static void ip6_rt_init_dst_reject(struc
+@@ -934,6 +949,10 @@ static void ip6_rt_init_dst_reject(struc
                rt->dst.output = ip6_pkt_prohibit_out;
                rt->dst.input = ip6_pkt_prohibit;
                break;
@@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
        case RTN_THROW:
        case RTN_UNREACHABLE:
        default:
-@@ -3774,6 +3793,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -3728,6 +3747,17 @@ static int ip6_pkt_prohibit_out(struct n
        return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
  }
  
@@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  /*
   *    Allocate a dst for local (unicast / anycast) address.
   */
-@@ -4221,7 +4251,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -4183,7 +4213,8 @@ static int rtm_to_fib6_config(struct sk_
        if (rtm->rtm_type == RTN_UNREACHABLE ||
            rtm->rtm_type == RTN_BLACKHOLE ||
            rtm->rtm_type == RTN_PROHIBIT ||
@@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
                cfg->fc_flags |= RTF_REJECT;
  
        if (rtm->rtm_type == RTN_LOCAL)
-@@ -5069,6 +5100,8 @@ static int ip6_route_dev_notify(struct n
+@@ -5106,6 +5137,8 @@ static int ip6_route_dev_notify(struct n
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
                net->ipv6.ip6_prohibit_entry->dst.dev = dev;
                net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
                net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
                net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  #endif
-@@ -5080,6 +5113,7 @@ static int ip6_route_dev_notify(struct n
+@@ -5117,6 +5150,7 @@ static int ip6_route_dev_notify(struct n
                in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
                in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
                in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
  #endif
        }
-@@ -5274,6 +5308,15 @@ static int __net_init ip6_route_net_init
+@@ -5328,6 +5362,15 @@ static int __net_init ip6_route_net_init
        net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
        dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
                         ip6_template_metrics, true);
@@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  #endif
  
        net->ipv6.sysctl.flush_delay = 0;
-@@ -5292,6 +5335,8 @@ out:
+@@ -5347,6 +5390,8 @@ out:
        return ret;
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  out_ip6_prohibit_entry:
        kfree(net->ipv6.ip6_prohibit_entry);
  out_ip6_null_entry:
-@@ -5312,6 +5357,7 @@ static void __net_exit ip6_route_net_exi
+@@ -5367,6 +5412,7 @@ static void __net_exit ip6_route_net_exi
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
        kfree(net->ipv6.ip6_prohibit_entry);
        kfree(net->ipv6.ip6_blk_hole_entry);
@@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  #endif
        dst_entries_destroy(&net->ipv6.ip6_dst_ops);
  }
-@@ -5388,6 +5434,9 @@ void __init ip6_route_init_special_entri
+@@ -5443,6 +5489,9 @@ void __init ip6_route_init_special_entri
        init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
        init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
        init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
index 85adfedc9488b2f5d21952d0dd337dd8b3ca72f6..5f335c4ae6dff862ebaac378efef2ea4e63b1cda 100644 (file)
@@ -28,7 +28,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  #endif
 --- a/include/uapi/linux/icmpv6.h
 +++ b/include/uapi/linux/icmpv6.h
-@@ -119,6 +119,8 @@ struct icmp6hdr {
+@@ -121,6 +121,8 @@ struct icmp6hdr {
  #define ICMPV6_POLICY_FAIL            5
  #define ICMPV6_REJECT_ROUTE           6
  
index f7803f0e3676be75f2706788c70811286a30f421..6d59d0585e2a99f82ffbb5e6d852e149c756063e 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1882,6 +1882,8 @@ struct net_device {
+@@ -1923,6 +1923,8 @@ struct net_device {
        struct netdev_hw_addr_list      mc;
        struct netdev_hw_addr_list      dev_addrs;
  
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -799,6 +799,7 @@ struct sk_buff {
+@@ -833,6 +833,7 @@ struct sk_buff {
  #ifdef CONFIG_TLS_DEVICE
        __u8                    decrypted:1;
  #endif
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        __u16                   tc_index;       /* traffic control index */
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -5468,6 +5468,9 @@ static enum gro_result dev_gro_receive(s
+@@ -5541,6 +5541,9 @@ static enum gro_result dev_gro_receive(s
        int same_flow;
        int grow;
  
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (netif_elide_gro(skb->dev))
                goto normal;
  
-@@ -6962,6 +6965,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -7046,6 +7049,48 @@ static void __netdev_adjacent_dev_unlink
                                           &upper_dev->adj_list.lower);
  }
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static int __netdev_upper_dev_link(struct net_device *dev,
                                   struct net_device *upper_dev, bool master,
                                   void *upper_priv, void *upper_info,
-@@ -7009,6 +7054,7 @@ static int __netdev_upper_dev_link(struc
+@@ -7093,6 +7138,7 @@ static int __netdev_upper_dev_link(struc
        if (ret)
                return ret;
  
@@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
                                            &changeupper_info.info);
        ret = notifier_to_errno(ret);
-@@ -7095,6 +7141,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -7179,6 +7225,7 @@ void netdev_upper_dev_unlink(struct net_
  
        __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
                                      &changeupper_info.info);
  }
-@@ -7718,6 +7765,7 @@ int dev_set_mac_address(struct net_devic
+@@ -7831,6 +7878,7 @@ int dev_set_mac_address(struct net_devic
        if (err)
                return err;
        dev->addr_assign_type = NET_ADDR_SET;
@@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        return 0;
 --- a/net/ethernet/eth.c
 +++ b/net/ethernet/eth.c
-@@ -144,6 +144,18 @@ u32 eth_get_headlen(void *data, unsigned
+@@ -145,6 +145,18 @@ u32 eth_get_headlen(void *data, unsigned
  }
  EXPORT_SYMBOL(eth_get_headlen);
  
@@ -136,17 +136,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /**
   * eth_type_trans - determine the packet's protocol ID.
   * @skb: received socket data
-@@ -172,8 +184,12 @@ __be16 eth_type_trans(struct sk_buff *sk
-                       skb->pkt_type = PACKET_MULTICAST;
-       }
-       else if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
--                                                 dev->dev_addr)))
-+                                                 dev->dev_addr))) {
-               skb->pkt_type = PACKET_OTHERHOST;
+@@ -176,6 +188,10 @@ __be16 eth_type_trans(struct sk_buff *sk
+               } else {
+                       skb->pkt_type = PACKET_OTHERHOST;
+               }
++
 +              if (eth_check_local_mask(eth->h_dest, dev->dev_addr,
 +                                       dev->local_addr_mask))
 +                      skb->gro_skip = 1;
-+      }
+       }
  
        /*
-        * Some variants of DSA tagging don't have an ethertype field
index 13f564059019839b210f876ed5f677c08d46fbc9..2b89a05238358213941a10f69721d3f11ff159cc 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -11,6 +11,7 @@
+@@ -10,6 +10,7 @@
  #include <linux/of_net.h>
  #include <linux/phy.h>
  #include <linux/export.h>
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -39,7 +40,7 @@ int of_get_phy_mode(struct device_node *
+@@ -38,7 +39,7 @@ int of_get_phy_mode(struct device_node *
  }
  EXPORT_SYMBOL_GPL(of_get_phy_mode);
  
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  {
        struct property *pp = of_find_property(np, name, NULL);
  
-@@ -48,6 +49,79 @@ static const void *of_get_mac_addr(struc
+@@ -47,6 +48,79 @@ static const void *of_get_mac_addr(struc
        return NULL;
  }
  
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -65,11 +139,18 @@ static const void *of_get_mac_addr(struc
+@@ -64,11 +138,18 @@ static const void *of_get_mac_addr(struc
   * addresses.  Some older U-Boots only initialized 'local-mac-address'.  In
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
index 0cf187a49146cacc1cd1e5d2668fb4c767c6f831..2dbbdc30da1a524309bba0784478732aae85fd87 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1130,6 +1130,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1352,6 +1352,9 @@ void phy_detach(struct phy_device *phyde
        struct module *ndev_owner = dev->dev.parent->driver->owner;
        struct mii_bus *bus;
  
@@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
                sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev");
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -560,6 +560,12 @@ struct phy_driver {
+@@ -538,6 +538,12 @@ struct phy_driver {
         */
        int (*did_interrupt)(struct phy_device *phydev);
  
index e56e77addfc3b15d45a23442216a6b16ef90f52b..7218fc287a57ba8df3a53b2faf3d56b11e282d85 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/net/phy/at803x.c
 +++ b/drivers/net/phy/at803x.c
-@@ -12,12 +12,14 @@
+@@ -8,12 +8,14 @@
   */
  
  #include <linux/phy.h>
@@ -28,7 +28,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
  #define AT803X_INTR_ENABLE                    0x12
  #define AT803X_INTR_ENABLE_AUTONEG_ERR                BIT(15)
-@@ -45,6 +47,11 @@
+@@ -38,6 +40,11 @@
  #define AT803X_REG_CHIP_CONFIG                        0x1f
  #define AT803X_BT_BX_REG_SEL                  0x8000
  
@@ -40,7 +40,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  #define AT803X_DEBUG_ADDR                     0x1D
  #define AT803X_DEBUG_DATA                     0x1E
  
-@@ -73,6 +80,7 @@ MODULE_LICENSE("GPL");
+@@ -66,6 +73,7 @@ MODULE_LICENSE("GPL");
  
  struct at803x_priv {
        bool phy_reset:1;
@@ -48,7 +48,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  };
  
  struct at803x_context {
-@@ -249,8 +257,16 @@ static int at803x_probe(struct phy_devic
+@@ -247,8 +255,16 @@ static int at803x_probe(struct phy_devic
        return 0;
  }
  
@@ -65,34 +65,39 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
        int ret;
  
        ret = genphy_config_init(phydev);
-@@ -271,6 +287,26 @@ static int at803x_config_init(struct phy
-                       return ret;
-       }
+@@ -272,8 +288,11 @@ static int at803x_config_init(struct phy
+       if (ret < 0)
+               return ret;
  
 +      pdata = dev_get_platdata(&phydev->mdio.dev);
-+      if (pdata) {
-+              if (pdata->disable_smarteee)
-+                      at803x_disable_smarteee(phydev);
-+
-+              if (pdata->enable_rgmii_rx_delay)
-+                      at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0,
-+                              AT803X_DEBUG_RX_CLK_DLY_EN);
-+              else
-+                      at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
-+                              AT803X_DEBUG_RX_CLK_DLY_EN, 0);
 +
-+              if (pdata->enable_rgmii_tx_delay)
-+                      at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, 0,
-+                              AT803X_DEBUG_TX_CLK_DLY_EN);
-+              else
-+                      at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5,
-+                              AT803X_DEBUG_TX_CLK_DLY_EN, 0);
-+      }
+       if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
+-          phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) {
++          phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
++          (pdata && pdata->enable_rgmii_rx_delay)) {
+               /* If RGMII_ID or RGMII_RXID are specified enable RX delay,
+                * otherwise keep it disabled
+                */
+@@ -283,13 +302,17 @@ static int at803x_config_init(struct phy
+       }
+       if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
+-          phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) {
++          phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
++          (pdata && pdata->enable_rgmii_tx_delay)) {
+               /* If RGMII_ID or RGMII_TXID are specified enable TX delay,
+                * otherwise keep it disabled
+                */
+               ret = at803x_enable_tx_delay(phydev);
+       }
++      if (pdata && pdata->disable_smarteee)
++              at803x_disable_smarteee(phydev);
 +
-       return 0;
+       return ret;
  }
  
-@@ -308,6 +344,8 @@ static int at803x_config_intr(struct phy
+@@ -327,6 +350,8 @@ static int at803x_config_intr(struct phy
  static void at803x_link_change_notify(struct phy_device *phydev)
  {
        struct at803x_priv *priv = phydev->priv;
@@ -101,7 +106,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
        /*
         * Conduct a hardware reset for AT8030/2 every time a link loss is
-@@ -336,6 +374,24 @@ static void at803x_link_change_notify(st
+@@ -355,6 +380,24 @@ static void at803x_link_change_notify(st
        } else {
                priv->phy_reset = false;
        }
index 1f81b37f712ded66ae067540880fed572c2c487d..7a2293782cf0baa42741b5922b1a55c1cdd801d9 100644 (file)
@@ -13,15 +13,15 @@ Signed-off-by: Roman Yeryomin <roman@advem.lv>
 
 --- a/drivers/net/phy/at803x.c
 +++ b/drivers/net/phy/at803x.c
-@@ -46,6 +46,7 @@
- #define AT803X_FUNC_DATA                      0x4003
+@@ -39,6 +39,7 @@
+ #define AT803X_LOC_MAC_ADDR_32_47_OFFSET      0x804A
  #define AT803X_REG_CHIP_CONFIG                        0x1f
  #define AT803X_BT_BX_REG_SEL                  0x8000
 +#define AT803X_SGMII_ANEG_EN                  0x1000
  
  #define AT803X_PCS_SMART_EEE_CTRL3                    0x805D
  #define AT803X_SMART_EEE_CTRL3_LPI_TX_DELAY_SEL_MASK  0x3
-@@ -268,6 +269,27 @@ static int at803x_config_init(struct phy
+@@ -266,6 +267,27 @@ static int at803x_config_init(struct phy
  {
        struct at803x_platform_data *pdata;
        int ret;
index 496700f37710c31159be823177772281b109ede7..961271592d3a74c8ced014ee661b70c5e627b458 100644 (file)
@@ -1,21 +1,20 @@
 --- a/drivers/net/phy/at803x.c
 +++ b/drivers/net/phy/at803x.c
-@@ -329,6 +329,14 @@ static int at803x_config_init(struct phy
-                               AT803X_DEBUG_TX_CLK_DLY_EN, 0);
+@@ -332,8 +332,12 @@ static int at803x_config_init(struct phy
+               ret = at803x_enable_tx_delay(phydev);
        }
  
-+#ifdef CONFIG_OF_MDIO
-+      if (phydev->mdio.dev.of_node &&
-+              of_property_read_bool(phydev->mdio.dev.of_node,
-+                                    "at803x-disable-smarteee")) {
-+              at803x_disable_smarteee(phydev);
+-      if (pdata && pdata->disable_smarteee)
++      if ((pdata && pdata->disable_smarteee) ||
++          (phydev->mdio.dev.of_node &&
++           of_property_read_bool(phydev->mdio.dev.of_node,
++                                 "at803x-disable-smarteee"))) {
+               at803x_disable_smarteee(phydev);
 +      }
-+#endif
-+
-       return 0;
- }
  
-@@ -367,6 +375,7 @@ static void at803x_link_change_notify(st
+       return ret;
+ }
+@@ -373,6 +377,7 @@ static void at803x_link_change_notify(st
  {
        struct at803x_priv *priv = phydev->priv;
        struct at803x_platform_data *pdata;
@@ -23,7 +22,7 @@
        pdata = dev_get_platdata(&phydev->mdio.dev);
  
        /*
-@@ -396,8 +405,19 @@ static void at803x_link_change_notify(st
+@@ -402,8 +407,19 @@ static void at803x_link_change_notify(st
        } else {
                priv->phy_reset = false;
        }
index c8c28b51755398371ee0e6ffd7b82d2cd0cf06f5..862e2480c92857fd83093895d08a60568c3d4a45 100644 (file)
@@ -9,7 +9,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/pci/Kconfig
 +++ b/drivers/pci/Kconfig
-@@ -89,6 +89,13 @@ config XEN_PCIDEV_FRONTEND
+@@ -115,6 +115,13 @@ config XEN_PCIDEV_FRONTEND
            The PCI device frontend driver allows the kernel to import arbitrary
            PCI devices from a PCI backend to support PCI driver domains.
  
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /*
   * The Mellanox Tavor device gives false positive parity errors.  Mark this
   * device with a broken_parity_status to allow PCI scanning code to "skip"
-@@ -3152,6 +3153,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3177,6 +3178,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  
@@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /*
   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.
   * To work around this, query the size it should be configured to by the
-@@ -3177,6 +3180,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3202,6 +3205,8 @@ static void quirk_intel_ntb(struct pci_d
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb);
  
@@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /*
   * Some BIOS implementations leave the Intel GPU interrupts enabled, even
   * though no one is handling them (e.g., if the i915 driver is never
-@@ -3215,6 +3220,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3240,6 +3245,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
  
index 7d36af7d266a34afdda289fbfb5be259ba1db879..7c63d26abd237f401150e39052680bdcaafdb879 100644 (file)
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
  {
        u16 cmd;
-@@ -1268,3 +1283,4 @@ static void quirk_usb_early_handoff(stru
+@@ -1262,3 +1277,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);
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif  /*  __LINUX_USB_PCI_QUIRKS_H  */
 --- a/include/linux/usb/hcd.h
 +++ b/include/linux/usb/hcd.h
-@@ -473,7 +473,14 @@ extern int usb_hcd_pci_probe(struct pci_
+@@ -472,7 +472,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);
  
index de029fafe5a677aefee767713712a1ecb35d031b..ed67176061b541ed564831b0c313a66744da0554 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/ata/Kconfig
 +++ b/drivers/ata/Kconfig
-@@ -46,6 +46,22 @@ config ATA_VERBOSE_ERROR
+@@ -45,6 +45,22 @@ config ATA_VERBOSE_ERROR
  
          If unsure, say Y.
  
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -893,6 +896,12 @@ struct ata_port {
+@@ -892,6 +895,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
        struct ata_acpi_gtm     __acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
index 51af6b5d6b97bd825da78ab91aebdc6d0dc2b3a8..438ebc339e67547294434db2cc3aec3c284a0689 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1531,6 +1531,15 @@ config EMBEDDED
+@@ -1588,6 +1588,15 @@ config EMBEDDED
          an embedded system so certain expert options are available
          for configuration.
  
@@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
        help
 --- a/init/main.c
 +++ b/init/main.c
-@@ -366,6 +366,29 @@ static inline void setup_nr_cpu_ids(void
+@@ -365,6 +365,29 @@ static inline void setup_nr_cpu_ids(void
  static inline void smp_prepare_cpus(unsigned int maxcpus) { }
  #endif
  
@@ -61,7 +61,7 @@ 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
-@@ -558,6 +581,7 @@ asmlinkage __visible void __init start_k
+@@ -572,6 +595,7 @@ asmlinkage __visible void __init start_k
        add_device_randomness(command_line, strlen(command_line));
        boot_init_stack_canary();
        mm_init_cpumask(&init_mm);