kernel: bump 4.14 to 4.14.20
authorStijn Tintel <stijn@linux-ipv6.be>
Sat, 17 Feb 2018 21:59:07 +0000 (22:59 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Sun, 18 Feb 2018 01:59:48 +0000 (02:59 +0100)
Refresh patches.
Remove upstreamed patches:
- backport/080-v4.15-0001-arch-define-weak-abort.patch
- backport/081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch
Update patch that no longer applies:
pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch

Fixes CVE-2017-8824.

Compile-tested: octeon, x86/64.
Runtime-tested: octeon, x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
31 files changed:
include/kernel-version.mk
target/linux/archs38/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
target/linux/generic/backport-4.14/080-v4.15-0001-arch-define-weak-abort.patch [deleted file]
target/linux/generic/backport-4.14/081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch [deleted file]
target/linux/generic/hack-4.14/207-disable-modorder.patch
target/linux/generic/hack-4.14/220-gc_sections.patch
target/linux/generic/hack-4.14/902-debloat_proc.patch
target/linux/generic/pending-4.14/201-extra_optimization.patch
target/linux/generic/pending-4.14/491-ubi-auto-create-ubiblock-device-for-rootfs.patch
target/linux/generic/pending-4.14/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch
target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch
target/linux/mediatek/patches-4.14/0027-net-next-mediatek-fix-DQL-support.patch
target/linux/mediatek/patches-4.14/0032-net-dsa-mediatek-add-support-for-GMAC2-wired-to-ext-.patch
target/linux/mediatek/patches-4.14/0033-dsa-multi-cpu.patch
target/linux/mediatek/patches-4.14/0035-net-mediatek-disable-RX-VLan-offloading.patch
target/linux/mediatek/patches-4.14/0042-net-next-mediatek-honour-special-tag-bit-inside-RX-D.patch
target/linux/mediatek/patches-4.14/0043-net-next-mediatek-enable-special-tag-indication-for-.patch
target/linux/mediatek/patches-4.14/0044-net-next-dsa-mediatek-tell-GDMA-when-we-are-turning-.patch
target/linux/mediatek/patches-4.14/0045-net-dsa-mediatek-turn-into-platform-driver.patch
target/linux/mediatek/patches-4.14/0046-net-mediatek-add-irq-delay.patch
target/linux/mediatek/patches-4.14/0048-net-core-add-RPS-balancer.patch
target/linux/mediatek/patches-4.14/0051-net-mediatek-increase-tx_timeout.patch
target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
target/linux/mediatek/patches-4.14/0062-mdio-atomic.patch
target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch
target/linux/mediatek/patches-4.14/0064-dts.patch
target/linux/octeontx/patches-4.14/0001-net-thunderx-add-support-for-rgmii-internal-delay-mo.patch
target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
target/linux/ramips/patches-4.14/0040-nand-hack-restore-write_page.patch
target/linux/ramips/patches-4.14/0040-nand-hack.patch

index adf9712f004c9c959654ca067cddec76e5c54af4..891205d7797756cbd609077162d87aa87b4a32fb 100644 (file)
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .112
 LINUX_VERSION-4.9 = .77
-LINUX_VERSION-4.14 = .18
+LINUX_VERSION-4.14 = .20
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.112 = 544b42cbeed022896115c76a18fc97b4507d5b41d7ac0ce1dce9afd6ffd11ecd
 LINUX_KERNEL_HASH-4.9.77 = 7c29bc3fb96f1e23d98f664e786dddd53a1599f56431b9b7fdfba402a4b3705c
-LINUX_KERNEL_HASH-4.14.18 = 866a94c1c38d923ae18e74b683d7a8a79b674ebdfe7f40f1a3be9a27d39fe354
+LINUX_KERNEL_HASH-4.14.20 = 4ab7f42aa6af9c1e3b00cba6b1fa305a87407666aaa2fae555f7fbdaafb6d292
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
index 58094ae96d86042ca735cc2b5be0d7d6a3aa99dc..e63c2e934b316bd030334f859a7d405cd38f6ffb 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
 
 --- a/drivers/net/ethernet/stmicro/stmmac/common.h
 +++ b/drivers/net/ethernet/stmicro/stmmac/common.h
-@@ -49,7 +49,7 @@
+@@ -46,7 +46,7 @@
  #define STMMAC_GET_ENTRY(x, size)     ((x + 1) & (size - 1))
  
  #undef FRAME_FILTER_DEBUG
index 0c57f2e337d9576fdcbca7ffdf14a6c6ea5ed60f..6c80eaa4beb5480b496ed9b78cd34feaf2e0a09d 100644 (file)
@@ -55,7 +55,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
        rwlock_t                sk_callback_lock;
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -2744,6 +2744,7 @@ void sock_init_data(struct socket *sock,
+@@ -2741,6 +2741,7 @@ void sock_init_data(struct socket *sock,
  
        sk->sk_max_pacing_rate = ~0U;
        sk->sk_pacing_rate = ~0U;
diff --git a/target/linux/generic/backport-4.14/080-v4.15-0001-arch-define-weak-abort.patch b/target/linux/generic/backport-4.14/080-v4.15-0001-arch-define-weak-abort.patch
deleted file mode 100644 (file)
index 1867234..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 7c2c11b208be09c156573fc0076b7b3646e05219 Mon Sep 17 00:00:00 2001
-From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
-Date: Thu, 14 Dec 2017 15:33:19 -0800
-Subject: [PATCH] arch: define weak abort()
-
-gcc toggle -fisolate-erroneous-paths-dereference (default at -O2
-onwards) isolates faulty code paths such as null pointer access, divide
-by zero etc.  If gcc port doesnt implement __builtin_trap, an abort() is
-generated which causes kernel link error.
-
-In this case, gcc is generating abort due to 'divide by zero' in
-lib/mpi/mpih-div.c.
-
-Currently 'frv' and 'arc' are failing.  Previously other arch was also
-broken like m32r was fixed by commit d22e3d69ee1a ("m32r: fix build
-failure").
-
-Let's define this weak function which is common for all arch and fix the
-problem permanently.  We can even remove the arch specific 'abort' after
-this is done.
-
-Link: http://lkml.kernel.org/r/1513118956-8718-1-git-send-email-sudipm.mukherjee@gmail.com
-Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
-Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
-Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
-Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----
- kernel/exit.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/kernel/exit.c
-+++ b/kernel/exit.c
-@@ -1755,3 +1755,11 @@ Efault:
-       return -EFAULT;
- }
- #endif
-+
-+__weak void abort(void)
-+{
-+      BUG();
-+
-+      /* if that doesn't kill us, halt */
-+      panic("Oops failed to kill thread");
-+}
diff --git a/target/linux/generic/backport-4.14/081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch b/target/linux/generic/backport-4.14/081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch
deleted file mode 100644 (file)
index 4c1402f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-From dc8635b78cd8669c37e230058d18c33af7451ab1 Mon Sep 17 00:00:00 2001
-From: Andrew Morton <akpm@linux-foundation.org>
-Date: Thu, 4 Jan 2018 16:17:56 -0800
-Subject: [PATCH] kernel/exit.c: export abort() to modules
-
-gcc -fisolate-erroneous-paths-dereference can generate calls to abort()
-from modular code too.
-
-[arnd@arndb.de: drop duplicate exports of abort()]
-  Link: http://lkml.kernel.org/r/20180102103311.706364-1-arnd@arndb.de
-Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
-Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
-Cc: Arnd Bergmann <arnd@arndb.de>
-Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
-Cc: Russell King <rmk+kernel@armlinux.org.uk>
-Cc: Jose Abreu <Jose.Abreu@synopsys.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----
- arch/arm/kernel/traps.c       | 1 -
- arch/m32r/kernel/traps.c      | 1 -
- arch/unicore32/kernel/traps.c | 1 -
- kernel/exit.c                 | 1 +
- 4 files changed, 1 insertion(+), 3 deletions(-)
-
---- a/arch/arm/kernel/traps.c
-+++ b/arch/arm/kernel/traps.c
-@@ -790,7 +790,6 @@ void abort(void)
-       /* if that doesn't kill us, halt */
-       panic("Oops failed to kill thread");
- }
--EXPORT_SYMBOL(abort);
- void __init trap_init(void)
- {
---- a/arch/m32r/kernel/traps.c
-+++ b/arch/m32r/kernel/traps.c
-@@ -122,7 +122,6 @@ void abort(void)
-       /* if that doesn't kill us, halt */
-       panic("Oops failed to kill thread");
- }
--EXPORT_SYMBOL(abort);
- void __init trap_init(void)
- {
---- a/arch/unicore32/kernel/traps.c
-+++ b/arch/unicore32/kernel/traps.c
-@@ -298,7 +298,6 @@ void abort(void)
-       /* if that doesn't kill us, halt */
-       panic("Oops failed to kill thread");
- }
--EXPORT_SYMBOL(abort);
- void __init trap_init(void)
- {
---- a/kernel/exit.c
-+++ b/kernel/exit.c
-@@ -1763,3 +1763,4 @@ __weak void abort(void)
-       /* if that doesn't kill us, halt */
-       panic("Oops failed to kill thread");
- }
-+EXPORT_SYMBOL(abort);
index 4afed16a080af12c2f06a59f62e2fad6a8cf3548..a6b0f6760292524b873219da3a2f3f1e395af37b 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1212,7 +1212,6 @@ all: modules
+@@ -1213,7 +1213,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
  
-@@ -1241,7 +1240,6 @@ _modinst_:
+@@ -1242,7 +1241,6 @@ _modinst_:
                rm -f $(MODLIB)/build ; \
                ln -s $(CURDIR) $(MODLIB)/build ; \
        fi
index e06ddb80d444f23a19f49e0df064a4c91840e2f3..162ee45ff09a9f3ece06df33b117a4e29e06fb45 100644 (file)
@@ -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)
-@@ -784,11 +789,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -785,11 +790,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  endif
  
index e291da5163427e5522b7a88bd417922a79bef53d..c23a8fb616b13eeb250fc9df96209369dacc5c37 100644 (file)
@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -3383,6 +3383,8 @@ static __net_initdata struct pernet_oper
+@@ -3380,6 +3380,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
index 81f7e2664ea8df9e143d0dda6993da6abe809880..e92b1a10a3f6a843b4d7b93ea21d9baaf52f282b 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -638,12 +638,12 @@ KBUILD_CFLAGS    += $(call cc-disable-warni
+@@ -639,12 +639,12 @@ KBUILD_CFLAGS    += $(call cc-disable-warni
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
index f8dc1bcb2886359de7d47972aa40df226d22c0a1..cb2d52561013a242faa0ae2bc0303a11ee7797a2 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/mtd/ubi/block.c
 +++ b/drivers/mtd/ubi/block.c
-@@ -625,6 +625,44 @@ static void __init ubiblock_create_from_
+@@ -633,6 +633,44 @@ static void __init ubiblock_create_from_
        }
  }
  
@@ -53,7 +53,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  static void ubiblock_remove_all(void)
  {
        struct ubiblock *next;
-@@ -655,6 +693,10 @@ int __init ubiblock_init(void)
+@@ -665,6 +703,10 @@ int __init ubiblock_init(void)
         */
        ubiblock_create_from_param();
  
index 06cd1b62acf86b0976046471c6500de6a89b88e2..1bb53ada7fc9ef7ff2f256f80c1308a48809b574 100644 (file)
@@ -17,9 +17,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  #include "ubi-media.h"
  #include "ubi.h"
 @@ -445,6 +446,15 @@ int ubiblock_create(struct ubi_volume_in
-       add_disk(dev->gd);
        dev_info(disk_to_dev(dev->gd), "created from ubi%d:%d(%s)",
                 dev->ubi_num, dev->vol_id, vi->name);
+       mutex_unlock(&devices_mutex);
 +
 +      if (!strcmp(vi->name, "rootfs") &&
 +          IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) &&
index 770a1a0d767b96ae03c7314f67a6038607f5e77f..a0fdc14f782c8c8fcfc9311dad9614f2d8994588 100644 (file)
@@ -14,10 +14,8 @@ Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
  drivers/clk/mediatek/clk-mt2701.c | 4 ++++
  1 file changed, 4 insertions(+)
 
-Index: linux-4.14.11/drivers/clk/mediatek/clk-mt2701.c
-===================================================================
---- linux-4.14.11.orig/drivers/clk/mediatek/clk-mt2701.c
-+++ linux-4.14.11/drivers/clk/mediatek/clk-mt2701.c
+--- a/drivers/clk/mediatek/clk-mt2701.c
++++ b/drivers/clk/mediatek/clk-mt2701.c
 @@ -771,6 +771,8 @@ static void mtk_infrasys_init_early(stru
        if (r)
                pr_err("%s(): could not register clock provider: %d\n",
index 3431b119c0b760348fe87dc6ae7c1f6de831e4ad..3ea2f456a8ce9e839fd3c4a497d92a3cb9e018d2 100644 (file)
@@ -16,10 +16,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 35 +++++++++++++++++------------
  1 file changed, 21 insertions(+), 14 deletions(-)
 
-Index: linux-4.14.11/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.14.11.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.14.11/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 @@ -779,7 +779,16 @@ static int mtk_tx_map(struct sk_buff *sk
        WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) |
                                (!nr_frags * TX_DMA_LS0)));
index 073934d6e156c60adc1a6645ce7ebdbbd819ebf1..c01703d07b8b60bd84ebba68f095fccf1efc8024 100644 (file)
@@ -10,10 +10,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++
  2 files changed, 8 insertions(+)
 
-Index: linux-4.14.11/drivers/net/dsa/mt7530.c
-===================================================================
---- linux-4.14.11.orig/drivers/net/dsa/mt7530.c
-+++ linux-4.14.11/drivers/net/dsa/mt7530.c
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
 @@ -991,6 +991,11 @@ mt7530_setup(struct dsa_switch *ds)
        val = mt7530_read(priv, MT7530_MHWTRAP);
        val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;
index 92f4c98dcae64dc5075342c25396e09b0ba3c801..5c4edec077b1881723afa33b137e3105d26da92f 100644 (file)
@@ -1,7 +1,5 @@
-Index: linux-4.14.14/drivers/net/dsa/mt7530.c
-===================================================================
---- linux-4.14.14.orig/drivers/net/dsa/mt7530.c
-+++ linux-4.14.14/drivers/net/dsa/mt7530.c
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
 @@ -670,6 +670,9 @@ static int
  mt7530_cpu_port_enable(struct mt7530_priv *priv,
                       int port)
@@ -98,10 +96,8 @@ Index: linux-4.14.14/drivers/net/dsa/mt7530.c
        val |= MHWTRAP_MANUAL;
        if (!dsa_is_cpu_port(ds, 5)) {
                val |= MHWTRAP_P5_DIS;
-Index: linux-4.14.14/include/net/dsa.h
-===================================================================
---- linux-4.14.14.orig/include/net/dsa.h
-+++ linux-4.14.14/include/net/dsa.h
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
 @@ -185,6 +185,10 @@ struct dsa_port {
        u8                      stp_state;
        struct net_device       *bridge_dev;
@@ -144,10 +140,8 @@ Index: linux-4.14.14/include/net/dsa.h
  typedef int dsa_fdb_dump_cb_t(const unsigned char *addr, u16 vid,
                              bool is_static, void *data);
  struct dsa_switch_ops {
-Index: linux-4.14.14/net/dsa/dsa2.c
-===================================================================
---- linux-4.14.14.orig/net/dsa/dsa2.c
-+++ linux-4.14.14/net/dsa/dsa2.c
+--- a/net/dsa/dsa2.c
++++ b/net/dsa/dsa2.c
 @@ -253,6 +253,8 @@ static int dsa_cpu_port_apply(struct dsa
        memset(&port->devlink_port, 0, sizeof(port->devlink_port));
        err = devlink_port_register(ds->devlink, &port->devlink_port,
@@ -232,10 +226,8 @@ Index: linux-4.14.14/net/dsa/dsa2.c
                        /* Initialize enabled_port_mask now for drv->setup()
                         * to have access to a correct value, just like what
                         * net/dsa/dsa.c::dsa_switch_setup_one does.
-Index: linux-4.14.14/net/dsa/dsa_priv.h
-===================================================================
---- linux-4.14.14.orig/net/dsa/dsa_priv.h
-+++ linux-4.14.14/net/dsa/dsa_priv.h
+--- a/net/dsa/dsa_priv.h
++++ b/net/dsa/dsa_priv.h
 @@ -91,6 +91,8 @@ struct dsa_slave_priv {
  
        /* TC context */
@@ -255,10 +247,8 @@ Index: linux-4.14.14/net/dsa/dsa_priv.h
        return p->dp->cpu_dp->netdev;
  }
  
-Index: linux-4.14.14/net/dsa/slave.c
-===================================================================
---- linux-4.14.14.orig/net/dsa/slave.c
-+++ linux-4.14.14/net/dsa/slave.c
+--- a/net/dsa/slave.c
++++ b/net/dsa/slave.c
 @@ -1257,7 +1257,7 @@ int dsa_slave_create(struct dsa_port *po
        int ret;
  
index 36321c55cf525b7bde4cc4080755e6fb51aac11c..07f8206ead98bd7c6a67b396e72e8af9d6383b9f 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -643,8 +643,8 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -709,8 +709,8 @@ static int mtk_tx_map(struct sk_buff *sk
                txd4 |= TX_DMA_CHKSUM;
  
        /* VLAN header offload */
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
  
        mapped_addr = dma_map_single(eth->dev, skb->data,
                                     skb_headlen(skb), DMA_TO_DEVICE);
-@@ -1874,7 +1874,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -1979,7 +1979,10 @@ static int mtk_hw_init(struct mtk_eth *e
        mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
  
        /* Enable RX VLan Offloading */
@@ -32,8 +32,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
 +      else
 +              mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
  
-       /* disable delay and normal interrupt */
-       mtk_w32(eth, 0, MTK_QDMA_DELAY_INT);
+       /* enable interrupt delay for RX */
+       mtk_w32(eth, MTK_PDMA_DELAY_RX_DELAY, MTK_PDMA_DELAY_INT);
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 @@ -34,8 +34,6 @@
index 4f2c7b2e6ee7593c7c16b867c150c6974cde3bf2..8163e4475d57b2ac444773ff437ac8e7ae655a0d 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -933,10 +933,16 @@ static int mtk_poll_rx(struct napi_struc
+@@ -999,10 +999,16 @@ static int mtk_poll_rx(struct napi_struc
                if (!(trxd.rxd2 & RX_DMA_DONE))
                        break;
  
@@ -36,11 +36,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
 +                      mac--;
 +              }
  
-               netdev = eth->netdev[mac];
+               if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
+                            !eth->netdev[mac]))
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -284,6 +284,7 @@
+@@ -287,6 +287,7 @@
  
  /* QDMA descriptor rxd4 */
  #define RX_DMA_L4_VALID               BIT(24)
index 2256325c9c209595345266adf2fa1605de65c826..7542a55148cfa083be3a35e8385fffbe893cb92d 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1894,6 +1894,8 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -1983,6 +1983,8 @@ static int mtk_hw_init(struct mtk_eth *e
         */
        val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
        mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@@ -28,7 +28,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
        if (MTK_HW_FEATURES & NETIF_F_HW_VLAN_CTAG_RX)
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -76,6 +76,10 @@
+@@ -72,6 +72,10 @@
  #define MTK_CDMQ_IG_CTRL      0x1400
  #define MTK_CDMQ_STAG_EN      BIT(0)
  
index 51204d40017e48a1eb8f3c5770de70afe2ff16a2..4a69e7aadf48795fb1a1de1cea4ba49db72f71a6 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -742,6 +742,11 @@ mt7530_cpu_port_enable(struct mt7530_pri
+@@ -677,6 +677,11 @@ mt7530_cpu_port_enable(struct mt7530_pri
        mt7530_write(priv, MT7530_PVC_P(port),
                     PORT_SPEC_TAG);
  
index f9c0a2b5e88182ae15935bd42608d454c8d86630..87e3e88226db941cab42f95959b3515dfd48d6d5 100644 (file)
@@ -8,10 +8,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
  drivers/net/dsa/mt7530.c | 23 +++++++++++++++--------
  1 file changed, 15 insertions(+), 8 deletions(-)
 
-Index: linux-4.14.12/drivers/net/dsa/mt7530.c
-===================================================================
---- linux-4.14.12.orig/drivers/net/dsa/mt7530.c
-+++ linux-4.14.12/drivers/net/dsa/mt7530.c
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
 @@ -1049,10 +1049,10 @@ static const struct dsa_switch_ops mt753
  };
  
index 3c351d345e7fd8fcbab4c8180e182012faed2cb4..531c426f9dbf920a7aff45c1c3ef85f5bcff2330 100644 (file)
@@ -9,10 +9,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
  drivers/net/ethernet/mediatek/mtk_eth_soc.h | 8 +++++++-
  2 files changed, 13 insertions(+), 2 deletions(-)
 
-Index: linux-4.14.11/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.14.11.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.14.11/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 @@ -1994,6 +1994,7 @@ static int mtk_hw_init(struct mtk_eth *e
  
        /* enable interrupt delay for RX */
index aeb81e14bf5d1c43b4fa933f473953916400f797..673df45a63ba048198ad9c9f65a692278a1e0e55 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3551,6 +3551,58 @@ set_rps_cpu(struct net_device *dev, stru
+@@ -3621,6 +3621,58 @@ set_rps_cpu(struct net_device *dev, stru
        return rflow;
  }
  
@@ -69,7 +69,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
  /*
   * get_rps_cpu is called from netif_receive_skb and returns the target
   * CPU from the RPS map of the receiving queue for a given skb.
-@@ -3640,7 +3692,7 @@ static int get_rps_cpu(struct net_device
+@@ -3710,7 +3762,7 @@ static int get_rps_cpu(struct net_device
  try_rps:
  
        if (map) {
@@ -78,7 +78,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
                if (cpu_online(tcpu)) {
                        cpu = tcpu;
                        goto done;
-@@ -8431,6 +8483,9 @@ static int __init net_dev_init(void)
+@@ -8795,6 +8847,9 @@ static int __init net_dev_init(void)
                sd->backlog.weight = weight_p;
        }
  
index 3de3e7343bf813e9fb0be49f22762fcad1aff108..2efab3f7d592494cefdcf20960162571ab9029b6 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2384,7 +2384,7 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -2453,7 +2453,7 @@ static int mtk_add_mac(struct mtk_eth *e
        mac->hw_stats->reg_offset = id * MTK_STAT_OFFSET;
  
        SET_NETDEV_DEV(eth->netdev[id], eth->dev);
index 32d516ce4de699a949a696471e1d409150dc7ab5..5d04113852469abfb95df82b30bb6cdf0c32978f 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1804,7 +1804,7 @@ static struct phy_driver genphy_driver[]
+@@ -1912,7 +1912,7 @@ static struct phy_driver genphy_driver =
        .config_init    = genphy_config_init,
        .features       = PHY_GBIT_FEATURES | SUPPORTED_MII |
                          SUPPORTED_AUI | SUPPORTED_FIBRE |
index 96e7072a33964d5386086cae90296aebca84b4cd..9ce66ef487362d2e20764801d683a6a38226ecb4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -97,7 +97,10 @@ static int mtk_mdio_busy_wait(struct mtk
+@@ -76,7 +76,10 @@ static int mtk_mdio_busy_wait(struct mtk
                        return 0;
                if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT))
                        break;
index de49dacd5ff17fa68cd0be75e93aa9e63b7fa904..0dde3fdb6440e03a78bb56e7cdcd7457372b9ebf 100644 (file)
@@ -1,7 +1,5 @@
-Index: linux-4.14.12/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.14.12.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.14.12/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 @@ -409,6 +409,7 @@ static int mtk_mdio_init(struct mtk_eth
  
        snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
index 9120dfc2cd8634d09417c6cc8e80e0e12f530621..9f069e78094db371a6c091bb1a417603d8aa0b62 100644 (file)
@@ -1,7 +1,5 @@
-Index: linux-4.14.18/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-===================================================================
---- linux-4.14.18.orig/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-+++ linux-4.14.18/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
 @@ -21,6 +21,10 @@
                stdout-path = "serial2:115200n8";
        };
@@ -117,10 +115,8 @@ Index: linux-4.14.18/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
  
  &i2c0 {
        pinctrl-names = "default";
-Index: linux-4.14.18/arch/arm/boot/dts/Makefile
-===================================================================
---- linux-4.14.18.orig/arch/arm/boot/dts/Makefile
-+++ linux-4.14.18/arch/arm/boot/dts/Makefile
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
 @@ -1061,6 +1061,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
        mt6580-evbp1.dtb \
        mt6589-aquaris5.dtb \
@@ -129,10 +125,8 @@ Index: linux-4.14.18/arch/arm/boot/dts/Makefile
        mt7623n-rfb-nand.dtb \
        mt7623n-bananapi-bpi-r2.dtb \
        mt8127-moose.dtb \
-Index: linux-4.14.18/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
-===================================================================
 --- /dev/null
-+++ linux-4.14.18/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
++++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
 @@ -0,0 +1,449 @@
 +/*
 + * Copyright 2017 Sean Wang <sean.wang@mediatek.com>
@@ -583,10 +577,8 @@ Index: linux-4.14.18/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
 +      status = "okay";
 +};
 +
-Index: linux-4.14.18/arch/arm/boot/dts/mt7623.dtsi
-===================================================================
---- linux-4.14.18.orig/arch/arm/boot/dts/mt7623.dtsi
-+++ linux-4.14.18/arch/arm/boot/dts/mt7623.dtsi
+--- a/arch/arm/boot/dts/mt7623.dtsi
++++ b/arch/arm/boot/dts/mt7623.dtsi
 @@ -753,6 +753,7 @@
                             "syscon";
                reg = <0 0x1b000000 0 0x1000>;
index 362f4bc7edcb8295ce1f404a172eb0ef2dffb6ce..efd13da5ec647b7beb7b0da59355693c0566aabc 100644 (file)
@@ -17,8 +17,6 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
  drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 31 ++++++++++++++++++-----
  3 files changed, 35 insertions(+), 11 deletions(-)
 
-diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
-index 5e5c4d7..805c02a 100644
 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
 +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
 @@ -55,6 +55,7 @@ struct bgx {
@@ -29,7 +27,7 @@ index 5e5c4d7..805c02a 100644
  };
  
  static struct bgx *bgx_vnic[MAX_BGX_THUNDER];
-@@ -841,12 +842,12 @@ static void bgx_poll_for_link(struct work_struct *work)
+@@ -841,12 +842,12 @@ static void bgx_poll_for_link(struct wor
        queue_delayed_work(lmac->check_link, &lmac->dwork, HZ * 2);
  }
  
@@ -44,7 +42,7 @@ index 5e5c4d7..805c02a 100644
  
        return PHY_INTERFACE_MODE_SGMII;
  }
-@@ -912,7 +913,8 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
+@@ -912,7 +913,8 @@ static int bgx_lmac_enable(struct bgx *b
  
                if (phy_connect_direct(&lmac->netdev, lmac->phydev,
                                       bgx_lmac_handler,
@@ -54,7 +52,7 @@ index 5e5c4d7..805c02a 100644
                        return -ENODEV;
  
                phy_start_aneg(lmac->phydev);
-@@ -1287,6 +1289,8 @@ static int bgx_init_of_phy(struct bgx *bgx)
+@@ -1287,6 +1289,8 @@ static int bgx_init_of_phy(struct bgx *b
                bgx->lmac[lmac].lmacid = lmac;
  
                phy_np = of_parse_phandle(node, "phy-handle", 0);
@@ -63,7 +61,7 @@ index 5e5c4d7..805c02a 100644
                /* If there is no phy or defective firmware presents
                 * this cortina phy, for which there is no driver
                 * support, ignore it.
-@@ -1390,7 +1394,6 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -1390,7 +1394,6 @@ static int bgx_probe(struct pci_dev *pde
                bgx->max_lmac = 1;
                bgx->bgx_id = MAX_BGX_PER_CN81XX - 1;
                bgx_vnic[bgx->bgx_id] = bgx;
@@ -71,7 +69,7 @@ index 5e5c4d7..805c02a 100644
        }
  
        /* On 81xx all are DLMs and on 83xx there are 3 BGX QLMs and one
-@@ -1407,6 +1410,8 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -1407,6 +1410,8 @@ static int bgx_probe(struct pci_dev *pde
        if (err)
                goto err_enable;
  
@@ -80,11 +78,9 @@ index 5e5c4d7..805c02a 100644
        bgx_init_hw(bgx);
  
        /* Enable all LMACs */
-diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
-index 23acdc5..2bba9d1 100644
 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
 +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
-@@ -226,7 +226,7 @@ void bgx_lmac_internal_loopback(int node, int bgx_idx,
+@@ -226,7 +226,7 @@ void bgx_lmac_internal_loopback(int node
  void bgx_lmac_get_pfc(int node, int bgx_idx, int lmacid, void *pause);
  void bgx_lmac_set_pfc(int node, int bgx_idx, int lmacid, void *pause);
  
@@ -93,8 +89,6 @@ index 23acdc5..2bba9d1 100644
  void xcv_setup_link(bool link_up, int link_speed);
  
  u64 bgx_get_rx_stats(int node, int bgx_idx, int lmac, int idx);
-diff --git a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c b/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
-index 578c7f8..7e0c4cb 100644
 --- a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
 +++ b/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
 @@ -65,7 +65,7 @@ MODULE_LICENSE("GPL v2");
@@ -143,6 +137,3 @@ index 578c7f8..7e0c4cb 100644
        writeq_relaxed(cfg, xcv->reg_base + XCV_DLL_CTL);
  
        /* Enable compensation controller and force the
--- 
-2.7.4
-
index db57f6dcca8043275e0111489ae473288788414e..ef7aef3a8afab7e3f022400d3d7e0b2a8e0b2efc 100644 (file)
@@ -13,8 +13,6 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
  drivers/net/ethernet/cavium/thunder/thunder_bgx.h |  9 ++++
  2 files changed, 63 insertions(+)
 
-diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
-index 805c02a..0690966 100644
 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
 +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
 @@ -1344,6 +1344,54 @@ static int bgx_init_phy(struct bgx *bgx)
@@ -72,7 +70,7 @@ index 805c02a..0690966 100644
  static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  {
        int err;
-@@ -1414,6 +1462,8 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -1414,6 +1462,8 @@ static int bgx_probe(struct pci_dev *pde
                xcv_init_hw(bgx->phy_mode);
        bgx_init_hw(bgx);
  
@@ -81,7 +79,7 @@ index 805c02a..0690966 100644
        /* Enable all LMACs */
        for (lmac = 0; lmac < bgx->lmac_count; lmac++) {
                err = bgx_lmac_enable(bgx, lmac);
-@@ -1424,6 +1474,10 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -1424,6 +1474,10 @@ static int bgx_probe(struct pci_dev *pde
                                bgx_lmac_disable(bgx, --lmac);
                        goto err_enable;
                }
@@ -92,8 +90,6 @@ index 805c02a..0690966 100644
        }
  
        return 0;
-diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
-index 2bba9d1..be9148f9 100644
 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
 +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
 @@ -179,6 +179,15 @@
@@ -112,6 +108,3 @@ index 2bba9d1..be9148f9 100644
  
  #define BGX_MSIX_VEC_0_29_ADDR                0x400000 /* +(0..29) << 4 */
  #define BGX_MSIX_VEC_0_29_CTL         0x400008
--- 
-2.7.4
-
index 80136b89a6e4602b5870b0f530d5452a50ef16c4..048e60441c2d18fcaf43444859e1229d61a3e42e 100644 (file)
@@ -12,7 +12,7 @@
        int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,
 --- a/drivers/mtd/nand/nand_base.c
 +++ b/drivers/mtd/nand/nand_base.c
-@@ -2753,9 +2753,14 @@ static int nand_do_write_ops(struct mtd_
+@@ -2756,9 +2756,14 @@ static int nand_do_write_ops(struct mtd_
                        memset(chip->oob_poi, 0xff, mtd->oobsize);
                }
  
@@ -30,7 +30,7 @@
                if (ret)
                        break;
  
-@@ -4711,6 +4716,9 @@ int nand_scan_tail(struct mtd_info *mtd)
+@@ -4714,6 +4719,9 @@ int nand_scan_tail(struct mtd_info *mtd)
                }
        }
  
index a9d16840f013de5306cac62edccafaeb765e819a..7b616eca469ae418bdb85b43a5e681abcda05e6e 100644 (file)
@@ -18,7 +18,7 @@
                        if (ret < 0) {
                                if (use_bufpoi)
                                        /* Invalidate page cache */
-@@ -3076,8 +3080,11 @@ int nand_erase_nand(struct mtd_info *mtd
+@@ -3079,8 +3083,11 @@ int nand_erase_nand(struct mtd_info *mtd
                    (page + pages_per_block))
                        chip->pagebuf = -1;
  
@@ -31,7 +31,7 @@
                /* See if block erase succeeded */
                if (status & NAND_STATUS_FAIL) {
                        pr_debug("%s: failed erase, page 0x%08x\n",
-@@ -4207,6 +4214,7 @@ int nand_scan_ident(struct mtd_info *mtd
+@@ -4210,6 +4217,7 @@ int nand_scan_ident(struct mtd_info *mtd
                 * cmdfunc() both expect cmd_ctrl() to be populated,
                 * so we need to check that that's the case
                 */