kernel: bump 4.14 to 4.14.20

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>
openwrt-18.06
Stijn Tintel 2018-02-17 22:59:07 +01:00
parent 6c2e1ff80f
commit 88ba41453d
31 changed files with 70 additions and 225 deletions

View File

@ -5,12 +5,12 @@ LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .71 LINUX_VERSION-3.18 = .71
LINUX_VERSION-4.4 = .112 LINUX_VERSION-4.4 = .112
LINUX_VERSION-4.9 = .77 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-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
LINUX_KERNEL_HASH-4.4.112 = 544b42cbeed022896115c76a18fc97b4507d5b41d7ac0ce1dce9afd6ffd11ecd LINUX_KERNEL_HASH-4.4.112 = 544b42cbeed022896115c76a18fc97b4507d5b41d7ac0ce1dce9afd6ffd11ecd
LINUX_KERNEL_HASH-4.9.77 = 7c29bc3fb96f1e23d98f664e786dddd53a1599f56431b9b7fdfba402a4b3705c 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)))) remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -20,7 +20,7 @@ Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
--- a/drivers/net/ethernet/stmicro/stmmac/common.h --- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/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)) #define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1))
#undef FRAME_FILTER_DEBUG #undef FRAME_FILTER_DEBUG

View File

@ -55,7 +55,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
rwlock_t sk_callback_lock; rwlock_t sk_callback_lock;
--- a/net/core/sock.c --- a/net/core/sock.c
+++ b/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_max_pacing_rate = ~0U;
sk->sk_pacing_rate = ~0U; sk->sk_pacing_rate = ~0U;

View File

@ -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");
+}

View File

@ -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);

View File

@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -1212,7 +1212,6 @@ all: modules @@ -1213,7 +1213,6 @@ all: modules
PHONY += modules PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin 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.'; @$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1241,7 +1240,6 @@ _modinst_: @@ -1242,7 +1241,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \ rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \
fi fi

View File

@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
# Read KERNELRELEASE from include/config/kernel.release (if it exists) # Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) 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) KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif endif

View File

@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c --- a/net/core/sock.c
+++ b/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) static int __init proto_init(void)
{ {

View File

@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile --- a/Makefile
+++ b/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 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)

View File

@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/mtd/ubi/block.c --- a/drivers/mtd/ubi/block.c
+++ b/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) static void ubiblock_remove_all(void)
{ {
struct ubiblock *next; 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(); ubiblock_create_from_param();

View File

@ -17,9 +17,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
#include "ubi-media.h" #include "ubi-media.h"
#include "ubi.h" #include "ubi.h"
@@ -445,6 +446,15 @@ int ubiblock_create(struct ubi_volume_in @@ -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_info(disk_to_dev(dev->gd), "created from ubi%d:%d(%s)",
dev->ubi_num, dev->vol_id, vi->name); dev->ubi_num, dev->vol_id, vi->name);
mutex_unlock(&devices_mutex);
+ +
+ if (!strcmp(vi->name, "rootfs") && + if (!strcmp(vi->name, "rootfs") &&
+ IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) && + IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) &&

View File

@ -14,10 +14,8 @@ Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/clk/mediatek/clk-mt2701.c | 4 ++++ drivers/clk/mediatek/clk-mt2701.c | 4 ++++
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
Index: linux-4.14.11/drivers/clk/mediatek/clk-mt2701.c --- a/drivers/clk/mediatek/clk-mt2701.c
=================================================================== +++ b/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
@@ -771,6 +771,8 @@ static void mtk_infrasys_init_early(stru @@ -771,6 +771,8 @@ static void mtk_infrasys_init_early(stru
if (r) if (r)
pr_err("%s(): could not register clock provider: %d\n", pr_err("%s(): could not register clock provider: %d\n",

View File

@ -16,10 +16,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 35 +++++++++++++++++------------ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 35 +++++++++++++++++------------
1 file changed, 21 insertions(+), 14 deletions(-) 1 file changed, 21 insertions(+), 14 deletions(-)
Index: 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
--- 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
@@ -779,7 +779,16 @@ static int mtk_tx_map(struct sk_buff *sk @@ -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)) | WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) |
(!nr_frags * TX_DMA_LS0))); (!nr_frags * TX_DMA_LS0)));

