From patchwork Mon Mar 5 16:34:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Vandeputte X-Patchwork-Id: 881563 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ncentric.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OUlnD0fA"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ncentric.com header.i=@ncentric.com header.b="CFXmw2MK"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zw59n3WSsz9s1r for ; Tue, 6 Mar 2018 03:35:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZE5iWel/E7c+FVn2/0q0G2Cf7C8ro3AZlXhnWPN+4Eo=; b=OUlnD0fAMV0k82 YD42S0pW6deU4NCa7netGml6Ys0aGPHIvn/yl6kzGBM45ctCVb/AxgicWubbgpaHggNJ6uGho9FWm pIoIxxH+3oiFHerinSdvteC8hoh5jYERGjgm+pp9jYF77/aqFgTr7gWqcFjdeKeXMOBGA6g55TES/ Gl9SrVcT0BP4La3O8a0osIhm5OK+BetnLc9I6XgjfbDGmNdRYuh8ZZG5OVnn1a/rWEKetbj8BXA12 mz/fzTyaRJWpWun7K6OBBHBJtW7qwUNxKviJv6sIpzlnO1lRdkEANadM9WNHUUF8QWu36t7SWYZF3 TPF9safsI44V6jImhSLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1est4q-00025V-3f; Mon, 05 Mar 2018 16:35:04 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1est4i-00021Q-7k for lede-dev@lists.infradead.org; Mon, 05 Mar 2018 16:35:00 +0000 Received: by mail-wm0-x244.google.com with SMTP id 188so16719037wme.1 for ; Mon, 05 Mar 2018 08:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EktKEpOa4Dtz/5cCtOJy0PJnGZs+wv6hOns6Ca/rKyo=; b=CFXmw2MKxGtzjCkxmTU5kV3byZRZPToIg6TF8ZGRter1VcczShQLPA1Lqu7FQW2iGB RXOQX/zKDBmE3geNc9AEFhddFvJ0j8iQrlfOqGqhLBOajh1njFntycUiuUN7gIDwu5/1 g+kKXI8V6o1eQSv1KBhLY/ZMr2Eq3ba9tlbcw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EktKEpOa4Dtz/5cCtOJy0PJnGZs+wv6hOns6Ca/rKyo=; b=KmONIZZlj5Ga6Q67YT6yYXMd0Y14tZDDGXSpk+2KAOiy2q0LgrHXsGHJIe9wpA+4wy SyVxQ3zgF5wUt4Rq4ENsdH2UUOigMaCduhH0byViSdfiEorQpe1N+pIEqurBWVVrkuZa /Z7P5hF5IGS+bAEMztbqF1psoFAaBqqx0L5X51ZRUPoWETquSZR+5SBkpQiVqkfaOIOI WcPg0bkcBCbqkkueygPF1AfREKptZldSW1haqsThzQGpvzWHIA5H6NxwzIjfvEtY5U55 tSxvAebDTfRReO+x2RiGxgs/4biXUwLNDGRmF+bx+M1+8It3QM9BPlH5IS27iJb/v9BL 0dEQ== X-Gm-Message-State: APf1xPDBEiNsoebTKDizpNkpwob8QrYP1xooigPO99Vj48MWbk4dSK96 /ho31twMSfVgk7DKsPzXpF55RlrFN4U= X-Google-Smtp-Source: AG47ELtV1hdUl3SN4L/rJAWiH4ePw0PCjfZT3XW6O7WbqLPpP+WEFT3VPjS4Oc3gR+bXAFOsCdJL0w== X-Received: by 10.80.172.22 with SMTP id v22mr19501562edc.158.1520267683860; Mon, 05 Mar 2018 08:34:43 -0800 (PST) Received: from kvdp-BRIX.cmb.citymesh.com (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id g59sm11185493ede.19.2018.03.05.08.34.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Mar 2018 08:34:43 -0800 (PST) From: Koen Vandeputte To: lede-dev@lists.infradead.org Date: Mon, 5 Mar 2018 17:34:07 +0100 Message-Id: <1520267647-20571-2-git-send-email-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520267647-20571-1-git-send-email-koen.vandeputte@ncentric.com> References: <1520267647-20571-1-git-send-email-koen.vandeputte@ncentric.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180305_083456_482886_9E3C4460 X-CRM114-Status: GOOD ( 19.96 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH 2/2] kernel: bump 4.9 to 4.9.86 X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Koen Vandeputte MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org - Refreshed all patches - Removed 1 patch which got upstreamed Compile tested on: ar71xx (Rocket M5, Mikrotik RB2011) Runtime tested on: ar71xx (Rocket M5, Mikrotik RB2011) Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 +- ...configuration-and-device-tree-differences.patch | 2 +- .../090-net-generalize-napi_complete_done.patch | 2 +- ...compat-add-fallback-for-unsupported-libcs.patch | 147 -------- .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch | 22 +- ...jecting-with-source-address-failed-policy.patch | 18 +- .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch | 386 +++++++++++---------- 7 files changed, 228 insertions(+), 353 deletions(-) delete mode 100644 target/linux/generic/backport-4.9/270-uapi-libc-compat-add-fallback-for-unsupported-libcs.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index d3a69be285c1..18179e687e41 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,12 +4,12 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .119 -LINUX_VERSION-4.9 = .85 +LINUX_VERSION-4.9 = .86 LINUX_VERSION-4.14 = .24 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.119 = 4f1f9b7b6b2ee93597239d89bb3b6b60c71ebd8c91d706fadd36f515c68443e6 -LINUX_KERNEL_HASH-4.9.85 = 80fe13eee45bd0d5aee6193281dc85dad14500e27d238dc45ebcbcc77cd965c1 +LINUX_KERNEL_HASH-4.9.86 = a7cf6eb5efcf182f1760fdfc06118eecce5d8c9d82d6945e68fc15db990c6e85 LINUX_KERNEL_HASH-4.14.24 = ba512d1bd7f5910bae0f5d66554810f097f82e5df6fccb8c7cc4a11410839801 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/brcm2708/patches-4.9/950-0094-Add-arm64-configuration-and-device-tree-differences.patch b/target/linux/brcm2708/patches-4.9/950-0094-Add-arm64-configuration-and-device-tree-differences.patch index 7076b99abaa7..d2bfb1695cfe 100644 --- a/target/linux/brcm2708/patches-4.9/950-0094-Add-arm64-configuration-and-device-tree-differences.patch +++ b/target/linux/brcm2708/patches-4.9/950-0094-Add-arm64-configuration-and-device-tree-differences.patch @@ -51,7 +51,7 @@ Tested with raspbian-jessie 2016-09-23. + config ARCH_SUNXI bool "Allwinner sunxi 64-bit SoC Family" - select ARCH_HAS_RESET_CONTROLLER + select ARCH_HAS_RESET_CONTROLLER --- a/arch/arm64/boot/dts/broadcom/Makefile +++ b/arch/arm64/boot/dts/broadcom/Makefile @@ -1,6 +1,7 @@ diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index 4fe42a9c0746..cfd41f2f0deb 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -280,7 +280,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/arc/emac_main.c +++ b/drivers/net/ethernet/arc/emac_main.c -@@ -275,7 +275,7 @@ static int arc_emac_poll(struct napi_str +@@ -284,7 +284,7 @@ static int arc_emac_poll(struct napi_str work_done = arc_emac_rx(ndev, budget); if (work_done < budget) { diff --git a/target/linux/generic/backport-4.9/270-uapi-libc-compat-add-fallback-for-unsupported-libcs.patch b/target/linux/generic/backport-4.9/270-uapi-libc-compat-add-fallback-for-unsupported-libcs.patch deleted file mode 100644 index 7b82bed535ef..000000000000 --- a/target/linux/generic/backport-4.9/270-uapi-libc-compat-add-fallback-for-unsupported-libcs.patch +++ /dev/null @@ -1,147 +0,0 @@ -From c6bdd0d302119819de72439972d0462c26ef9eda Mon Sep 17 00:00:00 2001 -From: Felix Janda -Date: Sun, 12 Nov 2017 13:30:17 -0500 -Subject: uapi libc compat: add fallback for unsupported libcs - -libc-compat.h aims to prevent symbol collisions between uapi and libc -headers for each supported libc. This requires continuous coordination -between them. - -The goal of this commit is to improve the situation for libcs (such as -musl) which are not yet supported and/or do not wish to be explicitly -supported, while not affecting supported libcs. More precisely, with -this commit, unsupported libcs can request the suppression of any -specific uapi definition by defining the correspondings _UAPI_DEF_* -macro as 0. This can fix symbol collisions for them, as long as the -libc headers are included before the uapi headers. Inclusion in the -other order is outside the scope of this commit. - -All infrastructure in order to enable this fallback for unsupported -libcs is already in place, except that libc-compat.h unconditionally -defines all _UAPI_DEF_* macros to 1 for all unsupported libcs so that -any previous definitions are ignored. In order to fix this, this commit -merely makes these definitions conditional. - -This commit together with the musl libc commit - -http://git.musl-libc.org/cgit/musl/commit/?id=04983f2272382af92eb8f8838964ff944fbb8258 - -fixes for example the following compiler errors when is -included after musl's : - -./linux/in6.h:32:8: error: redefinition of 'struct in6_addr' -./linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6' -./linux/in6.h:59:8: error: redefinition of 'struct ipv6_mreq' - -The comments referencing glibc are still correct, but this file is not -only used for glibc any more. - -Signed-off-by: Felix Janda -Reviewed-by: Hauke Mehrtens ---- - include/uapi/linux/libc-compat.h | 55 +++++++++++++++++++++++++++++++++++++++- - 1 file changed, 54 insertions(+), 1 deletion(-) - ---- a/include/uapi/linux/libc-compat.h -+++ b/include/uapi/linux/libc-compat.h -@@ -167,46 +167,99 @@ - - /* If we did not see any headers from any supported C libraries, - * or we are being included in the kernel, then define everything -- * that we need. */ -+ * that we need. Check for previous __UAPI_* definitions to give -+ * unsupported C libraries a way to opt out of any kernel definition. */ - #else /* !defined(__GLIBC__) */ - - /* Definitions for if.h */ -+#ifndef __UAPI_DEF_IF_IFCONF - #define __UAPI_DEF_IF_IFCONF 1 -+#endif -+#ifndef __UAPI_DEF_IF_IFMAP - #define __UAPI_DEF_IF_IFMAP 1 -+#endif -+#ifndef __UAPI_DEF_IF_IFNAMSIZ - #define __UAPI_DEF_IF_IFNAMSIZ 1 -+#endif -+#ifndef __UAPI_DEF_IF_IFREQ - #define __UAPI_DEF_IF_IFREQ 1 -+#endif - /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ -+#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 -+#endif - /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ -+#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 -+#endif - - /* Definitions for in.h */ -+#ifndef __UAPI_DEF_IN_ADDR - #define __UAPI_DEF_IN_ADDR 1 -+#endif -+#ifndef __UAPI_DEF_IN_IPPROTO - #define __UAPI_DEF_IN_IPPROTO 1 -+#endif -+#ifndef __UAPI_DEF_IN_PKTINFO - #define __UAPI_DEF_IN_PKTINFO 1 -+#endif -+#ifndef __UAPI_DEF_IP_MREQ - #define __UAPI_DEF_IP_MREQ 1 -+#endif -+#ifndef __UAPI_DEF_SOCKADDR_IN - #define __UAPI_DEF_SOCKADDR_IN 1 -+#endif -+#ifndef __UAPI_DEF_IN_CLASS - #define __UAPI_DEF_IN_CLASS 1 -+#endif - - /* Definitions for in6.h */ -+#ifndef __UAPI_DEF_IN6_ADDR - #define __UAPI_DEF_IN6_ADDR 1 -+#endif -+#ifndef __UAPI_DEF_IN6_ADDR_ALT - #define __UAPI_DEF_IN6_ADDR_ALT 1 -+#endif -+#ifndef __UAPI_DEF_SOCKADDR_IN6 - #define __UAPI_DEF_SOCKADDR_IN6 1 -+#endif -+#ifndef __UAPI_DEF_IPV6_MREQ - #define __UAPI_DEF_IPV6_MREQ 1 -+#endif -+#ifndef __UAPI_DEF_IPPROTO_V6 - #define __UAPI_DEF_IPPROTO_V6 1 -+#endif -+#ifndef __UAPI_DEF_IPV6_OPTIONS - #define __UAPI_DEF_IPV6_OPTIONS 1 -+#endif -+#ifndef __UAPI_DEF_IN6_PKTINFO - #define __UAPI_DEF_IN6_PKTINFO 1 -+#endif -+#ifndef __UAPI_DEF_IP6_MTUINFO - #define __UAPI_DEF_IP6_MTUINFO 1 -+#endif - - /* Definitions for ipx.h */ -+#ifndef __UAPI_DEF_SOCKADDR_IPX - #define __UAPI_DEF_SOCKADDR_IPX 1 -+#endif -+#ifndef __UAPI_DEF_IPX_ROUTE_DEFINITION - #define __UAPI_DEF_IPX_ROUTE_DEFINITION 1 -+#endif -+#ifndef __UAPI_DEF_IPX_INTERFACE_DEFINITION - #define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1 -+#endif -+#ifndef __UAPI_DEF_IPX_CONFIG_DATA - #define __UAPI_DEF_IPX_CONFIG_DATA 1 -+#endif -+#ifndef __UAPI_DEF_IPX_ROUTE_DEF - #define __UAPI_DEF_IPX_ROUTE_DEF 1 -+#endif - - /* Definitions for xattr.h */ -+#ifndef __UAPI_DEF_XATTR - #define __UAPI_DEF_XATTR 1 -+#endif - - #endif /* __GLIBC__ */ - diff --git a/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 0941b79b66b6..aeefcaf39c8b 100644 --- a/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -300,7 +300,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1287,6 +1427,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1292,6 +1432,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str { struct ip6_tnl *t = netdev_priv(dev); struct ipv6hdr *ipv6h = ipv6_hdr(skb); @@ -308,7 +308,7 @@ Signed-off-by: Steven Barth int encap_limit = -1; __u16 offset; struct flowi6 fl6; -@@ -1345,6 +1486,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1350,6 +1491,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_mark = skb->mark; } @@ -327,7 +327,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1472,6 +1625,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1477,6 +1630,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.flowinfo = p->flowinfo; t->parms.link = p->link; t->parms.proto = p->proto; @@ -342,7 +342,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1510,6 +1671,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1515,6 +1676,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -350,7 +350,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1887,6 +2049,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1892,6 +2054,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -366,7 +366,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1921,6 +2092,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1926,6 +2097,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_COLLECT_METADATA]) parms->collect_md = true; @@ -413,7 +413,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2030,6 +2241,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2035,6 +2246,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -426,7 +426,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2057,6 +2274,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2062,6 +2279,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(2) + /* IFLA_IPTUN_COLLECT_METADATA */ nla_total_size(0) + @@ -451,7 +451,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2064,6 +2299,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2069,6 +2304,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -461,7 +461,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2072,9 +2310,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2077,9 +2315,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) || nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || @@ -490,7 +490,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2112,6 +2368,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2117,6 +2373,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_SPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, diff --git a/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index e9c247fad008..85293a2da5d6 100644 --- a/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -1966,6 +1983,11 @@ static struct rt6_info *ip6_route_info_c +@@ -1967,6 +1984,11 @@ static struct rt6_info *ip6_route_info_c rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -153,7 +153,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -2609,6 +2631,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -2610,6 +2632,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2844,7 +2877,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2845,7 +2878,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3216,6 +3250,9 @@ static int rt6_fill_node(struct net *net +@@ -3217,6 +3251,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 case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3492,6 +3529,8 @@ static int ip6_route_dev_notify(struct n +@@ -3493,6 +3530,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 net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3718,6 +3757,17 @@ static int __net_init ip6_route_net_init +@@ -3719,6 +3758,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); @@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3736,6 +3786,8 @@ out: +@@ -3737,6 +3787,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3753,6 +3805,7 @@ static void __net_exit ip6_route_net_exi +@@ -3754,6 +3806,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 #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3826,6 +3879,9 @@ void __init ip6_route_init_special_entri +@@ -3827,6 +3880,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); diff --git a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch index 1356a4b9e97a..182648b98fa7 100644 --- a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch +++ b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch @@ -2887,7 +2887,7 @@ + + /* Display RX ring */ + priv->hw->desc->display_ring(head_rx, DMA_RX_SIZE, true); - } ++ } +} + +static void stmmac_display_tx_rings(struct stmmac_priv *priv) @@ -2906,15 +2906,15 @@ + head_tx = (void *)tx_q->dma_etx; + else + head_tx = (void *)tx_q->dma_tx; ++ ++ priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false); + } ++} - /* Display Rx ring */ - priv->hw->desc->display_ring(head_rx, DMA_RX_SIZE, true); - /* Display Tx ring */ - priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false); -+ priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false); -+ } -+} -+ +static void stmmac_display_rings(struct stmmac_priv *priv) +{ + /* Display RX ring */ @@ -3131,7 +3131,7 @@ if (priv->hw->mode->set_16kib_bfsize) bfsize = priv->hw->mode->set_16kib_bfsize(dev->mtu); -@@ -1024,235 +1234,409 @@ static int init_dma_desc_rings(struct ne +@@ -1024,257 +1234,516 @@ static int init_dma_desc_rings(struct ne priv->dma_buf_sz = bfsize; @@ -3163,7 +3163,10 @@ + p = &((rx_q->dma_erx + i)->basic); + else + p = rx_q->dma_rx + i; -+ + +- ret = stmmac_init_rx_buffers(priv, p, i, flags); +- if (ret) +- goto err_init_rx_buffers; + ret = stmmac_init_rx_buffers(priv, p, i, flags, + queue); + if (ret) @@ -3173,18 +3176,15 @@ + rx_q->rx_skbuff[i], rx_q->rx_skbuff[i]->data, + (unsigned int)rx_q->rx_skbuff_dma[i]); + } - -- ret = stmmac_init_rx_buffers(priv, p, i, flags); -- if (ret) -- goto err_init_rx_buffers; ++ + rx_q->cur_rx = 0; + rx_q->dirty_rx = (unsigned int)(i - DMA_RX_SIZE); ++ ++ stmmac_clear_rx_descriptors(priv, queue); - netif_dbg(priv, probe, priv->dev, "[%p]\t[%p]\t[%x]\n", - priv->rx_skbuff[i], priv->rx_skbuff[i]->data, - (unsigned int)priv->rx_skbuff_dma[i]); -+ stmmac_clear_rx_descriptors(priv, queue); -+ + /* Setup the chained descriptor addresses */ + if (priv->mode == STMMAC_CHAIN_MODE) { + if (priv->extend_desc) @@ -3277,8 +3277,13 @@ + priv->hw->mode->init(tx_q->dma_tx, + tx_q->dma_tx_phy, + DMA_TX_SIZE, 0); -+ } -+ + } + +- priv->tx_skbuff_dma[i].buf = 0; +- priv->tx_skbuff_dma[i].map_as_page = false; +- priv->tx_skbuff_dma[i].len = 0; +- priv->tx_skbuff_dma[i].last_segment = false; +- priv->tx_skbuff[i] = NULL; + for (i = 0; i < DMA_TX_SIZE; i++) { + struct dma_desc *p; + if (priv->extend_desc) @@ -3300,13 +3305,8 @@ + tx_q->tx_skbuff_dma[i].len = 0; + tx_q->tx_skbuff_dma[i].last_segment = false; + tx_q->tx_skbuff[i] = NULL; - } - -- priv->tx_skbuff_dma[i].buf = 0; -- priv->tx_skbuff_dma[i].map_as_page = false; -- priv->tx_skbuff_dma[i].len = 0; -- priv->tx_skbuff_dma[i].last_segment = false; -- priv->tx_skbuff[i] = NULL; ++ } ++ + tx_q->dirty_tx = 0; + tx_q->cur_tx = 0; + @@ -3387,17 +3387,10 @@ - priv->tx_skbuff_dma[i].buf, - priv->tx_skbuff_dma[i].len, - DMA_TO_DEVICE); -- } + for (i = 0; i < DMA_TX_SIZE; i++) + stmmac_free_tx_buffer(priv, queue, i); +} - -- if (priv->tx_skbuff[i]) { -- dev_kfree_skb_any(priv->tx_skbuff[i]); -- priv->tx_skbuff[i] = NULL; -- priv->tx_skbuff_dma[i].buf = 0; -- priv->tx_skbuff_dma[i].map_as_page = false; -- } ++ +/** + * free_dma_rx_desc_resources - free RX dma desc resources + * @priv: private structure @@ -3426,11 +3419,10 @@ + + kfree(rx_q->rx_skbuff_dma); + kfree(rx_q->rx_skbuff); - } - } - - /** -- * alloc_dma_desc_resources - alloc TX/RX resources. ++ } ++} ++ ++/** + * free_dma_tx_desc_resources - free TX dma desc resources + * @priv: private structure + */ @@ -3463,90 +3455,36 @@ + +/** + * alloc_dma_rx_desc_resources - alloc RX resources. - * @priv: private structure - * Description: according to which descriptor can be used (extend or basic) - * this function allocates the resources for TX and RX paths. In case of - * reception, for example, it pre-allocated the RX socket buffer in order to - * allow zero-copy mechanism. - */ --static int alloc_dma_desc_resources(struct stmmac_priv *priv) ++ * @priv: private structure ++ * Description: according to which descriptor can be used (extend or basic) ++ * this function allocates the resources for TX and RX paths. In case of ++ * reception, for example, it pre-allocated the RX socket buffer in order to ++ * allow zero-copy mechanism. ++ */ +static int alloc_dma_rx_desc_resources(struct stmmac_priv *priv) - { ++{ + u32 rx_count = priv->plat->rx_queues_to_use; - int ret = -ENOMEM; ++ int ret = -ENOMEM; + u32 queue; - -- priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t), -- GFP_KERNEL); -- if (!priv->rx_skbuff_dma) -- return -ENOMEM; ++ + /* RX queues buffers and DMA */ + for (queue = 0; queue < rx_count; queue++) { + struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue]; - -- priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *), -- GFP_KERNEL); -- if (!priv->rx_skbuff) -- goto err_rx_skbuff; -- -- priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE, -- sizeof(*priv->tx_skbuff_dma), -- GFP_KERNEL); -- if (!priv->tx_skbuff_dma) -- goto err_tx_skbuff_dma; -- -- priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *), -- GFP_KERNEL); -- if (!priv->tx_skbuff) -- goto err_tx_skbuff; -- -- if (priv->extend_desc) { -- priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct -- dma_extended_desc), -- &priv->dma_rx_phy, -- GFP_KERNEL); -- if (!priv->dma_erx) -- goto err_dma; ++ + rx_q->queue_index = queue; + rx_q->priv_data = priv; - -- priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * -- sizeof(struct -- dma_extended_desc), -- &priv->dma_tx_phy, ++ + rx_q->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, + sizeof(dma_addr_t), - GFP_KERNEL); -- if (!priv->dma_etx) { -- dma_free_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_extended_desc), -- priv->dma_erx, priv->dma_rx_phy); -- goto err_dma; -- } -- } else { -- priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_desc), -- &priv->dma_rx_phy, -- GFP_KERNEL); -- if (!priv->dma_rx) -- goto err_dma; ++ GFP_KERNEL); + if (!rx_q->rx_skbuff_dma) + return -ENOMEM; - -- priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * -- sizeof(struct dma_desc), -- &priv->dma_tx_phy, -- GFP_KERNEL); -- if (!priv->dma_tx) { -- dma_free_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_desc), -- priv->dma_rx, priv->dma_rx_phy); ++ + rx_q->rx_skbuff = kmalloc_array(DMA_RX_SIZE, + sizeof(struct sk_buff *), + GFP_KERNEL); + if (!rx_q->rx_skbuff) - goto err_dma; ++ goto err_dma; + + if (priv->extend_desc) { + rx_q->dma_erx = dma_zalloc_coherent(priv->device, @@ -3567,19 +3505,12 @@ + GFP_KERNEL); + if (!rx_q->dma_rx) + goto err_dma; - } - } - - return 0; - - err_dma: -- kfree(priv->tx_skbuff); --err_tx_skbuff: -- kfree(priv->tx_skbuff_dma); --err_tx_skbuff_dma: -- kfree(priv->rx_skbuff); --err_rx_skbuff: -- kfree(priv->rx_skbuff_dma); ++ } ++ } ++ ++ return 0; ++ ++err_dma: + free_dma_rx_desc_resources(priv); + + return ret; @@ -3636,7 +3567,7 @@ + GFP_KERNEL); + if (!tx_q->dma_tx) + goto err_dma_buffers; -+ } + } + } + + return 0; @@ -3644,9 +3575,9 @@ +err_dma_buffers: + free_dma_tx_desc_resources(priv); + - return ret; - } - ++ return ret; ++} ++ +/** + * alloc_dma_desc_resources - alloc TX/RX resources. + * @priv: private structure @@ -3672,78 +3603,119 @@ + * free_dma_desc_resources - free dma desc resources + * @priv: private structure + */ - static void free_dma_desc_resources(struct stmmac_priv *priv) - { -- /* Release the DMA TX/RX socket buffers */ -- dma_free_rx_skbufs(priv); -- dma_free_tx_skbufs(priv); -- -- /* Free DMA regions of consistent memory previously allocated */ -- if (!priv->extend_desc) { -- dma_free_coherent(priv->device, -- DMA_TX_SIZE * sizeof(struct dma_desc), -- priv->dma_tx, priv->dma_tx_phy); -- dma_free_coherent(priv->device, -- DMA_RX_SIZE * sizeof(struct dma_desc), -- priv->dma_rx, priv->dma_rx_phy); -- } else { -- dma_free_coherent(priv->device, DMA_TX_SIZE * -- sizeof(struct dma_extended_desc), -- priv->dma_etx, priv->dma_tx_phy); -- dma_free_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_extended_desc), -- priv->dma_erx, priv->dma_rx_phy); -- } -- kfree(priv->rx_skbuff_dma); -- kfree(priv->rx_skbuff); -- kfree(priv->tx_skbuff_dma); -- kfree(priv->tx_skbuff); ++static void free_dma_desc_resources(struct stmmac_priv *priv) ++{ + /* Release the DMA RX socket buffers */ + free_dma_rx_desc_resources(priv); + + /* Release the DMA TX socket buffers */ + free_dma_tx_desc_resources(priv); - } - - /** -@@ -1262,19 +1646,104 @@ static void free_dma_desc_resources(stru - */ - static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) - { -- int rx_count = priv->dma_cap.number_rx_queues; -- int queue = 0; ++} ++ ++/** ++ * stmmac_mac_enable_rx_queues - Enable MAC rx queues ++ * @priv: driver private structure ++ * Description: It is used for enabling the rx queues in the MAC ++ */ ++static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) ++{ + u32 rx_queues_count = priv->plat->rx_queues_to_use; + int queue; + u8 mode; -- /* If GMAC does not have multiple queues, then this is not necessary*/ -- if (rx_count == 1) -- return; +- if (priv->tx_skbuff[i]) { +- dev_kfree_skb_any(priv->tx_skbuff[i]); +- priv->tx_skbuff[i] = NULL; +- priv->tx_skbuff_dma[i].buf = 0; +- priv->tx_skbuff_dma[i].map_as_page = false; +- } + for (queue = 0; queue < rx_queues_count; queue++) { + mode = priv->plat->rx_queues_cfg[queue].mode_to_use; + priv->hw->mac->rx_queue_enable(priv->hw, mode, queue); -+ } -+} + } + } -- /** -- * If the core is synthesized with multiple rx queues / multiple -- * dma channels, then rx queues will be disabled by default. -- * For now only rx queue 0 is enabled. -- */ -- priv->hw->mac->rx_queue_enable(priv->hw, queue); -+/** + /** +- * alloc_dma_desc_resources - alloc TX/RX resources. +- * @priv: private structure +- * Description: according to which descriptor can be used (extend or basic) +- * this function allocates the resources for TX and RX paths. In case of +- * reception, for example, it pre-allocated the RX socket buffer in order to +- * allow zero-copy mechanism. + * stmmac_start_rx_dma - start RX DMA channel + * @priv: driver private structure + * @chan: RX channel index + * Description: + * This starts a RX DMA channel -+ */ + */ +-static int alloc_dma_desc_resources(struct stmmac_priv *priv) +static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan) -+{ + { +- int ret = -ENOMEM; +- +- priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t), +- GFP_KERNEL); +- if (!priv->rx_skbuff_dma) +- return -ENOMEM; +- +- priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *), +- GFP_KERNEL); +- if (!priv->rx_skbuff) +- goto err_rx_skbuff; +- +- priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE, +- sizeof(*priv->tx_skbuff_dma), +- GFP_KERNEL); +- if (!priv->tx_skbuff_dma) +- goto err_tx_skbuff_dma; +- +- priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *), +- GFP_KERNEL); +- if (!priv->tx_skbuff) +- goto err_tx_skbuff; +- +- if (priv->extend_desc) { +- priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct +- dma_extended_desc), +- &priv->dma_rx_phy, +- GFP_KERNEL); +- if (!priv->dma_erx) +- goto err_dma; +- +- priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * +- sizeof(struct +- dma_extended_desc), +- &priv->dma_tx_phy, +- GFP_KERNEL); +- if (!priv->dma_etx) { +- dma_free_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_extended_desc), +- priv->dma_erx, priv->dma_rx_phy); +- goto err_dma; +- } +- } else { +- priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_desc), +- &priv->dma_rx_phy, +- GFP_KERNEL); +- if (!priv->dma_rx) +- goto err_dma; + netdev_dbg(priv->dev, "DMA RX processes started in channel %d\n", chan); + priv->hw->dma->start_rx(priv->ioaddr, chan); +} -+ + +- priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * +- sizeof(struct dma_desc), +- &priv->dma_tx_phy, +- GFP_KERNEL); +- if (!priv->dma_tx) { +- dma_free_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_desc), +- priv->dma_rx, priv->dma_rx_phy); +- goto err_dma; +- } +- } +/** + * stmmac_start_tx_dma - start TX DMA channel + * @priv: driver private structure @@ -3756,7 +3728,8 @@ + netdev_dbg(priv->dev, "DMA TX processes started in channel %d\n", chan); + priv->hw->dma->start_tx(priv->ioaddr, chan); +} -+ + +- return 0; +/** + * stmmac_stop_rx_dma - stop RX DMA channel + * @priv: driver private structure @@ -3769,7 +3742,16 @@ + netdev_dbg(priv->dev, "DMA RX processes stopped in channel %d\n", chan); + priv->hw->dma->stop_rx(priv->ioaddr, chan); +} -+ + +-err_dma: +- kfree(priv->tx_skbuff); +-err_tx_skbuff: +- kfree(priv->tx_skbuff_dma); +-err_tx_skbuff_dma: +- kfree(priv->rx_skbuff); +-err_rx_skbuff: +- kfree(priv->rx_skbuff_dma); +- return ret; +/** + * stmmac_stop_tx_dma - stop TX DMA channel + * @priv: driver private structure @@ -3781,8 +3763,9 @@ +{ + netdev_dbg(priv->dev, "DMA TX processes stopped in channel %d\n", chan); + priv->hw->dma->stop_tx(priv->ioaddr, chan); -+} -+ + } + +-static void free_dma_desc_resources(struct stmmac_priv *priv) +/** + * stmmac_start_all_dma - start all RX and TX DMA channels + * @priv: driver private structure @@ -3790,7 +3773,31 @@ + * This starts all the RX and TX DMA channels + */ +static void stmmac_start_all_dma(struct stmmac_priv *priv) -+{ + { +- /* Release the DMA TX/RX socket buffers */ +- dma_free_rx_skbufs(priv); +- dma_free_tx_skbufs(priv); +- +- /* Free DMA regions of consistent memory previously allocated */ +- if (!priv->extend_desc) { +- dma_free_coherent(priv->device, +- DMA_TX_SIZE * sizeof(struct dma_desc), +- priv->dma_tx, priv->dma_tx_phy); +- dma_free_coherent(priv->device, +- DMA_RX_SIZE * sizeof(struct dma_desc), +- priv->dma_rx, priv->dma_rx_phy); +- } else { +- dma_free_coherent(priv->device, DMA_TX_SIZE * +- sizeof(struct dma_extended_desc), +- priv->dma_etx, priv->dma_tx_phy); +- dma_free_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_extended_desc), +- priv->dma_erx, priv->dma_rx_phy); +- } +- kfree(priv->rx_skbuff_dma); +- kfree(priv->rx_skbuff); +- kfree(priv->tx_skbuff_dma); +- kfree(priv->tx_skbuff); + u32 rx_channels_count = priv->plat->rx_queues_to_use; + u32 tx_channels_count = priv->plat->tx_queues_to_use; + u32 chan = 0; @@ -3800,23 +3807,38 @@ + + for (chan = 0; chan < tx_channels_count; chan++) + stmmac_start_tx_dma(priv, chan); -+} -+ -+/** + } + + /** +- * stmmac_mac_enable_rx_queues - Enable MAC rx queues +- * @priv: driver private structure +- * Description: It is used for enabling the rx queues in the MAC + * stmmac_stop_all_dma - stop all RX and TX DMA channels + * @priv: driver private structure + * Description: + * This stops the RX and TX DMA channels -+ */ + */ +-static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) +static void stmmac_stop_all_dma(struct stmmac_priv *priv) -+{ + { +- int rx_count = priv->dma_cap.number_rx_queues; +- int queue = 0; + u32 rx_channels_count = priv->plat->rx_queues_to_use; + u32 tx_channels_count = priv->plat->tx_queues_to_use; + u32 chan = 0; -+ + +- /* If GMAC does not have multiple queues, then this is not necessary*/ +- if (rx_count == 1) +- return; + for (chan = 0; chan < rx_channels_count; chan++) + stmmac_stop_rx_dma(priv, chan); -+ + +- /** +- * If the core is synthesized with multiple rx queues / multiple +- * dma channels, then rx queues will be disabled by default. +- * For now only rx queue 0 is enabled. +- */ +- priv->hw->mac->rx_queue_enable(priv->hw, queue); + for (chan = 0; chan < tx_channels_count; chan++) + stmmac_stop_tx_dma(priv, chan); }