[LEDE-DEV] [PATCH] kernel: bump 4.9 to 4.9.61

Koen Vandeputte koen.vandeputte at ncentric.com
Fri Nov 10 03:07:26 PST 2017


Refreshed all patches.
Removed upstreamed parts (704-fsl-mc-layerscape-support.patch)
Fixed 1 hunk (419-net-mvneta-convert-to-phylink.patch)

Compile-tested: cns3xxx, imx6, mvebu, layerscape
Run-tested: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 include/kernel-version.mk                          |   4 +-
 .../450-gpio-nxp-74hc153-gpio-chip-driver.patch    |   2 +-
 .../452-gpio-add-gpio-latch-driver.patch           |   2 +-
 .../patches-4.9/950-0031-Add-dwc_otg-driver.patch  |   2 +-
 .../090-net-generalize-napi_complete_done.patch    |   6 +-
 .../hack-4.9/214-spidev_h_portability.patch        |   2 +-
 ...-support-limiting-4K-sectors-support-base.patch |   2 +-
 ...dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch |   2 +-
 ...entralize-net_device-min-max-MTU-checking.patch |  13 +-
 .../303-add-devm_alloc_percpu-support.patch        |  11 +-
 .../401-mtd-spi-nor-support-layerscape.patch       |   4 +-
 .../patches-4.9/601-net-readd-skb_recycle.patch    |  11 +-
 ...inux-core-export-copy_skb_header-function.patch |  13 +-
 ...date-the-xmit-timestamp-to-avoid-watchdog.patch |   9 +-
 .../704-fsl-mc-layerscape-support.patch            |  24 +-
 .../patches-4.9/817-usb-support-layerscape.patch   |   2 +-
 ...-soc-Introduce-soc_device_match-interface.patch |  21 +-
 .../120-net-mvneta-add-BQL-support.patch           |  16 +-
 .../300-mvneta-tx-queue-workaround.patch           |   4 +-
 .../419-net-mvneta-convert-to-phylink.patch        |  52 +--
 ...disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch |   8 +-
 .../422-net-mvneta-add-nway_reset-support.patch    |   4 +-
 ...neta-add-flow-control-support-via-phylink.patch |  10 +-
 ...a-enable-flow-control-for-PHY-connections.patch |   2 +-
 ...enable-flow-control-for-fixed-connections.patch |   4 +-
 .../patches-4.9/427-phylink-add-EEE-support.patch  |   2 +-
 .../428-net-mvneta-add-EEE-support.patch           |  22 +-
 ...-mvneta-add-module-EEPROM-reading-support.patch |   4 +-
 ...53-mtd-spi-nor-add-w25q256-3b-mode-switch.patch |   2 +-
 .../0054-mtd-add-chunked-read-io-to-m25p80.patch   |   2 +-
 .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch  | 386 +++++++++++----------
 ...Allow-building-and-running-on-older-hosts.patch |   2 +-
 .../x86/patches-4.9/100-fix_cs5535_clockevt.patch  |   2 +-
 33 files changed, 305 insertions(+), 347 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 2bddc87..fdf4ac7 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,11 +4,11 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .93
-LINUX_VERSION-4.9 = .58
+LINUX_VERSION-4.9 = .61
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.93 = ed349314f16e78a6571b5f8884f6452782aef6c26b81bcc7ccdac44ecd917c36
-LINUX_KERNEL_HASH-4.9.58 = 748f12a28689644b6a9102c67f8fa7938ca73823a949ba6f65024aecf2f221a7
+LINUX_KERNEL_HASH-4.9.61 = e0239675728ef0c3697d4b651a1d1a1dd7b2920ed2c5f05a23a23d4aa726d19e
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch b/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch
index 41cf75a..7ffdc76 100644
--- a/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch
+++ b/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1211,4 +1211,12 @@ config GPIO_VIPERBOARD
+@@ -1213,4 +1213,12 @@ config GPIO_VIPERBOARD
  
  endmenu
  
diff --git a/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch b/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch
index 5ddf6de..a56226f 100644
--- a/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch
+++ b/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1218,4 +1218,9 @@ config GPIO_NXP_74HC153
+@@ -1220,4 +1220,9 @@ config GPIO_NXP_74HC153
  	  Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This
  	  provides a GPIO interface supporting input mode only.
  
