generic/rockchip: refresh kernel patches

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit ee6815b64c)
This commit is contained in:
Tianling Shen 2021-08-13 02:36:36 +08:00
parent 751967e121
commit 370a4e1cb4
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
10 changed files with 49 additions and 27 deletions

View File

@ -1,3 +1,25 @@
From 42824d4b753f84ccf885eca602c5037338b546c8 Mon Sep 17 00:00:00 2001
From: Zhi Chen <zhichen@codeaurora.org>
Date: Tue, 13 Jan 2015 14:28:18 -0800
Subject: [PATCH 3/3] net: conntrack events, support multiple registrant
Merging this patch from kernel 3.4:
This was supported by old (.28) kernel versions but removed
because of it's overhead.
But we need this feature for NA connection manager. Both ipv4
and ipv6 modules needs to register themselves to ct events.
Change-Id: Iebfb254590fb594f5baf232f849d1b7ae45ef757
Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
---
include/net/netfilter/nf_conntrack_ecache.h | 42 ++++++++++++++++++-
include/net/netns/conntrack.h | 4 ++
net/netfilter/Kconfig | 8 ++++
net/netfilter/nf_conntrack_core.c | 4 ++
net/netfilter/nf_conntrack_ecache.c | 63 +++++++++++++++++++++++++++++
net/netfilter/nf_conntrack_netlink.c | 17 ++++++++
6 files changed, 137 insertions(+), 1 deletion(-)
--- a/include/net/netfilter/nf_conntrack_ecache.h
+++ b/include/net/netfilter/nf_conntrack_ecache.h
@@ -72,6 +72,10 @@ struct nf_ct_event {
@ -62,7 +84,7 @@
#else
--- a/include/net/netns/conntrack.h
+++ b/include/net/netns/conntrack.h
@@ -112,7 +112,11 @@ struct netns_ct {
@@ -120,7 +120,11 @@ struct netns_ct {
struct ct_pcpu __percpu *pcpu_lists;
struct ip_conntrack_stat __percpu *stat;
@ -93,7 +115,7 @@
depends on NETFILTER_ADVANCED
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2744,6 +2744,9 @@ int nf_conntrack_init_net(struct net *ne
@@ -2749,6 +2749,9 @@ int nf_conntrack_init_net(struct net *ne
nf_conntrack_helper_pernet_init(net);
nf_conntrack_proto_pernet_init(net);
@ -252,7 +274,7 @@
int nf_ct_expect_register_notifier(struct net *net,
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -703,13 +703,20 @@ static size_t ctnetlink_nlmsg_size(const
@@ -706,13 +706,20 @@ static size_t ctnetlink_nlmsg_size(const
}
static int
@ -273,7 +295,7 @@
struct nf_conn *ct = item->ct;
struct sk_buff *skb;
unsigned int type;
@@ -3785,9 +3792,15 @@ static int ctnetlink_stat_exp_cpu(struct
@@ -3788,9 +3795,15 @@ static int ctnetlink_stat_exp_cpu(struct
}
#ifdef CONFIG_NF_CONNTRACK_EVENTS

View File

@ -49,7 +49,7 @@
int (*fcn)(unsigned int events, struct nf_ct_event *item);
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -762,6 +762,28 @@ void br_port_flags_change(struct net_bri
@@ -777,6 +777,28 @@ void br_port_flags_change(struct net_bri
br_recalculate_neigh_suppress_enabled(br);
}

View File

@ -98,9 +98,9 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
#if defined(CONFIG_NF_CONNTRACK_LABELS)
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -148,6 +148,14 @@ config NF_CONNTRACK_RTCACHE
To compile it as a module, choose M here. If unsure, say N.
The module will be called nf_conntrack_rtcache.
@@ -136,6 +136,14 @@ config NF_CONNTRACK_EVENTS
If unsure, say `N'.
+config NF_CONNTRACK_CHAIN_EVENTS
+ bool "Register multiple callbacks to ct events"
@ -115,7 +115,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
depends on NETFILTER_ADVANCED
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2592,6 +2592,9 @@ int nf_conntrack_init_net(struct net *ne
@@ -2597,6 +2597,9 @@ int nf_conntrack_init_net(struct net *ne
nf_conntrack_helper_pernet_init(net);
nf_conntrack_proto_pernet_init(net);
@ -274,7 +274,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
int nf_ct_expect_register_notifier(struct net *net,
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -677,13 +677,20 @@ static size_t ctnetlink_nlmsg_size(const
@@ -680,13 +680,20 @@ static size_t ctnetlink_nlmsg_size(const
}
static int
@ -295,7 +295,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
struct nf_conn *ct = item->ct;
struct sk_buff *skb;
unsigned int type;
@@ -3504,9 +3511,15 @@ static int ctnetlink_stat_exp_cpu(struct
@@ -3508,9 +3515,15 @@ static int ctnetlink_stat_exp_cpu(struct
}
#ifdef CONFIG_NF_CONNTRACK_EVENTS

View File

@ -12,7 +12,7 @@
struct list_head *br_ip_list);
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -838,6 +838,10 @@ struct sk_buff {
@@ -826,6 +826,10 @@ struct sk_buff {
#endif
__u8 gro_skip:1;
@ -49,7 +49,7 @@
int (*fcn)(unsigned int events, struct nf_ct_event *item);
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -746,6 +746,28 @@ void br_port_flags_change(struct net_bri
@@ -761,6 +761,28 @@ void br_port_flags_change(struct net_bri
br_recalculate_neigh_suppress_enabled(br);
}
@ -80,9 +80,9 @@
struct net_bridge_port *p;
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3199,9 +3199,17 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
#endif
@@ -3189,9 +3189,17 @@ static int xmit_one(struct sk_buff *skb,
unsigned int len;
int rc;
+#ifdef CONFIG_SHORTCUT_FE
+ /* If this skb has been fast forwarded then we don't want it to
@ -99,7 +99,7 @@
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
if (!dev->eth_mangle_tx ||
(skb = dev->eth_mangle_tx(dev, skb)) != NULL)
@@ -4714,6 +4722,11 @@ void netdev_rx_handler_unregister(struct
@@ -4702,6 +4710,11 @@ void netdev_rx_handler_unregister(struct
}
EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);
@ -111,7 +111,7 @@
/*
* Limit the use of PFMEMALLOC reserves to those protocols that implement
* the special handling of PFMEMALLOC skbs.
@@ -4764,6 +4777,10 @@ static int __netif_receive_skb_core(stru
@@ -4752,6 +4765,10 @@ static int __netif_receive_skb_core(stru
int ret = NET_RX_DROP;
__be16 type;
@ -122,7 +122,7 @@
net_timestamp_check(!netdev_tstamp_prequeue, skb);
trace_netif_receive_skb(skb);
@@ -4803,6 +4820,16 @@ another_round:
@@ -4791,6 +4808,16 @@ another_round:
goto out;
}

View File

@ -10,7 +10,7 @@
{QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -383,6 +383,7 @@ static void option_instat_callback(struc
@@ -384,6 +384,7 @@ static void option_instat_callback(struc
* Mobidata, etc sell under their own brand names.
*/
#define LONGCHEER_VENDOR_ID 0x1c9e
@ -18,7 +18,7 @@
/* 4G Systems products */
/* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick *
@@ -580,6 +581,16 @@ static void option_instat_callback(struc
@@ -581,6 +582,16 @@ static void option_instat_callback(struc
/* Device needs ZLP */
#define ZLP BIT(17)
@ -35,7 +35,7 @@
static const struct usb_device_id option_ids[] = {
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
@@ -614,6 +625,8 @@ static const struct usb_device_id option
@@ -615,6 +626,8 @@ static const struct usb_device_id option
{ USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) },
{ USB_DEVICE(QUANTA_VENDOR_ID, 0xea42),
.driver_info = RSVD(4) },

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
@@ -83,6 +83,19 @@
@@ -101,6 +101,19 @@
max-link-speed = <1>;
num-lanes = <1>;
vpcie3v3-supply = <&vcc3v3_sys>;

View File

@ -24,7 +24,7 @@ Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1351,6 +1351,8 @@ void mmc_power_off(struct mmc_host *host
@@ -1354,6 +1354,8 @@ void mmc_power_off(struct mmc_host *host
mmc_pwrseq_power_off(host);

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -7,6 +7,7 @@
@@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-od
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb

View File

@ -24,7 +24,7 @@ Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1368,6 +1368,8 @@ void mmc_power_off(struct mmc_host *host
@@ -1371,6 +1371,8 @@ void mmc_power_off(struct mmc_host *host
mmc_pwrseq_power_off(host);

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
@@ -83,6 +83,19 @@
@@ -101,6 +101,19 @@
max-link-speed = <1>;
num-lanes = <1>;
vpcie3v3-supply = <&vcc3v3_sys>;