View File

@ -10,10 +10,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++
2 files changed, 8 insertions(+) 2 files changed, 8 insertions(+)
Index: linux-4.14.11/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
=================================================================== +++ b/drivers/net/dsa/mt7530.c
--- linux-4.14.11.orig/drivers/net/dsa/mt7530.c
+++ linux-4.14.11/drivers/net/dsa/mt7530.c
@@ -991,6 +991,11 @@ mt7530_setup(struct dsa_switch *ds) @@ -991,6 +991,11 @@ mt7530_setup(struct dsa_switch *ds)
val = mt7530_read(priv, MT7530_MHWTRAP); val = mt7530_read(priv, MT7530_MHWTRAP);
val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS; val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;

View File

@ -1,7 +1,5 @@
Index: linux-4.14.14/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
=================================================================== +++ b/drivers/net/dsa/mt7530.c
--- linux-4.14.14.orig/drivers/net/dsa/mt7530.c
+++ linux-4.14.14/drivers/net/dsa/mt7530.c
@@ -670,6 +670,9 @@ static int @@ -670,6 +670,9 @@ static int
mt7530_cpu_port_enable(struct mt7530_priv *priv, mt7530_cpu_port_enable(struct mt7530_priv *priv,
int port) int port)
@ -98,10 +96,8 @@ Index: linux-4.14.14/drivers/net/dsa/mt7530.c
val |= MHWTRAP_MANUAL; val |= MHWTRAP_MANUAL;
if (!dsa_is_cpu_port(ds, 5)) { if (!dsa_is_cpu_port(ds, 5)) {
val |= MHWTRAP_P5_DIS; val |= MHWTRAP_P5_DIS;
Index: linux-4.14.14/include/net/dsa.h --- a/include/net/dsa.h
=================================================================== +++ b/include/net/dsa.h
--- linux-4.14.14.orig/include/net/dsa.h
+++ linux-4.14.14/include/net/dsa.h
@@ -185,6 +185,10 @@ struct dsa_port { @@ -185,6 +185,10 @@ struct dsa_port {
u8 stp_state; u8 stp_state;
struct net_device *bridge_dev; 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, typedef int dsa_fdb_dump_cb_t(const unsigned char *addr, u16 vid,
bool is_static, void *data); bool is_static, void *data);
struct dsa_switch_ops { struct dsa_switch_ops {
Index: linux-4.14.14/net/dsa/dsa2.c --- a/net/dsa/dsa2.c
=================================================================== +++ b/net/dsa/dsa2.c
--- linux-4.14.14.orig/net/dsa/dsa2.c
+++ linux-4.14.14/net/dsa/dsa2.c
@@ -253,6 +253,8 @@ static int dsa_cpu_port_apply(struct dsa @@ -253,6 +253,8 @@ static int dsa_cpu_port_apply(struct dsa
memset(&port->devlink_port, 0, sizeof(port->devlink_port)); memset(&port->devlink_port, 0, sizeof(port->devlink_port));
err = devlink_port_register(ds->devlink, &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() /* Initialize enabled_port_mask now for drv->setup()
* to have access to a correct value, just like what * to have access to a correct value, just like what
* net/dsa/dsa.c::dsa_switch_setup_one does. * net/dsa/dsa.c::dsa_switch_setup_one does.
Index: linux-4.14.14/net/dsa/dsa_priv.h --- a/net/dsa/dsa_priv.h
=================================================================== +++ b/net/dsa/dsa_priv.h
--- linux-4.14.14.orig/net/dsa/dsa_priv.h
+++ linux-4.14.14/net/dsa/dsa_priv.h
@@ -91,6 +91,8 @@ struct dsa_slave_priv { @@ -91,6 +91,8 @@ struct dsa_slave_priv {
/* TC context */ /* TC context */
@ -255,10 +247,8 @@ Index: linux-4.14.14/net/dsa/dsa_priv.h
return p->dp->cpu_dp->netdev; return p->dp->cpu_dp->netdev;
} }
Index: linux-4.14.14/net/dsa/slave.c --- a/net/dsa/slave.c
=================================================================== +++ b/net/dsa/slave.c
--- linux-4.14.14.orig/net/dsa/slave.c
+++ linux-4.14.14/net/dsa/slave.c
@@ -1257,7 +1257,7 @@ int dsa_slave_create(struct dsa_port *po @@ -1257,7 +1257,7 @@ int dsa_slave_create(struct dsa_port *po
int ret; int ret;

View File

@ -11,7 +11,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/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 +++ 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; txd4 |= TX_DMA_CHKSUM;
/* VLAN header offload */ /* VLAN header offload */
@ -22,7 +22,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
mapped_addr = dma_map_single(eth->dev, skb->data, mapped_addr = dma_map_single(eth->dev, skb->data,
skb_headlen(skb), DMA_TO_DEVICE); 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); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
/* Enable RX VLan Offloading */ /* Enable RX VLan Offloading */
@ -32,8 +32,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ else + else
+ mtk_w32(eth, 0, MTK_CDMP_EG_CTRL); + mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
/* disable delay and normal interrupt */ /* enable interrupt delay for RX */
mtk_w32(eth, 0, MTK_QDMA_DELAY_INT); mtk_w32(eth, MTK_PDMA_DELAY_RX_DELAY, MTK_PDMA_DELAY_INT);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -34,8 +34,6 @@ @@ -34,8 +34,6 @@

View File

@ -17,7 +17,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/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 +++ 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)) if (!(trxd.rxd2 & RX_DMA_DONE))
break; break;
@ -36,11 +36,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ mac--; + 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/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 */ /* QDMA descriptor rxd4 */
#define RX_DMA_L4_VALID BIT(24) #define RX_DMA_L4_VALID BIT(24)

View File

@ -17,7 +17,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/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 +++ 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); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, 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) if (MTK_HW_FEATURES & NETIF_F_HW_VLAN_CTAG_RX)
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/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_IG_CTRL 0x1400
#define MTK_CDMQ_STAG_EN BIT(0) #define MTK_CDMQ_STAG_EN BIT(0)

View File

@ -16,7 +16,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/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), mt7530_write(priv, MT7530_PVC_P(port),
PORT_SPEC_TAG); PORT_SPEC_TAG);

View File

@ -8,10 +8,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/dsa/mt7530.c | 23 +++++++++++++++-------- drivers/net/dsa/mt7530.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-) 1 file changed, 15 insertions(+), 8 deletions(-)
Index: linux-4.14.12/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
=================================================================== +++ b/drivers/net/dsa/mt7530.c
--- linux-4.14.12.orig/drivers/net/dsa/mt7530.c
+++ linux-4.14.12/drivers/net/dsa/mt7530.c
@@ -1049,10 +1049,10 @@ static const struct dsa_switch_ops mt753 @@ -1049,10 +1049,10 @@ static const struct dsa_switch_ops mt753
}; };

