From 370a4e1cb4253227456ba8de2e8025fd93b327f4 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 13 Aug 2021 02:36:36 +0800 Subject: [PATCH] generic/rockchip: refresh kernel patches Signed-off-by: Tianling Shen (cherry picked from commit ee6815b64ca1a29cb07edbc6dcf07e940087dfbc) --- ...k-events-support-multiple-registrant.patch | 30 ++++++++++++++++--- ...-linux-kernel-to-support-shortcut-fe.patch | 2 +- ...k-events-support-multiple-registrant.patch | 12 ++++---- ...-linux-kernel-to-support-shortcut-fe.patch | 16 +++++----- .../993-usb-serial-option-add-u9300.patch | 6 ++-- ...d-OF-node-for-pcie-eth-on-NanoPi-R4S.patch | 2 +- ...-initial-signal-voltage-on-power-off.patch | 2 +- ...328-Add-support-for-OrangePi-R1-Plus.patch | 2 +- ...-initial-signal-voltage-on-power-off.patch | 2 +- ...d-OF-node-for-pcie-eth-on-NanoPi-R4S.patch | 2 +- 10 files changed, 49 insertions(+), 27 deletions(-) diff --git a/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch index 3bd51dc884..15e589e129 100644 --- a/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch @@ -1,3 +1,25 @@ +From 42824d4b753f84ccf885eca602c5037338b546c8 Mon Sep 17 00:00:00 2001 +From: Zhi Chen +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 +--- + 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 diff --git a/target/linux/generic/hack-5.10/953-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-5.10/953-net-patch-linux-kernel-to-support-shortcut-fe.patch index ac99f3047a..03b077784e 100644 --- a/target/linux/generic/hack-5.10/953-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-5.10/953-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -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); } diff --git a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch index 6decde1182..31a53dd52d 100644 --- a/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-5.4/952-net-conntrack-events-support-multiple-registrant.patch @@ -98,9 +98,9 @@ Signed-off-by: Zhi Chen #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 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 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 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 diff --git a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch index 9a5e0fa994..d689517d90 100644 --- a/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -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; } diff --git a/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch b/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch index 2ea6783362..c1eaceeb3c 100644 --- a/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch +++ b/target/linux/generic/hack-5.4/993-usb-serial-option-add-u9300.patch @@ -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) }, diff --git a/target/linux/rockchip/patches-5.10/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch b/target/linux/rockchip/patches-5.10/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch index 028deca248..563a7f6df5 100644 --- a/target/linux/rockchip/patches-5.10/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch +++ b/target/linux/rockchip/patches-5.10/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch @@ -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>; diff --git a/target/linux/rockchip/patches-5.10/107-mmc-core-set-initial-signal-voltage-on-power-off.patch b/target/linux/rockchip/patches-5.10/107-mmc-core-set-initial-signal-voltage-on-power-off.patch index 2a0f8d9bd0..ef30115859 100644 --- a/target/linux/rockchip/patches-5.10/107-mmc-core-set-initial-signal-voltage-on-power-off.patch +++ b/target/linux/rockchip/patches-5.10/107-mmc-core-set-initial-signal-voltage-on-power-off.patch @@ -24,7 +24,7 @@ Signed-off-by: Jonas Karlman --- 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); diff --git a/target/linux/rockchip/patches-5.10/202-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus.patch b/target/linux/rockchip/patches-5.10/202-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus.patch index f9fb9ee8bd..2166676837 100644 --- a/target/linux/rockchip/patches-5.10/202-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus.patch +++ b/target/linux/rockchip/patches-5.10/202-rockchip-rk3328-Add-support-for-OrangePi-R1-Plus.patch @@ -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 diff --git a/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch b/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch index 6597ee4776..d462899007 100644 --- a/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch +++ b/target/linux/rockchip/patches-5.4/105-mmc-core-set-initial-signal-voltage-on-power-off.patch @@ -24,7 +24,7 @@ Signed-off-by: Jonas Karlman --- 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); diff --git a/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch b/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch index 028deca248..563a7f6df5 100644 --- a/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch +++ b/target/linux/rockchip/patches-5.4/106-arm64-rockchip-add-OF-node-for-pcie-eth-on-NanoPi-R4S.patch @@ -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>;