[From nobody Thu Jun 25 05:54:40 2020
Received: from mail-eopbgr00073.outbound.protection.outlook.com ([40.107.0.73]
 helo=EUR02-AM5-obe.outbound.protection.outlook.com)
 by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
 id 1fOTZA-0002Iz-4R
 for openwrt-devel@lists.openwrt.org; Thu, 31 May 2018 19:49:06 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=darbyshire-bryant.me.uk; s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=AxaIWp4Euuu7ryN+KGBfIrR/e4pneuotZ6auOD6tCaY=;
 b=mM4cynkPZHBgiwe5yqDbVNg5FZklHD5QsVY9hZU46EkeNfh9Dbz8SLyqTOOlRsIdw5zBo+gNY2G8CTxH3GMD1IQVYTJmm/dRrPXSd1Qw0nVGoJIKflnGWQfNxCERAdCWtRKaQK6Jd4HBP+Kz6P/Y4aoC9UFQriGzMiQcJ7InOrc=
Received: from Kevins-MBP.lan.darbyshire-bryant.me.uk (94.14.179.40) by
 AM0PR07MB4244.eurprd07.prod.outlook.com (2603:10a6:208:b8::28) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.820.11; Thu, 31 May 2018 19:48:37 +0000
From: Kevin Darbyshire-Bryant &lt;ldir@darbyshire-bryant.me.uk&gt;
To: openwrt-devel@lists.openwrt.org
Cc: Kevin Darbyshire-Bryant &lt;ldir@darbyshire-bryant.me.uk&gt;
Subject: [PATCH] kernel: bump to 4.9.105
Date: Thu, 31 May 2018 20:48:31 +0100
Message-Id: &lt;20180531194831.1234-1-ldir@darbyshire-bryant.me.uk&gt;
X-Mailer: git-send-email 2.15.1 (Apple Git-101)
MIME-Version: 1.0
Content-Type: text/plain
X-Originating-IP: [94.14.179.40]
X-ClientProxiedBy: CWLP265CA0085.GBRP265.PROD.OUTLOOK.COM
 (2603:10a6:401:50::25) To AM0PR07MB4244.eurprd07.prod.outlook.com
 (2603:10a6:208:b8::28)
X-MS-PublicTrafficType: Email
X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0;
 RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(7168020)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020);
 SRVR:AM0PR07MB4244; 
X-Microsoft-Exchange-Diagnostics: 1; AM0PR07MB4244;
 3:gdIEGJAeQBW/ZOiN9D6cCnMhelH3dsHHXKnye+H+XdljZMpkFVhItFdnzbwgv+oRdKIXG+WEtcVj3WWQyKc4g+6DJ9yO8QbtbubxSziK1sqIhZTDANzGeYKzOGcLNxUkd4xfp5UkKMVCrJwFJcAOmTosbTAMM4RXYSqhsf3YiHrgmkmMkPlG4QnwFHRCxkROpu+nPfrAKXm30VHjrV8TClojKQYoFgRNDi6Bz04rgGxftlRXYc/NhDxhZSHmYR68;
 25:KXqH+1sT0QtQC4TnR7atE2p4BvWx5DJXwsQGnOuBJVNx7LQaEg2GjdAb0hGHM92M5Fe967sCH99i2OXrYwV/G2A8QKBzPrlG7K4lkUA83eWFhpuEw8/7d6K821ePSmbkuaYb4MxtYsh1knIySKUj1Kbpk9GqzxcRYVFPOLx+gLKjtdF76W6dlI7s5e7fzQaDpIqaY9DNqxOAUgYAY8bac03ygJ/aJvi2e6vOOwKb61+OdQ7AdmZZ7po9OhUfX1v48iadLbGiX1GNgLQxn6ABaaIUKcynUacO72yWda6LuMbrwq3JHA/pNtjrulWUZNhAworHk/yKICh/ANxwf+Q4hA==;
 31:EAktwjBTbyqZcbF7v3fy8ugi2xnwTzR4PX5abjAHoYkLBmMrhGpR+wxB6Hvje/l8yA9pAiWxNoBca5TwoRjAXfhbyTYHAia41ytabjg7RJwmfFnzosDpdEUe49kRCtTK5Zaf65VIBaTdzNDgUC+76E5DwgZLkPzee3xeLS6BQUWP8pcciJBHlrabxTptDUt+Yyo31QG2wo1ndO63W67eZwK4wCYDX2CksMT2yjYKve0=
X-MS-TrafficTypeDiagnostic: AM0PR07MB4244:
Authentication-Results: spf=none (sender IP is )
 smtp.mailfrom=kevin@darbyshire-bryant.me.uk; 
X-Microsoft-Antispam-PRVS: &lt;AM0PR07MB4244AE230A205E6FDB5B629AA5630@AM0PR07MB4244.eurprd07.prod.outlook.com&gt;
X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(85827821059158)(788757137089)(228905959029699); 
X-MS-Exchange-SenderADCheck: 1
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0;
 RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(2016111802025)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6043046)(6072148)(201708071742011)(7699016);
 SRVR:AM0PR07MB4244; BCL:0; PCL:0; RULEID:; SRVR:AM0PR07MB4244; 
X-Microsoft-Exchange-Diagnostics: 1; AM0PR07MB4244;
 4:IBhjLBBLj757tpmXkdofkT8kdusfxixNJlBKLeQP1gPSA/TqqVofvHpo1i/Gpi+qiSlsWIS4lSx39u2nrZKlVIDt9QmcZ+oHgYhcheHlimTAuUnVhBFw0yLV/Am5qklHXxatFmL/+5y5U6bFi+7AGQctcoN3ESdW3YbS0wBDs6C1+iI0o9Ul+WeTJ6tFrk1+5J95q8x8PuXAkDI2aXcQP/a239PTpBYTQ8OFrdJqQp5zxXbpnI2UDnBTkdtS1+8FM3Qz7LD+C/2aoF1gw9jN9Px/Aktp29X7y9YFF9ztjpcoNzIfIx2Y/bHFDpvtGXIUQVmRIuSJEfFraN44zer99Qac4S09phFbEjKBpAj3ws8SzqufkKvnH5O57gJlnCqLhcxbOQ3sax1xguWDrVBFDrXzxAgtTTYFk8sHvIamrms=
X-Forefront-PRVS: 06891E23FB
X-Forefront-Antispam-Report: SFV:NSPM;
 SFS:(10009020)(979002)(39380400002)(396003)(39830400003)(366004)(346002)(376002)(50944005)(189003)(199004)(4326008)(26005)(2906002)(16526019)(74482002)(53936002)(6916009)(1076002)(186003)(6666003)(16586007)(386003)(36756003)(55236004)(25786009)(1857600001)(575784001)(7696005)(97736004)(6306002)(51416003)(52116002)(107886003)(59450400001)(316002)(16200700003)(8676002)(47776003)(476003)(956004)(2616005)(8936002)(105586002)(50466002)(486006)(478600001)(3846002)(81156014)(48376002)(966005)(66066001)(50226002)(53946003)(7736002)(305945005)(2351001)(68736007)(106356001)(81166006)(6486002)(5660300001)(2361001)(6116002)(959014)(559001)(569006);
 DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR07MB4244;
 H:Kevins-MBP.lan.darbyshire-bryant.me.uk; FPR:; SPF:None; LANG:en;
 PTR:InfoNoRecords; MX:3; A:1; 
Received-SPF: None (protection.outlook.com: darbyshire-bryant.me.uk does not
 designate permitted sender hosts)
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR07MB4244;
 23:raV2348VbeaF5Mp+MnWRCS1BOn1ib5Yb3aQvP7PoV?=
 =?us-ascii?Q?KmhiVX+XWwBpPhJgaLVNfkICmEQN9s+2iceLggbPT44+WmPUOP7sDP4z5q7i?=
 =?us-ascii?Q?AHXuHsytPApeUEK7rHHvGTn3sYo5x6ougoGOcaNHfeeoOqo8OVBSiR+x1tYm?=
 =?us-ascii?Q?aDhQLzvfgcyTs4gO42kz80lzGeiB0idqw+7LPoICp6ZKDdwsmHcRnpvJXMzJ?=
 =?us-ascii?Q?wvKG4umah19Mqg6Vf+DUsLEGxJ3DOJbw8zKwAOK0YKVZAlptgXMiirYbo3B4?=
 =?us-ascii?Q?2VpdOE578MblRWpeC9zGmOcJXhOzi9ecp6WzfWKs0kbgom0yw3YgPo0n8VE6?=
 =?us-ascii?Q?7UocoUdwJK4QHOarUOSUv1E8d13a3mdglJvx6Z0MdZIUG5XVU/ifBv1p7b9k?=
 =?us-ascii?Q?p0TRIgpsH1FICn1ntLqXCrfTxWYCJCNwA44EY8zoIZN2VHylcDVWj6zxay8k?=
 =?us-ascii?Q?SlvnuG+hkyqZasd7Vkiz7FAD9XbDQIldaGSFuVd/KMares7UayM3jwMW1jqA?=
 =?us-ascii?Q?MO7vE4hUMnvbw/JgyvimbQXL6sHdHXEJhLAcPXIOVMTOL0EI6hASMwRxmABX?=
 =?us-ascii?Q?VKGDFCLkT5m4sLqCTwr2T0UKrypQwez7I0Nv79fkO4prgs6+sQGNz9PUxOne?=
 =?us-ascii?Q?8k1qTAFjyD38bQj0Zr/Waje03JihdMnTHa+TT0sHIVd6PGQlZkSJgJd0gxyT?=
 =?us-ascii?Q?11hiaTOHMVowAS7JigEYVteTXGQm05jfnFD/Z6SLDLWFG/5UQ3nPD01bhcoC?=
 =?us-ascii?Q?ScU+FfMAZDc4jwZjoJrTuERbZ6Nj3t1MK7INKjTuxYb+7+urIV0BC0QDBzuH?=
 =?us-ascii?Q?QIGAEJNnUc0C073e/ZTlyToWJ+6AEct/iIqvvSLSuK8J5BfSrKrxIHDbKaKA?=
 =?us-ascii?Q?vzdF3GFYYKkJ675dkBVaIpK13Ag54aE1/GcMkzipEauAtNcG1/z+ZFn2ZbOh?=
 =?us-ascii?Q?GcRl45YHtFN/2G1+ODFqEbgmhEtdbWDqVCaxqOlG9fBllkBXOvnwPEgy5ZCt?=
 =?us-ascii?Q?eOqd1WWfirb3QkU5/K+ZpFfwBOr1O6yF885tPlyKqB25SWhJySN19WeMrCTF?=
 =?us-ascii?Q?iOG1pfP3MYfJZYGpkc5LQ3ZeNJBI77uZjziBn7F3zdjPB2OmiKrpQ4GqeLIT?=
 =?us-ascii?Q?naLN4n/iQEHK+49vBpYQk2Lu+KZbA/9uE5JsezxcRbiPa+OtPEqxWGe0zSSd?=
 =?us-ascii?Q?HQOClj7hXA+usdyuvGG150xQPngLnwnAx+iPaJAX+wHs8iXnKv8bdZevdl7m?=
 =?us-ascii?Q?STpz7/KvYvzuMlWVt+OSGtenyH+xAPNVkjap72qFEMtHVKaazUyhjdYCaPFK?=
 =?us-ascii?Q?vFJBZl1tSxVXcz3PCvoo0mNTL41iJKVWflCfFTx6Vak8QnhXqd4avQkzig5s?=
 =?us-ascii?Q?EQLbo3eMbZoMKQvaBmK7eSCoEFIQzFoUKDvECXb8DDowDJgymhv2eIMj+U5J?=
 =?us-ascii?Q?OGTh/UIC2PkkytJTEBUxPnuNvKoNFc=3D?=
X-Microsoft-Antispam-Message-Info: Rgl+jNd8ca84wDxc3OpjWxPKXRebkWZv/Rq+MCTQt/Vi4/UvuVGk3G0Vjvt9ievSqYB8+Jx5ObN+4miEEpPc5TIhQiCaMyy9C/FXnGmtEl/pa1V2zXqX/Rtstfcv64rG0Fme+AEZBDopoh39dYaZgBLbHvaprX576q1cOAjbmFzVzh+aQZSEa6ZxFuRwjVJs
X-Microsoft-Exchange-Diagnostics: 1; AM0PR07MB4244;
 6:FSuA8mqmbRpH4UgBzpyNKEfuPgkhXYZ1e1eCD3/hO/HYoaf3UW2pv1oOyU0I/69ASLcsZQ0wrwK5RPRow46Apl1jAvsO1PqJWkBeuRc1XHak53h2JaPEXd55z4v29IWv8eWQLsdSZwVD3/Pb9YWnjMFgsPOHO8hBpFBNz9PBlpbrDAg+BvUTYSoqc5LQnhEfCVBUWKqHVdS/H9QTwTlM+nYllw29PU8DDTXdLVMk915lWcawLiyzvNg9+ztGzkhv4ls2MmUmWxOaG5rshlMIHfyD1sCmlzre3ifJ52y2ZZowYAcXmwtk449C2P7dwXhjW6DDHXkSqK1IqwTrz2BrwbY6CdEDzBh+UjrDS8aSHDJGVO5CuV2bsxq+ofn92pdYPaE+58KodIX/iorNNB5H4Ca7sIxpCH3To7VZyZbGG4GbaFhtlpYP8uaMtsfS/9DpcZKN+8rVr/ou/gP33Bzmqw==;
 5:FDltFD8V17U8OO1ALYzpZVI0HkgZ91dU1sP0XcHAsaoIsX2FcvnIVhCymjs4+RPT90jXHSgOw7ELtpTQ3a3HIioCv7UIhTnRKUbU6jOhNTuBe9JxGgY4j4wdGbmlGRvbsghzFGLI4g06ARXoN0hiFMeWDD4JHLTtXmGCgKMtqN8=;
 24:7xtlHVWXP+6GUC1F6UuYQVepD35Bztg2rJ2XWznkG2ac9KLgSQ/A7J5BBoPobwur6OLZCprmdIn/cDFgGIZj9NMBtYLdNmr5pMRH2bKPoGc=
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-Microsoft-Exchange-Diagnostics: 1; AM0PR07MB4244;
 7:GgxyV/gOtccbDjufYnp73vn4y2kpZAdJAKh0bV3++V2acY369tA5UMxRChVEjTNrvl+QVCSvDdxupJ/mq/F9d58NhnPT2m4SHWVZpnGgdpp3OGxuUb2RhkN/1vwGUjPFLsvWEY/E8dG8RPZ5j+0XT+A32qJBIIgRGJ475gTSx8NQ9CZCBcCpZaGXxSoFR1oI+KtuNK0r2sRL61sT3KZxwm8J3E1+ao4YJbTnSLSCfJXT55PYnfJM1gln3iX6JuFZ