diff --git a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
index 1932e30..c3862fc 100644
--- a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
+++ b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
@@ -696,7 +696,7 @@ Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5042,7 +5042,7 @@ static void port_event(struct usb_hub *h
+@@ -5045,7 +5045,7 @@ static void port_event(struct usb_hub *h
  	if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
  		u16 status = 0, unused;
  
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 d7b7b48..d234651 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
@@ -399,7 +399,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			/* bnx2x_has_rx_work() reads the status block,
 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
 +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
-@@ -1768,7 +1768,7 @@ static int bnxt_poll_nitroa0(struct napi
+@@ -1774,7 +1774,7 @@ static int bnxt_poll_nitroa0(struct napi
  	}
  
  	if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) {
@@ -803,7 +803,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -2696,11 +2696,9 @@ static int mvneta_poll(struct napi_struc
+@@ -2697,11 +2697,9 @@ static int mvneta_poll(struct napi_struc
  			rx_done = mvneta_rx_swbm(pp, budget, &pp->rxqs[rx_queue]);
  	}
  
@@ -1346,7 +1346,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/wireless/ath/ath10k/pci.c
 +++ b/drivers/net/wireless/ath/ath10k/pci.c
-@@ -2800,7 +2800,7 @@ static int ath10k_pci_napi_poll(struct n
+@@ -2804,7 +2804,7 @@ static int ath10k_pci_napi_poll(struct n
  	done = ath10k_htt_txrx_compl_task(ar, budget);
  
  	if (done < budget) {
diff --git a/target/linux/generic/hack-4.9/214-spidev_h_portability.patch b/target/linux/generic/hack-4.9/214-spidev_h_portability.patch
index 23914d6..ad4706c 100644
--- a/target/linux/generic/hack-4.9/214-spidev_h_portability.patch
+++ b/target/linux/generic/hack-4.9/214-spidev_h_portability.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/uapi/linux/spi/spidev.h
 +++ b/include/uapi/linux/spi/spidev.h
-@@ -111,7 +111,7 @@ struct spi_ioc_transfer {
+@@ -112,7 +112,7 @@ struct spi_ioc_transfer {
  
  /* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
  #define SPI_MSGSIZE(N) \
diff --git a/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch b/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
index e1c1de3..1c5b9c3 100644
--- a/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
+++ b/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
@@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	depends on ARCH_AT91 || (ARM && COMPILE_TEST)
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1642,10 +1642,12 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1640,10 +1640,12 @@ int spi_nor_scan(struct spi_nor *nor, co
  
  #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
  	/* prefer "small sector" erase if possible */
diff --git a/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch b/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch
index a7717a6..f2de6d6 100644
--- a/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch
+++ b/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi
-@@ -40,7 +40,7 @@
+@@ -38,7 +38,7 @@
  			clock-frequency = <48000000>;
  		};
  
diff --git a/target/linux/layerscape/patches-4.9/001-net-centralize-net_device-min-max-MTU-checking.patch b/target/linux/layerscape/patches-4.9/001-net-centralize-net_device-min-max-MTU-checking.patch
index fcabb62..104ecda 100644
--- a/target/linux/layerscape/patches-4.9/001-net-centralize-net_device-min-max-MTU-checking.patch
+++ b/target/linux/layerscape/patches-4.9/001-net-centralize-net_device-min-max-MTU-checking.patch
@@ -26,11 +26,9 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  net/core/dev.c            | 13 +++++++++++--
  2 files changed, 15 insertions(+), 2 deletions(-)
 
-diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
-index 780e7171f548..2082b7d02a77 100644
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1507,6 +1507,8 @@ enum netdev_priv_flags {
+@@ -1509,6 +1509,8 @@ enum netdev_priv_flags {
   *	@if_port:	Selectable AUI, TP, ...
   *	@dma:		DMA channel
   *	@mtu:		Interface MTU value
@@ -39,7 +37,7 @@ index 780e7171f548..2082b7d02a77 100644
   *	@type:		Interface hardware type
   *	@hard_header_len: Maximum hardware header length.
   *	@min_header_len:  Minimum hardware header length
-@@ -1728,6 +1730,8 @@ struct net_device {
+@@ -1735,6 +1737,8 @@ struct net_device {
  	unsigned char		dma;
  
  	unsigned int		mtu;
@@ -48,11 +46,9 @@ index 780e7171f548..2082b7d02a77 100644
  	unsigned short		type;
  	unsigned short		hard_header_len;
  	unsigned short		min_header_len;
-diff --git a/net/core/dev.c b/net/core/dev.c
-index 2e04fd188081..c7ec56e8659a 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -6524,9 +6524,18 @@ int dev_set_mtu(struct net_device *dev, int new_mtu)
+@@ -6603,9 +6603,18 @@ int dev_set_mtu(struct net_device *dev,
  	if (new_mtu == dev->mtu)
  		return 0;
  
@@ -73,6 +69,3 @@ index 2e04fd188081..c7ec56e8659a 100644
  
  	if (!netif_device_present(dev))
  		return -ENODEV;
--- 
-2.11.1
-
diff --git a/target/linux/layerscape/patches-4.9/303-add-devm_alloc_percpu-support.patch b/target/linux/layerscape/patches-4.9/303-add-devm_alloc_percpu-support.patch
index a8573cc..2eb7cf6 100644
--- a/target/linux/layerscape/patches-4.9/303-add-devm_alloc_percpu-support.patch
+++ b/target/linux/layerscape/patches-4.9/303-add-devm_alloc_percpu-support.patch
@@ -9,8 +9,6 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  include/linux/device.h | 19 +++++++++++++++
  2 files changed, 85 insertions(+)
 
-diff --git a/drivers/base/devres.c b/drivers/base/devres.c
-index 8fc654f0807b..71d577025285 100644
 --- a/drivers/base/devres.c
 +++ b/drivers/base/devres.c
 @@ -10,6 +10,7 @@
@@ -21,7 +19,7 @@ index 8fc654f0807b..71d577025285 100644
  
  #include "base.h"
  
-@@ -985,3 +986,68 @@ void devm_free_pages(struct device *dev, unsigned long addr)
+@@ -985,3 +986,68 @@ void devm_free_pages(struct device *dev,
  			       &devres));
  }
  EXPORT_SYMBOL_GPL(devm_free_pages);
@@ -90,11 +88,9 @@ index 8fc654f0807b..71d577025285 100644
 +			       (void *)pdata));
 +}
 +EXPORT_SYMBOL_GPL(devm_free_percpu);
-diff --git a/include/linux/device.h b/include/linux/device.h
-index bc41e87a969b..0a2135cbddc9 100644
 --- a/include/linux/device.h
 +++ b/include/linux/device.h
-@@ -686,6 +686,25 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
+@@ -688,6 +688,25 @@ void __iomem *devm_ioremap_resource(stru
  int devm_add_action(struct device *dev, void (*action)(void *), void *data);
  void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
  
@@ -120,6 +116,3 @@ index bc41e87a969b..0a2135cbddc9 100644
  static inline int devm_add_action_or_reset(struct device *dev,
  					   void (*action)(void *), void *data)
  {
--- 
-2.11.1
-
diff --git a/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch b/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch
index 445a6fa..1386925 100644
--- a/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch
@@ -935,7 +935,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  
  #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
  	/* prefer "small sector" erase if possible */
-@@ -1676,9 +1783,15 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1678,9 +1785,15 @@ int spi_nor_scan(struct spi_nor *nor, co
  	/* Some devices cannot do fast-read, no matter what DT tells us */
  	if (info->flags & SPI_NOR_NO_FR)
  		nor->flash_read = SPI_NOR_NORMAL;
@@ -954,7 +954,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  		ret = set_quad_mode(nor, info);
  		if (ret) {
  			dev_err(dev, "quad mode not supported\n");
-@@ -1691,6 +1804,9 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1693,6 +1806,9 @@ int spi_nor_scan(struct spi_nor *nor, co
  
  	/* Default commands */
  	switch (nor->flash_read) {
diff --git a/target/linux/layerscape/patches-4.9/601-net-readd-skb_recycle.patch b/target/linux/layerscape/patches-4.9/601-net-readd-skb_recycle.patch
index 08aa2a0..105866e 100644
--- a/target/linux/layerscape/patches-4.9/601-net-readd-skb_recycle.patch
+++ b/target/linux/layerscape/patches-4.9/601-net-readd-skb_recycle.patch
@@ -12,11 +12,9 @@ Signed-off-by: Madalin Bucur <madalin.bucur at freescale.com>
  net/core/skbuff.c      | 26 ++++++++++++++++++++++++++
  2 files changed, 27 insertions(+)
 
-diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 32810f279f8e..a52a6fb0ac2e 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -902,6 +902,7 @@ void kfree_skb(struct sk_buff *skb);
+@@ -903,6 +903,7 @@ void kfree_skb(struct sk_buff *skb);
  void kfree_skb_list(struct sk_buff *segs);
  void skb_tx_error(struct sk_buff *skb);
  void consume_skb(struct sk_buff *skb);
@@ -24,11 +22,9 @@ index 32810f279f8e..a52a6fb0ac2e 100644
  void  __kfree_skb(struct sk_buff *skb);
  extern struct kmem_cache *skbuff_head_cache;
  
-diff --git a/net/core/skbuff.c b/net/core/skbuff.c
-index fe008f1bd930..ab1038083df2 100644
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
-@@ -825,6 +825,32 @@ void napi_consume_skb(struct sk_buff *skb, int budget)
+@@ -842,6 +842,32 @@ void napi_consume_skb(struct sk_buff *sk
  }
  EXPORT_SYMBOL(napi_consume_skb);
  
@@ -61,6 +57,3 @@ index fe008f1bd930..ab1038083df2 100644
  /* Make sure a field is enclosed inside headers_start/headers_end section */
  #define CHECK_SKB_FIELD(field) \
  	BUILD_BUG_ON(offsetof(struct sk_buff, field) <		\
--- 
-2.11.1
-
diff --git a/target/linux/layerscape/patches-4.9/602-linux-core-export-copy_skb_header-function.patch b/target/linux/layerscape/patches-4.9/602-linux-core-export-copy_skb_header-function.patch
index 1244675..b00b7aa 100644
--- a/target/linux/layerscape/patches-4.9/602-linux-core-export-copy_skb_header-function.patch
+++ b/target/linux/layerscape/patches-4.9/602-linux-core-export-copy_skb_header-function.patch
@@ -9,11 +9,9 @@ Signed-off-by: Camelia Groza camelia.groza at nxp.com
  net/core/skbuff.c      | 3 ++-
  2 files changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index a52a6fb0ac2e..a0385f9bdd4e 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3063,6 +3063,7 @@ static inline void skb_free_datagram_locked(struct sock *sk,
+@@ -3058,6 +3058,7 @@ static inline void skb_free_datagram_loc
  }
  int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
  int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
@@ -21,11 +19,9 @@ index a52a6fb0ac2e..a0385f9bdd4e 100644
  int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
  __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to,
  			      int len, __wsum csum);
-diff --git a/net/core/skbuff.c b/net/core/skbuff.c
-index ab1038083df2..2684c49b9805 100644
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
-@@ -1082,7 +1082,7 @@ static void skb_headers_offset_update(struct sk_buff *skb, int off)
+@@ -1099,7 +1099,7 @@ static void skb_headers_offset_update(st
  	skb->inner_mac_header += off;
  }
  
@@ -34,7 +30,7 @@ index ab1038083df2..2684c49b9805 100644
  {
  	__copy_skb_header(new, old);
  
-@@ -1090,6 +1090,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
+@@ -1107,6 +1107,7 @@ static void copy_skb_header(struct sk_bu
  	skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs;
  	skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type;
  }
@@ -42,6 +38,3 @@ index ab1038083df2..2684c49b9805 100644
  
  static inline int skb_alloc_rx_flag(const struct sk_buff *skb)
  {
--- 
-2.11.1
-
diff --git a/target/linux/layerscape/patches-4.9/603-sdk_dpaa-update-the-xmit-timestamp-to-avoid-watchdog.patch b/target/linux/layerscape/patches-4.9/603-sdk_dpaa-update-the-xmit-timestamp-to-avoid-watchdog.patch
index a9a4596..0d3b9d6 100644
--- a/target/linux/layerscape/patches-4.9/603-sdk_dpaa-update-the-xmit-timestamp-to-avoid-watchdog.patch
+++ b/target/linux/layerscape/patches-4.9/603-sdk_dpaa-update-the-xmit-timestamp-to-avoid-watchdog.patch
@@ -17,8 +17,6 @@ Signed-off-by: Camelia Groza <camelia.groza at nxp.com>
  net/sched/sch_generic.c         | 7 +++++++
  2 files changed, 9 insertions(+)
 
-diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
-index 9c6c8ef2e9e7..90b4107ebeff 100644
 --- a/include/linux/netdev_features.h
 +++ b/include/linux/netdev_features.h
 @@ -74,6 +74,7 @@ enum {
@@ -37,11 +35,9 @@ index 9c6c8ef2e9e7..90b4107ebeff 100644
  
  #define for_each_netdev_feature(mask_addr, bit)	\
  	for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT)
-diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
-index 6cfb6e9038c2..3fab16cb7c58 100644
 --- a/net/sched/sch_generic.c
 +++ b/net/sched/sch_generic.c
-@@ -309,6 +309,13 @@ static void dev_watchdog(unsigned long arg)
+@@ -309,6 +309,13 @@ static void dev_watchdog(unsigned long a
  					txq->trans_timeout++;
  					break;
  				}
@@ -55,6 +51,3 @@ index 6cfb6e9038c2..3fab16cb7c58 100644
  			}
  
  			if (some_queue_timedout) {
--- 
-2.11.1
-
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 2927c7e..5307d33 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
@@ -8354,14 +8354,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
   * Author: German Rivera <German.Rivera at freescale.com>
   *
   * This file is licensed under the terms of the GNU General Public
-@@ -17,6 +17,7 @@
- #include <linux/irqdomain.h>
- #include <linux/msi.h>
- #include "../include/mc-bus.h"
-+#include "fsl-mc-private.h"
- 
- /*
-  * Generate a unique ID identifying the interrupt (only used within the MSI
 --- a/drivers/staging/fsl-mc/bus/fsl-mc-private.h
 +++ b/drivers/staging/fsl-mc/bus/fsl-mc-private.h
 @@ -10,13 +10,15 @@
@@ -8393,19 +8385,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
   * Author: German Rivera <German.Rivera at freescale.com>
   *
   * This file is licensed under the terms of the GNU General Public
-@@ -17,9 +17,10 @@
- #include <linux/of.h>
- #include <linux/of_irq.h>
- #include "../include/mc-bus.h"
-+#include "fsl-mc-private.h"
- 
- static struct irq_chip its_msi_irq_chip = {
--	.name = "fsl-mc-bus-msi",
-+	.name = "ITS-fMSI",
- 	.irq_mask = irq_chip_mask_parent,
- 	.irq_unmask = irq_chip_unmask_parent,
- 	.irq_eoi = irq_chip_eoi_parent,
-@@ -51,7 +52,7 @@ static int its_fsl_mc_msi_prepare(struct
+@@ -52,7 +52,7 @@ static int its_fsl_mc_msi_prepare(struct
  	return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info);
  }
  
@@ -8414,7 +8394,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  	.msi_prepare = its_fsl_mc_msi_prepare,
  };
  
-@@ -94,8 +95,8 @@ int __init its_fsl_mc_msi_init(void)
+@@ -95,8 +95,8 @@ int __init its_fsl_mc_msi_init(void)
  			continue;
  		}
  
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 147b03a..cd724cb 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
@@ -95,7 +95,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  	int ret;
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -4412,6 +4412,14 @@ hub_port_init(struct usb_hub *hub, struc
+@@ -4415,6 +4415,14 @@ hub_port_init(struct usb_hub *hub, struc
  	else
  		speed = usb_speed_string(udev->speed);
  
diff --git a/target/linux/layerscape/patches-4.9/820-base-soc-Introduce-soc_device_match-interface.patch b/target/linux/layerscape/patches-4.9/820-base-soc-Introduce-soc_device_match-interface.patch
index ec9e261..e277e30 100644
--- a/target/linux/layerscape/patches-4.9/820-base-soc-Introduce-soc_device_match-interface.patch
+++ b/target/linux/layerscape/patches-4.9/820-base-soc-Introduce-soc_device_match-interface.patch
@@ -45,20 +45,16 @@ Acked-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  include/linux/sys_soc.h |  3 +++
  3 files changed, 70 insertions(+)
 
-diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
-index fdf44cac08e6..991b21e1f89b 100644
 --- a/drivers/base/Kconfig
 +++ b/drivers/base/Kconfig
-@@ -235,6 +235,7 @@ config GENERIC_CPU_AUTOPROBE
+@@ -234,6 +234,7 @@ config GENERIC_CPU_DEVICES
  
- config SOC_BUS
+ config GENERIC_CPU_AUTOPROBE
  	bool
 +	select GLOB
  
- source "drivers/base/regmap/Kconfig"
- 
-diff --git a/drivers/base/soc.c b/drivers/base/soc.c
-index 028cef377fd4..04ee597fc3a3 100644
+ config SOC_BUS
+ 	bool
 --- a/drivers/base/soc.c
 +++ b/drivers/base/soc.c
 @@ -13,6 +13,7 @@
@@ -69,7 +65,7 @@ index 028cef377fd4..04ee597fc3a3 100644
  
  static DEFINE_IDA(soc_ida);
  
-@@ -168,3 +169,68 @@ static int __init soc_bus_register(void)
+@@ -159,3 +160,68 @@ static int __init soc_bus_register(void)
  	return bus_register(&soc_bus_type);
  }
  core_initcall(soc_bus_register);
@@ -138,8 +134,6 @@ index 028cef377fd4..04ee597fc3a3 100644
 +	return NULL;
 +}
 +EXPORT_SYMBOL_GPL(soc_device_match);
-diff --git a/include/linux/sys_soc.h b/include/linux/sys_soc.h
-index 2739ccb69571..9f5eb06f9fd8 100644
 --- a/include/linux/sys_soc.h
 +++ b/include/linux/sys_soc.h
 @@ -13,6 +13,7 @@ struct soc_device_attribute {
@@ -150,13 +144,10 @@ index 2739ccb69571..9f5eb06f9fd8 100644
  };
  
  /**
-@@ -34,4 +35,6 @@ void soc_device_unregister(struct soc_device *soc_dev);
+@@ -34,4 +35,6 @@ void soc_device_unregister(struct soc_de
   */
  struct device *soc_device_to_device(struct soc_device *soc);
  
 +const struct soc_device_attribute *soc_device_match(
 +	const struct soc_device_attribute *matches);
  #endif /* __SOC_BUS_H */
--- 
-2.11.1
-
diff --git a/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch b/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch
index 5fedc8e..dba8f27 100644
--- a/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch
+++ b/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -1719,8 +1719,10 @@ static struct mvneta_tx_queue *mvneta_tx
+@@ -1720,8 +1720,10 @@ static struct mvneta_tx_queue *mvneta_tx
  
  /* Free tx queue skbuffs */
  static void mvneta_txq_bufs_free(struct mvneta_port *pp,
@@ -12,7 +12,7 @@
  	int i;
  
  	for (i = 0; i < num; i++) {
-@@ -1728,6 +1730,11 @@ static void mvneta_txq_bufs_free(struct
+@@ -1729,6 +1731,11 @@ static void mvneta_txq_bufs_free(struct
  			txq->txq_get_index;
  		struct sk_buff *skb = txq->tx_skb[txq->txq_get_index];
  
@@ -24,7 +24,7 @@
  		mvneta_txq_inc_get(txq);
  
  		if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr))
-@@ -1738,6 +1745,8 @@ static void mvneta_txq_bufs_free(struct
+@@ -1739,6 +1746,8 @@ static void mvneta_txq_bufs_free(struct
  			continue;
  		dev_kfree_skb_any(skb);
  	}
@@ -33,7 +33,7 @@
  }
  
  /* Handle end of transmission */
-@@ -1751,7 +1760,7 @@ static void mvneta_txq_done(struct mvnet
+@@ -1752,7 +1761,7 @@ static void mvneta_txq_done(struct mvnet
  	if (!tx_done)
  		return;
  
@@ -42,7 +42,7 @@
  
  	txq->count -= tx_done;
  
-@@ -2358,6 +2367,8 @@ out:
+@@ -2359,6 +2368,8 @@ out:
  		struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats);
  		struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id);
  
@@ -51,7 +51,7 @@
  		txq->count += frags;
  		mvneta_txq_pend_desc_add(pp, txq, frags);
  
-@@ -2382,9 +2393,10 @@ static void mvneta_txq_done_force(struct
+@@ -2383,9 +2394,10 @@ static void mvneta_txq_done_force(struct
  				  struct mvneta_tx_queue *txq)
  
  {
@@ -63,7 +63,7 @@
  
  	/* reset txq */
  	txq->count = 0;
-@@ -2880,6 +2892,8 @@ static int mvneta_txq_init(struct mvneta
+@@ -2881,6 +2893,8 @@ static int mvneta_txq_init(struct mvneta
  static void mvneta_txq_deinit(struct mvneta_port *pp,
  			      struct mvneta_tx_queue *txq)
  {
@@ -72,7 +72,7 @@
  	kfree(txq->tx_skb);
  
  	if (txq->tso_hdrs)
-@@ -2891,6 +2905,8 @@ static void mvneta_txq_deinit(struct mvn
+@@ -2892,6 +2906,8 @@ static void mvneta_txq_deinit(struct mvn
  				  txq->size * MVNETA_DESC_ALIGNED_SIZE,
  				  txq->descs, txq->descs_phys);
  
diff --git a/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch
index 2582a41..2601d92 100644
--- a/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch
+++ b/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3833,6 +3833,16 @@ static int mvneta_ethtool_get_rxfh(struc
+@@ -3834,6 +3834,16 @@ static int mvneta_ethtool_get_rxfh(struc
  	return 0;
  }
  
@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static const struct net_device_ops mvneta_netdev_ops = {
  	.ndo_open            = mvneta_open,
  	.ndo_stop            = mvneta_stop,
-@@ -3843,6 +3853,7 @@ static const struct net_device_ops mvnet
+@@ -3844,6 +3854,7 @@ static const struct net_device_ops mvnet
  	.ndo_fix_features    = mvneta_fix_features,
  	.ndo_get_stats64     = mvneta_get_stats64,
  	.ndo_do_ioctl        = mvneta_ioctl,
diff --git a/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch b/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch
index bc8d5fd..8084a17 100644
--- a/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch
+++ b/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch
@@ -21,15 +21,15 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	  Marvell ARMADA XP, ARMADA 370 and ARMADA 38x SoC family.
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -28,6 +28,7 @@
- #include <linux/of_mdio.h>
+@@ -29,6 +29,7 @@
  #include <linux/of_net.h>
  #include <linux/phy.h>
+ #include <linux/phy_fixed.h>
 +#include <linux/phylink.h>
  #include <linux/platform_device.h>
  #include <linux/skbuff.h>
  #include <net/hwbm.h>
-@@ -188,6 +189,7 @@
+@@ -189,6 +190,7 @@
  #define MVNETA_GMAC_CTRL_0                       0x2c00
  #define      MVNETA_GMAC_MAX_RX_SIZE_SHIFT       2
  #define      MVNETA_GMAC_MAX_RX_SIZE_MASK        0x7ffc
@@ -37,7 +37,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  #define      MVNETA_GMAC0_PORT_ENABLE            BIT(0)
  #define MVNETA_GMAC_CTRL_2                       0x2c08
  #define      MVNETA_GMAC2_INBAND_AN_ENABLE       BIT(0)
-@@ -203,13 +205,19 @@
+@@ -204,13 +206,19 @@
  #define      MVNETA_GMAC_TX_FLOW_CTRL_ENABLE     BIT(5)
  #define      MVNETA_GMAC_RX_FLOW_CTRL_ACTIVE     BIT(6)
  #define      MVNETA_GMAC_TX_FLOW_CTRL_ACTIVE     BIT(7)
@@ -57,7 +57,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  #define      MVNETA_GMAC_AN_FLOW_CTRL_EN         BIT(11)
  #define      MVNETA_GMAC_CONFIG_FULL_DUPLEX      BIT(12)
  #define      MVNETA_GMAC_AN_DUPLEX_EN            BIT(13)
-@@ -399,14 +407,9 @@ struct mvneta_port {
+@@ -400,14 +408,9 @@ struct mvneta_port {
  	u16 tx_ring_size;
  	u16 rx_ring_size;
  
@@ -74,7 +74,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  
  	struct mvneta_bm *bm_priv;
  	struct mvneta_bm_pool *pool_long;
-@@ -1240,44 +1243,6 @@ static void mvneta_set_other_mcast_table
+@@ -1241,44 +1244,6 @@ static void mvneta_set_other_mcast_table
  		mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val);
  }
  
@@ -119,7 +119,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  static void mvneta_percpu_unmask_interrupt(void *arg)
  {
  	struct mvneta_port *pp = arg;
-@@ -1425,7 +1390,6 @@ static void mvneta_defaults_set(struct m
+@@ -1426,7 +1391,6 @@ static void mvneta_defaults_set(struct m
  	val &= ~MVNETA_PHY_POLLING_ENABLE;
  	mvreg_write(pp, MVNETA_UNIT_CONTROL, val);
  
@@ -127,7 +127,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	mvneta_set_ucast_table(pp, -1);
  	mvneta_set_special_mcast_table(pp, -1);
  	mvneta_set_other_mcast_table(pp, -1);
-@@ -2630,26 +2594,11 @@ static irqreturn_t mvneta_isr(int irq, v
+@@ -2631,26 +2595,11 @@ static irqreturn_t mvneta_isr(int irq, v
  	return IRQ_HANDLED;
  }
  
@@ -156,7 +156,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  }
  
  /* NAPI handler
-@@ -2665,7 +2614,6 @@ static int mvneta_poll(struct napi_struc
+@@ -2666,7 +2615,6 @@ static int mvneta_poll(struct napi_struc
  	u32 cause_rx_tx;
  	int rx_queue;
  	struct mvneta_port *pp = netdev_priv(napi->dev);
@@ -164,7 +164,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports);
  
  	if (!netif_running(pp->dev)) {
-@@ -2679,12 +2627,11 @@ static int mvneta_poll(struct napi_struc
+@@ -2680,12 +2628,11 @@ static int mvneta_poll(struct napi_struc
  		u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE);
  
  		mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0);
@@ -182,7 +182,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	}
  
  	/* Release Tx descriptors */
-@@ -2980,7 +2927,6 @@ static int mvneta_setup_txqs(struct mvne
+@@ -2981,7 +2928,6 @@ static int mvneta_setup_txqs(struct mvne
  static void mvneta_start_dev(struct mvneta_port *pp)
  {
  	int cpu;
@@ -190,7 +190,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  
  	mvneta_max_rx_size_set(pp, pp->pkt_size);
  	mvneta_txq_max_tx_size_set(pp, pp->pkt_size);
-@@ -3003,16 +2949,15 @@ static void mvneta_start_dev(struct mvne
+@@ -3004,16 +2950,15 @@ static void mvneta_start_dev(struct mvne
  		    MVNETA_CAUSE_LINK_CHANGE |
  		    MVNETA_CAUSE_PSC_SYNC_CHANGE);
  
@@ -209,7 +209,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  
  	for_each_online_cpu(cpu) {
  		struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
-@@ -3182,99 +3127,210 @@ static int mvneta_set_mac_addr(struct ne
+@@ -3183,99 +3128,210 @@ static int mvneta_set_mac_addr(struct ne
  	return 0;
  }
  
@@ -490,7 +490,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  }
  
  /* Electing a CPU must be done in an atomic way: it should be done
-@@ -3532,10 +3588,9 @@ static int mvneta_stop(struct net_device
+@@ -3533,10 +3589,9 @@ static int mvneta_stop(struct net_device
  
  static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  {
@@ -503,7 +503,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  }
  
  /* Ethtool methods */
-@@ -3546,44 +3601,18 @@ mvneta_ethtool_set_link_ksettings(struct
+@@ -3547,44 +3602,18 @@ mvneta_ethtool_set_link_ksettings(struct
  				  const struct ethtool_link_ksettings *cmd)
  {
  	struct mvneta_port *pp = netdev_priv(ndev);
@@ -557,7 +557,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  }
  
  /* Set interrupt coalescing for ethtools */
-@@ -3691,26 +3720,28 @@ static void mvneta_ethtool_update_stats(
+@@ -3692,26 +3721,28 @@ static void mvneta_ethtool_update_stats(
  {
  	const struct mvneta_statistic *s;
  	void __iomem *base = pp->base;
@@ -591,7 +591,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	}
  }
  
-@@ -3870,7 +3901,7 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -3871,7 +3902,7 @@ const struct ethtool_ops mvneta_eth_tool
  	.get_rxnfc	= mvneta_ethtool_get_rxnfc,
  	.get_rxfh	= mvneta_ethtool_get_rxfh,
  	.set_rxfh	= mvneta_ethtool_set_rxfh,
@@ -600,7 +600,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	.set_link_ksettings = mvneta_ethtool_set_link_ksettings,
  };
  
-@@ -3997,14 +4028,13 @@ static int mvneta_probe(struct platform_
+@@ -3998,14 +4029,13 @@ static int mvneta_probe(struct platform_
  	const struct mbus_dram_target_info *dram_target_info;
  	struct resource *res;
  	struct device_node *dn = pdev->dev.of_node;
@@ -616,7 +616,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	int tx_csum_limit;
  	int phy_mode;
  	int err;
-@@ -4020,31 +4050,11 @@ static int mvneta_probe(struct platform_
+@@ -4021,31 +4051,11 @@ static int mvneta_probe(struct platform_
  		goto err_free_netdev;
  	}
  
@@ -649,7 +649,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	}
  
  	dev->tx_queue_len = MVNETA_MAX_TXD;
-@@ -4055,12 +4065,7 @@ static int mvneta_probe(struct platform_
+@@ -4056,12 +4066,7 @@ static int mvneta_probe(struct platform_
  
  	pp = netdev_priv(dev);
  	spin_lock_init(&pp->lock);
@@ -663,7 +663,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  
  	pp->rxq_def = rxq_def;
  
-@@ -4071,7 +4076,7 @@ static int mvneta_probe(struct platform_
+@@ -4072,7 +4077,7 @@ static int mvneta_probe(struct platform_
  		pp->clk = devm_clk_get(&pdev->dev, NULL);
  	if (IS_ERR(pp->clk)) {
  		err = PTR_ERR(pp->clk);
@@ -672,7 +672,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	}
  
  	clk_prepare_enable(pp->clk);
-@@ -4179,6 +4184,14 @@ static int mvneta_probe(struct platform_
+@@ -4180,6 +4185,14 @@ static int mvneta_probe(struct platform_
  	dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
  	dev->gso_max_segs = MVNETA_MAX_TSO_SEGS;
  
@@ -687,7 +687,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	err = register_netdev(dev);
  	if (err < 0) {
  		dev_err(&pdev->dev, "failed to register\n");
-@@ -4190,14 +4203,6 @@ static int mvneta_probe(struct platform_
+@@ -4191,14 +4204,6 @@ static int mvneta_probe(struct platform_
  
  	platform_set_drvdata(pdev, pp->dev);
  
@@ -702,7 +702,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	return 0;
  
  err_netdev:
-@@ -4208,16 +4213,14 @@ err_netdev:
+@@ -4209,16 +4214,14 @@ err_netdev:
  				       1 << pp->id);
  	}
  err_free_stats:
@@ -721,7 +721,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  err_free_irq:
  	irq_dispose_mapping(dev->irq);
  err_free_netdev:
-@@ -4229,7 +4232,6 @@ err_free_netdev:
+@@ -4230,7 +4233,6 @@ err_free_netdev:
  static int mvneta_remove(struct platform_device *pdev)
  {
  	struct net_device  *dev = platform_get_drvdata(pdev);
@@ -729,7 +729,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	struct mvneta_port *pp = netdev_priv(dev);
  
  	unregister_netdev(dev);
-@@ -4237,10 +4239,8 @@ static int mvneta_remove(struct platform
+@@ -4238,10 +4240,8 @@ static int mvneta_remove(struct platform
  	clk_disable_unprepare(pp->clk);
  	free_percpu(pp->ports);
  	free_percpu(pp->stats);
diff --git a/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch b/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch
index 2558720..6d35b50 100644
--- a/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch
+++ b/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch
@@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -2629,9 +2629,11 @@ static int mvneta_poll(struct napi_struc
+@@ -2630,9 +2630,11 @@ static int mvneta_poll(struct napi_struc
  		mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0);
  
  		if (cause_misc & (MVNETA_CAUSE_PHY_STATUS_CHANGE |
@@ -26,7 +26,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	}
  
  	/* Release Tx descriptors */
-@@ -2946,8 +2948,7 @@ static void mvneta_start_dev(struct mvne
+@@ -2947,8 +2949,7 @@ static void mvneta_start_dev(struct mvne
  
  	mvreg_write(pp, MVNETA_INTR_MISC_MASK,
  		    MVNETA_CAUSE_PHY_STATUS_CHANGE |
@@ -36,7 +36,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  	phylink_start(pp->phylink);
  	netif_tx_start_all_queues(pp->dev);
-@@ -3438,8 +3439,7 @@ static int mvneta_cpu_online(unsigned in
+@@ -3439,8 +3440,7 @@ static int mvneta_cpu_online(unsigned in
  	on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
  	mvreg_write(pp, MVNETA_INTR_MISC_MASK,
  		    MVNETA_CAUSE_PHY_STATUS_CHANGE |
@@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	netif_tx_start_all_queues(pp->dev);
  	spin_unlock(&pp->lock);
  	return 0;
-@@ -3480,8 +3480,7 @@ static int mvneta_cpu_dead(unsigned int
+@@ -3481,8 +3481,7 @@ static int mvneta_cpu_dead(unsigned int
  	on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
  	mvreg_write(pp, MVNETA_INTR_MISC_MASK,
  		    MVNETA_CAUSE_PHY_STATUS_CHANGE |
diff --git a/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch b/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch
index 9a604eb..20c23ba 100644
--- a/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch
+++ b/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch
@@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3614,6 +3614,13 @@ mvneta_ethtool_get_link_ksettings(struct
+@@ -3615,6 +3615,13 @@ mvneta_ethtool_get_link_ksettings(struct
  	return phylink_ethtool_ksettings_get(pp->phylink, cmd);
  }
  
@@ -25,7 +25,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  /* Set interrupt coalescing for ethtools */
  static int mvneta_ethtool_set_coalesce(struct net_device *dev,
  				       struct ethtool_coalesce *c)
-@@ -3887,6 +3894,7 @@ static const struct net_device_ops mvnet
+@@ -3888,6 +3895,7 @@ static const struct net_device_ops mvnet
  };
  
  const struct ethtool_ops mvneta_eth_tool_ops = {
diff --git a/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch b/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch
index f10b57c..3f77895 100644
--- a/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch
+++ b/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch
@@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3178,6 +3178,12 @@ static int mvneta_mac_link_state(struct
+@@ -3179,6 +3179,12 @@ static int mvneta_mac_link_state(struct
  	state->link = !!(gmac_stat & MVNETA_GMAC_LINK_UP);
  	state->duplex = !!(gmac_stat & MVNETA_GMAC_FULL_DUPLEX);
  
@@ -24,7 +24,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	return 1;
  }
  
-@@ -3220,6 +3226,8 @@ static void mvneta_mac_config(struct net
+@@ -3221,6 +3227,8 @@ static void mvneta_mac_config(struct net
  
  	if (phylink_test(state->advertising, Pause))
  		new_an |= MVNETA_GMAC_ADVERT_SYM_FLOW_CTRL;
@@ -33,7 +33,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  
  	switch (mode) {
  	case MLO_AN_SGMII:
-@@ -3244,7 +3252,7 @@ static void mvneta_mac_config(struct net
+@@ -3245,7 +3253,7 @@ static void mvneta_mac_config(struct net
  			 /* The MAC only supports FD mode */
  			 MVNETA_GMAC_CONFIG_FULL_DUPLEX;
  
@@ -42,7 +42,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  			new_an |= MVNETA_GMAC_AN_FLOW_CTRL_EN;
  		break;
  
-@@ -3710,6 +3718,22 @@ static int mvneta_ethtool_set_ringparam(
+@@ -3711,6 +3719,22 @@ static int mvneta_ethtool_set_ringparam(
  	return 0;
  }
  
@@ -65,7 +65,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
  				       u8 *data)
  {
-@@ -3901,6 +3925,8 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -3902,6 +3926,8 @@ const struct ethtool_ops mvneta_eth_tool
  	.get_drvinfo    = mvneta_ethtool_get_drvinfo,
  	.get_ringparam  = mvneta_ethtool_get_ringparam,
  	.set_ringparam	= mvneta_ethtool_set_ringparam,
diff --git a/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch b/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch
index 29d45f9..f2d14af 100644
--- a/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch
+++ b/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch
@@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3152,10 +3152,11 @@ static void mvneta_validate_support(stru
+@@ -3153,10 +3153,11 @@ static void mvneta_validate_support(stru
  		phylink_set(mask, 10baseT_Full);
  		phylink_set(mask, 100baseT_Half);
  		phylink_set(mask, 100baseT_Full);
diff --git a/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch b/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch
index 60f549c..bac74ca 100644
--- a/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch
+++ b/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch
@@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3142,6 +3142,8 @@ static void mvneta_validate_support(stru
+@@ -3143,6 +3143,8 @@ static void mvneta_validate_support(stru
  	phylink_set(mask, BNC);
  	phylink_set(mask, Backplane);
  
@@ -20,7 +20,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	/* Half-duplex at speeds higher than 100Mbit is unsupported */
  	phylink_set(mask, 1000baseT_Full);
  	phylink_set(mask, 1000baseX_Full);
-@@ -3154,9 +3156,6 @@ static void mvneta_validate_support(stru
+@@ -3155,9 +3157,6 @@ static void mvneta_validate_support(stru
  		phylink_set(mask, 100baseT_Full);
  	}
  
diff --git a/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch b/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch
index 7678304..bc7e5ee 100644
--- a/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch
+++ b/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch
@@ -10,7 +10,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3304,7 +3304,8 @@ static void mvneta_mac_link_down(struct
+@@ -3305,7 +3305,8 @@ static void mvneta_mac_link_down(struct
  	}
  }
  
diff --git a/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch b/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch
index e1e11ee..3a20a06 100644
--- a/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch
+++ b/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch
@@ -13,7 +13,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -243,6 +243,12 @@
+@@ -244,6 +244,12 @@
  #define MVNETA_TXQ_TOKEN_SIZE_REG(q)             (0x3e40 + ((q) << 2))
  #define      MVNETA_TXQ_TOKEN_SIZE_MAX           0x7fffffff
  
@@ -26,7 +26,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  #define MVNETA_CAUSE_TXQ_SENT_DESC_ALL_MASK	 0xff
  
  /* Descriptor ring Macros */
-@@ -316,6 +322,11 @@
+@@ -317,6 +323,11 @@
  #define MVNETA_RX_GET_BM_POOL_ID(rxd) \
  	(((rxd)->status & MVNETA_RXD_BM_POOL_MASK) >> MVNETA_RXD_BM_POOL_SHIFT)
  
@@ -38,7 +38,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  struct mvneta_statistic {
  	unsigned short offset;
  	unsigned short type;
-@@ -324,6 +335,7 @@ struct mvneta_statistic {
+@@ -325,6 +336,7 @@ struct mvneta_statistic {
  
  #define T_REG_32	32
  #define T_REG_64	64
@@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  
  static const struct mvneta_statistic mvneta_statistics[] = {
  	{ 0x3000, T_REG_64, "good_octets_received", },
-@@ -358,6 +370,7 @@ static const struct mvneta_statistic mvn
+@@ -359,6 +371,7 @@ static const struct mvneta_statistic mvn
  	{ 0x304c, T_REG_32, "broadcast_frames_sent", },
  	{ 0x3054, T_REG_32, "fc_sent", },
  	{ 0x300c, T_REG_32, "internal_mac_transmit_err", },
@@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  };
  
  struct mvneta_pcpu_stats {
-@@ -416,6 +429,10 @@ struct mvneta_port {
+@@ -417,6 +430,10 @@ struct mvneta_port {
  	struct mvneta_bm_pool *pool_short;
  	int bm_win_id;
  
@@ -65,7 +65,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  	u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
  
  	u32 indir[MVNETA_RSS_LU_TABLE_SIZE];
-@@ -3289,6 +3306,18 @@ static void mvneta_mac_config(struct net
+@@ -3290,6 +3307,18 @@ static void mvneta_mac_config(struct net
  		mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, new_an);
  }
  
@@ -84,7 +84,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  static void mvneta_mac_link_down(struct net_device *ndev, unsigned int mode)
  {
  	struct mvneta_port *pp = netdev_priv(ndev);
-@@ -3302,6 +3331,9 @@ static void mvneta_mac_link_down(struct
+@@ -3303,6 +3332,9 @@ static void mvneta_mac_link_down(struct
  		val |= MVNETA_GMAC_FORCE_LINK_DOWN;
  		mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
  	}
@@ -94,7 +94,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  }
  
  static void mvneta_mac_link_up(struct net_device *ndev, unsigned int mode,
-@@ -3318,6 +3350,11 @@ static void mvneta_mac_link_up(struct ne
+@@ -3319,6 +3351,11 @@ static void mvneta_mac_link_up(struct ne
  	}
  
  	mvneta_port_up(pp);
@@ -106,7 +106,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  }
  
  static const struct phylink_mac_ops mvneta_phylink_ops = {
-@@ -3770,6 +3807,13 @@ static void mvneta_ethtool_update_stats(
+@@ -3771,6 +3808,13 @@ static void mvneta_ethtool_update_stats(
  			high = readl_relaxed(base + s->offset + 4);
  			val = (u64)high << 32 | low;
  			break;
@@ -120,7 +120,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  		}
  
  		pp->ethtool_stats[i] += val;
-@@ -3905,6 +3949,47 @@ static u16 mvneta_select_queue(struct ne
+@@ -3906,6 +3950,47 @@ static u16 mvneta_select_queue(struct ne
  }
  
  
@@ -168,7 +168,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  static const struct net_device_ops mvneta_netdev_ops = {
  	.ndo_open            = mvneta_open,
  	.ndo_stop            = mvneta_stop,
-@@ -3937,6 +4022,8 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -3938,6 +4023,8 @@ const struct ethtool_ops mvneta_eth_tool
  	.set_rxfh	= mvneta_ethtool_set_rxfh,
  	.get_link_ksettings = mvneta_ethtool_get_link_ksettings,
  	.set_link_ksettings = mvneta_ethtool_set_link_ksettings,
diff --git a/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch b/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch
index 1f35a18..834bbe9 100644
--- a/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch
+++ b/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch
@@ -7,7 +7,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
 
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3949,6 +3949,22 @@ static u16 mvneta_select_queue(struct ne
+@@ -3950,6 +3950,22 @@ static u16 mvneta_select_queue(struct ne
  }
  
  
@@ -30,7 +30,7 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
  static int mvneta_ethtool_get_eee(struct net_device *dev,
  				  struct ethtool_eee *eee)
  {
-@@ -4022,6 +4038,8 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -4023,6 +4039,8 @@ const struct ethtool_ops mvneta_eth_tool
  	.set_rxfh	= mvneta_ethtool_set_rxfh,
  	.get_link_ksettings = mvneta_ethtool_get_link_ksettings,
  	.set_link_ksettings = mvneta_ethtool_set_link_ksettings,
diff --git a/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch b/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
index e1e2bae..9d45ad0 100644
--- a/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
+++ b/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
@@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
  	return ret;
  }
-@@ -1715,8 +1787,10 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1717,8 +1789,10 @@ int spi_nor_scan(struct spi_nor *nor, co
  	else if (mtd->size > 0x1000000) {
  		/* enable 4-byte addressing if the device exceeds 16MiB */
  		nor->addr_width = 4;
diff --git a/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch b/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch
index 7f88ec5..0a429d2 100644
--- a/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch
+++ b/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch
@@ -83,7 +83,7 @@
  
  	if (info->flags & USE_FSR)
  		nor->flags |= SNOR_F_USE_FSR;
-@@ -1735,11 +1798,20 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1737,11 +1800,20 @@ int spi_nor_scan(struct spi_nor *nor, co
  	mtd->writebufsize = nor->page_size;
  
  	if (np) {
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 285e4d2..a5cdec5 100644
--- a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
+++ b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
@@ -2887,7 +2887,7 @@
 +
 +		/* Display RX ring */
 +		priv->hw->desc->display_ring(head_rx, DMA_RX_SIZE, true);
- 	}
++	}
 +}
 +
 +static void stmmac_display_tx_rings(struct stmmac_priv *priv)
@@ -2906,15 +2906,15 @@
 +			head_tx = (void *)tx_q->dma_etx;
 +		else
 +			head_tx = (void *)tx_q->dma_tx;
++
++		priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false);
+ 	}
++}
  
 -	/* Display Rx ring */
 -	priv->hw->desc->display_ring(head_rx, DMA_RX_SIZE, true);
 -	/* Display Tx ring */
 -	priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false);
-+		priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false);
-+	}
-+}
-+
 +static void stmmac_display_rings(struct stmmac_priv *priv)
 +{
 +	/* Display RX ring */
@@ -3131,7 +3131,7 @@
  
  	if (priv->hw->mode->set_16kib_bfsize)
  		bfsize = priv->hw->mode->set_16kib_bfsize(dev->mtu);
-@@ -1018,235 +1228,409 @@ static int init_dma_desc_rings(struct ne
+@@ -1018,257 +1228,516 @@ static int init_dma_desc_rings(struct ne
  
  	priv->dma_buf_sz = bfsize;
  
@@ -3163,7 +3163,10 @@
 +				p = &((rx_q->dma_erx + i)->basic);
 +			else
 +				p = rx_q->dma_rx + i;
-+
+ 
+-		ret = stmmac_init_rx_buffers(priv, p, i, flags);
+-		if (ret)
+-			goto err_init_rx_buffers;
 +			ret = stmmac_init_rx_buffers(priv, p, i, flags,
 +						     queue);
 +			if (ret)
@@ -3173,18 +3176,15 @@
 +				  rx_q->rx_skbuff[i], rx_q->rx_skbuff[i]->data,
 +				  (unsigned int)rx_q->rx_skbuff_dma[i]);
 +		}
- 
--		ret = stmmac_init_rx_buffers(priv, p, i, flags);
--		if (ret)
--			goto err_init_rx_buffers;
++
 +		rx_q->cur_rx = 0;
 +		rx_q->dirty_rx = (unsigned int)(i - DMA_RX_SIZE);
++
++		stmmac_clear_rx_descriptors(priv, queue);
  
 -		netif_dbg(priv, probe, priv->dev, "[%p]\t[%p]\t[%x]\n",
 -			  priv->rx_skbuff[i], priv->rx_skbuff[i]->data,
 -			  (unsigned int)priv->rx_skbuff_dma[i]);
-+		stmmac_clear_rx_descriptors(priv, queue);
-+
 +		/* Setup the chained descriptor addresses */
 +		if (priv->mode == STMMAC_CHAIN_MODE) {
 +			if (priv->extend_desc)
@@ -3277,8 +3277,13 @@
 +				priv->hw->mode->init(tx_q->dma_tx,
 +						     tx_q->dma_tx_phy,
 +						     DMA_TX_SIZE, 0);
-+		}
-+
+ 		}
+ 
+-		priv->tx_skbuff_dma[i].buf = 0;
+-		priv->tx_skbuff_dma[i].map_as_page = false;
+-		priv->tx_skbuff_dma[i].len = 0;
+-		priv->tx_skbuff_dma[i].last_segment = false;
+-		priv->tx_skbuff[i] = NULL;
 +		for (i = 0; i < DMA_TX_SIZE; i++) {
 +			struct dma_desc *p;
 +			if (priv->extend_desc)
@@ -3300,13 +3305,8 @@
 +			tx_q->tx_skbuff_dma[i].len = 0;
 +			tx_q->tx_skbuff_dma[i].last_segment = false;
 +			tx_q->tx_skbuff[i] = NULL;
- 		}
- 
--		priv->tx_skbuff_dma[i].buf = 0;
--		priv->tx_skbuff_dma[i].map_as_page = false;
--		priv->tx_skbuff_dma[i].len = 0;
--		priv->tx_skbuff_dma[i].last_segment = false;
--		priv->tx_skbuff[i] = NULL;
++		}
++
 +		tx_q->dirty_tx = 0;
 +		tx_q->cur_tx = 0;
 +
@@ -3387,17 +3387,10 @@
 -						 priv->tx_skbuff_dma[i].buf,
 -						 priv->tx_skbuff_dma[i].len,
 -						 DMA_TO_DEVICE);
--		}
 +	for (i = 0; i < DMA_TX_SIZE; i++)
 +		stmmac_free_tx_buffer(priv, queue, i);
 +}
- 
--		if (priv->tx_skbuff[i]) {
--			dev_kfree_skb_any(priv->tx_skbuff[i]);
--			priv->tx_skbuff[i] = NULL;
--			priv->tx_skbuff_dma[i].buf = 0;
--			priv->tx_skbuff_dma[i].map_as_page = false;
--		}
++
 +/**
 + * free_dma_rx_desc_resources - free RX dma desc resources
 + * @priv: private structure
@@ -3426,11 +3419,10 @@
 +
 +		kfree(rx_q->rx_skbuff_dma);
 +		kfree(rx_q->rx_skbuff);
- 	}
- }
- 
- /**
-- * alloc_dma_desc_resources - alloc TX/RX resources.
++	}
++}
++
++/**
 + * free_dma_tx_desc_resources - free TX dma desc resources
 + * @priv: private structure
 + */
@@ -3463,90 +3455,36 @@
 +
 +/**
 + * alloc_dma_rx_desc_resources - alloc RX resources.
-  * @priv: private structure
-  * Description: according to which descriptor can be used (extend or basic)
-  * this function allocates the resources for TX and RX paths. In case of
-  * reception, for example, it pre-allocated the RX socket buffer in order to
-  * allow zero-copy mechanism.
-  */
--static int alloc_dma_desc_resources(struct stmmac_priv *priv)
++ * @priv: private structure
++ * Description: according to which descriptor can be used (extend or basic)
++ * this function allocates the resources for TX and RX paths. In case of
++ * reception, for example, it pre-allocated the RX socket buffer in order to
++ * allow zero-copy mechanism.
++ */
 +static int alloc_dma_rx_desc_resources(struct stmmac_priv *priv)
- {
++{
 +	u32 rx_count = priv->plat->rx_queues_to_use;
- 	int ret = -ENOMEM;
++	int ret = -ENOMEM;
 +	u32 queue;
- 
--	priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
--					    GFP_KERNEL);
--	if (!priv->rx_skbuff_dma)
--		return -ENOMEM;
++
 +	/* RX queues buffers and DMA */
 +	for (queue = 0; queue < rx_count; queue++) {
 +		struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
- 
--	priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv->rx_skbuff)
--		goto err_rx_skbuff;
--
--	priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
--					    sizeof(*priv->tx_skbuff_dma),
--					    GFP_KERNEL);
--	if (!priv->tx_skbuff_dma)
--		goto err_tx_skbuff_dma;
--
--	priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv->tx_skbuff)
--		goto err_tx_skbuff;
--
--	if (priv->extend_desc) {
--		priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &priv->dma_rx_phy,
--						    GFP_KERNEL);
--		if (!priv->dma_erx)
--			goto err_dma;
++
 +		rx_q->queue_index = queue;
 +		rx_q->priv_data = priv;
- 
--		priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &priv->dma_tx_phy,
++
 +		rx_q->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE,
 +						    sizeof(dma_addr_t),
- 						    GFP_KERNEL);
--		if (!priv->dma_etx) {
--			dma_free_coherent(priv->device, DMA_RX_SIZE *
--					  sizeof(struct dma_extended_desc),
--					  priv->dma_erx, priv->dma_rx_phy);
--			goto err_dma;
--		}
--	} else {
--		priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
--						   sizeof(struct dma_desc),
--						   &priv->dma_rx_phy,
--						   GFP_KERNEL);
--		if (!priv->dma_rx)
--			goto err_dma;
++						    GFP_KERNEL);
 +		if (!rx_q->rx_skbuff_dma)
 +			return -ENOMEM;
- 
--		priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
--						   sizeof(struct dma_desc),
--						   &priv->dma_tx_phy,
--						   GFP_KERNEL);
--		if (!priv->dma_tx) {
--			dma_free_coherent(priv->device, DMA_RX_SIZE *
--					  sizeof(struct dma_desc),
--					  priv->dma_rx, priv->dma_rx_phy);
++
 +		rx_q->rx_skbuff = kmalloc_array(DMA_RX_SIZE,
 +						sizeof(struct sk_buff *),
 +						GFP_KERNEL);
 +		if (!rx_q->rx_skbuff)
- 			goto err_dma;
++			goto err_dma;
 +
 +		if (priv->extend_desc) {
 +			rx_q->dma_erx = dma_zalloc_coherent(priv->device,
@@ -3567,19 +3505,12 @@
 +							   GFP_KERNEL);
 +			if (!rx_q->dma_rx)
 +				goto err_dma;
- 		}
- 	}
- 
- 	return 0;
- 
- err_dma:
--	kfree(priv->tx_skbuff);
--err_tx_skbuff:
--	kfree(priv->tx_skbuff_dma);
--err_tx_skbuff_dma:
--	kfree(priv->rx_skbuff);
--err_rx_skbuff:
--	kfree(priv->rx_skbuff_dma);
++		}
++	}
++
++	return 0;
++
++err_dma:
 +	free_dma_rx_desc_resources(priv);
 +
 +	return ret;
@@ -3636,7 +3567,7 @@
 +							   GFP_KERNEL);
 +			if (!tx_q->dma_tx)
 +				goto err_dma_buffers;
-+		}
+ 		}
 +	}
 +
 +	return 0;
@@ -3644,9 +3575,9 @@
 +err_dma_buffers:
 +	free_dma_tx_desc_resources(priv);
 +
- 	return ret;
- }
- 
++	return ret;
++}
++
 +/**
 + * alloc_dma_desc_resources - alloc TX/RX resources.
 + * @priv: private structure
@@ -3672,78 +3603,119 @@
 + * free_dma_desc_resources - free dma desc resources
 + * @priv: private structure
 + */
- static void free_dma_desc_resources(struct stmmac_priv *priv)
- {
--	/* Release the DMA TX/RX socket buffers */
--	dma_free_rx_skbufs(priv);
--	dma_free_tx_skbufs(priv);
--
--	/* Free DMA regions of consistent memory previously allocated */
--	if (!priv->extend_desc) {
--		dma_free_coherent(priv->device,
--				  DMA_TX_SIZE * sizeof(struct dma_desc),
--				  priv->dma_tx, priv->dma_tx_phy);
--		dma_free_coherent(priv->device,
--				  DMA_RX_SIZE * sizeof(struct dma_desc),
--				  priv->dma_rx, priv->dma_rx_phy);
--	} else {
--		dma_free_coherent(priv->device, DMA_TX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv->dma_etx, priv->dma_tx_phy);
--		dma_free_coherent(priv->device, DMA_RX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv->dma_erx, priv->dma_rx_phy);
--	}
--	kfree(priv->rx_skbuff_dma);
--	kfree(priv->rx_skbuff);
--	kfree(priv->tx_skbuff_dma);
--	kfree(priv->tx_skbuff);
++static void free_dma_desc_resources(struct stmmac_priv *priv)
++{
 +	/* Release the DMA RX socket buffers */
 +	free_dma_rx_desc_resources(priv);
 +
 +	/* Release the DMA TX socket buffers */
 +	free_dma_tx_desc_resources(priv);
- }
- 
- /**
-@@ -1256,19 +1640,104 @@ static void free_dma_desc_resources(stru
-  */
- static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
- {
--	int rx_count = priv->dma_cap.number_rx_queues;
--	int queue = 0;
++}
++
++/**
++ *  stmmac_mac_enable_rx_queues - Enable MAC rx queues
++ *  @priv: driver private structure
++ *  Description: It is used for enabling the rx queues in the MAC
++ */
++static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
++{
 +	u32 rx_queues_count = priv->plat->rx_queues_to_use;
 +	int queue;
 +	u8 mode;
  
--	/* If GMAC does not have multiple queues, then this is not necessary*/
--	if (rx_count == 1)
--		return;
+-		if (priv->tx_skbuff[i]) {
+-			dev_kfree_skb_any(priv->tx_skbuff[i]);
+-			priv->tx_skbuff[i] = NULL;
+-			priv->tx_skbuff_dma[i].buf = 0;
+-			priv->tx_skbuff_dma[i].map_as_page = false;
+-		}
 +	for (queue = 0; queue < rx_queues_count; queue++) {
 +		mode = priv->plat->rx_queues_cfg[queue].mode_to_use;
 +		priv->hw->mac->rx_queue_enable(priv->hw, mode, queue);
-+	}
-+}
+ 	}
+ }
  
--	/**
--	 *  If the core is synthesized with multiple rx queues / multiple
--	 *  dma channels, then rx queues will be disabled by default.
--	 *  For now only rx queue 0 is enabled.
--	 */
--	priv->hw->mac->rx_queue_enable(priv->hw, queue);
-+/**
+ /**
+- * alloc_dma_desc_resources - alloc TX/RX resources.
+- * @priv: private structure
+- * Description: according to which descriptor can be used (extend or basic)
+- * this function allocates the resources for TX and RX paths. In case of
+- * reception, for example, it pre-allocated the RX socket buffer in order to
+- * allow zero-copy mechanism.
 + * stmmac_start_rx_dma - start RX DMA channel
 + * @priv: driver private structure
 + * @chan: RX channel index
 + * Description:
 + * This starts a RX DMA channel
-+ */
+  */
+-static int alloc_dma_desc_resources(struct stmmac_priv *priv)
 +static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan)
-+{
+ {
+-	int ret = -ENOMEM;
+-
+-	priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
+-					    GFP_KERNEL);
+-	if (!priv->rx_skbuff_dma)
+-		return -ENOMEM;
+-
+-	priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv->rx_skbuff)
+-		goto err_rx_skbuff;
+-
+-	priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
+-					    sizeof(*priv->tx_skbuff_dma),
+-					    GFP_KERNEL);
+-	if (!priv->tx_skbuff_dma)
+-		goto err_tx_skbuff_dma;
+-
+-	priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv->tx_skbuff)
+-		goto err_tx_skbuff;
+-
+-	if (priv->extend_desc) {
+-		priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &priv->dma_rx_phy,
+-						    GFP_KERNEL);
+-		if (!priv->dma_erx)
+-			goto err_dma;
+-
+-		priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &priv->dma_tx_phy,
+-						    GFP_KERNEL);
+-		if (!priv->dma_etx) {
+-			dma_free_coherent(priv->device, DMA_RX_SIZE *
+-					  sizeof(struct dma_extended_desc),
+-					  priv->dma_erx, priv->dma_rx_phy);
+-			goto err_dma;
+-		}
+-	} else {
+-		priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &priv->dma_rx_phy,
+-						   GFP_KERNEL);
+-		if (!priv->dma_rx)
+-			goto err_dma;
 +	netdev_dbg(priv->dev, "DMA RX processes started in channel %d\n", chan);
 +	priv->hw->dma->start_rx(priv->ioaddr, chan);
 +}
-+
+ 
+-		priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &priv->dma_tx_phy,
+-						   GFP_KERNEL);
+-		if (!priv->dma_tx) {
+-			dma_free_coherent(priv->device, DMA_RX_SIZE *
+-					  sizeof(struct dma_desc),
+-					  priv->dma_rx, priv->dma_rx_phy);
+-			goto err_dma;
+-		}
+-	}
 +/**
 + * stmmac_start_tx_dma - start TX DMA channel
 + * @priv: driver private structure
@@ -3756,7 +3728,8 @@
 +	netdev_dbg(priv->dev, "DMA TX processes started in channel %d\n", chan);
 +	priv->hw->dma->start_tx(priv->ioaddr, chan);
 +}
-+
+ 
+-	return 0;
 +/**
 + * stmmac_stop_rx_dma - stop RX DMA channel
 + * @priv: driver private structure
@@ -3769,7 +3742,16 @@
 +	netdev_dbg(priv->dev, "DMA RX processes stopped in channel %d\n", chan);
 +	priv->hw->dma->stop_rx(priv->ioaddr, chan);
 +}
-+
+ 
+-err_dma:
+-	kfree(priv->tx_skbuff);
+-err_tx_skbuff:
+-	kfree(priv->tx_skbuff_dma);
+-err_tx_skbuff_dma:
+-	kfree(priv->rx_skbuff);
+-err_rx_skbuff:
+-	kfree(priv->rx_skbuff_dma);
+-	return ret;
 +/**
 + * stmmac_stop_tx_dma - stop TX DMA channel
 + * @priv: driver private structure
@@ -3781,8 +3763,9 @@
 +{
 +	netdev_dbg(priv->dev, "DMA TX processes stopped in channel %d\n", chan);
 +	priv->hw->dma->stop_tx(priv->ioaddr, chan);
-+}
-+
+ }
+ 
+-static void free_dma_desc_resources(struct stmmac_priv *priv)
 +/**
 + * stmmac_start_all_dma - start all RX and TX DMA channels
 + * @priv: driver private structure
@@ -3790,7 +3773,31 @@
 + * This starts all the RX and TX DMA channels
 + */
 +static void stmmac_start_all_dma(struct stmmac_priv *priv)
-+{
+ {
+-	/* Release the DMA TX/RX socket buffers */
+-	dma_free_rx_skbufs(priv);
+-	dma_free_tx_skbufs(priv);
+-
+-	/* Free DMA regions of consistent memory previously allocated */
+-	if (!priv->extend_desc) {
+-		dma_free_coherent(priv->device,
+-				  DMA_TX_SIZE * sizeof(struct dma_desc),
+-				  priv->dma_tx, priv->dma_tx_phy);
+-		dma_free_coherent(priv->device,
+-				  DMA_RX_SIZE * sizeof(struct dma_desc),
+-				  priv->dma_rx, priv->dma_rx_phy);
+-	} else {
+-		dma_free_coherent(priv->device, DMA_TX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv->dma_etx, priv->dma_tx_phy);
+-		dma_free_coherent(priv->device, DMA_RX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv->dma_erx, priv->dma_rx_phy);
+-	}
+-	kfree(priv->rx_skbuff_dma);
+-	kfree(priv->rx_skbuff);
+-	kfree(priv->tx_skbuff_dma);
+-	kfree(priv->tx_skbuff);
 +	u32 rx_channels_count = priv->plat->rx_queues_to_use;
 +	u32 tx_channels_count = priv->plat->tx_queues_to_use;
 +	u32 chan = 0;
@@ -3800,23 +3807,38 @@
 +
 +	for (chan = 0; chan < tx_channels_count; chan++)
 +		stmmac_start_tx_dma(priv, chan);
-+}
-+
-+/**
+ }
+ 
+ /**
+- *  stmmac_mac_enable_rx_queues - Enable MAC rx queues
+- *  @priv: driver private structure
+- *  Description: It is used for enabling the rx queues in the MAC
 + * stmmac_stop_all_dma - stop all RX and TX DMA channels
 + * @priv: driver private structure
 + * Description:
 + * This stops the RX and TX DMA channels
-+ */
+  */
+-static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
 +static void stmmac_stop_all_dma(struct stmmac_priv *priv)
-+{
+ {
+-	int rx_count = priv->dma_cap.number_rx_queues;
+-	int queue = 0;
 +	u32 rx_channels_count = priv->plat->rx_queues_to_use;
 +	u32 tx_channels_count = priv->plat->tx_queues_to_use;
 +	u32 chan = 0;
-+
+ 
+-	/* If GMAC does not have multiple queues, then this is not necessary*/
+-	if (rx_count == 1)
+-		return;
 +	for (chan = 0; chan < rx_channels_count; chan++)
 +		stmmac_stop_rx_dma(priv, chan);
-+
+ 
+-	/**
+-	 *  If the core is synthesized with multiple rx queues / multiple
+-	 *  dma channels, then rx queues will be disabled by default.
+-	 *  For now only rx queue 0 is enabled.
+-	 */
+-	priv->hw->mac->rx_queue_enable(priv->hw, queue);
 +	for (chan = 0; chan < tx_channels_count; chan++)
 +		stmmac_stop_tx_dma(priv, chan);
  }
diff --git a/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch b/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch
index 9de557b..501cca8 100644
--- a/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch
+++ b/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch
@@ -35,7 +35,7 @@ Signed-off-by: Richard Weinberger <richard at nod.at>
  	struct iovec iov;
  
  	if (have_xstate_support) {
-@@ -34,9 +35,9 @@ int save_fp_registers(int pid, unsigned 
+@@ -34,9 +35,9 @@ int save_fp_registers(int pid, unsigned
  		if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0)
  			return -errno;
  		return 0;
diff --git a/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch b/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch
index c49ddca..c3a7fce 100644
--- a/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch
+++ b/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch
@@ -1,6 +1,6 @@
 --- a/drivers/clocksource/cs5535-clockevt.c
 +++ b/drivers/clocksource/cs5535-clockevt.c
-@@ -129,7 +129,8 @@ static irqreturn_t mfgpt_tick(int irq, v
+@@ -130,7 +130,8 @@ static irqreturn_t mfgpt_tick(int irq, v
  		cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP,
  				MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);
  
-- 
2.7.4




More information about the Lede-dev mailing list