View File

@ -9,10 +9,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 8 +++++++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 8 +++++++-
2 files changed, 13 insertions(+), 2 deletions(-) 2 files changed, 13 insertions(+), 2 deletions(-)
Index: 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
--- 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
@@ -1994,6 +1994,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -1994,6 +1994,7 @@ static int mtk_hw_init(struct mtk_eth *e
/* enable interrupt delay for RX */ /* enable interrupt delay for RX */

View File

@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/net/core/dev.c --- a/net/core/dev.c
+++ b/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; 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 * 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. * 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: try_rps:
if (map) { if (map) {
@ -78,7 +78,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
if (cpu_online(tcpu)) { if (cpu_online(tcpu)) {
cpu = tcpu; cpu = tcpu;
goto done; 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; sd->backlog.weight = weight_p;
} }

View File

@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/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 +++ 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; mac->hw_stats->reg_offset = id * MTK_STAT_OFFSET;
SET_NETDEV_DEV(eth->netdev[id], eth->dev); SET_NETDEV_DEV(eth->netdev[id], eth->dev);

View File

@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/net/phy/phy_device.c --- a/drivers/net/phy/phy_device.c
+++ b/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, .config_init = genphy_config_init,
.features = PHY_GBIT_FEATURES | SUPPORTED_MII | .features = PHY_GBIT_FEATURES | SUPPORTED_MII |
SUPPORTED_AUI | SUPPORTED_FIBRE | SUPPORTED_AUI | SUPPORTED_FIBRE |

View File

@ -1,6 +1,6 @@
--- a/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 +++ 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; return 0;
if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT)) if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT))
break; break;