X-MS-Office365-Filtering-Correlation-Id: df432ddd-c9ab-4891-e1cc-08d5c72f8091
X-OriginatorOrg: darbyshire-bryant.me.uk
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2018 19:48:37.6307 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: df432ddd-c9ab-4891-e1cc-08d5c72f8091
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 9151708b-c553-406f-8e56-694f435154a4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB4244
X-Spam-Note: CRM114 run bypassed due to message size (122519 bytes)
X-Spam-Score: -0.1 (/)
X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary:
 Content analysis details:   (-0.1 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [40.107.0.73 listed in list.dnswl.org]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
 not necessarily valid
 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
 domain

Refresh patches.

Drop patches that have been upstreamed:
target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch
target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch
target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch

Compile &amp; run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant &lt;ldir@darbyshire-bryant.me.uk&gt;
---
 include/kernel-version.mk                          |   4 +-
 ...h79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch |  29 --
 .../902-at803x-add-reset-gpio-pdata.patch          |   8 +-
 ...oid-suspending-if-we-re-in-gadget-mode-18.patch |   2 +-
 .../linux/brcm47xx/patches-4.9/159-cpu_fixes.patch |   8 +-
 ...tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch |   2 +-
 .../050-usb-dwc2-Remove-unnecessary-kfree.patch    |   2 +-
 ...llocate-struct-bgmac-just-once-don-t-copy.patch |   6 +-
 .../090-net-generalize-napi_complete_done.patch    |  18 +-
 ...o-export-ipv6_push_frag_opts-for-tunnelin.patch |  36 --
 ...er.h-prevent-redefinition-of-struct-ethhd.patch |   2 +-
 .../hack-4.9/773-bgmac-add-srab-switch.patch       |   6 +-
 .../generic/hack-4.9/901-debloat_sock_diag.patch   |   2 +-
 ...-.rename2-and-add-RENAME_WHITEOUT-support.patch |   6 +-
 .../141-jffs2-add-RENAME_EXCHANGE-support.patch    |   8 +-
 ...180-net-phy-at803x-add-support-for-AT8032.patch |  70 ---
 ...net-usb-add-lte-modem-wistron-neweb-d18q1.patch |  61 ---
 ...t-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch |  28 --
 .../pending-4.9/630-packet_socket_type.patch       |   6 +-
 .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch |  10 +-
 ...t-phy-at803x-allow-to-configure-via-pdata.patch |  12 +-
 .../735-net-phy-at803x-fix-at8033-sgmii-mode.patch |   2 +-
 .../generic/pending-4.9/834-ledtrig-libata.patch   |   8 +-
 .../pending-4.9/890-uart_optional_sysrq.patch      |   2 +-
 .../ixp4xx/patches-4.9/160-delayed_uart_io.patch   |   4 +-
 .../202-core-linux-support-layerscape.patch        |   2 +-
 .../patches-4.9/702-pci-support-layerscape.patch   |   2 +-
 .../704-fsl-mc-layerscape-support.patch            |   2 +-
 .../patches-4.9/810-iommu-support-layerscape.patch |   8 +-
 .../816-tty-serial-support-layerscape.patch        |  10 +-
 .../patches-4.9/817-usb-support-layerscape.patch   |  32 +-
 .../100-powerpc-85xx-tl-wdr4900-v1-support.patch   |   4 +-
 .../sunxi/patches-4.9/0050-stmmac-form-4-10.patch  | 120 +++---
 .../sunxi/patches-4.9/0051-stmmac-form-4-11.patch  |  36 +-
 .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch  | 468 ++++++++++-----------
 .../sunxi/patches-4.9/0053-stmmac-form-4-13.patch  |  16 +-
 36 files changed, 400 insertions(+), 642 deletions(-)
 delete mode 100644 target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
 delete mode 100644 target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch
 delete mode 100644 target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch
 delete mode 100644 target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
 delete mode 100644 target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 2c6adc8ab0..877fa880f5 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 = .121
-LINUX_VERSION-4.9 = .102
+LINUX_VERSION-4.9 = .105
 LINUX_VERSION-4.14 = .44
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
-LINUX_KERNEL_HASH-4.9.102 = d155a36ba52d5809805cd370902582ac373c5b23a958c6424325684447119dc5
+LINUX_KERNEL_HASH-4.9.105 = d085d228e3ac1fdbdf5a31bb8154e4e8a0943a9085f0384842601db8e9d96dc4
 LINUX_KERNEL_HASH-4.14.44 = 2eb356e6af25f6ca65affe7704be8c4e0cdf224505e7441ac9d5b6e8d96ec8e4
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch b/target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
deleted file mode 100644
index e785b30eff..0000000000
--- a/target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 0f15814bcdf59f10b708a3fba636acb089e9a4f1 Mon Sep 17 00:00:00 2001
-From: Mathias Kresin &lt;dev@kresin.me&gt;
-Date: Thu, 30 Mar 2017 15:34:39 +0200
-Subject: [PATCH] MIPS: ath79: fix AR724X_PLL_REG_PCIE_CONFIG offset
-
-According to the QCA u-boot source the &quot;PCIE Phase Lock Loop
-Configuration (PCIE_PLL_CONFIG)&quot; register is for all SoCs except the
-QCA955X and QCA956X at offset 0x10.
-
-Since the PCIE PLL config register is only defined for the AR724x fix
-only this value. The value is wrong since the day it was added and isn't
-yet used by any driver.
-
-Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
----
- arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -167,7 +167,7 @@
- #define AR71XX_AHB_DIV_MASK		0x7
- 
- #define AR724X_PLL_REG_CPU_CONFIG	0x00
--#define AR724X_PLL_REG_PCIE_CONFIG	0x18
-+#define AR724X_PLL_REG_PCIE_CONFIG	0x10
- 
- #define AR724X_PLL_FB_SHIFT		0
- #define AR724X_PLL_FB_MASK		0x3ff
diff --git a/target/linux/ar71xx/patches-4.9/902-at803x-add-reset-gpio-pdata.patch b/target/linux/ar71xx/patches-4.9/902-at803x-add-reset-gpio-pdata.patch
index cb3ed89e98..fb6f85cdfd 100644
--- a/target/linux/ar71xx/patches-4.9/902-at803x-add-reset-gpio-pdata.patch
+++ b/target/linux/ar71xx/patches-4.9/902-at803x-add-reset-gpio-pdata.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  #endif /* _PHY_AT803X_PDATA_H */
 --- a/drivers/net/phy/at803x.c
 +++ b/drivers/net/phy/at803x.c
-@@ -264,6 +264,7 @@ static int at803x_resume(struct phy_devi
+@@ -263,6 +263,7 @@ static int at803x_resume(struct phy_devi
  
  static int at803x_probe(struct phy_device *phydev)
  {
@@ -24,8 +24,8 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  	struct device *dev = &amp;phydev-&gt;mdio.dev;
  	struct at803x_priv *priv;
  	struct gpio_desc *gpiod_reset;
-@@ -276,6 +277,12 @@ static int at803x_probe(struct phy_devic
- 	    phydev-&gt;drv-&gt;phy_id != ATH8032_PHY_ID)
+@@ -274,6 +275,12 @@ static int at803x_probe(struct phy_devic
+ 	if (phydev-&gt;drv-&gt;phy_id != ATH8030_PHY_ID)
  		goto does_not_require_reset_workaround;
  
 +	pdata = dev_get_platdata(dev);
@@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  	gpiod_reset = devm_gpiod_get_optional(dev, &quot;reset&quot;, GPIOD_OUT_LOW);
  	if (IS_ERR(gpiod_reset))
  		return PTR_ERR(gpiod_reset);
-@@ -407,15 +414,23 @@ static void at803x_link_change_notify(st
+@@ -405,15 +412,23 @@ static void at803x_link_change_notify(st
  	 * cannot recover from by software.
  	 */
  	if (phydev-&gt;state == PHY_NOLINK) {
diff --git a/target/linux/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch b/target/linux/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch
index 9f6049b6cc..1bfe34408e 100644
--- a/target/linux/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch
+++ b/target/linux/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch
@@ -39,7 +39,7 @@ Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
 
 --- a/drivers/usb/dwc2/hcd.c
 +++ b/drivers/usb/dwc2/hcd.c
-@@ -4369,6 +4369,9 @@ static int _dwc2_hcd_suspend(struct usb_
+@@ -4381,6 +4381,9 @@ static int _dwc2_hcd_suspend(struct usb_
  	if (!HCD_HW_ACCESSIBLE(hcd))
  		goto unlock;
  
diff --git a/target/linux/brcm47xx/patches-4.9/159-cpu_fixes.patch b/target/linux/brcm47xx/patches-4.9/159-cpu_fixes.patch
index 3102923a6b..9725779c3e 100644
--- a/target/linux/brcm47xx/patches-4.9/159-cpu_fixes.patch
+++ b/target/linux/brcm47xx/patches-4.9/159-cpu_fixes.patch
@@ -396,7 +396,7 @@
  	if (dc_lsize == 0)
  		r4k_blast_dcache = (void *)cache_noop;
  	else if (dc_lsize == 16)
-@@ -952,6 +964,8 @@ static void local_r4k_flush_cache_sigtra
+@@ -955,6 +967,8 @@ static void local_r4k_flush_cache_sigtra
  	}
  
  	R4600_HIT_CACHEOP_WAR_IMPL;
@@ -405,7 +405,7 @@
  	if (!cpu_has_ic_fills_f_dc) {
  		if (dc_lsize)
  			vaddr ? flush_dcache_line(addr &amp; ~(dc_lsize - 1))
-@@ -1840,6 +1854,17 @@ static void coherency_setup(void)
+@@ -1843,6 +1857,17 @@ static void coherency_setup(void)
  	 * silly idea of putting something else there ...
  	 */
  	switch (current_cpu_type()) {
@@ -423,7 +423,7 @@
  	case CPU_R4000PC:
  	case CPU_R4000SC:
  	case CPU_R4000MC:
-@@ -1886,6 +1911,15 @@ void r4k_cache_init(void)
+@@ -1889,6 +1914,15 @@ void r4k_cache_init(void)
  	extern void build_copy_page(void);
  	struct cpuinfo_mips *c = &amp;current_cpu_data;
  
@@ -439,7 +439,7 @@
  	probe_pcache();
  	probe_vcache();
  	setup_scache();
-@@ -1963,7 +1997,15 @@ void r4k_cache_init(void)
+@@ -1966,7 +2000,15 @@ void r4k_cache_init(void)
  	 */
  	local_r4k___flush_cache_all(NULL);
  
diff --git a/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch b/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch
index 407d508f94..292b381f8d 100644
--- a/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch
+++ b/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch
@@ -134,7 +134,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  		if (tcp_small_queue_check(sk, skb, 0))
  			break;
  
-@@ -3531,8 +3531,6 @@ void tcp_send_ack(struct sock *sk)
+@@ -3534,8 +3534,6 @@ void tcp_send_ack(struct sock *sk)
  	/* We do not want pure acks influencing TCP Small Queues or fq/pacing
  	 * too much.
  	 * SKB_TRUESIZE(max(1 .. 66, MAX_TCP_HEADER)) is unfortunately ~784
diff --git a/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch b/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch
index 3bb486c958..69aaa9f84d 100644
--- a/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch
+++ b/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
 
 --- a/drivers/usb/dwc2/hcd.c
 +++ b/drivers/usb/dwc2/hcd.c
-@@ -5188,7 +5188,6 @@ error3:
+@@ -5200,7 +5200,6 @@ error3:
  error2:
  	usb_put_hcd(hcd);
  error1:
diff --git a/target/linux/generic/backport-4.9/071-v4.10-0001-net-bgmac-allocate-struct-bgmac-just-once-don-t-copy.patch b/target/linux/generic/backport-4.9/071-v4.10-0001-net-bgmac-allocate-struct-bgmac-just-once-don-t-copy.patch
index d16948668c..4b667bc2f3 100644
--- a/target/linux/generic/backport-4.9/071-v4.10-0001-net-bgmac-allocate-struct-bgmac-just-once-don-t-copy.patch
+++ b/target/linux/generic/backport-4.9/071-v4.10-0001-net-bgmac-allocate-struct-bgmac-just-once-don-t-copy.patch
@@ -68,7 +68,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  
 --- a/drivers/net/ethernet/broadcom/bgmac.c
 +++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1459,22 +1459,32 @@ static int bgmac_phy_connect(struct bgma
+@@ -1460,22 +1460,32 @@ static int bgmac_phy_connect(struct bgma
  	return 0;
  }
  
@@ -106,7 +106,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  	net_dev-&gt;irq = bgmac-&gt;irq;
  	SET_NETDEV_DEV(net_dev, bgmac-&gt;dev);
  
-@@ -1501,7 +1511,7 @@ int bgmac_enet_probe(struct bgmac *info)
+@@ -1502,7 +1512,7 @@ int bgmac_enet_probe(struct bgmac *info)
  	err = bgmac_dma_alloc(bgmac);
  	if (err) {
  		dev_err(bgmac-&gt;dev, &quot;Unable to alloc memory for DMA\n&quot;);
@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  	}
  
  	bgmac-&gt;int_mask = BGMAC_IS_ERRMASK | BGMAC_IS_RX | BGMAC_IS_TX_MASK;
-@@ -1537,8 +1547,7 @@ err_phy_disconnect:
+@@ -1538,8 +1548,7 @@ err_phy_disconnect:
  	phy_disconnect(net_dev-&gt;phydev);
  err_dma_free:
  	bgmac_dma_free(bgmac);
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 ea703839f1..5c0388ed0f 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
@@ -357,7 +357,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  	enet_dmac_writel(priv, priv-&gt;dma_chan_int_mask,
 --- a/drivers/net/ethernet/broadcom/bgmac.c
 +++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1145,7 +1145,7 @@ static int bgmac_poll(struct napi_struct
+@@ -1146,7 +1146,7 @@ static int bgmac_poll(struct napi_struct
  		return weight;
  
  	if (handled &lt; weight) {
@@ -637,7 +637,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  		return received;
 --- a/drivers/net/ethernet/freescale/gianfar.c
 +++ b/drivers/net/ethernet/freescale/gianfar.c
-@@ -3193,7 +3193,7 @@ static int gfar_poll_rx_sq(struct napi_s
+@@ -3197,7 +3197,7 @@ static int gfar_poll_rx_sq(struct napi_s
  
  	if (work_done &lt; budget) {
  		u32 imask;
@@ -646,7 +646,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  		/* Clear the halt bit in RSTAT */
  		gfar_write(&amp;regs-&gt;rstat, gfargrp-&gt;rstat);
  
-@@ -3282,7 +3282,7 @@ static int gfar_poll_rx(struct napi_stru
+@@ -3286,7 +3286,7 @@ static int gfar_poll_rx(struct napi_stru
  
  	if (!num_act_queues) {
  		u32 imask;
@@ -712,7 +712,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  		 * then check once more to make sure we are done.
 --- a/drivers/net/ethernet/ibm/ibmvnic.c
 +++ b/drivers/net/ethernet/ibm/ibmvnic.c
-@@ -1027,7 +1027,7 @@ restart_poll:
+@@ -1028,7 +1028,7 @@ restart_poll:
  
  	if (frames_processed &lt; budget) {
  		enable_scrq_irq(adapter, adapter-&gt;rx_scrq[scrq_num]);
@@ -803,7 +803,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -2701,11 +2701,9 @@ static int mvneta_poll(struct napi_struc
+@@ -2702,11 +2702,9 @@ static int mvneta_poll(struct napi_struc
  			rx_done = mvneta_rx_swbm(pp, budget, &amp;pp-&gt;rxqs[rx_queue]);
  	}
  
@@ -1095,7 +1095,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  		dma_intr_ena = smsc9420_reg_read(pd, DMAC_INTR_ENA);
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -2693,7 +2693,7 @@ static int stmmac_poll(struct napi_struc
+@@ -2705,7 +2705,7 @@ static int stmmac_poll(struct napi_struc
  
  	work_done = stmmac_rx(priv, budget);
  	if (work_done &lt; budget) {
@@ -1304,7 +1304,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  			adapter-&gt;rx_last_jiffies = jiffies;
 --- a/drivers/net/vmxnet3/vmxnet3_drv.c
 +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
-@@ -1851,7 +1851,7 @@ vmxnet3_poll(struct napi_struct *napi, i
+@@ -1873,7 +1873,7 @@ vmxnet3_poll(struct napi_struct *napi, i
  	rxd_done = vmxnet3_do_poll(rx_queue-&gt;adapter, budget);
  
  	if (rxd_done &lt; budget) {
@@ -1313,7 +1313,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  		vmxnet3_enable_all_intrs(rx_queue-&gt;adapter);
  	}
  	return rxd_done;
-@@ -1882,7 +1882,7 @@ vmxnet3_poll_rx_only(struct napi_struct
+@@ -1904,7 +1904,7 @@ vmxnet3_poll_rx_only(struct napi_struct
  	rxd_done = vmxnet3_rq_rx_complete(rq, adapter, budget);
  
  	if (rxd_done &lt; budget) {
@@ -1379,7 +1379,7 @@ Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
  		 */
 --- a/drivers/net/xen-netfront.c
 +++ b/drivers/net/xen-netfront.c
-@@ -1061,7 +1061,7 @@ err:
+@@ -1064,7 +1064,7 @@ err:
  	if (work_done &lt; budget) {
  		int more_to_do = 0;
  
diff --git a/target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch b/target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch
deleted file mode 100644
index 4197079968..0000000000
--- a/target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 5b8481fa42ac58484d633b558579e302aead64c1 Mon Sep 17 00:00:00 2001
-From: &quot;David S. Miller&quot; &lt;davem@davemloft.net&gt;
-Date: Mon, 1 May 2017 15:10:20 -0400
-Subject: [PATCH] ipv6: Need to export ipv6_push_frag_opts for tunneling now.
-
-Since that change also made the nfrag function not necessary
-for exports, remove it.
-
-Fixes: 89a23c8b528b (&quot;ip6_tunnel: Fix missing tunnel encapsulation limit option&quot;)
-Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
----
- net/ipv6/exthdrs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
-index d32e2110aff2..b636f1da9aec 100644
---- a/net/ipv6/exthdrs.c
-+++ b/net/ipv6/exthdrs.c
-@@ -946,13 +946,13 @@ void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
- 	if (opt-&gt;hopopt)
- 		ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt-&gt;hopopt);
- }
--EXPORT_SYMBOL(ipv6_push_nfrag_opts);
- 
- void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto)
- {
- 	if (opt-&gt;dst1opt)
- 		ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt-&gt;dst1opt);
- }
-+EXPORT_SYMBOL(ipv6_push_frag_opts);
- 
- struct ipv6_txoptions *
- ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt)
--- 
-2.17.1
-
diff --git a/target/linux/generic/backport-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch b/target/linux/generic/backport-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch
index 38697021d5..f20984955f 100644
--- a/target/linux/generic/backport-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch
+++ b/target/linux/generic/backport-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch
@@ -26,7 +26,7 @@ Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
  
  /*
   *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
-@@ -138,11 +139,13 @@
+@@ -139,11 +140,13 @@
   *	This is an Ethernet frame header.
   */
  
diff --git a/target/linux/generic/hack-4.9/773-bgmac-add-srab-switch.patch b/target/linux/generic/hack-4.9/773-bgmac-add-srab-switch.patch
index 88e60e5875..55ebae7143 100644
--- a/target/linux/generic/hack-4.9/773-bgmac-add-srab-switch.patch
+++ b/target/linux/generic/hack-4.9/773-bgmac-add-srab-switch.patch
@@ -32,7 +32,7 @@ Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
  #include &lt;linux/bcm47xx_nvram.h&gt;
  #include &quot;bgmac.h&quot;
  
-@@ -1387,6 +1388,17 @@ static const struct ethtool_ops bgmac_et
+@@ -1388,6 +1389,17 @@ static const struct ethtool_ops bgmac_et
  	.set_link_ksettings     = phy_ethtool_set_link_ksettings,
  };
  
@@ -50,7 +50,7 @@ Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
  /**************************************************
   * MII
   **************************************************/
-@@ -1533,6 +1545,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
+@@ -1534,6 +1546,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
  	net_dev-&gt;hw_features = net_dev-&gt;features;
  	net_dev-&gt;vlan_features = net_dev-&gt;features;
  
@@ -65,7 +65,7 @@ Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
  	err = register_netdev(bgmac-&gt;net_dev);
  	if (err) {
  		dev_err(bgmac-&gt;dev, &quot;Cannot register net device\n&quot;);
-@@ -1555,6 +1575,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
+@@ -1556,6 +1576,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
  
  void bgmac_enet_remove(struct bgmac *bgmac)
  {
diff --git a/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch b/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch
index 98ac5afea6..ed9c76326f 100644
--- a/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch
+++ b/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  static void __sk_free(struct sock *sk)
  {
 +#ifdef CONFIG_SOCK_DIAG
- 	if (unlikely(sock_diag_has_destroy_listeners(sk) &amp;&amp; sk-&gt;sk_net_refcnt))
+ 	if (unlikely(sk-&gt;sk_net_refcnt &amp;&amp; sock_diag_has_destroy_listeners(sk)))
  		sock_diag_broadcast_destroy(sk);
  	else
 +#endif
diff --git a/target/linux/generic/pending-4.9/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch b/target/linux/generic/pending-4.9/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch
index b9bb3f71f1..c97e93250b 100644
--- a/target/linux/generic/pending-4.9/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch
+++ b/target/linux/generic/pending-4.9/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch
@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
 
 --- a/fs/jffs2/dir.c
 +++ b/fs/jffs2/dir.c
-@@ -756,6 +756,24 @@ static int jffs2_mknod (struct inode *di
+@@ -752,6 +752,24 @@ static int jffs2_mknod (struct inode *di
  	return ret;
  }
  
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
  			 struct inode *new_dir_i, struct dentry *new_dentry,
  			 unsigned int flags)
-@@ -766,7 +784,7 @@ static int jffs2_rename (struct inode *o
+@@ -762,7 +780,7 @@ static int jffs2_rename (struct inode *o
  	uint8_t type;
  	uint32_t now;
  
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  		return -EINVAL;
  
  	/* The VFS will check for us and prevent trying to rename a
-@@ -832,9 +850,14 @@ static int jffs2_rename (struct inode *o
+@@ -828,9 +846,14 @@ static int jffs2_rename (struct inode *o
  	if (d_is_dir(old_dentry) &amp;&amp; !victim_f)
  		inc_nlink(new_dir_i);
  
diff --git a/target/linux/generic/pending-4.9/141-jffs2-add-RENAME_EXCHANGE-support.patch b/target/linux/generic/pending-4.9/141-jffs2-add-RENAME_EXCHANGE-support.patch
index 4b30bc7cd0..093a73ab66 100644
--- a/target/linux/generic/pending-4.9/141-jffs2-add-RENAME_EXCHANGE-support.patch
+++ b/target/linux/generic/pending-4.9/141-jffs2-add-RENAME_EXCHANGE-support.patch
@@ -6,7 +6,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
 
 --- a/fs/jffs2/dir.c
 +++ b/fs/jffs2/dir.c
-@@ -781,18 +781,31 @@ static int jffs2_rename (struct inode *o
+@@ -777,18 +777,31 @@ static int jffs2_rename (struct inode *o
  	int ret;
  	struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i-&gt;i_sb);
  	struct jffs2_inode_info *victim_f = NULL;
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  		victim_f = JFFS2_INODE_INFO(d_inode(new_dentry));
  		if (d_is_dir(new_dentry)) {
  			struct jffs2_full_dirent *fd;
-@@ -827,7 +840,7 @@ static int jffs2_rename (struct inode *o
+@@ -823,7 +836,7 @@ static int jffs2_rename (struct inode *o
  	if (ret)
  		return ret;
  
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  		/* There was a victim. Kill it off nicely */
  		if (d_is_dir(new_dentry))
  			clear_nlink(d_inode(new_dentry));
-@@ -853,6 +866,12 @@ static int jffs2_rename (struct inode *o
+@@ -849,6 +862,12 @@ static int jffs2_rename (struct inode *o
  	if (flags &amp; RENAME_WHITEOUT)
  		/* Replace with whiteout */
  		ret = jffs2_whiteout(old_dir_i, old_dentry);
@@ -62,7 +62,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  	else
  		/* Unlink the original */
  		ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i),
-@@ -884,7 +903,7 @@ static int jffs2_rename (struct inode *o
+@@ -880,7 +899,7 @@ static int jffs2_rename (struct inode *o
  		return ret;
  	}
  
diff --git a/target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch b/target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch
deleted file mode 100644
index f2d5df503f..0000000000
--- a/target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From: Felix Fietkau &lt;nbd@nbd.name&gt;
-Subject: net: phy: at803x: add support for AT8032
-
-Like AT8030, this PHY needs the GPIO reset workaround
-
-Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
----
-
---- a/drivers/net/phy/at803x.c
-+++ b/drivers/net/phy/at803x.c
-@@ -62,6 +62,7 @@
- 
- #define ATH8030_PHY_ID 0x004dd076
- #define ATH8031_PHY_ID 0x004dd074
-+#define ATH8032_PHY_ID 0x004dd023
- #define ATH8035_PHY_ID 0x004dd072
- 
- MODULE_DESCRIPTION(&quot;Atheros 803x PHY driver&quot;);
-@@ -259,7 +260,8 @@ static int at803x_probe(struct phy_devic
- 	if (!priv)
- 		return -ENOMEM;
- 
--	if (phydev-&gt;drv-&gt;phy_id != ATH8030_PHY_ID)
-+	if (phydev-&gt;drv-&gt;phy_id != ATH8030_PHY_ID &amp;&amp;
-+	    phydev-&gt;drv-&gt;phy_id != ATH8032_PHY_ID)
- 		goto does_not_require_reset_workaround;
- 
- 	gpiod_reset = devm_gpiod_get_optional(dev, &quot;reset&quot;, GPIOD_OUT_LOW);
-@@ -335,7 +337,7 @@ static void at803x_link_change_notify(st
- 	struct at803x_priv *priv = phydev-&gt;priv;
- 
- 	/*
--	 * Conduct a hardware reset for AT8030 every time a link loss is
-+	 * Conduct a hardware reset for AT8030/2 every time a link loss is
- 	 * signalled. This is necessary to circumvent a hardware bug that
- 	 * occurs when the cable is unplugged while TX packets are pending
- 	 * in the FIFO. In such cases, the FIFO enters an error mode it
-@@ -447,6 +449,24 @@ static struct phy_driver at803x_driver[]
- 	.aneg_done		= at803x_aneg_done,
- 	.ack_interrupt		= &amp;at803x_ack_interrupt,
- 	.config_intr		= &amp;at803x_config_intr,
-+}, {
-+	/* ATHEROS 8032 */
-+	.phy_id			= ATH8032_PHY_ID,
-+	.name			= &quot;Atheros 8032 ethernet&quot;,
-+	.phy_id_mask		= 0xffffffef,
-+	.probe			= at803x_probe,
-+	.config_init		= at803x_config_init,
-+	.link_change_notify	= at803x_link_change_notify,
-+	.set_wol		= at803x_set_wol,
-+	.get_wol		= at803x_get_wol,
-+	.suspend		= at803x_suspend,
-+	.resume			= at803x_resume,
-+	.features		= PHY_BASIC_FEATURES,
-+	.flags			= PHY_HAS_INTERRUPT,
-+	.config_aneg		= genphy_config_aneg,
-+	.read_status		= genphy_read_status,
-+	.ack_interrupt		= at803x_ack_interrupt,
-+	.config_intr		= at803x_config_intr,
- } };
- 
- module_phy_driver(at803x_driver);
-@@ -454,6 +474,7 @@ module_phy_driver(at803x_driver);
- static struct mdio_device_id __maybe_unused atheros_tbl[] = {
- 	{ ATH8030_PHY_ID, 0xffffffef },
- 	{ ATH8031_PHY_ID, 0xffffffef },
-+	{ ATH8032_PHY_ID, 0xffffffef },
- 	{ ATH8035_PHY_ID, 0xffffffef },
- 	{ }
- };
diff --git a/target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch b/target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
deleted file mode 100644
index 8403382de7..0000000000
--- a/target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From d4c4bc11353f3bea6754f7d21e3612c9f32d1d64 Mon Sep 17 00:00:00 2001
-From: Giuseppe Lippolis &lt;giu.lippolis@gmail.com&gt;
-Date: Mon, 26 Mar 2018 16:34:39 +0200
-Subject: [PATCH] net-usb: add qmi_wwan if on lte modem wistron neweb d18q1
-
-This modem is embedded on dlink dwr-921 router.
-    The oem configuration states:
-
-    T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
-    D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
-    P:  Vendor=1435 ProdID=0918 Rev= 2.32
-    S:  Manufacturer=Android
-    S:  Product=Android
-    S:  SerialNumber=0123456789ABCDEF
-    C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA
-    I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
-    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
-    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
-    E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
-    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
-    E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
-    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
-    E:  Ad=88(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
-    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
-    E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
-    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
-    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
-    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
-
-Tested on openwrt distribution
-
-Signed-off-by: Giuseppe Lippolis &lt;giu.lippolis@gmail.com&gt;
-Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
----
- drivers/net/usb/qmi_wwan.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/drivers/net/usb/qmi_wwan.c
-+++ b/drivers/net/usb/qmi_wwan.c
-@@ -810,6 +810,9 @@ static const struct usb_device_id produc
- 	{QMI_FIXED_INTF(0x0846, 0x68a2, 8)},
- 	{QMI_FIXED_INTF(0x12d1, 0x140c, 1)},	/* Huawei E173 */
- 	{QMI_FIXED_INTF(0x12d1, 0x14ac, 1)},	/* Huawei E1820 */
-+	{QMI_FIXED_INTF(0x1435, 0xd181, 3)},	/* Wistron NeWeb D18Q1 */
-+	{QMI_FIXED_INTF(0x1435, 0xd181, 4)},	/* Wistron NeWeb D18Q1 */
-+	{QMI_FIXED_INTF(0x1435, 0xd181, 5)},	/* Wistron NeWeb D18Q1 */
- 	{QMI_FIXED_INTF(0x16d8, 0x6003, 0)},	/* CMOTech 6003 */
- 	{QMI_FIXED_INTF(0x16d8, 0x6007, 0)},	/* CMOTech CHE-628S */
- 	{QMI_FIXED_INTF(0x16d8, 0x6008, 0)},	/* CMOTech CMU-301 */
diff --git a/target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch b/target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch
deleted file mode 100644
index 2a41a6a95f..0000000000
--- a/target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 743989254ea9f132517806d8893ca9b6cf9dc86b Mon Sep 17 00:00:00 2001
-From: Pawel Dembicki &lt;paweldembicki@gmail.com&gt;
-Date: Sat, 24 Mar 2018 22:08:14 +0100
-Subject: [PATCH] net: qmi_wwan: add BroadMobi BM806U 2020:2033
-
-BroadMobi BM806U is an Qualcomm MDM9225 based 3G/4G modem.
-Tested hardware BM806U is mounted on D-Link DWR-921-C3 router.
-The USB id is added to qmi_wwan.c to allow QMI communication with
-the BM806U.
-
-Tested on 4.14 kernel and OpenWRT.
-
-Signed-off-by: Pawel Dembicki &lt;paweldembicki@gmail.com&gt;
-Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
----
- drivers/net/usb/qmi_wwan.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/net/usb/qmi_wwan.c
-+++ b/drivers/net/usb/qmi_wwan.c
-@@ -889,6 +889,7 @@ static const struct usb_device_id produc
- 	{QMI_FIXED_INTF(0x19d2, 0x2002, 4)},	/* ZTE (Vodafone) K3765-Z */
- 	{QMI_FIXED_INTF(0x2001, 0x7e19, 4)},	/* D-Link DWM-221 B1 */
- 	{QMI_FIXED_INTF(0x2001, 0x7e35, 4)},	/* D-Link DWM-222 */
-+	{QMI_FIXED_INTF(0x2020, 0x2033, 4)},	/* BroadMobi BM806U */
- 	{QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)},    /* Sierra Wireless MC7700 */
- 	{QMI_FIXED_INTF(0x114f, 0x68a2, 8)},    /* Sierra Wireless MC7750 */
- 	{QMI_FIXED_INTF(0x1199, 0x68a2, 8)},	/* Sierra Wireless MC7710 in QMI mode */
diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch
index 08d730ac31..0bf9339d11 100644
--- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
+@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
  	mutex_init(&amp;po-&gt;pg_vec_lock);
  	po-&gt;rollover = NULL;
  	po-&gt;prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  
  	if (sock-&gt;type == SOCK_PACKET)
  		po-&gt;prot_hook.func = packet_rcv_spkt;
-@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
  		po-&gt;xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
+@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po-&gt;has_vnet_hdr;
  		break;
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 b922be6f3d..99d1fb2e53 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
@@ -413,7 +413,7 @@ Signed-off-by: Steven Barth &lt;cyrus@openwrt.org&gt;
  }
  
  static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
-@@ -2041,6 +2252,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2045,6 +2256,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 &lt;cyrus@openwrt.org&gt;
  	return
  		/* IFLA_IPTUN_LINK */
  		nla_total_size(4) +
-@@ -2068,6 +2285,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2072,6 +2289,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 &lt;cyrus@openwrt.org&gt;
  		0;
  }
  
-@@ -2075,6 +2310,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2079,6 +2314,9 @@ static int ip6_tnl_fill_info(struct sk_b
  {
  	struct ip6_tnl *tunnel = netdev_priv(dev);
  	struct __ip6_tnl_parm *parm = &amp;tunnel-&gt;parms;
@@ -461,7 +461,7 @@ Signed-off-by: Steven Barth &lt;cyrus@openwrt.org&gt;
  
  	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm-&gt;link) ||
  	    nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &amp;parm-&gt;laddr) ||
-@@ -2083,9 +2321,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2087,9 +2325,27 @@ static int ip6_tnl_fill_info(struct sk_b
  	    nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm-&gt;encap_limit) ||
  	    nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm-&gt;flowinfo) ||
  	    nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm-&gt;flags) ||
@@ -490,7 +490,7 @@ Signed-off-by: Steven Barth &lt;cyrus@openwrt.org&gt;
  	if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel-&gt;encap.type) ||
  	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel-&gt;encap.sport) ||
  	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel-&gt;encap.dport) ||
-@@ -2123,6 +2379,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2127,6 +2383,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/734-net-phy-at803x-allow-to-configure-via-pdata.patch b/target/linux/generic/pending-4.9/734-net-phy-at803x-allow-to-configure-via-pdata.patch
index 69b21be951..8bd9ce3bf7 100644
--- a/target/linux/generic/pending-4.9/734-net-phy-at803x-allow-to-configure-via-pdata.patch
+++ b/target/linux/generic/pending-4.9/734-net-phy-at803x-allow-to-configure-via-pdata.patch
@@ -40,7 +40,7 @@ Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
  #define AT803X_DEBUG_ADDR			0x1D
  #define AT803X_DEBUG_DATA			0x1E
  
-@@ -72,6 +79,7 @@ MODULE_LICENSE(&quot;GPL&quot;);
+@@ -71,6 +78,7 @@ MODULE_LICENSE(&quot;GPL&quot;);
  struct at803x_priv {
  	bool phy_reset:1;
  	struct gpio_desc *gpiod_reset;
@@ -48,7 +48,7 @@ Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
  };
  
  struct at803x_context {
-@@ -276,8 +284,16 @@ does_not_require_reset_workaround:
+@@ -274,8 +282,16 @@ does_not_require_reset_workaround:
  	return 0;
  }
  
@@ -65,7 +65,7 @@ Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
  	int ret;
  
  	ret = genphy_config_init(phydev);
-@@ -298,6 +314,26 @@ static int at803x_config_init(struct phy
+@@ -296,6 +312,26 @@ static int at803x_config_init(struct phy
  			return ret;
  	}
  
@@ -92,7 +92,7 @@ Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
  	return 0;
  }
  
-@@ -335,6 +371,8 @@ static int at803x_config_intr(struct phy
+@@ -333,6 +369,8 @@ static int at803x_config_intr(struct phy
  static void at803x_link_change_notify(struct phy_device *phydev)
  {
  	struct at803x_priv *priv = phydev-&gt;priv;
@@ -100,8 +100,8 @@ Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
 +	pdata = dev_get_platdata(&amp;phydev-&gt;mdio.dev);
  
  	/*
- 	 * Conduct a hardware reset for AT8030/2 every time a link loss is
-@@ -363,6 +401,24 @@ static void at803x_link_change_notify(st
+ 	 * Conduct a hardware reset for AT8030 every time a link loss is
+@@ -361,6 +399,24 @@ static void at803x_link_change_notify(st
  	} else {
  		priv-&gt;phy_reset = false;
  	}
diff --git a/target/linux/generic/pending-4.9/735-net-phy-at803x-fix-at8033-sgmii-mode.patch b/target/linux/generic/pending-4.9/735-net-phy-at803x-fix-at8033-sgmii-mode.patch
index 485567cd76..1f689850bd 100644
--- a/target/linux/generic/pending-4.9/735-net-phy-at803x-fix-at8033-sgmii-mode.patch
+++ b/target/linux/generic/pending-4.9/735-net-phy-at803x-fix-at8033-sgmii-mode.patch
@@ -24,7 +24,7 @@ Signed-off-by: Roman Yeryomin &lt;roman@advem.lv&gt;
  #define AT803X_MODE_CFG_MASK			0x0F
  #define AT803X_MODE_CFG_SGMII			0x01
  
-@@ -295,6 +299,27 @@ static int at803x_config_init(struct phy
+@@ -293,6 +297,27 @@ static int at803x_config_init(struct phy
  {
  	struct at803x_platform_data *pdata;
  	int ret;
diff --git a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
index 913957370b..78255a9550 100644
--- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
  /**
   *	ata_build_rw_tf - Build ATA taskfile for given read/write request
   *	@tf: Target ATA taskfile
-@@ -4988,6 +5001,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -4994,6 +5007,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  		if (tag &lt; 0)
  			return NULL;
  	}
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
  
  	qc = __ata_qc_from_tag(ap, tag);
  	qc-&gt;tag = tag;
-@@ -5889,6 +5905,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5895,6 +5911,9 @@ struct ata_port *ata_port_alloc(struct a
  	ap-&gt;stats.unhandled_irq = 1;
  	ap-&gt;stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
  	ata_sff_port_init(ap);
  
  	return ap;
-@@ -5910,6 +5929,12 @@ static void ata_host_release(struct devi
+@@ -5916,6 +5935,12 @@ static void ata_host_release(struct devi
  
  		kfree(ap-&gt;pmp_link);
  		kfree(ap-&gt;slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
  		kfree(ap);
  		host-&gt;ports[i] = NULL;
  	}
-@@ -6356,7 +6381,23 @@ int ata_host_register(struct ata_host *h
+@@ -6362,7 +6387,23 @@ int ata_host_register(struct ata_host *h
  		host-&gt;ports[i]-&gt;print_id = atomic_inc_return(&amp;ata_print_id);
  		host-&gt;ports[i]-&gt;local_port_no = i + 1;
  	}
diff --git a/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch
index 6cb745ee33..b317070e52 100644
--- a/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch
+++ b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch
@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
  {
 --- a/lib/Kconfig.debug
 +++ b/lib/Kconfig.debug
-@@ -396,6 +396,11 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE
+@@ -410,6 +410,11 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE
  	  This may be set to 1 or 0 to enable or disable them all, or
  	  to a bitmask as described in Documentation/sysrq.txt.
  
diff --git a/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch b/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch
index dd431a294e..40e830dbcb 100644
--- a/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch
+++ b/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch
@@ -105,7 +105,7 @@
  	case UPIO_AU:
  		p-&gt;serial_out(p, offset, value);
  		p-&gt;serial_in(p, UART_LCR);	/* safe, no side-effects */
-@@ -2759,6 +2779,7 @@ static int serial8250_request_std_resour
+@@ -2760,6 +2780,7 @@ static int serial8250_request_std_resour
  	case UPIO_MEM32BE:
  	case UPIO_MEM16:
  	case UPIO_MEM:
@@ -113,7 +113,7 @@
  		if (!port-&gt;mapbase)
  			break;
  
-@@ -2797,6 +2818,7 @@ static void serial8250_release_std_resou
+@@ -2798,6 +2819,7 @@ static void serial8250_release_std_resou
  	case UPIO_MEM32BE:
  	case UPIO_MEM16:
  	case UPIO_MEM:
diff --git a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch
index 026fce7dc9..dd71b826fd 100644
--- a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch
@@ -411,7 +411,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  #endif /* __SOC_BUS_H */
 --- a/include/uapi/linux/if_ether.h
 +++ b/include/uapi/linux/if_ether.h
-@@ -35,6 +35,7 @@
+@@ -36,6 +36,7 @@
  #define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
  #define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */
  #define ETH_FCS_LEN	4		/* Octets in the FCS		 */
diff --git a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch
index 3d7febcebb..37eb5410d2 100644
--- a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch
@@ -2060,7 +2060,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	}
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -4654,3 +4654,11 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IN
+@@ -4659,3 +4659,11 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2031, quirk_no_aersid);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2032, quirk_no_aersid);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2033, quirk_no_aersid);
diff --git a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch
index 976f801cdf..f6d515ada0 100644
--- a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch
+++ b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch
@@ -8267,7 +8267,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	.msi_prepare = its_fsl_mc_msi_prepare,
  };
  
-@@ -95,8 +95,8 @@ int __init its_fsl_mc_msi_init(void)
+@@ -97,8 +97,8 @@ int __init its_fsl_mc_msi_init(void)
  			continue;
  		}
  
diff --git a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch
index bbf60211f7..b9faa504b6 100644
--- a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch
@@ -995,7 +995,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  };
  
  struct dmar_atsr_unit {
-@@ -4252,27 +4253,40 @@ static inline void init_iommu_pm_ops(voi
+@@ -4251,27 +4252,40 @@ static inline void init_iommu_pm_ops(voi
  int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
  {
  	struct acpi_dmar_reserved_memory *rmrr;
@@ -1041,7 +1041,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  }
  
  static struct dmar_atsr_unit *dmar_find_atsr(struct acpi_dmar_atsr *atsr)
-@@ -4486,6 +4500,7 @@ static void intel_iommu_free_dmars(void)
+@@ -4485,6 +4499,7 @@ static void intel_iommu_free_dmars(void)
  	list_for_each_entry_safe(rmrru, rmrr_n, &amp;dmar_rmrr_units, list) {
  		list_del(&amp;rmrru-&gt;list);
  		dmar_free_dev_scope(&amp;rmrru-&gt;devices, &amp;rmrru-&gt;devices_cnt);
@@ -1049,7 +1049,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  		kfree(rmrru);
  	}
  
-@@ -5221,6 +5236,45 @@ static void intel_iommu_remove_device(st
+@@ -5220,6 +5235,45 @@ static void intel_iommu_remove_device(st
  	iommu_device_unlink(iommu-&gt;iommu_dev, dev);
  }
  
@@ -1095,7 +1095,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  #ifdef CONFIG_INTEL_IOMMU_SVM
  #define MAX_NR_PASID_BITS (20)
  static inline unsigned long intel_iommu_get_pts(struct intel_iommu *iommu)
-@@ -5351,19 +5405,21 @@ struct intel_iommu *intel_svm_device_to_
+@@ -5350,19 +5404,21 @@ struct intel_iommu *intel_svm_device_to_
  #endif /* CONFIG_INTEL_IOMMU_SVM */
  
  static const struct iommu_ops intel_iommu_ops = {
diff --git a/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch b/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch
index f7119e494c..dd28ef6c04 100644
--- a/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch
@@ -117,12 +117,16 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  }
  
  /*
-@@ -1899,9 +1922,13 @@ static int lpuart_probe(struct platform_
+@@ -1899,13 +1922,13 @@ static int lpuart_probe(struct platform_
  
  	ret = of_alias_get_id(np, &quot;serial&quot;);
  	if (ret &lt; 0) {
 -		dev_err(&amp;pdev-&gt;dev, &quot;failed to get alias id, errno %d\n&quot;, ret);
 -		return ret;
+-	}
+-	if (ret &gt;= ARRAY_SIZE(lpuart_ports)) {
+-		dev_err(&amp;pdev-&gt;dev, &quot;serial%d out of range\n&quot;, ret);
+-		return -EINVAL;
 +		ret = find_first_zero_bit(linemap, UART_NR);
 +		if (ret &gt;= UART_NR) {
 +			dev_err(&amp;pdev-&gt;dev, &quot;port line is full, add device failed\n&quot;);
@@ -133,7 +137,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	sport-&gt;port.line = ret;
  	sport-&gt;lpuart32 = of_device_is_compatible(np, &quot;fsl,ls1021a-lpuart&quot;);
  
-@@ -1983,6 +2010,7 @@ static int lpuart_remove(struct platform
+@@ -1987,6 +2010,7 @@ static int lpuart_remove(struct platform
  	struct lpuart_port *sport = platform_get_drvdata(pdev);
  
  	uart_remove_one_port(&amp;lpuart_reg, &amp;sport-&gt;port);
@@ -141,7 +145,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  
  	clk_disable_unprepare(sport-&gt;clk);
  
-@@ -2067,12 +2095,10 @@ static int lpuart_resume(struct device *
+@@ -2071,12 +2095,10 @@ static int lpuart_resume(struct device *
  
  	if (sport-&gt;lpuart_dma_rx_use) {
  		if (sport-&gt;port.irq_wake) {
diff --git a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
index f8917291ee..3ec91b4982 100644
--- a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
@@ -206,7 +206,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  		if (IS_ENABLED(CONFIG_USB_DWC3_HOST))
  			mode = USB_DR_MODE_HOST;
  		else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET))
-@@ -213,8 +232,9 @@ static void dwc3_frame_length_adjustment
+@@ -227,8 +246,9 @@ static void dwc3_frame_length_adjustment
  
  	reg = dwc3_readl(dwc-&gt;regs, DWC3_GFLADJ);
  	dft = reg &amp; DWC3_GFLADJ_30MHZ_MASK;
@@ -218,7 +218,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  		reg &amp;= ~DWC3_GFLADJ_30MHZ_MASK;
  		reg |= DWC3_GFLADJ_30MHZ_SDBND_SEL | dwc-&gt;fladj;
  		dwc3_writel(dwc-&gt;regs, DWC3_GFLADJ, reg);
-@@ -585,6 +605,99 @@ static int dwc3_phy_setup(struct dwc3 *d
+@@ -599,6 +619,99 @@ static int dwc3_phy_setup(struct dwc3 *d
  	return 0;
  }
  
@@ -318,7 +318,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  static void dwc3_core_exit(struct dwc3 *dwc)
  {
  	dwc3_event_buffers_cleanup(dwc);
-@@ -727,6 +840,8 @@ static int dwc3_core_init(struct dwc3 *d
+@@ -741,6 +854,8 @@ static int dwc3_core_init(struct dwc3 *d
  	if (ret)
  		goto err1;
  
@@ -327,7 +327,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	/* Adjust Frame Length */
  	dwc3_frame_length_adjustment(dwc);
  
-@@ -925,11 +1040,117 @@ static void dwc3_core_exit_mode(struct d
+@@ -939,11 +1054,117 @@ static void dwc3_core_exit_mode(struct d
  	}
  }
  
@@ -445,7 +445,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	struct resource		*res;
  	struct dwc3		*dwc;
  	u8			lpm_nyet_threshold;
-@@ -961,6 +1182,11 @@ static int dwc3_probe(struct platform_de
+@@ -975,6 +1196,11 @@ static int dwc3_probe(struct platform_de
  	dwc-&gt;xhci_resources[0].flags = res-&gt;flags;
  	dwc-&gt;xhci_resources[0].name = res-&gt;name;
  
@@ -457,7 +457,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	res-&gt;start += DWC3_GLOBALS_REGS_START;
  
  	/*
-@@ -1003,6 +1229,12 @@ static int dwc3_probe(struct platform_de
+@@ -1017,6 +1243,12 @@ static int dwc3_probe(struct platform_de
  	dwc-&gt;usb3_lpm_capable = device_property_read_bool(dev,
  				&quot;snps,usb3_lpm_capable&quot;);
  
@@ -470,7 +470,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	dwc-&gt;disable_scramble_quirk = device_property_read_bool(dev,
  				&quot;snps,disable_scramble_quirk&quot;);
  	dwc-&gt;u2exit_lfps_quirk = device_property_read_bool(dev,
-@@ -1047,6 +1279,8 @@ static int dwc3_probe(struct platform_de
+@@ -1061,6 +1293,8 @@ static int dwc3_probe(struct platform_de
  	dwc-&gt;hird_threshold = hird_threshold
  		| (dwc-&gt;is_utmi_l1_suspend &lt;&lt; 4);
  
@@ -479,7 +479,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	platform_set_drvdata(pdev, dwc);
  	dwc3_cache_hwparams(dwc);
  
-@@ -1070,6 +1304,11 @@ static int dwc3_probe(struct platform_de
+@@ -1084,6 +1318,11 @@ static int dwc3_probe(struct platform_de
  	if (ret &lt; 0)
  		goto err1;
  
@@ -542,7 +542,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  #define DWC3_GCTL_PRTCAP(n)	(((n) &amp; (3 &lt;&lt; 12)) &gt;&gt; 12)
  #define DWC3_GCTL_PRTCAPDIR(n)	((n) &lt;&lt; 12)
  #define DWC3_GCTL_PRTCAP_HOST	1
-@@ -292,6 +318,10 @@
+@@ -294,6 +320,10 @@
  /* Global Frame Length Adjustment Register */
  #define DWC3_GFLADJ_30MHZ_SDBND_SEL		(1 &lt;&lt; 7)
  #define DWC3_GFLADJ_30MHZ_MASK			0x3f
@@ -553,7 +553,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  
  /* Global User Control Register 2 */
  #define DWC3_GUCTL2_RST_ACTBITLATER		(1 &lt;&lt; 14)
-@@ -756,6 +786,7 @@ struct dwc3_scratchpad_array {
+@@ -758,6 +788,7 @@ struct dwc3_scratchpad_array {
   * @regs: base address for our registers
   * @regs_size: address space size
   * @fladj: frame length adjustment
@@ -561,7 +561,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
   * @irq_gadget: peripheral controller's IRQ number
   * @nr_scratch: number of scratch buffers
   * @u1u2: only used on revisions &lt;1.83a for workaround
-@@ -832,6 +863,7 @@ struct dwc3_scratchpad_array {
+@@ -834,6 +865,7 @@ struct dwc3_scratchpad_array {
   * 	1	- -3.5dB de-emphasis
   * 	2	- No de-emphasis
   * 	3	- Reserved
@@ -569,7 +569,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
   */
  struct dwc3 {
  	struct usb_ctrlrequest	*ctrl_req;
-@@ -850,6 +882,7 @@ struct dwc3 {
+@@ -852,6 +884,7 @@ struct dwc3 {
  	spinlock_t		lock;
  
  	struct device		*dev;
@@ -577,7 +577,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  
  	struct platform_device	*xhci;
  	struct resource		xhci_resources[DWC3_XHCI_RESOURCES_NUM];
-@@ -875,6 +908,12 @@ struct dwc3 {
+@@ -877,6 +910,12 @@ struct dwc3 {
  	enum usb_phy_interface	hsphy_mode;
  
  	u32			fladj;
@@ -590,7 +590,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	u32			irq_gadget;
  	u32			nr_scratch;
  	u32			u1u2;
-@@ -951,9 +990,12 @@ struct dwc3 {
+@@ -953,9 +992,12 @@ struct dwc3 {
  	unsigned		ep0_bounced:1;
  	unsigned		ep0_expect_in:1;
  	unsigned		has_hibernation:1;
@@ -603,7 +603,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  	unsigned		pending_events:1;
  	unsigned		pullups_connected:1;
  	unsigned		setup_packet_pending:1;
-@@ -974,9 +1016,16 @@ struct dwc3 {
+@@ -976,9 +1018,16 @@ struct dwc3 {
  	unsigned		dis_rxdet_inp3_quirk:1;
  	unsigned		dis_u2_freeclk_exists_quirk:1;
  	unsigned		dis_del_phy_power_chg_quirk:1;
@@ -822,7 +822,7 @@ Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
  		curr_ep = get_ep_by_pipe(udc, i);
  
  		/* If the ep is configured */
--		if (curr_ep-&gt;name == NULL) {
+-		if (!curr_ep-&gt;ep.name) {
 +		if (strncmp(curr_ep-&gt;name, &quot;ep&quot;, 2)) {
  			WARNING(&quot;Invalid EP?&quot;);
  			continue;
diff --git a/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch b/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch
index bfe8100a2f..3797ae258e 100644
--- a/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch
+++ b/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch
@@ -17,7 +17,7 @@ Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
 
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -137,6 +137,7 @@ src-plat-$(CONFIG_PPC_PSERIES) += pserie
+@@ -138,6 +138,7 @@ src-plat-$(CONFIG_PPC_PSERIES) += pserie
  src-plat-$(CONFIG_PPC_POWERNV) += pseries-head.S
  src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S
  src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
@@ -25,7 +25,7 @@ Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
  
  src-wlib := $(sort $(src-wlib-y))
  src-plat := $(sort $(src-plat-y))
-@@ -320,6 +321,7 @@ image-$(CONFIG_TQM8555)			+= cuImage.tqm
+@@ -321,6 +322,7 @@ image-$(CONFIG_TQM8555)			+= cuImage.tqm
  image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
  image-$(CONFIG_SBC8548)			+= cuImage.sbc8548
  image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
diff --git a/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch b/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch
index e6ca1447ff..7549d4995a 100644
--- a/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch
+++ b/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch
@@ -2317,7 +2317,7 @@
  
  	priv-&gt;xstats.tx_clean++;
  
-@@ -1393,22 +1394,17 @@ static void stmmac_tx_clean(struct stmma
+@@ -1398,22 +1399,17 @@ static void stmmac_tx_clean(struct stmma
  	netdev_completed_queue(priv-&gt;dev, pkts_compl, bytes_compl);
  
  	if (unlikely(netif_queue_stopped(priv-&gt;dev) &amp;&amp;
@@ -2345,7 +2345,7 @@
  }
  
  static inline void stmmac_enable_dma_irq(struct stmmac_priv *priv)
-@@ -1512,7 +1508,7 @@ static void stmmac_mmc_setup(struct stmm
+@@ -1517,7 +1513,7 @@ static void stmmac_mmc_setup(struct stmm
  		dwmac_mmc_ctrl(priv-&gt;mmcaddr, mode);
  		memset(&amp;priv-&gt;mmc, 0, sizeof(struct stmmac_counters));
  	} else
@@ -2354,7 +2354,7 @@
  }
  
  /**
-@@ -1525,18 +1521,18 @@ static void stmmac_mmc_setup(struct stmm
+@@ -1530,18 +1526,18 @@ static void stmmac_mmc_setup(struct stmm
  static void stmmac_selec_desc_mode(struct stmmac_priv *priv)
  {
  	if (priv-&gt;plat-&gt;enh_desc) {
@@ -2377,7 +2377,7 @@
  		priv-&gt;hw-&gt;desc = &amp;ndesc_ops;
  	}
  }
-@@ -1577,8 +1573,8 @@ static void stmmac_check_ether_addr(stru
+@@ -1582,8 +1578,8 @@ static void stmmac_check_ether_addr(stru
  					     priv-&gt;dev-&gt;dev_addr, 0);
  		if (!is_valid_ether_addr(priv-&gt;dev-&gt;dev_addr))
  			eth_hw_addr_random(priv-&gt;dev);
@@ -2388,7 +2388,7 @@
  	}
  }
  
-@@ -1592,16 +1588,12 @@ static void stmmac_check_ether_addr(stru
+@@ -1597,16 +1593,12 @@ static void stmmac_check_ether_addr(stru
   */
  static int stmmac_init_dma_engine(struct stmmac_priv *priv)
  {
@@ -2408,7 +2408,7 @@
  	}
  
  	if (priv-&gt;extend_desc &amp;&amp; (priv-&gt;mode == STMMAC_RING_MODE))
-@@ -1613,8 +1605,8 @@ static int stmmac_init_dma_engine(struct
+@@ -1618,8 +1610,8 @@ static int stmmac_init_dma_engine(struct
  		return ret;
  	}
  
@@ -2419,7 +2419,7 @@
  
  	if (priv-&gt;synopsys_id &gt;= DWMAC_CORE_4_00) {
  		priv-&gt;rx_tail_addr = priv-&gt;dma_rx_phy +
-@@ -1686,7 +1678,8 @@ static int stmmac_hw_setup(struct net_de
+@@ -1691,7 +1683,8 @@ static int stmmac_hw_setup(struct net_de
  	/* DMA initialization and SW reset */
  	ret = stmmac_init_dma_engine(priv);
  	if (ret &lt; 0) {
@@ -2429,7 +2429,7 @@
  		return ret;
  	}
  
-@@ -1715,7 +1708,7 @@ static int stmmac_hw_setup(struct net_de
+@@ -1720,7 +1713,7 @@ static int stmmac_hw_setup(struct net_de
  
  	ret = priv-&gt;hw-&gt;mac-&gt;rx_ipc(priv-&gt;hw);
  	if (!ret) {
@@ -2438,7 +2438,7 @@
  		priv-&gt;plat-&gt;rx_coe = STMMAC_RX_COE_NONE;
  		priv-&gt;hw-&gt;rx_csum = 0;
  	}
-@@ -1740,10 +1733,11 @@ static int stmmac_hw_setup(struct net_de
+@@ -1745,10 +1738,11 @@ static int stmmac_hw_setup(struct net_de
  #ifdef CONFIG_DEBUG_FS
  	ret = stmmac_init_fs(dev);
  	if (ret &lt; 0)
@@ -2452,7 +2452,7 @@
  	priv-&gt;hw-&gt;dma-&gt;start_tx(priv-&gt;ioaddr);
  	priv-&gt;hw-&gt;dma-&gt;start_rx(priv-&gt;ioaddr);
  
-@@ -1798,8 +1792,9 @@ static int stmmac_open(struct net_device
+@@ -1803,8 +1797,9 @@ static int stmmac_open(struct net_device
  	    priv-&gt;hw-&gt;pcs != STMMAC_PCS_RTBI) {
  		ret = stmmac_init_phy(dev);
  		if (ret) {
@@ -2464,7 +2464,7 @@
  			return ret;
  		}
  	}
-@@ -1814,33 +1809,36 @@ static int stmmac_open(struct net_device
+@@ -1819,33 +1814,36 @@ static int stmmac_open(struct net_device
  
  	ret = alloc_dma_desc_resources(priv);
  	if (ret &lt; 0) {
@@ -2508,7 +2508,7 @@
  		goto init_error;
  	}
  
-@@ -1849,8 +1847,9 @@ static int stmmac_open(struct net_device
+@@ -1854,8 +1852,9 @@ static int stmmac_open(struct net_device
  		ret = request_irq(priv-&gt;wol_irq, stmmac_interrupt,
  				  IRQF_SHARED, dev-&gt;name, dev);
  		if (unlikely(ret &lt; 0)) {
@@ -2520,7 +2520,7 @@
  			goto wolirq_error;
  		}
  	}
-@@ -1860,8 +1859,9 @@ static int stmmac_open(struct net_device
+@@ -1865,8 +1864,9 @@ static int stmmac_open(struct net_device
  		ret = request_irq(priv-&gt;lpi_irq, stmmac_interrupt, IRQF_SHARED,
  				  dev-&gt;name, dev);
  		if (unlikely(ret &lt; 0)) {
@@ -2532,7 +2532,7 @@
  			goto lpiirq_error;
  		}
  	}
-@@ -1880,8 +1880,8 @@ wolirq_error:
+@@ -1885,8 +1885,8 @@ wolirq_error:
  init_error:
  	free_dma_desc_resources(priv);
  dma_desc_error:
@@ -2543,7 +2543,7 @@
  
  	return ret;
  }
-@@ -1900,10 +1900,9 @@ static int stmmac_release(struct net_dev
+@@ -1905,10 +1905,9 @@ static int stmmac_release(struct net_dev
  		del_timer_sync(&amp;priv-&gt;eee_ctrl_timer);
  
  	/* Stop and disconnect the PHY */
@@ -2557,7 +2557,7 @@
  	}
  
  	netif_stop_queue(dev);
-@@ -1963,13 +1962,13 @@ static void stmmac_tso_allocator(struct
+@@ -1968,13 +1967,13 @@ static void stmmac_tso_allocator(struct
  		priv-&gt;cur_tx = STMMAC_GET_ENTRY(priv-&gt;cur_tx, DMA_TX_SIZE);
  		desc = priv-&gt;dma_tx + priv-&gt;cur_tx;
  
@@ -2573,7 +2573,7 @@
  			0, 0);
  
  		tmp_len -= TSO_MAX_BUFF_SIZE;
-@@ -2014,8 +2013,6 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2019,8 +2018,6 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	u8 proto_hdr_len;
  	int i;
  
@@ -2582,7 +2582,7 @@
  	/* Compute header lengths */
  	proto_hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
  
-@@ -2025,9 +2022,10 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2030,9 +2027,10 @@ static netdev_tx_t stmmac_tso_xmit(struc
  		if (!netif_queue_stopped(dev)) {
  			netif_stop_queue(dev);
  			/* This is a hard error, log it. */
@@ -2595,7 +2595,7 @@
  		return NETDEV_TX_BUSY;
  	}
  
-@@ -2065,11 +2063,11 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2070,11 +2068,11 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	priv-&gt;tx_skbuff_dma[first_entry].len = skb_headlen(skb);
  	priv-&gt;tx_skbuff[first_entry] = skb;
  
@@ -2609,7 +2609,7 @@
  
  	/* If needed take extra descriptors to fill the remaining payload */
  	tmp_pay_len = pay_len - TSO_MAX_BUFF_SIZE;
-@@ -2098,8 +2096,8 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2103,8 +2101,8 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	priv-&gt;cur_tx = STMMAC_GET_ENTRY(priv-&gt;cur_tx, DMA_TX_SIZE);
  
  	if (unlikely(stmmac_tx_avail(priv) &lt;= (MAX_SKB_FRAGS + 1))) {
@@ -2620,7 +2620,7 @@
  		netif_stop_queue(dev);
  	}
  
-@@ -2143,7 +2141,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2155,7 +2153,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	 * descriptor and then barrier is needed to make sure that
  	 * all is coherent before granting the DMA engine.
  	 */
@@ -2629,7 +2629,7 @@
  
  	if (netif_msg_pktdata(priv)) {
  		pr_info(&quot;%s: curr=%d dirty=%d f=%d, e=%d, f_p=%p, nfrags %d\n&quot;,
-@@ -2162,11 +2160,9 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2174,11 +2172,9 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	priv-&gt;hw-&gt;dma-&gt;set_tx_tail_ptr(priv-&gt;ioaddr, priv-&gt;tx_tail_addr,
  				       STMMAC_CHAN0);
  
@@ -2641,7 +2641,7 @@
  	dev_err(priv-&gt;device, &quot;Tx dma map failed\n&quot;);
  	dev_kfree_skb(skb);
  	priv-&gt;dev-&gt;stats.tx_dropped++;
-@@ -2198,14 +2194,13 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2210,14 +2206,13 @@ static netdev_tx_t stmmac_xmit(struct sk
  			return stmmac_tso_xmit(skb, dev);
  	}
  
@@ -2659,7 +2659,7 @@
  		}
  		return NETDEV_TX_BUSY;
  	}
-@@ -2258,13 +2253,11 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2270,13 +2265,11 @@ static netdev_tx_t stmmac_xmit(struct sk
  
  		priv-&gt;tx_skbuff[entry] = NULL;
  
@@ -2678,7 +2678,7 @@
  
  		priv-&gt;tx_skbuff_dma[entry].map_as_page = true;
  		priv-&gt;tx_skbuff_dma[entry].len = len;
-@@ -2282,9 +2275,10 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2294,9 +2287,10 @@ static netdev_tx_t stmmac_xmit(struct sk
  	if (netif_msg_pktdata(priv)) {
  		void *tx_head;
  
@@ -2692,7 +2692,7 @@
  
  		if (priv-&gt;extend_desc)
  			tx_head = (void *)priv-&gt;dma_etx;
-@@ -2293,13 +2287,13 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2305,13 +2299,13 @@ static netdev_tx_t stmmac_xmit(struct sk
  
  		priv-&gt;hw-&gt;desc-&gt;display_ring(tx_head, DMA_TX_SIZE, false);
  
@@ -2709,7 +2709,7 @@
  		netif_stop_queue(dev);
  	}
  
-@@ -2335,13 +2329,11 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2347,13 +2341,11 @@ static netdev_tx_t stmmac_xmit(struct sk
  		if (dma_mapping_error(priv-&gt;device, des))
  			goto dma_map_err;
  
@@ -2728,7 +2728,7 @@
  
  		priv-&gt;tx_skbuff_dma[first_entry].len = nopaged_len;
  		priv-&gt;tx_skbuff_dma[first_entry].last_segment = last_segment;
-@@ -2362,7 +2354,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2374,7 +2366,7 @@ static netdev_tx_t stmmac_xmit(struct sk
  		 * descriptor and then barrier is needed to make sure that
  		 * all is coherent before granting the DMA engine.
  		 */
@@ -2737,7 +2737,7 @@
  	}
  
  	netdev_sent_queue(dev, skb-&gt;len);
-@@ -2373,12 +2365,10 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2385,12 +2377,10 @@ static netdev_tx_t stmmac_xmit(struct sk
  		priv-&gt;hw-&gt;dma-&gt;set_tx_tail_ptr(priv-&gt;ioaddr, priv-&gt;tx_tail_addr,
  					       STMMAC_CHAN0);
  
@@ -2751,7 +2751,7 @@
  	dev_kfree_skb(skb);
  	priv-&gt;dev-&gt;stats.tx_dropped++;
  	return NETDEV_TX_OK;
-@@ -2449,16 +2439,16 @@ static inline void stmmac_rx_refill(stru
+@@ -2461,16 +2451,16 @@ static inline void stmmac_rx_refill(stru
  					   DMA_FROM_DEVICE);
  			if (dma_mapping_error(priv-&gt;device,
  					      priv-&gt;rx_skbuff_dma[entry])) {
@@ -2771,7 +2771,7 @@
  			}
  			if (priv-&gt;hw-&gt;mode-&gt;refill_desc3)
  				priv-&gt;hw-&gt;mode-&gt;refill_desc3(priv, p);
-@@ -2466,17 +2456,17 @@ static inline void stmmac_rx_refill(stru
+@@ -2478,17 +2468,17 @@ static inline void stmmac_rx_refill(stru
  			if (priv-&gt;rx_zeroc_thresh &gt; 0)
  				priv-&gt;rx_zeroc_thresh--;
  
@@ -2793,7 +2793,7 @@
  
  		entry = STMMAC_GET_ENTRY(entry, DMA_RX_SIZE);
  	}
-@@ -2500,7 +2490,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2512,7 +2502,7 @@ static int stmmac_rx(struct stmmac_priv
  	if (netif_msg_rx_status(priv)) {
  		void *rx_head;
  
@@ -2802,7 +2802,7 @@
  		if (priv-&gt;extend_desc)
  			rx_head = (void *)priv-&gt;dma_erx;
  		else
-@@ -2562,9 +2552,9 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2574,9 +2564,9 @@ static int stmmac_rx(struct stmmac_priv
  			unsigned int des;
  
  			if (unlikely(priv-&gt;synopsys_id &gt;= DWMAC_CORE_4_00))
@@ -2814,7 +2814,7 @@
  
  			frame_len = priv-&gt;hw-&gt;desc-&gt;get_rx_frame_len(p, coe);
  
-@@ -2573,9 +2563,9 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2585,9 +2575,9 @@ static int stmmac_rx(struct stmmac_priv
  			 *  ignored
  			 */
  			if (frame_len &gt; priv-&gt;dma_buf_sz) {
@@ -2827,7 +2827,7 @@
  				priv-&gt;dev-&gt;stats.rx_length_errors++;
  				break;
  			}
-@@ -2587,11 +2577,11 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2599,11 +2589,11 @@ static int stmmac_rx(struct stmmac_priv
  				frame_len -= ETH_FCS_LEN;
  
  			if (netif_msg_rx_status(priv)) {
@@ -2843,7 +2843,7 @@
  			}
  
  			/* The zero-copy is always used for all the sizes
-@@ -2628,8 +2618,9 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2640,8 +2630,9 @@ static int stmmac_rx(struct stmmac_priv
  			} else {
  				skb = priv-&gt;rx_skbuff[entry];
  				if (unlikely(!skb)) {
@@ -2855,7 +2855,7 @@
  					priv-&gt;dev-&gt;stats.rx_dropped++;
  					break;
  				}
-@@ -2645,7 +2636,8 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2657,7 +2648,8 @@ static int stmmac_rx(struct stmmac_priv
  			}
  
  			if (netif_msg_pktdata(priv)) {
@@ -2865,7 +2865,7 @@
  				print_pkt(skb-&gt;data, frame_len);
  			}
  
-@@ -2748,7 +2740,7 @@ static int stmmac_change_mtu(struct net_
+@@ -2760,7 +2752,7 @@ static int stmmac_change_mtu(struct net_
  	int max_mtu;
  
  	if (netif_running(dev)) {
@@ -2874,7 +2874,7 @@
  		return -EBUSY;
  	}
  
-@@ -2840,7 +2832,7 @@ static irqreturn_t stmmac_interrupt(int
+@@ -2852,7 +2844,7 @@ static irqreturn_t stmmac_interrupt(int
  		pm_wakeup_event(priv-&gt;device, 0);
  
  	if (unlikely(!dev)) {
@@ -2883,7 +2883,7 @@
  		return IRQ_NONE;
  	}
  
-@@ -2898,7 +2890,6 @@ static void stmmac_poll_controller(struc
+@@ -2910,7 +2902,6 @@ static void stmmac_poll_controller(struc
   */
  static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
  {
@@ -2891,7 +2891,7 @@
  	int ret = -EOPNOTSUPP;
  
  	if (!netif_running(dev))
-@@ -2908,9 +2899,9 @@ static int stmmac_ioctl(struct net_devic
+@@ -2920,9 +2911,9 @@ static int stmmac_ioctl(struct net_devic
  	case SIOCGMIIPHY:
  	case SIOCGMIIREG:
  	case SIOCSMIIREG:
@@ -2903,7 +2903,7 @@
  		break;
  	case SIOCSHWTSTAMP:
  		ret = stmmac_hwtstamp_ioctl(dev, rq);
-@@ -2938,14 +2929,17 @@ static void sysfs_display_ring(void *hea
+@@ -2950,14 +2941,17 @@ static void sysfs_display_ring(void *hea
  			x = *(u64 *) ep;
  			seq_printf(seq, &quot;%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n&quot;,
  				   i, (unsigned int)virt_to_phys(ep),
@@ -2924,7 +2924,7 @@
  			p++;
  		}
  		seq_printf(seq, &quot;\n&quot;);
-@@ -2977,6 +2971,8 @@ static int stmmac_sysfs_ring_open(struct
+@@ -2989,6 +2983,8 @@ static int stmmac_sysfs_ring_open(struct
  	return single_open(file, stmmac_sysfs_ring_read, inode-&gt;i_private);
  }
  
@@ -2933,7 +2933,7 @@
  static const struct file_operations stmmac_rings_status_fops = {
  	.owner = THIS_MODULE,
  	.open = stmmac_sysfs_ring_open,
-@@ -2999,11 +2995,11 @@ static int stmmac_sysfs_dma_cap_read(str
+@@ -3011,11 +3007,11 @@ static int stmmac_sysfs_dma_cap_read(str
  	seq_printf(seq, &quot;\tDMA HW features\n&quot;);
  	seq_printf(seq, &quot;==============================\n&quot;);
  
@@ -2948,7 +2948,7 @@
  		   (priv-&gt;dma_cap.half_duplex) ? &quot;Y&quot; : &quot;N&quot;);
  	seq_printf(seq, &quot;\tHash Filter: %s\n&quot;,
  		   (priv-&gt;dma_cap.hash_filter) ? &quot;Y&quot; : &quot;N&quot;);
-@@ -3021,9 +3017,9 @@ static int stmmac_sysfs_dma_cap_read(str
+@@ -3033,9 +3029,9 @@ static int stmmac_sysfs_dma_cap_read(str
  		   (priv-&gt;dma_cap.rmon) ? &quot;Y&quot; : &quot;N&quot;);
  	seq_printf(seq, &quot;\tIEEE 1588-2002 Time Stamp: %s\n&quot;,
  		   (priv-&gt;dma_cap.time_stamp) ? &quot;Y&quot; : &quot;N&quot;);
@@ -2960,7 +2960,7 @@
  		   (priv-&gt;dma_cap.eee) ? &quot;Y&quot; : &quot;N&quot;);
  	seq_printf(seq, &quot;\tAV features: %s\n&quot;, (priv-&gt;dma_cap.av) ? &quot;Y&quot; : &quot;N&quot;);
  	seq_printf(seq, &quot;\tChecksum Offload in TX: %s\n&quot;,
-@@ -3070,8 +3066,7 @@ static int stmmac_init_fs(struct net_dev
+@@ -3082,8 +3078,7 @@ static int stmmac_init_fs(struct net_dev
  	priv-&gt;dbgfs_dir = debugfs_create_dir(dev-&gt;name, stmmac_fs_dir);
  
  	if (!priv-&gt;dbgfs_dir || IS_ERR(priv-&gt;dbgfs_dir)) {
@@ -2970,7 +2970,7 @@
  
  		return -ENOMEM;
  	}
-@@ -3083,7 +3078,7 @@ static int stmmac_init_fs(struct net_dev
+@@ -3095,7 +3090,7 @@ static int stmmac_init_fs(struct net_dev
  				    &amp;stmmac_rings_status_fops);
  
  	if (!priv-&gt;dbgfs_rings_status || IS_ERR(priv-&gt;dbgfs_rings_status)) {
@@ -2979,7 +2979,7 @@
  		debugfs_remove_recursive(priv-&gt;dbgfs_dir);
  
  		return -ENOMEM;
-@@ -3095,7 +3090,7 @@ static int stmmac_init_fs(struct net_dev
+@@ -3107,7 +3102,7 @@ static int stmmac_init_fs(struct net_dev
  					    dev, &amp;stmmac_dma_cap_fops);
  
  	if (!priv-&gt;dbgfs_dma_cap || IS_ERR(priv-&gt;dbgfs_dma_cap)) {
@@ -2988,7 +2988,7 @@
  		debugfs_remove_recursive(priv-&gt;dbgfs_dir);
  
  		return -ENOMEM;
-@@ -3167,11 +3162,11 @@ static int stmmac_hw_init(struct stmmac_
+@@ -3179,11 +3174,11 @@ static int stmmac_hw_init(struct stmmac_
  	} else {
  		if (chain_mode) {
  			priv-&gt;hw-&gt;mode = &amp;chain_mode_ops;
@@ -3002,7 +3002,7 @@
  			priv-&gt;mode = STMMAC_RING_MODE;
  		}
  	}
-@@ -3179,7 +3174,7 @@ static int stmmac_hw_init(struct stmmac_
+@@ -3191,7 +3186,7 @@ static int stmmac_hw_init(struct stmmac_
  	/* Get the HW capability (new GMAC newer than 3.50a) */
  	priv-&gt;hw_cap_support = stmmac_get_hw_features(priv);
  	if (priv-&gt;hw_cap_support) {
@@ -3011,7 +3011,7 @@
  
  		/* We can override some gmac/dma configuration fields: e.g.
  		 * enh_desc, tx_coe (e.g. that are passed through the
-@@ -3204,8 +3199,9 @@ static int stmmac_hw_init(struct stmmac_
+@@ -3216,8 +3211,9 @@ static int stmmac_hw_init(struct stmmac_
  		else if (priv-&gt;dma_cap.rx_coe_type1)
  			priv-&gt;plat-&gt;rx_coe = STMMAC_RX_COE_TYPE1;
  
@@ -3023,7 +3023,7 @@
  
  	/* To use alternate (extended), normal or GMAC4 descriptor structures */
  	if (priv-&gt;synopsys_id &gt;= DWMAC_CORE_4_00)
-@@ -3215,20 +3211,20 @@ static int stmmac_hw_init(struct stmmac_
+@@ -3227,20 +3223,20 @@ static int stmmac_hw_init(struct stmmac_
  
  	if (priv-&gt;plat-&gt;rx_coe) {
  		priv-&gt;hw-&gt;rx_csum = priv-&gt;plat-&gt;rx_coe;
@@ -3049,7 +3049,7 @@
  
  	return 0;
  }
-@@ -3287,8 +3283,8 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3299,8 +3295,8 @@ int stmmac_dvr_probe(struct device *devi
  
  	priv-&gt;stmmac_clk = devm_clk_get(priv-&gt;device, STMMAC_RESOURCE_NAME);
  	if (IS_ERR(priv-&gt;stmmac_clk)) {
@@ -3060,7 +3060,7 @@
  		/* If failed to obtain stmmac_clk and specific clk_csr value
  		 * is NOT passed from the platform, probe fail.
  		 */
-@@ -3337,7 +3333,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3349,7 +3345,7 @@ int stmmac_dvr_probe(struct device *devi
  	if ((priv-&gt;plat-&gt;tso_en) &amp;&amp; (priv-&gt;dma_cap.tsoen)) {
  		ndev-&gt;hw_features |= NETIF_F_TSO;
  		priv-&gt;tso = true;
@@ -3069,7 +3069,7 @@
  	}
  	ndev-&gt;features |= ndev-&gt;hw_features | NETIF_F_HIGHDMA;
  	ndev-&gt;watchdog_timeo = msecs_to_jiffies(watchdog);
-@@ -3357,13 +3353,13 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3369,13 +3365,13 @@ int stmmac_dvr_probe(struct device *devi
  	 */
  	if ((priv-&gt;synopsys_id &gt;= DWMAC_CORE_3_50) &amp;&amp; (!priv-&gt;plat-&gt;riwt_off)) {
  		priv-&gt;use_riwt = 1;
@@ -3085,7 +3085,7 @@
  
  	/* If a specific clk_csr value is passed from the platform
  	 * this means that the CSR Clock Range selection cannot be
-@@ -3384,15 +3380,17 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3396,15 +3392,17 @@ int stmmac_dvr_probe(struct device *devi
  		/* MDIO bus Registration */
  		ret = stmmac_mdio_register(ndev);
  		if (ret &lt; 0) {
@@ -3107,7 +3107,7 @@
  		goto error_netdev_register;
  	}
  
-@@ -3403,7 +3401,7 @@ error_netdev_register:
+@@ -3415,7 +3413,7 @@ error_netdev_register:
  	    priv-&gt;hw-&gt;pcs != STMMAC_PCS_TBI &amp;&amp;
  	    priv-&gt;hw-&gt;pcs != STMMAC_PCS_RTBI)
  		stmmac_mdio_unregister(ndev);
@@ -3116,7 +3116,7 @@
  	netif_napi_del(&amp;priv-&gt;napi);
  error_hw_init:
  	clk_disable_unprepare(priv-&gt;pclk);
-@@ -3427,7 +3425,7 @@ int stmmac_dvr_remove(struct device *dev
+@@ -3439,7 +3437,7 @@ int stmmac_dvr_remove(struct device *dev
  	struct net_device *ndev = dev_get_drvdata(dev);
  	struct stmmac_priv *priv = netdev_priv(ndev);
  
@@ -3125,7 +3125,7 @@
  
  	priv-&gt;hw-&gt;dma-&gt;stop_rx(priv-&gt;ioaddr);
  	priv-&gt;hw-&gt;dma-&gt;stop_tx(priv-&gt;ioaddr);
-@@ -3465,8 +3463,8 @@ int stmmac_suspend(struct device *dev)
+@@ -3477,8 +3475,8 @@ int stmmac_suspend(struct device *dev)
  	if (!ndev || !netif_running(ndev))
  		return 0;
  
@@ -3136,7 +3136,7 @@
  
  	spin_lock_irqsave(&amp;priv-&gt;lock, flags);
  
-@@ -3560,8 +3558,8 @@ int stmmac_resume(struct device *dev)
+@@ -3572,8 +3570,8 @@ int stmmac_resume(struct device *dev)
  
  	spin_unlock_irqrestore(&amp;priv-&gt;lock, flags);
  
diff --git a/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch b/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch
index 95eb3deeb0..cd3e52a212 100644
--- a/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch
+++ b/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch
@@ -418,7 +418,7 @@
  };
  
  static void meson8b_dwmac_mask_bits(struct meson8b_dwmac *dwmac, u32 reg,
-@@ -179,11 +177,19 @@ static int meson8b_init_prg_eth(struct m
+@@ -181,11 +179,19 @@ static int meson8b_init_prg_eth(struct m
  {
  	int ret;
  	unsigned long clk_rate;
@@ -439,7 +439,7 @@
  	case PHY_INTERFACE_MODE_RGMII_TXID:
  		/* Generate a 25MHz clock for the PHY */
  		clk_rate = 25 * 1000 * 1000;
-@@ -196,9 +202,8 @@ static int meson8b_init_prg_eth(struct m
+@@ -198,9 +204,8 @@ static int meson8b_init_prg_eth(struct m
  		meson8b_dwmac_mask_bits(dwmac, PRG_ETH0,
  					PRG_ETH0_INVERTED_RMII_CLK, 0);
  
@@ -450,7 +450,7 @@
  		break;
  
  	case PHY_INTERFACE_MODE_RMII:
-@@ -284,6 +289,11 @@ static int meson8b_dwmac_probe(struct pl
+@@ -286,6 +291,11 @@ static int meson8b_dwmac_probe(struct pl
  		goto err_remove_config_dt;
  	}
  
@@ -1671,7 +1671,7 @@
   *  stmmac_dma_operation_mode - HW DMA operation mode
   *  @priv: driver private structure
   *  Description: it is used for configuring the DMA operation mode register in
-@@ -1686,10 +1687,6 @@ static int stmmac_hw_setup(struct net_de
+@@ -1691,10 +1692,6 @@ static int stmmac_hw_setup(struct net_de
  	/* Copy the MAC addr into the HW  */
  	priv-&gt;hw-&gt;mac-&gt;set_umac_addr(priv-&gt;hw, dev-&gt;dev_addr, 0);
  
@@ -1682,7 +1682,7 @@
  	/* PS and related bits will be programmed according to the speed */
  	if (priv-&gt;hw-&gt;pcs) {
  		int speed = priv-&gt;plat-&gt;mac_port_sel_speed;
-@@ -1706,6 +1703,10 @@ static int stmmac_hw_setup(struct net_de
+@@ -1711,6 +1708,10 @@ static int stmmac_hw_setup(struct net_de
  	/* Initialize the MAC Core */
  	priv-&gt;hw-&gt;mac-&gt;core_init(priv-&gt;hw, dev-&gt;mtu);
  
@@ -1693,7 +1693,7 @@
  	ret = priv-&gt;hw-&gt;mac-&gt;rx_ipc(priv-&gt;hw);
  	if (!ret) {
  		netdev_warn(priv-&gt;dev, &quot;RX IPC Checksum Offload disabled\n&quot;);
-@@ -1726,8 +1727,10 @@ static int stmmac_hw_setup(struct net_de
+@@ -1731,8 +1732,10 @@ static int stmmac_hw_setup(struct net_de
  
  	if (init_ptp) {
  		ret = stmmac_init_ptp(priv);
@@ -1706,7 +1706,7 @@
  	}
  
  #ifdef CONFIG_DEBUG_FS
-@@ -1741,11 +1744,6 @@ static int stmmac_hw_setup(struct net_de
+@@ -1746,11 +1749,6 @@ static int stmmac_hw_setup(struct net_de
  	priv-&gt;hw-&gt;dma-&gt;start_tx(priv-&gt;ioaddr);
  	priv-&gt;hw-&gt;dma-&gt;start_rx(priv-&gt;ioaddr);
  
@@ -1718,7 +1718,7 @@
  	priv-&gt;tx_lpi_timer = STMMAC_DEFAULT_TWT_LS;
  
  	if ((priv-&gt;use_riwt) &amp;&amp; (priv-&gt;hw-&gt;dma-&gt;rx_watchdog)) {
-@@ -2535,7 +2533,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2547,7 +2545,7 @@ static int stmmac_rx(struct stmmac_priv
  		if (unlikely(status == discard_frame)) {
  			priv-&gt;dev-&gt;stats.rx_errors++;
  			if (priv-&gt;hwts_rx_en &amp;&amp; !priv-&gt;extend_desc) {
@@ -1727,7 +1727,7 @@
  				 * with timestamp value, hence reinitialize
  				 * them in stmmac_rx_refill() function so that
  				 * device can reuse it.
-@@ -2558,7 +2556,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2570,7 +2568,7 @@ static int stmmac_rx(struct stmmac_priv
  
  			frame_len = priv-&gt;hw-&gt;desc-&gt;get_rx_frame_len(p, coe);
  
@@ -1736,7 +1736,7 @@
  			 *  (preallocated during init) then the packet is
  			 *  ignored
  			 */
-@@ -2778,7 +2776,7 @@ static netdev_features_t stmmac_fix_feat
+@@ -2790,7 +2788,7 @@ static netdev_features_t stmmac_fix_feat
  	/* Some GMAC devices have a bugged Jumbo frame support that
  	 * needs to have the Tx COE disabled for oversized frames
  	 * (due to limited buffer sizes). In this case we disable
@@ -1745,7 +1745,7 @@
  	 */
  	if (priv-&gt;plat-&gt;bugged_jumbo &amp;&amp; (dev-&gt;mtu &gt; ETH_DATA_LEN))
  		features &amp;= ~NETIF_F_CSUM_MASK;
-@@ -2924,9 +2922,7 @@ static void sysfs_display_ring(void *hea
+@@ -2936,9 +2934,7 @@ static void sysfs_display_ring(void *hea
  	struct dma_desc *p = (struct dma_desc *)head;
  
  	for (i = 0; i &lt; size; i++) {
@@ -1755,7 +1755,7 @@
  			seq_printf(seq, &quot;%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n&quot;,
  				   i, (unsigned int)virt_to_phys(ep),
  				   le32_to_cpu(ep-&gt;basic.des0),
-@@ -2935,7 +2931,6 @@ static void sysfs_display_ring(void *hea
+@@ -2947,7 +2943,6 @@ static void sysfs_display_ring(void *hea
  				   le32_to_cpu(ep-&gt;basic.des3));
  			ep++;
  		} else {
@@ -1763,7 +1763,7 @@
  			seq_printf(seq, &quot;%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n&quot;,
  				   i, (unsigned int)virt_to_phys(ep),
  				   le32_to_cpu(p-&gt;des0), le32_to_cpu(p-&gt;des1),
-@@ -3005,7 +3000,7 @@ static int stmmac_sysfs_dma_cap_read(str
+@@ -3017,7 +3012,7 @@ static int stmmac_sysfs_dma_cap_read(str
  		   (priv-&gt;dma_cap.hash_filter) ? &quot;Y&quot; : &quot;N&quot;);
  	seq_printf(seq, &quot;\tMultiple MAC address registers: %s\n&quot;,
  		   (priv-&gt;dma_cap.multi_addr) ? &quot;Y&quot; : &quot;N&quot;);
@@ -1772,7 +1772,7 @@
  		   (priv-&gt;dma_cap.pcs) ? &quot;Y&quot; : &quot;N&quot;);
  	seq_printf(seq, &quot;\tSMA (MDIO) Interface: %s\n&quot;,
  		   (priv-&gt;dma_cap.sma_mdio) ? &quot;Y&quot; : &quot;N&quot;);
-@@ -3281,44 +3276,8 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3293,44 +3288,8 @@ int stmmac_dvr_probe(struct device *devi
  	if ((phyaddr &gt;= 0) &amp;&amp; (phyaddr &lt;= 31))
  		priv-&gt;plat-&gt;phy_addr = phyaddr;
  
@@ -1819,7 +1819,7 @@
  
  	/* Init MAC and get the capabilities */
  	ret = stmmac_hw_init(priv);
-@@ -3404,10 +3363,6 @@ error_netdev_register:
+@@ -3416,10 +3375,6 @@ error_netdev_register:
  error_mdio_register:
  	netif_napi_del(&amp;priv-&gt;napi);
  error_hw_init:
@@ -1830,7 +1830,7 @@
  	free_netdev(ndev);
  
  	return ret;
-@@ -3433,10 +3388,10 @@ int stmmac_dvr_remove(struct device *dev
+@@ -3445,10 +3400,10 @@ int stmmac_dvr_remove(struct device *dev
  	stmmac_set_mac(priv-&gt;ioaddr, false);
  	netif_carrier_off(ndev);
  	unregister_netdev(ndev);
@@ -1845,7 +1845,7 @@
  	if (priv-&gt;hw-&gt;pcs != STMMAC_PCS_RGMII &amp;&amp;
  	    priv-&gt;hw-&gt;pcs != STMMAC_PCS_TBI &amp;&amp;
  	    priv-&gt;hw-&gt;pcs != STMMAC_PCS_RTBI)
-@@ -3485,14 +3440,14 @@ int stmmac_suspend(struct device *dev)
+@@ -3497,14 +3452,14 @@ int stmmac_suspend(struct device *dev)
  		stmmac_set_mac(priv-&gt;ioaddr, false);
  		pinctrl_pm_select_sleep_state(priv-&gt;device);
  		/* Disable clock in case of PWM is off */
@@ -1864,7 +1864,7 @@
  	return 0;
  }
  EXPORT_SYMBOL_GPL(stmmac_suspend);
-@@ -3525,9 +3480,9 @@ int stmmac_resume(struct device *dev)
+@@ -3537,9 +3492,9 @@ int stmmac_resume(struct device *dev)
  		priv-&gt;irq_wake = 0;
  	} else {
  		pinctrl_pm_select_default_state(priv-&gt;device);
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 3d9bbb2295..a1b018186f 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
@@ -3095,7 +3095,7 @@
  
  	if (priv-&gt;hw-&gt;mode-&gt;set_16kib_bfsize)
  		bfsize = priv-&gt;hw-&gt;mode-&gt;set_16kib_bfsize(dev-&gt;mtu);
-@@ -1033,257 +1234,516 @@ static int init_dma_desc_rings(struct ne
+@@ -1033,235 +1234,409 @@ static int init_dma_desc_rings(struct ne
  
  	priv-&gt;dma_buf_sz = bfsize;
  
@@ -3351,10 +3351,17 @@
 -						 priv-&gt;tx_skbuff_dma[i].buf,
 -						 priv-&gt;tx_skbuff_dma[i].len,
 -						 DMA_TO_DEVICE);
+-		}
 +	for (i = 0; i &lt; DMA_TX_SIZE; i++)
 +		stmmac_free_tx_buffer(priv, queue, i);
 +}
-+
+ 
+-		if (priv-&gt;tx_skbuff[i]) {
+-			dev_kfree_skb_any(priv-&gt;tx_skbuff[i]);
+-			priv-&gt;tx_skbuff[i] = NULL;
+-			priv-&gt;tx_skbuff_dma[i].buf = 0;
+-			priv-&gt;tx_skbuff_dma[i].map_as_page = false;
+-		}
 +/**
 + * free_dma_rx_desc_resources - free RX dma desc resources
 + * @priv: private structure
@@ -3383,10 +3390,11 @@
 +
 +		kfree(rx_q-&gt;rx_skbuff_dma);
 +		kfree(rx_q-&gt;rx_skbuff);
-+	}
-+}
-+
-+/**
+ 	}
+ }
+ 
+ /**
+- * alloc_dma_desc_resources - alloc TX/RX resources.
 + * free_dma_tx_desc_resources - free TX dma desc resources
 + * @priv: private structure
 + */
@@ -3419,36 +3427,90 @@
 +
 +/**
 + * 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.
-+ */
+  * @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)
 +static int alloc_dma_rx_desc_resources(struct stmmac_priv *priv)
-+{
+ {
 +	u32 rx_count = priv-&gt;plat-&gt;rx_queues_to_use;
-+	int ret = -ENOMEM;
+ 	int ret = -ENOMEM;
 +	u32 queue;
-+
+ 
+-	priv-&gt;rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
+-					    GFP_KERNEL);
+-	if (!priv-&gt;rx_skbuff_dma)
+-		return -ENOMEM;
 +	/* RX queues buffers and DMA */
 +	for (queue = 0; queue &lt; rx_count; queue++) {
 +		struct stmmac_rx_queue *rx_q = &amp;priv-&gt;rx_queue[queue];
-+
+ 
+-	priv-&gt;rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv-&gt;rx_skbuff)
+-		goto err_rx_skbuff;
+-
+-	priv-&gt;tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
+-					    sizeof(*priv-&gt;tx_skbuff_dma),
+-					    GFP_KERNEL);
+-	if (!priv-&gt;tx_skbuff_dma)
+-		goto err_tx_skbuff_dma;
+-
+-	priv-&gt;tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv-&gt;tx_skbuff)
+-		goto err_tx_skbuff;
+-
+-	if (priv-&gt;extend_desc) {
+-		priv-&gt;dma_erx = dma_zalloc_coherent(priv-&gt;device, DMA_RX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &amp;priv-&gt;dma_rx_phy,
+-						    GFP_KERNEL);
+-		if (!priv-&gt;dma_erx)
+-			goto err_dma;
 +		rx_q-&gt;queue_index = queue;
 +		rx_q-&gt;priv_data = priv;
-+
+ 
+-		priv-&gt;dma_etx = dma_zalloc_coherent(priv-&gt;device, DMA_TX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &amp;priv-&gt;dma_tx_phy,
 +		rx_q-&gt;rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE,
 +						    sizeof(dma_addr_t),
-+						    GFP_KERNEL);
+ 						    GFP_KERNEL);
+-		if (!priv-&gt;dma_etx) {
+-			dma_free_coherent(priv-&gt;device, DMA_RX_SIZE *
+-					  sizeof(struct dma_extended_desc),
+-					  priv-&gt;dma_erx, priv-&gt;dma_rx_phy);
+-			goto err_dma;
+-		}
+-	} else {
+-		priv-&gt;dma_rx = dma_zalloc_coherent(priv-&gt;device, DMA_RX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &amp;priv-&gt;dma_rx_phy,
+-						   GFP_KERNEL);
+-		if (!priv-&gt;dma_rx)
+-			goto err_dma;
 +		if (!rx_q-&gt;rx_skbuff_dma)
 +			return -ENOMEM;
-+
+ 
+-		priv-&gt;dma_tx = dma_zalloc_coherent(priv-&gt;device, DMA_TX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &amp;priv-&gt;dma_tx_phy,
+-						   GFP_KERNEL);
+-		if (!priv-&gt;dma_tx) {
+-			dma_free_coherent(priv-&gt;device, DMA_RX_SIZE *
+-					  sizeof(struct dma_desc),
+-					  priv-&gt;dma_rx, priv-&gt;dma_rx_phy);
 +		rx_q-&gt;rx_skbuff = kmalloc_array(DMA_RX_SIZE,
 +						sizeof(struct sk_buff *),
 +						GFP_KERNEL);
 +		if (!rx_q-&gt;rx_skbuff)
-+			goto err_dma;
+ 			goto err_dma;
 +
 +		if (priv-&gt;extend_desc) {
 +			rx_q-&gt;dma_erx = dma_zalloc_coherent(priv-&gt;device,
@@ -3469,12 +3531,19 @@
 +							   GFP_KERNEL);
 +			if (!rx_q-&gt;dma_rx)
 +				goto err_dma;
-+		}
-+	}
-+
-+	return 0;
-+
-+err_dma:
+ 		}
+ 	}
+ 
+ 	return 0;
+ 
+ err_dma:
+-	kfree(priv-&gt;tx_skbuff);
+-err_tx_skbuff:
+-	kfree(priv-&gt;tx_skbuff_dma);
+-err_tx_skbuff_dma:
+-	kfree(priv-&gt;rx_skbuff);
+-err_rx_skbuff:
+-	kfree(priv-&gt;rx_skbuff_dma);
 +	free_dma_rx_desc_resources(priv);
 +
 +	return ret;
@@ -3531,7 +3600,7 @@
 +							   GFP_KERNEL);
 +			if (!tx_q-&gt;dma_tx)
 +				goto err_dma_buffers;
- 		}
++		}
 +	}
 +
 +	return 0;
@@ -3560,126 +3629,85 @@
 +
 +	ret = alloc_dma_tx_desc_resources(priv);
 +
-+	return ret;
-+}
-+
+ 	return ret;
+ }
+ 
 +/**
 + * free_dma_desc_resources - free dma desc resources
 + * @priv: private structure
 + */
-+static void free_dma_desc_resources(struct stmmac_priv *priv)
-+{
+ 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-&gt;extend_desc) {
+-		dma_free_coherent(priv-&gt;device,
+-				  DMA_TX_SIZE * sizeof(struct dma_desc),
+-				  priv-&gt;dma_tx, priv-&gt;dma_tx_phy);
+-		dma_free_coherent(priv-&gt;device,
+-				  DMA_RX_SIZE * sizeof(struct dma_desc),
+-				  priv-&gt;dma_rx, priv-&gt;dma_rx_phy);
+-	} else {
+-		dma_free_coherent(priv-&gt;device, DMA_TX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv-&gt;dma_etx, priv-&gt;dma_tx_phy);
+-		dma_free_coherent(priv-&gt;device, DMA_RX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv-&gt;dma_erx, priv-&gt;dma_rx_phy);
+-	}
+-	kfree(priv-&gt;rx_skbuff_dma);
+-	kfree(priv-&gt;rx_skbuff);
+-	kfree(priv-&gt;tx_skbuff_dma);
+-	kfree(priv-&gt;tx_skbuff);
 +	/* Release the DMA RX socket buffers */
 +	free_dma_rx_desc_resources(priv);
 +
 +	/* Release the DMA TX socket buffers */
 +	free_dma_tx_desc_resources(priv);
-+}
-+
-+/**
-+ *  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)
-+{
+ }
+ 
+ /**
+@@ -1271,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-&gt;dma_cap.number_rx_queues;
+-	int queue = 0;
 +	u32 rx_queues_count = priv-&gt;plat-&gt;rx_queues_to_use;
 +	int queue;
 +	u8 mode;
  
--		if (priv-&gt;tx_skbuff[i]) {
--			dev_kfree_skb_any(priv-&gt;tx_skbuff[i]);
--			priv-&gt;tx_skbuff[i] = NULL;
--			priv-&gt;tx_skbuff_dma[i].buf = 0;
--			priv-&gt;tx_skbuff_dma[i].map_as_page = false;
--		}
+-	/* If GMAC does not have multiple queues, then this is not necessary*/
+-	if (rx_count == 1)
+-		return;
 +	for (queue = 0; queue &lt; rx_queues_count; queue++) {
 +		mode = priv-&gt;plat-&gt;rx_queues_cfg[queue].mode_to_use;
 +		priv-&gt;hw-&gt;mac-&gt;rx_queue_enable(priv-&gt;hw, mode, 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.
+-	/**
+-	 *  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-&gt;hw-&gt;mac-&gt;rx_queue_enable(priv-&gt;hw, queue);
++/**
 + * 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-&gt;rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
--					    GFP_KERNEL);
--	if (!priv-&gt;rx_skbuff_dma)
--		return -ENOMEM;
--
--	priv-&gt;rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv-&gt;rx_skbuff)
--		goto err_rx_skbuff;
--
--	priv-&gt;tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
--					    sizeof(*priv-&gt;tx_skbuff_dma),
--					    GFP_KERNEL);
--	if (!priv-&gt;tx_skbuff_dma)
--		goto err_tx_skbuff_dma;
--
--	priv-&gt;tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv-&gt;tx_skbuff)
--		goto err_tx_skbuff;
--
--	if (priv-&gt;extend_desc) {
--		priv-&gt;dma_erx = dma_zalloc_coherent(priv-&gt;device, DMA_RX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &amp;priv-&gt;dma_rx_phy,
--						    GFP_KERNEL);
--		if (!priv-&gt;dma_erx)
--			goto err_dma;
--
--		priv-&gt;dma_etx = dma_zalloc_coherent(priv-&gt;device, DMA_TX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &amp;priv-&gt;dma_tx_phy,
--						    GFP_KERNEL);
--		if (!priv-&gt;dma_etx) {
--			dma_free_coherent(priv-&gt;device, DMA_RX_SIZE *
--					  sizeof(struct dma_extended_desc),
--					  priv-&gt;dma_erx, priv-&gt;dma_rx_phy);
--			goto err_dma;
--		}
--	} else {
--		priv-&gt;dma_rx = dma_zalloc_coherent(priv-&gt;device, DMA_RX_SIZE *
--						   sizeof(struct dma_desc),
--						   &amp;priv-&gt;dma_rx_phy,
--						   GFP_KERNEL);
--		if (!priv-&gt;dma_rx)
--			goto err_dma;
++{
 +	netdev_dbg(priv-&gt;dev, &quot;DMA RX processes started in channel %d\n&quot;, chan);
 +	priv-&gt;hw-&gt;dma-&gt;start_rx(priv-&gt;ioaddr, chan);
 +}
- 
--		priv-&gt;dma_tx = dma_zalloc_coherent(priv-&gt;device, DMA_TX_SIZE *
--						   sizeof(struct dma_desc),
--						   &amp;priv-&gt;dma_tx_phy,
--						   GFP_KERNEL);
--		if (!priv-&gt;dma_tx) {
--			dma_free_coherent(priv-&gt;device, DMA_RX_SIZE *
--					  sizeof(struct dma_desc),
--					  priv-&gt;dma_rx, priv-&gt;dma_rx_phy);
--			goto err_dma;
--		}
--	}
++
 +/**
 + * stmmac_start_tx_dma - start TX DMA channel
 + * @priv: driver private structure
@@ -3692,8 +3720,7 @@
 +	netdev_dbg(priv-&gt;dev, &quot;DMA TX processes started in channel %d\n&quot;, chan);
 +	priv-&gt;hw-&gt;dma-&gt;start_tx(priv-&gt;ioaddr, chan);
 +}
- 
--	return 0;
++
 +/**
 + * stmmac_stop_rx_dma - stop RX DMA channel
 + * @priv: driver private structure
@@ -3706,16 +3733,7 @@
 +	netdev_dbg(priv-&gt;dev, &quot;DMA RX processes stopped in channel %d\n&quot;, chan);
 +	priv-&gt;hw-&gt;dma-&gt;stop_rx(priv-&gt;ioaddr, chan);
 +}
- 
--err_dma:
--	kfree(priv-&gt;tx_skbuff);
--err_tx_skbuff:
--	kfree(priv-&gt;tx_skbuff_dma);
--err_tx_skbuff_dma:
--	kfree(priv-&gt;rx_skbuff);
--err_rx_skbuff:
--	kfree(priv-&gt;rx_skbuff_dma);
--	return ret;
++
 +/**
 + * stmmac_stop_tx_dma - stop TX DMA channel
 + * @priv: driver private structure
@@ -3727,9 +3745,8 @@
 +{
 +	netdev_dbg(priv-&gt;dev, &quot;DMA TX processes stopped in channel %d\n&quot;, chan);
 +	priv-&gt;hw-&gt;dma-&gt;stop_tx(priv-&gt;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
@@ -3737,31 +3754,7 @@
 + * 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-&gt;extend_desc) {
--		dma_free_coherent(priv-&gt;device,
--				  DMA_TX_SIZE * sizeof(struct dma_desc),
--				  priv-&gt;dma_tx, priv-&gt;dma_tx_phy);
--		dma_free_coherent(priv-&gt;device,
--				  DMA_RX_SIZE * sizeof(struct dma_desc),
--				  priv-&gt;dma_rx, priv-&gt;dma_rx_phy);
--	} else {
--		dma_free_coherent(priv-&gt;device, DMA_TX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv-&gt;dma_etx, priv-&gt;dma_tx_phy);
--		dma_free_coherent(priv-&gt;device, DMA_RX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv-&gt;dma_erx, priv-&gt;dma_rx_phy);
--	}
--	kfree(priv-&gt;rx_skbuff_dma);
--	kfree(priv-&gt;rx_skbuff);
--	kfree(priv-&gt;tx_skbuff_dma);
--	kfree(priv-&gt;tx_skbuff);
++{
 +	u32 rx_channels_count = priv-&gt;plat-&gt;rx_queues_to_use;
 +	u32 tx_channels_count = priv-&gt;plat-&gt;tx_queues_to_use;
 +	u32 chan = 0;
@@ -3771,38 +3764,23 @@
 +
 +	for (chan = 0; chan &lt; 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-&gt;dma_cap.number_rx_queues;
--	int queue = 0;
++{
 +	u32 rx_channels_count = priv-&gt;plat-&gt;rx_queues_to_use;
 +	u32 tx_channels_count = priv-&gt;plat-&gt;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 &lt; 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-&gt;hw-&gt;mac-&gt;rx_queue_enable(priv-&gt;hw, queue);
++
 +	for (chan = 0; chan &lt; tx_channels_count; chan++)
 +		stmmac_stop_tx_dma(priv, chan);
  }
@@ -3897,7 +3875,7 @@
  
  		status = priv-&gt;hw-&gt;desc-&gt;tx_status(&amp;priv-&gt;dev-&gt;stats,
  						      &amp;priv-&gt;xstats, p,
-@@ -1357,48 +1842,51 @@ static void stmmac_tx_clean(struct stmma
+@@ -1362,48 +1847,51 @@ static void stmmac_tx_clean(struct stmma
  			stmmac_get_tx_hwtstamp(priv, p, skb);
  		}
  
@@ -3967,7 +3945,7 @@
  	}
  
  	if ((priv-&gt;eee_enabled) &amp;&amp; (!priv-&gt;tx_path_in_lpi_mode)) {
-@@ -1408,45 +1896,76 @@ static void stmmac_tx_clean(struct stmma
+@@ -1413,45 +1901,76 @@ static void stmmac_tx_clean(struct stmma
  	netif_tx_unlock(priv-&gt;dev);
  }
  
@@ -4059,7 +4037,7 @@
  }
  
  /**
-@@ -1458,31 +1977,43 @@ static void stmmac_tx_err(struct stmmac_
+@@ -1463,31 +1982,43 @@ static void stmmac_tx_err(struct stmmac_
   */
  static void stmmac_dma_interrupt(struct stmmac_priv *priv)
  {
@@ -4124,7 +4102,7 @@
  }
  
  /**
-@@ -1589,6 +2120,13 @@ static void stmmac_check_ether_addr(stru
+@@ -1594,6 +2125,13 @@ static void stmmac_check_ether_addr(stru
   */
  static int stmmac_init_dma_engine(struct stmmac_priv *priv)
  {
@@ -4138,7 +4116,7 @@
  	int atds = 0;
  	int ret = 0;
  
-@@ -1606,19 +2144,49 @@ static int stmmac_init_dma_engine(struct
+@@ -1611,19 +2149,49 @@ static int stmmac_init_dma_engine(struct
  		return ret;
  	}
  
@@ -4200,7 +4178,7 @@
  	}
  
  	if (priv-&gt;plat-&gt;axi &amp;&amp; priv-&gt;hw-&gt;dma-&gt;axi)
-@@ -1636,8 +2204,12 @@ static int stmmac_init_dma_engine(struct
+@@ -1641,8 +2209,12 @@ static int stmmac_init_dma_engine(struct
  static void stmmac_tx_timer(unsigned long data)
  {
  	struct stmmac_priv *priv = (struct stmmac_priv *)data;
@@ -4214,7 +4192,7 @@
  }
  
  /**
-@@ -1659,6 +2231,196 @@ static void stmmac_init_tx_coalesce(stru
+@@ -1664,6 +2236,196 @@ static void stmmac_init_tx_coalesce(stru
  	add_timer(&amp;priv-&gt;txtimer);
  }
  
@@ -4411,7 +4389,7 @@
  /**
   * stmmac_hw_setup - setup mac in a usable state.
   *  @dev : pointer to the device structure.
-@@ -1674,6 +2436,9 @@ static void stmmac_init_tx_coalesce(stru
+@@ -1679,6 +2441,9 @@ static void stmmac_init_tx_coalesce(stru
  static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
  {
  	struct stmmac_priv *priv = netdev_priv(dev);
@@ -4421,7 +4399,7 @@
  	int ret;
  
  	/* DMA initialization and SW reset */
-@@ -1703,9 +2468,9 @@ static int stmmac_hw_setup(struct net_de
+@@ -1708,9 +2473,9 @@ static int stmmac_hw_setup(struct net_de
  	/* Initialize the MAC Core */
  	priv-&gt;hw-&gt;mac-&gt;core_init(priv-&gt;hw, dev-&gt;mtu);
  
@@ -4434,7 +4412,7 @@
  
  	ret = priv-&gt;hw-&gt;mac-&gt;rx_ipc(priv-&gt;hw);
  	if (!ret) {
-@@ -1715,10 +2480,7 @@ static int stmmac_hw_setup(struct net_de
+@@ -1720,10 +2485,7 @@ static int stmmac_hw_setup(struct net_de
  	}
  
  	/* Enable the MAC Rx/Tx */
@@ -4446,7 +4424,7 @@
  
  	/* Set the HW DMA mode and the COE */
  	stmmac_dma_operation_mode(priv);
-@@ -1726,6 +2488,10 @@ static int stmmac_hw_setup(struct net_de
+@@ -1731,6 +2493,10 @@ static int stmmac_hw_setup(struct net_de
  	stmmac_mmc_setup(priv);
  
  	if (init_ptp) {
@@ -4457,7 +4435,7 @@
  		ret = stmmac_init_ptp(priv);
  		if (ret == -EOPNOTSUPP)
  			netdev_warn(priv-&gt;dev, &quot;PTP not supported by HW\n&quot;);
-@@ -1740,35 +2506,37 @@ static int stmmac_hw_setup(struct net_de
+@@ -1745,35 +2511,37 @@ static int stmmac_hw_setup(struct net_de
  			    __func__);
  #endif
  	/* Start the ball rolling... */
@@ -4509,7 +4487,7 @@
  /**
   *  stmmac_open - open entry point of the driver
   *  @dev : pointer to the device structure.
-@@ -1837,7 +2605,7 @@ static int stmmac_open(struct net_device
+@@ -1842,7 +2610,7 @@ static int stmmac_open(struct net_device
  		netdev_err(priv-&gt;dev,
  			   &quot;%s: ERROR: allocating the IRQ %d (error: %d)\n&quot;,
  			   __func__, dev-&gt;irq, ret);
@@ -4518,7 +4496,7 @@
  	}
  
  	/* Request the Wake IRQ in case of another line is used for WoL */
-@@ -1864,8 +2632,8 @@ static int stmmac_open(struct net_device
+@@ -1869,8 +2637,8 @@ static int stmmac_open(struct net_device
  		}
  	}
  
@@ -4529,7 +4507,7 @@
  
  	return 0;
  
-@@ -1874,7 +2642,12 @@ lpiirq_error:
+@@ -1879,7 +2647,12 @@ lpiirq_error:
  		free_irq(priv-&gt;wol_irq, dev);
  wolirq_error:
  	free_irq(dev-&gt;irq, dev);
@@ -4542,7 +4520,7 @@
  init_error:
  	free_dma_desc_resources(priv);
  dma_desc_error:
-@@ -1903,9 +2676,9 @@ static int stmmac_release(struct net_dev
+@@ -1908,9 +2681,9 @@ static int stmmac_release(struct net_dev
  		phy_disconnect(dev-&gt;phydev);
  	}
  
@@ -4554,7 +4532,7 @@
  
  	del_timer_sync(&amp;priv-&gt;txtimer);
  
-@@ -1917,14 +2690,13 @@ static int stmmac_release(struct net_dev
+@@ -1922,14 +2695,13 @@ static int stmmac_release(struct net_dev
  		free_irq(priv-&gt;lpi_irq, dev);
  
  	/* Stop TX/RX DMA and clear the descriptors */
@@ -4571,7 +4549,7 @@
  
  	netif_carrier_off(dev);
  
-@@ -1943,22 +2715,24 @@ static int stmmac_release(struct net_dev
+@@ -1948,22 +2720,24 @@ static int stmmac_release(struct net_dev
   *  @des: buffer start address
   *  @total_len: total length to fill in descriptors
   *  @last_segmant: condition for the last descriptor
@@ -4600,7 +4578,7 @@
  
  		desc-&gt;des0 = cpu_to_le32(des + (total_len - tmp_len));
  		buff_size = tmp_len &gt;= TSO_MAX_BUFF_SIZE ?
-@@ -1966,7 +2740,7 @@ static void stmmac_tso_allocator(struct
+@@ -1971,7 +2745,7 @@ static void stmmac_tso_allocator(struct
  
  		priv-&gt;hw-&gt;desc-&gt;prepare_tso_tx_desc(desc, 0, buff_size,
  			0, 1,
@@ -4609,7 +4587,7 @@
  			0, 0);
  
  		tmp_len -= TSO_MAX_BUFF_SIZE;
-@@ -2002,23 +2776,28 @@ static void stmmac_tso_allocator(struct
+@@ -2007,23 +2781,28 @@ static void stmmac_tso_allocator(struct
   */
  static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
  {
@@ -4644,7 +4622,7 @@
  			/* This is a hard error, log it. */
  			netdev_err(priv-&gt;dev,
  				   &quot;%s: Tx Ring full when queue awake\n&quot;,
-@@ -2033,10 +2812,10 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2038,10 +2817,10 @@ static netdev_tx_t stmmac_tso_xmit(struc
  
  	/* set new MSS value if needed */
  	if (mss != priv-&gt;mss) {
@@ -4657,7 +4635,7 @@
  	}
  
  	if (netif_msg_tx_queued(priv)) {
-@@ -2046,9 +2825,9 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2051,9 +2830,9 @@ static netdev_tx_t stmmac_tso_xmit(struc
  			skb-&gt;data_len);
  	}
  
@@ -4669,7 +4647,7 @@
  	first = desc;
  
  	/* first descriptor: fill Headers on Buf1 */
-@@ -2057,9 +2836,8 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2062,9 +2841,8 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	if (dma_mapping_error(priv-&gt;device, des))
  		goto dma_map_err;
  
@@ -4681,7 +4659,7 @@
  
  	first-&gt;des0 = cpu_to_le32(des);
  
-@@ -2070,7 +2848,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2075,7 +2853,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	/* If needed take extra descriptors to fill the remaining payload */
  	tmp_pay_len = pay_len - TSO_MAX_BUFF_SIZE;
  
@@ -4690,7 +4668,7 @@
  
  	/* Prepare fragments */
  	for (i = 0; i &lt; nfrags; i++) {
-@@ -2079,24 +2857,34 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2084,24 +2862,34 @@ static netdev_tx_t stmmac_tso_xmit(struc
  		des = skb_frag_dma_map(priv-&gt;device, frag, 0,
  				       skb_frag_size(frag),
  				       DMA_TO_DEVICE);
@@ -4734,7 +4712,7 @@
  	}
  
  	dev-&gt;stats.tx_bytes += skb-&gt;len;
-@@ -2128,7 +2916,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2133,7 +2921,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
  	priv-&gt;hw-&gt;desc-&gt;prepare_tso_tx_desc(first, 1,
  			proto_hdr_len,
  			pay_len,
@@ -4743,7 +4721,7 @@
  			tcp_hdrlen(skb) / 4, (skb-&gt;len - proto_hdr_len));
  
  	/* If context desc is used to change MSS */
-@@ -2143,20 +2931,20 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2155,20 +2943,20 @@ static netdev_tx_t stmmac_tso_xmit(struc
  
  	if (netif_msg_pktdata(priv)) {
  		pr_info(&quot;%s: curr=%d dirty=%d f=%d, e=%d, f_p=%p, nfrags %d\n&quot;,
@@ -4770,7 +4748,7 @@
  
  	return NETDEV_TX_OK;
  
-@@ -2180,21 +2968,27 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2192,21 +2980,27 @@ static netdev_tx_t stmmac_xmit(struct sk
  	struct stmmac_priv *priv = netdev_priv(dev);
  	unsigned int nopaged_len = skb_headlen(skb);
  	int i, csum_insertion = 0, is_jumbo = 0;
@@ -4802,7 +4780,7 @@
  			/* This is a hard error, log it. */
  			netdev_err(priv-&gt;dev,
  				   &quot;%s: Tx Ring full when queue awake\n&quot;,
-@@ -2206,20 +3000,18 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2218,20 +3012,18 @@ static netdev_tx_t stmmac_xmit(struct sk
  	if (priv-&gt;tx_path_in_lpi_mode)
  		stmmac_disable_eee_mode(priv);
  
@@ -4826,7 +4804,7 @@
  	enh_desc = priv-&gt;plat-&gt;enh_desc;
  	/* To program the descriptors according to the size of the frame */
  	if (enh_desc)
-@@ -2227,7 +3019,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2239,7 +3031,7 @@ static netdev_tx_t stmmac_xmit(struct sk
  
  	if (unlikely(is_jumbo) &amp;&amp; likely(priv-&gt;synopsys_id &lt;
  					 DWMAC_CORE_4_00)) {
@@ -4835,7 +4813,7 @@
  		if (unlikely(entry &lt; 0))
  			goto dma_map_err;
  	}
-@@ -2240,48 +3032,56 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2252,48 +3044,56 @@ static netdev_tx_t stmmac_xmit(struct sk
  		entry = STMMAC_GET_ENTRY(entry, DMA_TX_SIZE);
  
  		if (likely(priv-&gt;extend_desc))
@@ -4905,7 +4883,7 @@
  
  		priv-&gt;hw-&gt;desc-&gt;display_ring(tx_head, DMA_TX_SIZE, false);
  
-@@ -2289,10 +3089,10 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2301,10 +3101,10 @@ static netdev_tx_t stmmac_xmit(struct sk
  		print_pkt(skb-&gt;data, skb-&gt;len);
  	}
  
@@ -4918,7 +4896,7 @@
  	}
  
  	dev-&gt;stats.tx_bytes += skb-&gt;len;
-@@ -2327,14 +3127,14 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2339,14 +3139,14 @@ static netdev_tx_t stmmac_xmit(struct sk
  		if (dma_mapping_error(priv-&gt;device, des))
  			goto dma_map_err;
  
@@ -4936,7 +4914,7 @@
  
  		if (unlikely((skb_shinfo(skb)-&gt;tx_flags &amp; SKBTX_HW_TSTAMP) &amp;&amp;
  			     priv-&gt;hwts_tx_en)) {
-@@ -2346,7 +3146,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2358,7 +3158,7 @@ static netdev_tx_t stmmac_xmit(struct sk
  		/* Prepare the first descriptor setting the OWN bit too */
  		priv-&gt;hw-&gt;desc-&gt;prepare_tx_desc(first, 1, nopaged_len,
  						csum_insertion, priv-&gt;mode, 1,
@@ -4945,7 +4923,7 @@
  
  		/* The own bit must be the latest setting done when prepare the
  		 * descriptor and then barrier is needed to make sure that
-@@ -2355,13 +3155,13 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2367,13 +3167,13 @@ static netdev_tx_t stmmac_xmit(struct sk
  		dma_wmb();
  	}
  
@@ -4962,7 +4940,7 @@
  
  	return NETDEV_TX_OK;
  
-@@ -2389,9 +3189,9 @@ static void stmmac_rx_vlan(struct net_de
+@@ -2401,9 +3201,9 @@ static void stmmac_rx_vlan(struct net_de
  }
  
  
@@ -4974,7 +4952,7 @@
  		return 0;
  
  	return 1;
-@@ -2400,30 +3200,33 @@ static inline int stmmac_rx_threshold_co
+@@ -2412,30 +3212,33 @@ static inline int stmmac_rx_threshold_co
  /**
   * stmmac_rx_refill - refill used skb preallocated buffers
   * @priv: driver private structure
@@ -5015,7 +4993,7 @@
  				if (unlikely(net_ratelimit()))
  					dev_err(priv-&gt;device,
  						&quot;fail to alloc skb entry %d\n&quot;,
-@@ -2431,28 +3234,28 @@ static inline void stmmac_rx_refill(stru
+@@ -2443,28 +3246,28 @@ static inline void stmmac_rx_refill(stru
  				break;
  			}
  
@@ -5052,7 +5030,7 @@
  
  			netif_dbg(priv, rx_status, priv-&gt;dev,
  				  &quot;refill entry #%d\n&quot;, entry);
-@@ -2468,31 +3271,33 @@ static inline void stmmac_rx_refill(stru
+@@ -2480,31 +3283,33 @@ static inline void stmmac_rx_refill(stru
  
  		entry = STMMAC_GET_ENTRY(entry, DMA_RX_SIZE);
  	}
@@ -5093,7 +5071,7 @@
  
  		priv-&gt;hw-&gt;desc-&gt;display_ring(rx_head, DMA_RX_SIZE, true);
  	}
-@@ -2502,9 +3307,9 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2514,9 +3319,9 @@ static int stmmac_rx(struct stmmac_priv
  		struct dma_desc *np;
  
  		if (priv-&gt;extend_desc)
@@ -5105,7 +5083,7 @@
  
  		/* read the status of the incoming frame */
  		status = priv-&gt;hw-&gt;desc-&gt;rx_status(&amp;priv-&gt;dev-&gt;stats,
-@@ -2515,20 +3320,20 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2527,20 +3332,20 @@ static int stmmac_rx(struct stmmac_priv
  
  		count++;
  
@@ -5131,7 +5109,7 @@
  							   entry);
  		if (unlikely(status == discard_frame)) {
  			priv-&gt;dev-&gt;stats.rx_errors++;
-@@ -2538,9 +3343,9 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2550,9 +3355,9 @@ static int stmmac_rx(struct stmmac_priv
  				 * them in stmmac_rx_refill() function so that
  				 * device can reuse it.
  				 */
@@ -5143,7 +5121,7 @@
  						 priv-&gt;dma_buf_sz,
  						 DMA_FROM_DEVICE);
  			}
-@@ -2588,7 +3393,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2600,7 +3405,7 @@ static int stmmac_rx(struct stmmac_priv
  			 */
  			if (unlikely(!priv-&gt;plat-&gt;has_gmac4 &amp;&amp;
  				     ((frame_len &lt; priv-&gt;rx_copybreak) ||
@@ -5152,7 +5130,7 @@
  				skb = netdev_alloc_skb_ip_align(priv-&gt;dev,
  								frame_len);
  				if (unlikely(!skb)) {
-@@ -2600,21 +3405,21 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2612,21 +3417,21 @@ static int stmmac_rx(struct stmmac_priv
  				}
  
  				dma_sync_single_for_cpu(priv-&gt;device,
@@ -5178,7 +5156,7 @@
  				if (unlikely(!skb)) {
  					netdev_err(priv-&gt;dev,
  						   &quot;%s: Inconsistent Rx chain\n&quot;,
-@@ -2623,12 +3428,12 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2635,12 +3440,12 @@ static int stmmac_rx(struct stmmac_priv
  					break;
  				}
  				prefetch(skb-&gt;data - NET_IP_ALIGN);
@@ -5194,7 +5172,7 @@
  						 priv-&gt;dma_buf_sz,
  						 DMA_FROM_DEVICE);
  			}
-@@ -2650,7 +3455,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2662,7 +3467,7 @@ static int stmmac_rx(struct stmmac_priv
  			else
  				skb-&gt;ip_summed = CHECKSUM_UNNECESSARY;
  
@@ -5203,7 +5181,7 @@
  
  			priv-&gt;dev-&gt;stats.rx_packets++;
  			priv-&gt;dev-&gt;stats.rx_bytes += frame_len;
-@@ -2658,7 +3463,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2670,7 +3475,7 @@ static int stmmac_rx(struct stmmac_priv
  		entry = next_entry;
  	}
  
@@ -5212,7 +5190,7 @@
  
  	priv-&gt;xstats.rx_pkt_n += count;
  
-@@ -2675,16 +3480,24 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2687,16 +3492,24 @@ static int stmmac_rx(struct stmmac_priv
   */
  static int stmmac_poll(struct napi_struct *napi, int budget)
  {
@@ -5241,7 +5219,7 @@
  	}
  	return work_done;
  }
-@@ -2700,9 +3513,12 @@ static int stmmac_poll(struct napi_struc
+@@ -2712,9 +3525,12 @@ static int stmmac_poll(struct napi_struc
  static void stmmac_tx_timeout(struct net_device *dev)
  {
  	struct stmmac_priv *priv = netdev_priv(dev);
@@ -5255,7 +5233,7 @@
  }
  
  /**
-@@ -2825,6 +3641,12 @@ static irqreturn_t stmmac_interrupt(int
+@@ -2837,6 +3653,12 @@ static irqreturn_t stmmac_interrupt(int
  {
  	struct net_device *dev = (struct net_device *)dev_id;
  	struct stmmac_priv *priv = netdev_priv(dev);
@@ -5268,7 +5246,7 @@
  
  	if (priv-&gt;irq_wake)
  		pm_wakeup_event(priv-&gt;device, 0);
-@@ -2838,16 +3660,30 @@ static irqreturn_t stmmac_interrupt(int
+@@ -2850,16 +3672,30 @@ static irqreturn_t stmmac_interrupt(int
  	if ((priv-&gt;plat-&gt;has_gmac) || (priv-&gt;plat-&gt;has_gmac4)) {
  		int status = priv-&gt;hw-&gt;mac-&gt;host_irq_status(priv-&gt;hw,
  							    &amp;priv-&gt;xstats);
@@ -5303,7 +5281,7 @@
  		}
  
  		/* PCS link status */
-@@ -2932,7 +3768,7 @@ static void sysfs_display_ring(void *hea
+@@ -2944,7 +3780,7 @@ static void sysfs_display_ring(void *hea
  			ep++;
  		} else {
  			seq_printf(seq, &quot;%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n&quot;,
@@ -5312,7 +5290,7 @@
  				   le32_to_cpu(p-&gt;des0), le32_to_cpu(p-&gt;des1),
  				   le32_to_cpu(p-&gt;des2), le32_to_cpu(p-&gt;des3));
  			p++;
-@@ -2945,17 +3781,40 @@ static int stmmac_sysfs_ring_read(struct
+@@ -2957,17 +3793,40 @@ static int stmmac_sysfs_ring_read(struct
  {
  	struct net_device *dev = seq-&gt;private;
  	struct stmmac_priv *priv = netdev_priv(dev);
@@ -5363,7 +5341,7 @@
  	}
  
  	return 0;
-@@ -3238,11 +4097,14 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3250,11 +4109,14 @@ int stmmac_dvr_probe(struct device *devi
  		     struct plat_stmmacenet_data *plat_dat,
  		     struct stmmac_resources *res)
  {
@@ -5380,7 +5358,7 @@
  	if (!ndev)
  		return -ENOMEM;
  
-@@ -3284,6 +4146,10 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3296,6 +4158,10 @@ int stmmac_dvr_probe(struct device *devi
  	if (ret)
  		goto error_hw_init;
  
@@ -5391,7 +5369,7 @@
  	ndev-&gt;netdev_ops = &amp;stmmac_netdev_ops;
  
  	ndev-&gt;hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
-@@ -3316,7 +4182,12 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3328,7 +4194,12 @@ int stmmac_dvr_probe(struct device *devi
  			 &quot;Enable RX Mitigation via HW Watchdog Timer\n&quot;);
  	}
  
@@ -5405,7 +5383,7 @@
  
  	spin_lock_init(&amp;priv-&gt;lock);
  
-@@ -3361,7 +4232,11 @@ error_netdev_register:
+@@ -3373,7 +4244,11 @@ error_netdev_register:
  	    priv-&gt;hw-&gt;pcs != STMMAC_PCS_RTBI)
  		stmmac_mdio_unregister(ndev);
  error_mdio_register:
@@ -5418,7 +5396,7 @@
  error_hw_init:
  	free_netdev(ndev);
  
-@@ -3382,10 +4257,9 @@ int stmmac_dvr_remove(struct device *dev
+@@ -3394,10 +4269,9 @@ int stmmac_dvr_remove(struct device *dev
  
  	netdev_info(priv-&gt;dev, &quot;%s: removing driver&quot;, __func__);
  
@@ -5431,7 +5409,7 @@
  	netif_carrier_off(ndev);
  	unregister_netdev(ndev);
  	if (priv-&gt;plat-&gt;stmmac_rst)
-@@ -3424,20 +4298,19 @@ int stmmac_suspend(struct device *dev)
+@@ -3436,20 +4310,19 @@ int stmmac_suspend(struct device *dev)
  	spin_lock_irqsave(&amp;priv-&gt;lock, flags);
  
  	netif_device_detach(ndev);
@@ -5456,7 +5434,7 @@
  		pinctrl_pm_select_sleep_state(priv-&gt;device);
  		/* Disable clock in case of PWM is off */
  		clk_disable(priv-&gt;plat-&gt;pclk);
-@@ -3453,6 +4326,31 @@ int stmmac_suspend(struct device *dev)
+@@ -3465,6 +4338,31 @@ int stmmac_suspend(struct device *dev)
  EXPORT_SYMBOL_GPL(stmmac_suspend);
  
  /**
@@ -5488,7 +5466,7 @@
   * stmmac_resume - resume callback
   * @dev: device pointer
   * Description: when resume this function is invoked to setup the DMA and CORE
-@@ -3492,10 +4390,8 @@ int stmmac_resume(struct device *dev)
+@@ -3504,10 +4402,8 @@ int stmmac_resume(struct device *dev)
  
  	spin_lock_irqsave(&amp;priv-&gt;lock, flags);
  
@@ -5501,7 +5479,7 @@
  	/* reset private mss value to force mss context settings at
  	 * next tso xmit (only used for gmac4).
  	 */
-@@ -3507,9 +4403,9 @@ int stmmac_resume(struct device *dev)
+@@ -3519,9 +4415,9 @@ int stmmac_resume(struct device *dev)
  	stmmac_init_tx_coalesce(priv);
  	stmmac_set_rx_mode(ndev);
  
diff --git a/target/linux/sunxi/patches-4.9/0053-stmmac-form-4-13.patch b/target/linux/sunxi/patches-4.9/0053-stmmac-form-4-13.patch
index a5d860ddc4..4ee62321d5 100644
--- a/target/linux/sunxi/patches-4.9/0053-stmmac-form-4-13.patch
+++ b/target/linux/sunxi/patches-4.9/0053-stmmac-form-4-13.patch
@@ -1491,7 +1491,7 @@
  	free_dma_tx_desc_resources(priv);
  
  	return ret;
-@@ -2902,8 +2900,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2907,8 +2905,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
  		priv-&gt;xstats.tx_set_ic_bit++;
  	}
  
@@ -1501,7 +1501,7 @@
  
  	if (unlikely((skb_shinfo(skb)-&gt;tx_flags &amp; SKBTX_HW_TSTAMP) &amp;&amp;
  		     priv-&gt;hwts_tx_en)) {
-@@ -2981,7 +2978,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2993,7 +2990,7 @@ static netdev_tx_t stmmac_xmit(struct sk
  
  	/* Manage oversized TCP frames for GMAC4 device */
  	if (skb_is_gso(skb) &amp;&amp; priv-&gt;tso) {
@@ -1510,7 +1510,7 @@
  			return stmmac_tso_xmit(skb, dev);
  	}
  
-@@ -3112,8 +3109,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -3124,8 +3121,7 @@ static netdev_tx_t stmmac_xmit(struct sk
  		priv-&gt;xstats.tx_set_ic_bit++;
  	}
  
@@ -1520,7 +1520,7 @@
  
  	/* Ready to fill the first descriptor and set the OWN bit w/o any
  	 * problems because all the descriptors are actually ready to be
-@@ -3990,7 +3986,9 @@ static int stmmac_hw_init(struct stmmac_
+@@ -4002,7 +3998,9 @@ static int stmmac_hw_init(struct stmmac_
  	struct mac_device_info *mac;
  
  	/* Identify the MAC HW device */
@@ -1531,7 +1531,7 @@
  		priv-&gt;dev-&gt;priv_flags |= IFF_UNICAST_FLT;
  		mac = dwmac1000_setup(priv-&gt;ioaddr,
  				      priv-&gt;plat-&gt;multicast_filter_bins,
-@@ -4010,6 +4008,10 @@ static int stmmac_hw_init(struct stmmac_
+@@ -4022,6 +4020,10 @@ static int stmmac_hw_init(struct stmmac_
  
  	priv-&gt;hw = mac;
  
@@ -1542,7 +1542,7 @@
  	/* To use the chained or ring mode */
  	if (priv-&gt;synopsys_id &gt;= DWMAC_CORE_4_00) {
  		priv-&gt;hw-&gt;mode = &amp;dwmac4_ring_mode_ops;
-@@ -4138,8 +4140,15 @@ int stmmac_dvr_probe(struct device *devi
+@@ -4150,8 +4152,15 @@ int stmmac_dvr_probe(struct device *devi
  	if ((phyaddr &gt;= 0) &amp;&amp; (phyaddr &lt;= 31))
  		priv-&gt;plat-&gt;phy_addr = phyaddr;
  
@@ -1559,7 +1559,7 @@
  
  	/* Init MAC and get the capabilities */
  	ret = stmmac_hw_init(priv);
-@@ -4156,7 +4165,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -4168,7 +4177,7 @@ int stmmac_dvr_probe(struct device *devi
  			    NETIF_F_RXCSUM;
  
  	if ((priv-&gt;plat-&gt;tso_en) &amp;&amp; (priv-&gt;dma_cap.tsoen)) {
@@ -1568,7 +1568,7 @@
  		priv-&gt;tso = true;
  		dev_info(priv-&gt;device, &quot;TSO feature enabled\n&quot;);
  	}
-@@ -4318,7 +4327,7 @@ int stmmac_suspend(struct device *dev)
+@@ -4330,7 +4339,7 @@ int stmmac_suspend(struct device *dev)
  	}
  	spin_unlock_irqrestore(&amp;priv-&gt;lock, flags);
  
-- 
2.15.1 (Apple Git-101)


]