kernel: bump to 4.9.267, 4.14.231, 4.19.188
Remove upstreamed: - generic/pending-4.14/840-can-flexcan-flexcan_chip_freeze-fix-chip-freeze-for-.patch Refreshed all patches. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
e30252cace
commit
339d6fc2e8
@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-4.9 = .265
|
||||
LINUX_VERSION-4.14 = .229
|
||||
LINUX_VERSION-4.19 = .185
|
||||
LINUX_VERSION-4.9 = .267
|
||||
LINUX_VERSION-4.14 = .231
|
||||
LINUX_VERSION-4.19 = .188
|
||||
|
||||
LINUX_KERNEL_HASH-4.9.265 = 5146301569b049e871d8162b6928e35bbef665cd86d9f5e6e0fbb960b19f0511
|
||||
LINUX_KERNEL_HASH-4.14.229 = b29be839cddea6d728155ecd9dfa8bced517ab7456ce13bb3d23b63d28ab362c
|
||||
LINUX_KERNEL_HASH-4.19.185 = 1689d78212997dae44b24bf037bc842d11d88e974d524af66f7864e5a8508597
|
||||
LINUX_KERNEL_HASH-4.9.267 = 983b9afe69df31de8984d40a88afec38d617322d6521ef714db36b3e56220a60
|
||||
LINUX_KERNEL_HASH-4.14.231 = 573b79adee3490a8dd82f663bb187218288c99cd2613fd9f69edf915f91e6682
|
||||
LINUX_KERNEL_HASH-4.19.188 = b09cf1f026b1260bae6480d98c471958eff3ad64b65e59e64a6852f678050077
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
static void nfnl_queue_net_exit_batch(struct list_head *net_exit_list)
|
||||
--- a/net/netfilter/x_tables.c
|
||||
+++ b/net/netfilter/x_tables.c
|
||||
@@ -1787,8 +1787,17 @@ static int __net_init xt_net_init(struct
|
||||
@@ -1781,8 +1781,17 @@ static int __net_init xt_net_init(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
c_can_irq_control(priv, true);
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -703,7 +703,7 @@ static int flexcan_poll(struct napi_stru
|
||||
@@ -709,7 +709,7 @@ static int flexcan_poll(struct napi_stru
|
||||
work_done += flexcan_poll_bus_err(dev, reg_esr);
|
||||
|
||||
if (work_done < quota) {
|
||||
@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return received;
|
||||
--- a/drivers/net/ethernet/freescale/gianfar.c
|
||||
+++ b/drivers/net/ethernet/freescale/gianfar.c
|
||||
@@ -3195,7 +3195,7 @@ static int gfar_poll_rx_sq(struct napi_s
|
||||
@@ -3199,7 +3199,7 @@ static int gfar_poll_rx_sq(struct napi_s
|
||||
|
||||
if (work_done < budget) {
|
||||
u32 imask;
|
||||
@ -646,7 +646,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Clear the halt bit in RSTAT */
|
||||
gfar_write(®s->rstat, gfargrp->rstat);
|
||||
|
||||
@@ -3284,7 +3284,7 @@ static int gfar_poll_rx(struct napi_stru
|
||||
@@ -3288,7 +3288,7 @@ static int gfar_poll_rx(struct napi_stru
|
||||
|
||||
if (!num_act_queues) {
|
||||
u32 imask;
|
||||
|
||||
@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1904,6 +1904,13 @@ config TRIM_UNUSED_KSYMS
|
||||
@@ -1903,6 +1903,13 @@ config TRIM_UNUSED_KSYMS
|
||||
|
||||
If unsure, or if you need to build out-of-tree modules, say N.
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+#endif
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1010,6 +1010,10 @@ config RELAY
|
||||
@@ -1009,6 +1009,10 @@ config RELAY
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1998,6 +1998,13 @@ config TRIM_UNUSED_KSYMS
|
||||
@@ -1997,6 +1997,13 @@ config TRIM_UNUSED_KSYMS
|
||||
|
||||
If unsure, or if you need to build out-of-tree modules, say N.
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+#endif
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1050,6 +1050,10 @@ config RELAY
|
||||
@@ -1049,6 +1049,10 @@ config RELAY
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -2123,6 +2123,13 @@ config TRIM_UNUSED_KSYMS
|
||||
@@ -2122,6 +2122,13 @@ config TRIM_UNUSED_KSYMS
|
||||
|
||||
If unsure, or if you need to build out-of-tree modules, say N.
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+#endif
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1299,6 +1299,10 @@ config RELAY
|
||||
@@ -1298,6 +1298,10 @@ config RELAY
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1082,6 +1082,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
@@ -1081,6 +1081,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
the unaligned access emulation.
|
||||
see arch/parisc/kernel/unaligned.c for reference
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
cfg->fc_flags |= RTF_REJECT;
|
||||
|
||||
if (rtm->rtm_type == RTN_LOCAL)
|
||||
@@ -3517,6 +3551,9 @@ static int rt6_fill_node(struct net *net
|
||||
@@ -3519,6 +3553,9 @@ static int rt6_fill_node(struct net *net
|
||||
case -EACCES:
|
||||
rtm->rtm_type = RTN_PROHIBIT;
|
||||
break;
|
||||
@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
case -EAGAIN:
|
||||
rtm->rtm_type = RTN_THROW;
|
||||
break;
|
||||
@@ -3835,6 +3872,8 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3837,6 +3874,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);
|
||||
@ -200,7 +200,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
|
||||
@@ -3846,6 +3885,7 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3848,6 +3887,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);
|
||||
@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
|
||||
#endif
|
||||
}
|
||||
@@ -4062,6 +4102,17 @@ static int __net_init ip6_route_net_init
|
||||
@@ -4064,6 +4104,17 @@ 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);
|
||||
@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
|
||||
net->ipv6.sysctl.flush_delay = 0;
|
||||
@@ -4080,6 +4131,8 @@ out:
|
||||
@@ -4082,6 +4133,8 @@ out:
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
out_ip6_prohibit_entry:
|
||||
kfree(net->ipv6.ip6_prohibit_entry);
|
||||
out_ip6_null_entry:
|
||||
@@ -4097,6 +4150,7 @@ static void __net_exit ip6_route_net_exi
|
||||
@@ -4099,6 +4152,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);
|
||||
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
|
||||
}
|
||||
@@ -4170,6 +4224,9 @@ void __init ip6_route_init_special_entri
|
||||
@@ -4172,6 +4226,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);
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
From 47c5e474bc1e1061fb037d13b5000b38967eb070 Mon Sep 17 00:00:00 2001
|
||||
From: Angelo Dureghello <angelo@kernel-space.org>
|
||||
Date: Tue, 16 Mar 2021 00:15:10 +0100
|
||||
Subject: can: flexcan: flexcan_chip_freeze(): fix chip freeze for missing bitrate
|
||||
|
||||
From: Angelo Dureghello <angelo@kernel-space.org>
|
||||
|
||||
commit 47c5e474bc1e1061fb037d13b5000b38967eb070 upstream.
|
||||
|
||||
For cases when flexcan is built-in, bitrate is still not set at
|
||||
registering. So flexcan_chip_freeze() generates:
|
||||
|
||||
[ 1.860000] *** ZERO DIVIDE *** FORMAT=4
|
||||
[ 1.860000] Current process id is 1
|
||||
[ 1.860000] BAD KERNEL TRAP: 00000000
|
||||
[ 1.860000] PC: [<402e70c8>] flexcan_chip_freeze+0x1a/0xa8
|
||||
|
||||
To allow chip freeze, using an hardcoded timeout when bitrate is still
|
||||
not set.
|
||||
|
||||
Fixes: ec15e27cc890 ("can: flexcan: enable RX FIFO after FRZ/HALT valid")
|
||||
Link: https://lore.kernel.org/r/20210315231510.650593-1-angelo@kernel-space.org
|
||||
Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
|
||||
[mkl: use if instead of ? operator]
|
||||
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
Cc: Koen Vandeputte <koen.vandeputte@citymesh.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/net/can/flexcan.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -413,9 +413,15 @@ static int flexcan_chip_disable(struct f
|
||||
static int flexcan_chip_freeze(struct flexcan_priv *priv)
|
||||
{
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
- unsigned int timeout = 1000 * 1000 * 10 / priv->can.bittiming.bitrate;
|
||||
+ unsigned int timeout;
|
||||
+ u32 bitrate = priv->can.bittiming.bitrate;
|
||||
u32 reg;
|
||||
|
||||
+ if (bitrate)
|
||||
+ timeout = 1000 * 1000 * 10 / bitrate;
|
||||
+ else
|
||||
+ timeout = FLEXCAN_TIMEOUT_US / 10;
|
||||
+
|
||||
reg = flexcan_read(®s->mcr);
|
||||
reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT;
|
||||
flexcan_write(reg, ®s->mcr);
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1428,6 +1428,15 @@ config EMBEDDED
|
||||
@@ -1427,6 +1427,15 @@ config EMBEDDED
|
||||
an embedded system so certain expert options are available
|
||||
for configuration.
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1150,6 +1150,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
@@ -1149,6 +1149,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
the unaligned access emulation.
|
||||
see arch/parisc/kernel/unaligned.c for reference
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
cfg->fc_flags |= RTF_REJECT;
|
||||
|
||||
if (rtm->rtm_type == RTN_LOCAL)
|
||||
@@ -5087,6 +5118,8 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -5089,6 +5120,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
|
||||
@@ -5098,6 +5131,7 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -5100,6 +5133,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
|
||||
}
|
||||
@@ -5292,6 +5326,15 @@ static int __net_init ip6_route_net_init
|
||||
@@ -5294,6 +5328,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;
|
||||
@@ -5310,6 +5353,8 @@ out:
|
||||
@@ -5312,6 +5355,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:
|
||||
@@ -5330,6 +5375,7 @@ static void __net_exit ip6_route_net_exi
|
||||
@@ -5332,6 +5377,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);
|
||||
}
|
||||
@@ -5406,6 +5452,9 @@ void __init ip6_route_init_special_entri
|
||||
@@ -5408,6 +5454,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);
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1532,6 +1532,15 @@ config EMBEDDED
|
||||
@@ -1531,6 +1531,15 @@ config EMBEDDED
|
||||
an embedded system so certain expert options are available
|
||||
for configuration.
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1371,6 +1371,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
@@ -1370,6 +1370,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
the unaligned access emulation.
|
||||
see arch/parisc/kernel/unaligned.c for reference
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
cfg->fc_flags |= RTF_REJECT;
|
||||
|
||||
if (rtm->rtm_type == RTN_LOCAL)
|
||||
@@ -3225,6 +3259,9 @@ static int rt6_fill_node(struct net *net
|
||||
@@ -3227,6 +3261,9 @@ static int rt6_fill_node(struct net *net
|
||||
case -EACCES:
|
||||
rtm->rtm_type = RTN_PROHIBIT;
|
||||
break;
|
||||
@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
case -EAGAIN:
|
||||
rtm->rtm_type = RTN_THROW;
|
||||
break;
|
||||
@@ -3501,6 +3538,8 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3503,6 +3540,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);
|
||||
@ -200,7 +200,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
|
||||
@@ -3512,6 +3551,7 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3514,6 +3553,7 @@ static int ip6_route_dev_notify(struct n
|
||||
in6_dev_put(net->ipv6.ip6_null_entry->rt6i_idev);
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
in6_dev_put(net->ipv6.ip6_prohibit_entry->rt6i_idev);
|
||||
@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
in6_dev_put(net->ipv6.ip6_blk_hole_entry->rt6i_idev);
|
||||
#endif
|
||||
}
|
||||
@@ -3727,6 +3767,17 @@ static int __net_init ip6_route_net_init
|
||||
@@ -3729,6 +3769,17 @@ 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);
|
||||
@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
|
||||
net->ipv6.sysctl.flush_delay = 0;
|
||||
@@ -3745,6 +3796,8 @@ out:
|
||||
@@ -3747,6 +3798,8 @@ out:
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
out_ip6_prohibit_entry:
|
||||
kfree(net->ipv6.ip6_prohibit_entry);
|
||||
out_ip6_null_entry:
|
||||
@@ -3762,6 +3815,7 @@ static void __net_exit ip6_route_net_exi
|
||||
@@ -3764,6 +3817,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);
|
||||
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
|
||||
}
|
||||
@@ -3835,6 +3889,9 @@ void __init ip6_route_init_special_entri
|
||||
@@ -3837,6 +3891,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);
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1695,6 +1695,15 @@ config EMBEDDED
|
||||
@@ -1694,6 +1694,15 @@ config EMBEDDED
|
||||
an embedded system so certain expert options are available
|
||||
for configuration.
|
||||
|
||||
|
||||
@ -155,9 +155,9 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
@@ -416,14 +432,14 @@ static int flexcan_chip_freeze(struct fl
|
||||
unsigned int timeout = 1000 * 1000 * 10 / priv->can.bittiming.bitrate;
|
||||
u32 reg;
|
||||
@@ -422,14 +438,14 @@ static int flexcan_chip_freeze(struct fl
|
||||
else
|
||||
timeout = FLEXCAN_TIMEOUT_US / 10;
|
||||
|
||||
- reg = flexcan_read(®s->mcr);
|
||||
+ reg = priv->read(®s->mcr);
|
||||
@ -174,7 +174,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
@@ -435,14 +451,14 @@ static int flexcan_chip_unfreeze(struct
|
||||
@@ -441,14 +457,14 @@ static int flexcan_chip_unfreeze(struct
|
||||
unsigned int timeout = FLEXCAN_TIMEOUT_US / 10;
|
||||
u32 reg;
|
||||
|
||||
@ -193,7 +193,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
@@ -453,11 +469,11 @@ static int flexcan_chip_softreset(struct
|
||||
@@ -459,11 +475,11 @@ static int flexcan_chip_softreset(struct
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
unsigned int timeout = FLEXCAN_TIMEOUT_US / 10;
|
||||
|
||||
@ -208,7 +208,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
@@ -468,7 +484,7 @@ static int __flexcan_get_berr_counter(co
|
||||
@@ -474,7 +490,7 @@ static int __flexcan_get_berr_counter(co
|
||||
{
|
||||
const struct flexcan_priv *priv = netdev_priv(dev);
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
@ -217,7 +217,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
|
||||
bec->txerr = (reg >> 0) & 0xff;
|
||||
bec->rxerr = (reg >> 8) & 0xff;
|
||||
@@ -524,24 +540,24 @@ static int flexcan_start_xmit(struct sk_
|
||||
@@ -530,24 +546,24 @@ static int flexcan_start_xmit(struct sk_
|
||||
|
||||
if (cf->can_dlc > 0) {
|
||||
data = be32_to_cpup((__be32 *)&cf->data[0]);
|
||||
@ -248,7 +248,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
&priv->tx_mb_reserved->can_ctrl);
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
@@ -660,7 +676,7 @@ static unsigned int flexcan_mailbox_read
|
||||
@@ -666,7 +682,7 @@ static unsigned int flexcan_mailbox_read
|
||||
u32 code;
|
||||
|
||||
do {
|
||||
@ -257,7 +257,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
} while (reg_ctrl & FLEXCAN_MB_CODE_RX_BUSY_BIT);
|
||||
|
||||
/* is this MB empty? */
|
||||
@@ -675,17 +691,17 @@ static unsigned int flexcan_mailbox_read
|
||||
@@ -681,17 +697,17 @@ static unsigned int flexcan_mailbox_read
|
||||
offload->dev->stats.rx_errors++;
|
||||
}
|
||||
} else {
|
||||
@ -278,7 +278,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
if (reg_ctrl & FLEXCAN_MB_CNT_IDE)
|
||||
cf->can_id = ((reg_id >> 0) & CAN_EFF_MASK) | CAN_EFF_FLAG;
|
||||
else
|
||||
@@ -695,19 +711,19 @@ static unsigned int flexcan_mailbox_read
|
||||
@@ -701,19 +717,19 @@ static unsigned int flexcan_mailbox_read
|
||||
cf->can_id |= CAN_RTR_FLAG;
|
||||
cf->can_dlc = get_can_dlc((reg_ctrl >> 16) & 0xf);
|
||||
|
||||
@ -304,7 +304,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -719,8 +735,8 @@ static inline u64 flexcan_read_reg_iflag
|
||||
@@ -725,8 +741,8 @@ static inline u64 flexcan_read_reg_iflag
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
u32 iflag1, iflag2;
|
||||
|
||||
@ -315,7 +315,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
~FLEXCAN_IFLAG_MB(priv->tx_mb_idx);
|
||||
|
||||
return (u64)iflag2 << 32 | iflag1;
|
||||
@@ -736,7 +752,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -742,7 +758,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
u32 reg_iflag1, reg_esr;
|
||||
enum can_state last_state = priv->can.state;
|
||||
|
||||
@ -324,7 +324,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
|
||||
/* reception interrupt */
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||
@@ -759,7 +775,8 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -765,7 +781,8 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
/* FIFO overflow interrupt */
|
||||
if (reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_OVERFLOW) {
|
||||
handled = IRQ_HANDLED;
|
||||
@ -334,7 +334,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
dev->stats.rx_over_errors++;
|
||||
dev->stats.rx_errors++;
|
||||
}
|
||||
@@ -773,18 +790,18 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -779,18 +796,18 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
can_led_event(dev, CAN_LED_EVENT_TX);
|
||||
|
||||
/* after sending a RTR frame MB is in RX mode */
|
||||
@ -358,7 +358,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
}
|
||||
|
||||
/* state change interrupt or broken error state quirk fix is enabled */
|
||||
@@ -846,7 +863,7 @@ static void flexcan_set_bittiming(struct
|
||||
@@ -852,7 +869,7 @@ static void flexcan_set_bittiming(struct
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
u32 reg;
|
||||
|
||||
@ -367,7 +367,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
reg &= ~(FLEXCAN_CTRL_PRESDIV(0xff) |
|
||||
FLEXCAN_CTRL_RJW(0x3) |
|
||||
FLEXCAN_CTRL_PSEG1(0x7) |
|
||||
@@ -870,11 +887,11 @@ static void flexcan_set_bittiming(struct
|
||||
@@ -876,11 +893,11 @@ static void flexcan_set_bittiming(struct
|
||||
reg |= FLEXCAN_CTRL_SMP;
|
||||
|
||||
netdev_dbg(dev, "writing ctrl=0x%08x\n", reg);
|
||||
@ -381,7 +381,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
}
|
||||
|
||||
/* flexcan_chip_start
|
||||
@@ -913,7 +930,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -919,7 +936,7 @@ static int flexcan_chip_start(struct net
|
||||
* choose format C
|
||||
* set max mailbox number
|
||||
*/
|
||||
@ -390,7 +390,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
reg_mcr &= ~FLEXCAN_MCR_MAXMB(0xff);
|
||||
reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT | FLEXCAN_MCR_SUPV |
|
||||
FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_SRX_DIS | FLEXCAN_MCR_IRMQ |
|
||||
@@ -927,7 +944,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -933,7 +950,7 @@ static int flexcan_chip_start(struct net
|
||||
FLEXCAN_MCR_MAXMB(priv->tx_mb_idx);
|
||||
}
|
||||
netdev_dbg(dev, "%s: writing mcr=0x%08x", __func__, reg_mcr);
|
||||
@ -399,7 +399,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
|
||||
/* CTRL
|
||||
*
|
||||
@@ -940,7 +957,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -946,7 +963,7 @@ static int flexcan_chip_start(struct net
|
||||
* enable bus off interrupt
|
||||
* (== FLEXCAN_CTRL_ERR_STATE)
|
||||
*/
|
||||
@ -408,7 +408,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
reg_ctrl &= ~FLEXCAN_CTRL_TSYN;
|
||||
reg_ctrl |= FLEXCAN_CTRL_BOFF_REC | FLEXCAN_CTRL_LBUF |
|
||||
FLEXCAN_CTRL_ERR_STATE;
|
||||
@@ -960,45 +977,45 @@ static int flexcan_chip_start(struct net
|
||||
@@ -966,45 +983,45 @@ static int flexcan_chip_start(struct net
|
||||
/* leave interrupts disabled for now */
|
||||
reg_ctrl &= ~FLEXCAN_CTRL_ERR_ALL;
|
||||
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
|
||||
@ -470,7 +470,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
|
||||
/* On Vybrid, disable memory error detection interrupts
|
||||
* and freeze mode.
|
||||
@@ -1011,17 +1028,17 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1017,17 +1034,17 @@ static int flexcan_chip_start(struct net
|
||||
* and Correction of Memory Errors" to write to
|
||||
* MECR register
|
||||
*/
|
||||
@ -493,7 +493,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
}
|
||||
|
||||
err = flexcan_transceiver_enable(priv);
|
||||
@@ -1037,14 +1054,14 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1043,14 +1060,14 @@ static int flexcan_chip_start(struct net
|
||||
|
||||
/* enable interrupts atomically */
|
||||
disable_irq(dev->irq);
|
||||
@ -512,7 +512,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1074,10 +1091,10 @@ static int __flexcan_chip_stop(struct ne
|
||||
@@ -1080,10 +1097,10 @@ static int __flexcan_chip_stop(struct ne
|
||||
goto out_chip_unfreeze;
|
||||
|
||||
/* Disable all interrupts */
|
||||
@ -527,7 +527,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
|
||||
flexcan_transceiver_disable(priv);
|
||||
priv->can.state = CAN_STATE_STOPPED;
|
||||
@@ -1209,9 +1226,9 @@ static int register_flexcandev(struct ne
|
||||
@@ -1215,9 +1232,9 @@ static int register_flexcandev(struct ne
|
||||
err = flexcan_chip_disable(priv);
|
||||
if (err)
|
||||
goto out_disable_per;
|
||||
@ -539,7 +539,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
|
||||
err = flexcan_chip_enable(priv);
|
||||
if (err)
|
||||
@@ -1223,16 +1240,16 @@ static int register_flexcandev(struct ne
|
||||
@@ -1229,16 +1246,16 @@ static int register_flexcandev(struct ne
|
||||
goto out_chip_disable;
|
||||
|
||||
/* activate FIFO, restrict register access */
|
||||
@ -559,7 +559,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
if (!(reg & FLEXCAN_MCR_FEN)) {
|
||||
netdev_err(dev, "Could not enable RX FIFO, unsupported core\n");
|
||||
err = -ENODEV;
|
||||
@@ -1260,8 +1277,12 @@ static void unregister_flexcandev(struct
|
||||
@@ -1266,8 +1283,12 @@ static void unregister_flexcandev(struct
|
||||
static const struct of_device_id flexcan_of_match[] = {
|
||||
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
|
||||
{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
|
||||
@ -572,7 +572,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, flexcan_of_match);
|
||||
@@ -1341,6 +1362,21 @@ static int flexcan_probe(struct platform
|
||||
@@ -1347,6 +1368,21 @@ static int flexcan_probe(struct platform
|
||||
dev->flags |= IFF_ECHO;
|
||||
|
||||
priv = netdev_priv(dev);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user