View File

@ -1,7 +1,5 @@
Index: 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
--- 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
@@ -409,6 +409,7 @@ static int mtk_mdio_init(struct mtk_eth @@ -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); snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);

View File

@ -1,7 +1,5 @@
Index: 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
--- 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
@@ -21,6 +21,10 @@ @@ -21,6 +21,10 @@
stdout-path = "serial2:115200n8"; stdout-path = "serial2:115200n8";
}; };
@ -117,10 +115,8 @@ Index: linux-4.14.18/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
&i2c0 { &i2c0 {
pinctrl-names = "default"; pinctrl-names = "default";
Index: linux-4.14.18/arch/arm/boot/dts/Makefile --- a/arch/arm/boot/dts/Makefile
=================================================================== +++ b/arch/arm/boot/dts/Makefile
--- linux-4.14.18.orig/arch/arm/boot/dts/Makefile
+++ linux-4.14.18/arch/arm/boot/dts/Makefile
@@ -1061,6 +1061,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ @@ -1061,6 +1061,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt6580-evbp1.dtb \ mt6580-evbp1.dtb \
mt6589-aquaris5.dtb \ mt6589-aquaris5.dtb \
@ -129,10 +125,8 @@ Index: linux-4.14.18/arch/arm/boot/dts/Makefile
mt7623n-rfb-nand.dtb \ mt7623n-rfb-nand.dtb \
mt7623n-bananapi-bpi-r2.dtb \ mt7623n-bananapi-bpi-r2.dtb \
mt8127-moose.dtb \ mt8127-moose.dtb \
Index: linux-4.14.18/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
===================================================================
--- /dev/null --- /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 @@ @@ -0,0 +1,449 @@
+/* +/*
+ * Copyright 2017 Sean Wang <sean.wang@mediatek.com> + * 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"; + status = "okay";
+}; +};
+ +
Index: linux-4.14.18/arch/arm/boot/dts/mt7623.dtsi --- a/arch/arm/boot/dts/mt7623.dtsi
=================================================================== +++ b/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
@@ -753,6 +753,7 @@ @@ -753,6 +753,7 @@
"syscon"; "syscon";
reg = <0 0x1b000000 0 0x1000>; reg = <0 0x1b000000 0 0x1000>;

View File

@ -17,8 +17,6 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 31 ++++++++++++++++++----- drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 31 ++++++++++++++++++-----
3 files changed, 35 insertions(+), 11 deletions(-) 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 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
@@ -55,6 +55,7 @@ struct bgx { @@ -55,6 +55,7 @@ struct bgx {
@ -29,7 +27,7 @@ index 5e5c4d7..805c02a 100644
}; };
static struct bgx *bgx_vnic[MAX_BGX_THUNDER]; 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); queue_delayed_work(lmac->check_link, &lmac->dwork, HZ * 2);
} }
@ -44,7 +42,7 @@ index 5e5c4d7..805c02a 100644
return PHY_INTERFACE_MODE_SGMII; 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, if (phy_connect_direct(&lmac->netdev, lmac->phydev,
bgx_lmac_handler, bgx_lmac_handler,
@ -54,7 +52,7 @@ index 5e5c4d7..805c02a 100644
return -ENODEV; return -ENODEV;
phy_start_aneg(lmac->phydev); 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; bgx->lmac[lmac].lmacid = lmac;
phy_np = of_parse_phandle(node, "phy-handle", 0); 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 /* If there is no phy or defective firmware presents
* this cortina phy, for which there is no driver * this cortina phy, for which there is no driver
* support, ignore it. * 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->max_lmac = 1;
bgx->bgx_id = MAX_BGX_PER_CN81XX - 1; bgx->bgx_id = MAX_BGX_PER_CN81XX - 1;
bgx_vnic[bgx->bgx_id] = bgx; 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 /* 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) if (err)
goto err_enable; goto err_enable;
@ -80,11 +78,9 @@ index 5e5c4d7..805c02a 100644
bgx_init_hw(bgx); bgx_init_hw(bgx);
/* Enable all LMACs */ /* 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 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
+++ b/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_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); 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); void xcv_setup_link(bool link_up, int link_speed);
u64 bgx_get_rx_stats(int node, int bgx_idx, int lmac, int idx); 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 --- a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
+++ b/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"); @@ -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); writeq_relaxed(cfg, xcv->reg_base + XCV_DLL_CTL);
/* Enable compensation controller and force the /* Enable compensation controller and force the
--
2.7.4

View File

@ -13,8 +13,6 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 9 ++++ drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 9 ++++
2 files changed, 63 insertions(+) 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 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/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) @@ -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) static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
int err; 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); xcv_init_hw(bgx->phy_mode);
bgx_init_hw(bgx); bgx_init_hw(bgx);
@ -81,7 +79,7 @@ index 805c02a..0690966 100644
/* Enable all LMACs */ /* Enable all LMACs */
for (lmac = 0; lmac < bgx->lmac_count; lmac++) { for (lmac = 0; lmac < bgx->lmac_count; lmac++) {
err = bgx_lmac_enable(bgx, 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); bgx_lmac_disable(bgx, --lmac);
goto err_enable; goto err_enable;
} }
@ -92,8 +90,6 @@ index 805c02a..0690966 100644
} }
return 0; 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 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
@@ -179,6 +179,15 @@ @@ -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_ADDR 0x400000 /* +(0..29) << 4 */
#define BGX_MSIX_VEC_0_29_CTL 0x400008 #define BGX_MSIX_VEC_0_29_CTL 0x400008
--
2.7.4

View File

@ -12,7 +12,7 @@
int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip, int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,
--- a/drivers/mtd/nand/nand_base.c --- a/drivers/mtd/nand/nand_base.c
+++ b/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); memset(chip->oob_poi, 0xff, mtd->oobsize);
} }
@ -30,7 +30,7 @@
if (ret) if (ret)
break; 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)
} }
} }

View File

@ -18,7 +18,7 @@
if (ret < 0) { if (ret < 0) {
if (use_bufpoi) if (use_bufpoi)
/* Invalidate page cache */ /* 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)) (page + pages_per_block))
chip->pagebuf = -1; chip->pagebuf = -1;
@ -31,7 +31,7 @@
/* See if block erase succeeded */ /* See if block erase succeeded */
if (status & NAND_STATUS_FAIL) { if (status & NAND_STATUS_FAIL) {
pr_debug("%s: failed erase, page 0x%08x\n", 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, * cmdfunc() both expect cmd_ctrl() to be populated,
* so we need to check that that's the case * so we need to check that that's the case
*/ */