From: Koen Vandeputte Date: Wed, 12 Jul 2017 20:59:03 +0000 (+0200) Subject: kernel: update kernel 4.9 to 4.9.37 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cd54b2d42b39da8a7704b67c878eaec720df2cc9;p=openwrt%2Fstaging%2Fblocktrron.git kernel: update kernel 4.9 to 4.9.37 - Refreshed all patches - Removed upstreamed - Adapted 4 patches: 473-fix-marvell-phy-initialization-issues.patch ----------------------------------------------- Removed hunk 5 which got upstreamed 403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch 404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch -------------------------------------------------------------- Adapted these 2 RFC patches, merging the delta's from an upstream commit (see below) which made it before these 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux- stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0 180-usb-xhci-add-support-for-performing-fake-doorbell.patch ----------------------------------------------------------- - Moved fake_doorbell bitmask due to new item Compile tested on: cns3xxx, imx6 Run tested on: cns3xxx, imx6 Signed-off-by: Koen Vandeputte --- diff --git a/include/kernel-version.mk b/include/kernel-version.mk index b9f76a26e8..3033060383 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,11 +4,11 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .43 LINUX_VERSION-4.4 = .74 -LINUX_VERSION-4.9 = .34 +LINUX_VERSION-4.9 = .37 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c LINUX_KERNEL_HASH-4.4.74 = c319ad6150d112bd4f8c9d1427868eeafd3ab461becf9457f814e4ba7c57808e -LINUX_KERNEL_HASH-4.9.34 = 13d159d1b1fa41ea19fcc2defe09d7532f312ee0b8279b8e12c961d8b02a4546 +LINUX_KERNEL_HASH-4.9.37 = f61ecf083b690d97cfdeec2b4457992e98882250c4f41ade36fd7cdfda066090 ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index 39c0db3b73..731fa9206f 100644 --- a/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter #include "xhci.h" #include "xhci-trace.h" -@@ -230,6 +232,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -242,6 +244,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -269,6 +723,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -281,6 +735,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter driver = (struct hc_driver *)id->driver_data; /* Prevent runtime suspending between USB-2 and USB-3 initialization */ -@@ -326,6 +796,16 @@ static void xhci_pci_remove(struct pci_d +@@ -338,6 +808,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch index f930b39ad1..0805246f06 100644 --- a/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -191,7 +191,7 @@ static void xhci_pci_quirks(struct devic +@@ -203,7 +203,7 @@ static void xhci_pci_quirks(struct devic } if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) @@ -44,7 +44,7 @@ produce a noisy warning. /* hcd->irq is 0, we have MSI */ --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1678,6 +1678,7 @@ struct xhci_hcd { +@@ -1679,6 +1679,7 @@ struct xhci_hcd { /* support xHCI 0.96 spec USB2 software LPM */ unsigned sw_lpm_support:1; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/bcm53xx/patches-4.9/060-0001-net-phy-Initialize-mdio-clock-at-probe-function.patch b/target/linux/bcm53xx/patches-4.9/060-0001-net-phy-Initialize-mdio-clock-at-probe-function.patch deleted file mode 100644 index 7678a70a32..0000000000 --- a/target/linux/bcm53xx/patches-4.9/060-0001-net-phy-Initialize-mdio-clock-at-probe-function.patch +++ /dev/null @@ -1,48 +0,0 @@ -From bb1a619735b4660f21bce3e728b937640024b4ad Mon Sep 17 00:00:00 2001 -From: Yendapally Reddy Dhananjaya Reddy -Date: Wed, 8 Feb 2017 17:14:26 -0500 -Subject: [PATCH] net: phy: Initialize mdio clock at probe function - -USB PHYs need the MDIO clock divisor enabled earlier to work. -Initialize mdio clock divisor in probe function. The ext bus -bit available in the same register will be used by mdio mux -to enable external mdio. - -Signed-off-by: Yendapally Reddy Dhananjaya Reddy -Fixes: ddc24ae1 ("net: phy: Broadcom iProc MDIO bus driver") -Reviewed-by: Florian Fainelli -Signed-off-by: Jon Mason -Signed-off-by: David S. Miller ---- - drivers/net/phy/mdio-bcm-iproc.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - ---- a/drivers/net/phy/mdio-bcm-iproc.c -+++ b/drivers/net/phy/mdio-bcm-iproc.c -@@ -81,8 +81,6 @@ static int iproc_mdio_read(struct mii_bu - if (rc) - return rc; - -- iproc_mdio_config_clk(priv->base); -- - /* Prepare the read operation */ - cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) | - (reg << MII_DATA_RA_SHIFT) | -@@ -112,8 +110,6 @@ static int iproc_mdio_write(struct mii_b - if (rc) - return rc; - -- iproc_mdio_config_clk(priv->base); -- - /* Prepare the write operation */ - cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) | - (reg << MII_DATA_RA_SHIFT) | -@@ -163,6 +159,8 @@ static int iproc_mdio_probe(struct platf - bus->read = iproc_mdio_read; - bus->write = iproc_mdio_write; - -+ iproc_mdio_config_clk(priv->base); -+ - rc = of_mdiobus_register(bus, pdev->dev.of_node); - if (rc) { - dev_err(&pdev->dev, "MDIO bus registration failed\n"); diff --git a/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 7c91161302..a00e70c32b 100644 --- a/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -127,11 +127,11 @@ it on BCM4708 family. /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1660,6 +1660,7 @@ struct xhci_hcd { - /* For controller with a broken Port Disable implementation */ +@@ -1661,6 +1661,7 @@ struct xhci_hcd { #define XHCI_BROKEN_PORT_PED (1 << 25) #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26) -+#define XHCI_FAKE_DOORBELL (1 << 27) + #define XHCI_U2_DISABLE_WAKE (1 << 27) ++#define XHCI_FAKE_DOORBELL (1 << 28) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/brcm2708/patches-4.9/950-0019-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch b/target/linux/brcm2708/patches-4.9/950-0019-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch index e800713ab8..c402fe283b 100644 --- a/target/linux/brcm2708/patches-4.9/950-0019-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch +++ b/target/linux/brcm2708/patches-4.9/950-0019-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch @@ -46,7 +46,7 @@ Signed-off-by: Noralf Trønnes struct bcm2835_dmadev { struct dma_device ddev; -@@ -922,6 +924,9 @@ static int bcm2835_dma_probe(struct plat +@@ -925,6 +927,9 @@ static int bcm2835_dma_probe(struct plat base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(base)) return PTR_ERR(base); @@ -56,7 +56,7 @@ Signed-off-by: Noralf Trønnes od->base = base; -@@ -959,6 +964,9 @@ static int bcm2835_dma_probe(struct plat +@@ -962,6 +967,9 @@ static int bcm2835_dma_probe(struct plat goto err_no_dma; } @@ -66,7 +66,7 @@ Signed-off-by: Noralf Trønnes /* get irqs for each channel that we support */ for (i = 0; i <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; i++) { /* skip masked out channels */ -@@ -1033,6 +1041,7 @@ static int bcm2835_dma_remove(struct pla +@@ -1036,6 +1044,7 @@ static int bcm2835_dma_remove(struct pla { struct bcm2835_dmadev *od = platform_get_drvdata(pdev); @@ -74,7 +74,7 @@ Signed-off-by: Noralf Trønnes dma_async_device_unregister(&od->ddev); bcm2835_dma_free(od); -@@ -1048,7 +1057,22 @@ static struct platform_driver bcm2835_dm +@@ -1051,7 +1060,22 @@ static struct platform_driver bcm2835_dm }, }; diff --git a/target/linux/brcm2708/patches-4.9/950-0187-dmaengine-bcm2835-Fix-cyclic-DMA-period-splitting.patch b/target/linux/brcm2708/patches-4.9/950-0187-dmaengine-bcm2835-Fix-cyclic-DMA-period-splitting.patch deleted file mode 100644 index fa0d998a2d..0000000000 --- a/target/linux/brcm2708/patches-4.9/950-0187-dmaengine-bcm2835-Fix-cyclic-DMA-period-splitting.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9fd7a158ec098ab05b8d3ec2c2973b3dc7e498f3 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Mon, 20 Feb 2017 20:01:16 +0100 -Subject: [PATCH] dmaengine: bcm2835: Fix cyclic DMA period splitting - -The code responsible for splitting periods into chunks that -can be handled by the DMA controller missed to update total_len, -the number of bytes processed in the current period, when there -are more chunks to follow. - -Therefore total_len was stuck at 0 and the code didn't work at all. -This resulted in a wrong control block layout and audio issues because -the cyclic DMA callback wasn't executing on period boundaries. - -Fix this by adding the missing total_len update. - -Signed-off-by: Matthias Reichl -Signed-off-by: Martin Sperl -Tested-by: Clive Messer -Reviewed-by: Eric Anholt ---- - drivers/dma/bcm2835-dma.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/drivers/dma/bcm2835-dma.c -+++ b/drivers/dma/bcm2835-dma.c -@@ -253,8 +253,11 @@ static void bcm2835_dma_create_cb_set_le - */ - - /* have we filled in period_length yet? */ -- if (*total_len + control_block->length < period_len) -+ if (*total_len + control_block->length < period_len) { -+ /* update number of bytes in this period so far */ -+ *total_len += control_block->length; - return; -+ } - - /* calculate the length that remains to reach period_length */ - control_block->length = period_len - *total_len; diff --git a/target/linux/cns3xxx/patches-4.9/075-spi_support.patch b/target/linux/cns3xxx/patches-4.9/075-spi_support.patch index 8f1a1b626e..aeda7a3269 100644 --- a/target/linux/cns3xxx/patches-4.9/075-spi_support.patch +++ b/target/linux/cns3xxx/patches-4.9/075-spi_support.patch @@ -39,7 +39,7 @@ /** --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -983,6 +983,9 @@ static int spi_transfer_one_message(stru +@@ -985,6 +985,9 @@ static int spi_transfer_one_message(stru list_for_each_entry(xfer, &msg->transfers, transfer_list) { trace_spi_transfer_start(msg, xfer); diff --git a/target/linux/generic/patches-4.9/061-v4.10-0002-mtd-spi-nor-fix-spansion-quad-enable.patch b/target/linux/generic/patches-4.9/061-v4.10-0002-mtd-spi-nor-fix-spansion-quad-enable.patch index cd0aa4660a..c5e29c7c1f 100644 --- a/target/linux/generic/patches-4.9/061-v4.10-0002-mtd-spi-nor-fix-spansion-quad-enable.patch +++ b/target/linux/generic/patches-4.9/061-v4.10-0002-mtd-spi-nor-fix-spansion-quad-enable.patch @@ -26,8 +26,8 @@ Signed-off-by: Cyrille Pitchen --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1256,6 +1256,13 @@ static int spansion_quad_enable(struct s - return -EINVAL; +@@ -1263,6 +1263,13 @@ static int spansion_quad_enable(struct s + return ret; } + ret = spi_nor_wait_till_ready(nor); diff --git a/target/linux/generic/patches-4.9/062-v4.11-0001-mtd-spi-nor-Add-support-for-S3AN-spi-nor-devices.patch b/target/linux/generic/patches-4.9/062-v4.11-0001-mtd-spi-nor-Add-support-for-S3AN-spi-nor-devices.patch index df36f6b036..87b83cc5dd 100644 --- a/target/linux/generic/patches-4.9/062-v4.11-0001-mtd-spi-nor-Add-support-for-S3AN-spi-nor-devices.patch +++ b/target/linux/generic/patches-4.9/062-v4.11-0001-mtd-spi-nor-Add-support-for-S3AN-spi-nor-devices.patch @@ -206,7 +206,7 @@ Signed-off-by: Cyrille Pitchen if (ret < 0) goto write_err; written = ret; -@@ -1312,6 +1401,47 @@ static int spi_nor_check(struct spi_nor +@@ -1319,6 +1408,47 @@ static int spi_nor_check(struct spi_nor return 0; } @@ -254,7 +254,7 @@ Signed-off-by: Cyrille Pitchen int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) { const struct flash_info *info = NULL; -@@ -1360,6 +1490,14 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1367,6 +1497,14 @@ int spi_nor_scan(struct spi_nor *nor, co mutex_init(&nor->lock); /* @@ -269,7 +269,7 @@ Signed-off-by: Cyrille Pitchen * Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up * with the software protection bits set */ -@@ -1517,6 +1655,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1524,6 +1662,12 @@ int spi_nor_scan(struct spi_nor *nor, co nor->read_dummy = spi_nor_read_dummy_cycles(nor); diff --git a/target/linux/generic/patches-4.9/062-v4.11-0004-mtd-spi-nor-rename-SPINOR_OP_-macros-of-the-4-byte-a.patch b/target/linux/generic/patches-4.9/062-v4.11-0004-mtd-spi-nor-rename-SPINOR_OP_-macros-of-the-4-byte-a.patch index 9bdce0493e..d436789eb0 100644 --- a/target/linux/generic/patches-4.9/062-v4.11-0004-mtd-spi-nor-rename-SPINOR_OP_-macros-of-the-4-byte-a.patch +++ b/target/linux/generic/patches-4.9/062-v4.11-0004-mtd-spi-nor-rename-SPINOR_OP_-macros-of-the-4-byte-a.patch @@ -95,7 +95,7 @@ Acked-by: Marek Vasut static struct seq_rw_config stfsm_s25fl_write4_configs[] = { --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1625,16 +1625,16 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1632,16 +1632,16 @@ int spi_nor_scan(struct spi_nor *nor, co /* Dedicated 4-byte command set */ switch (nor->flash_read) { case SPI_NOR_QUAD: diff --git a/target/linux/generic/patches-4.9/062-v4.11-0005-mtd-spi-nor-add-a-stateless-method-to-support-memory.patch b/target/linux/generic/patches-4.9/062-v4.11-0005-mtd-spi-nor-add-a-stateless-method-to-support-memory.patch index 8e994e61be..dc05fe31bb 100644 --- a/target/linux/generic/patches-4.9/062-v4.11-0005-mtd-spi-nor-add-a-stateless-method-to-support-memory.patch +++ b/target/linux/generic/patches-4.9/062-v4.11-0005-mtd-spi-nor-add-a-stateless-method-to-support-memory.patch @@ -116,7 +116,7 @@ Acked-by: Marek Vasut /* Enable/disable 4-byte addressing mode. */ static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info, int enable) -@@ -1621,27 +1697,10 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1628,27 +1704,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/generic/patches-4.9/121-of-Add-check-to-of_scan_flat_dt-before-accessing-ini.patch b/target/linux/generic/patches-4.9/121-of-Add-check-to-of_scan_flat_dt-before-accessing-ini.patch deleted file mode 100644 index bc05dcec65..0000000000 --- a/target/linux/generic/patches-4.9/121-of-Add-check-to-of_scan_flat_dt-before-accessing-ini.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Tobias Wolf -Date: Wed, 23 Nov 2016 10:40:07 +0100 -Subject: [PATCH] of: Add check to of_scan_flat_dt() before accessing - initial_boot_params - -An empty __dtb_start to __dtb_end section might result in initial_boot_params -being null for arch/mips/ralink. This showed that the boot process hangs -indefinitely in of_scan_flat_dt(). - -Signed-off-by: Tobias Wolf ---- - ---- a/drivers/of/fdt.c -+++ b/drivers/of/fdt.c -@@ -741,9 +741,12 @@ int __init of_scan_flat_dt(int (*it)(uns - const char *pathp; - int offset, rc = 0, depth = -1; - -- for (offset = fdt_next_node(blob, -1, &depth); -- offset >= 0 && depth >= 0 && !rc; -- offset = fdt_next_node(blob, offset, &depth)) { -+ if (!blob) -+ return 0; -+ -+ for (offset = fdt_next_node(blob, -1, &depth); -+ offset >= 0 && depth >= 0 && !rc; -+ offset = fdt_next_node(blob, offset, &depth)) { - - pathp = fdt_get_name(blob, offset, NULL); - if (*pathp == '/') diff --git a/target/linux/generic/patches-4.9/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch b/target/linux/generic/patches-4.9/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch index 4cdce0ec2d..62d6b00852 100644 --- a/target/linux/generic/patches-4.9/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch +++ b/target/linux/generic/patches-4.9/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -698,7 +698,7 @@ static void spi_set_cs(struct spi_device +@@ -700,7 +700,7 @@ static void spi_set_cs(struct spi_device enable = !enable; if (gpio_is_valid(spi->cs_gpio)) diff --git a/target/linux/generic/patches-4.9/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-4.9/465-m25p80-mx-disable-software-protection.patch index b42ff2e399..16bdfb30fd 100644 --- a/target/linux/generic/patches-4.9/465-m25p80-mx-disable-software-protection.patch +++ b/target/linux/generic/patches-4.9/465-m25p80-mx-disable-software-protection.patch @@ -4,7 +4,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1588,6 +1588,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1595,6 +1595,7 @@ int spi_nor_scan(struct spi_nor *nor, co if (JEDEC_MFR(info) == SNOR_MFR_ATMEL || JEDEC_MFR(info) == SNOR_MFR_INTEL || diff --git a/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index a0a74077e4..4ef5bf1d4e 100644 --- a/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -302,7 +302,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1283,6 +1423,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1285,6 +1425,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str { struct ip6_tnl *t = netdev_priv(dev); struct ipv6hdr *ipv6h = ipv6_hdr(skb); @@ -310,7 +310,7 @@ Signed-off-by: Steven Barth int encap_limit = -1; __u16 offset; struct flowi6 fl6; -@@ -1338,6 +1479,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1343,6 +1484,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_mark = skb->mark; } @@ -329,7 +329,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1463,6 +1616,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1470,6 +1623,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.flowinfo = p->flowinfo; t->parms.link = p->link; t->parms.proto = p->proto; @@ -344,7 +344,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1501,6 +1662,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1508,6 +1669,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -352,7 +352,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1878,6 +2040,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1885,6 +2047,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -368,7 +368,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1912,6 +2083,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1919,6 +2090,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_COLLECT_METADATA]) parms->collect_md = true; @@ -415,7 +415,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2021,6 +2232,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2028,6 +2239,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -428,7 +428,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2048,6 +2265,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2055,6 +2272,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(2) + /* IFLA_IPTUN_COLLECT_METADATA */ nla_total_size(0) + @@ -453,7 +453,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2055,6 +2290,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2062,6 +2297,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -463,7 +463,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2063,9 +2301,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2070,9 +2308,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) || nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || @@ -492,7 +492,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2103,6 +2359,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2110,6 +2366,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/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 98c4ec7ec4..6062608bb0 100644 --- a/target/linux/generic/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -88,7 +88,7 @@ Signed-off-by: Jonas Gorski default: --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c -@@ -88,6 +88,10 @@ static int fib6_rule_action(struct fib_r +@@ -77,6 +77,10 @@ static int fib6_rule_action(struct fib_r err = -EACCES; rt = net->ipv6.ip6_prohibit_entry; goto discard_pkt; diff --git a/target/linux/generic/patches-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/patches-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 4a81e751dd..4d4ca6a134 100644 --- a/target/linux/generic/patches-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/patches-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4512,6 +4512,9 @@ static enum gro_result dev_gro_receive(s +@@ -4513,6 +4513,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau if (!(skb->dev->features & NETIF_F_GRO)) goto normal; -@@ -5789,6 +5792,48 @@ static void __netdev_adjacent_dev_unlink +@@ -5790,6 +5793,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info) -@@ -5987,6 +6032,8 @@ void netdev_upper_dev_unlink(struct net_ +@@ -5988,6 +6033,8 @@ void netdev_upper_dev_unlink(struct net_ list_for_each_entry(i, &upper_dev->all_adj_list.upper, list) __netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr); @@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6587,6 +6634,7 @@ int dev_set_mac_address(struct net_devic +@@ -6588,6 +6635,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/patches-4.9/701-phy_extension.patch b/target/linux/generic/patches-4.9/701-phy_extension.patch index 95e2c8249d..0eb3e89adc 100644 --- a/target/linux/generic/patches-4.9/701-phy_extension.patch +++ b/target/linux/generic/patches-4.9/701-phy_extension.patch @@ -53,7 +53,7 @@ * @phydev: the phy_device struct --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -813,6 +813,7 @@ int phy_ethtool_ksettings_get(struct phy +@@ -816,6 +816,7 @@ int phy_ethtool_ksettings_get(struct phy struct ethtool_link_ksettings *cmd); int phy_ethtool_ksettings_set(struct phy_device *phydev, const struct ethtool_link_ksettings *cmd); diff --git a/target/linux/generic/patches-4.9/702-phy_add_aneg_done_function.patch b/target/linux/generic/patches-4.9/702-phy_add_aneg_done_function.patch index 5f71be60b8..5c0c22e253 100644 --- a/target/linux/generic/patches-4.9/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/patches-4.9/702-phy_add_aneg_done_function.patch @@ -1,6 +1,6 @@ --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -496,6 +496,12 @@ struct phy_driver { +@@ -499,6 +499,12 @@ struct phy_driver { /* Determines the negotiated speed and duplex */ int (*read_status)(struct phy_device *phydev); @@ -15,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1267,6 +1267,9 @@ int genphy_update_link(struct phy_device +@@ -1309,6 +1309,9 @@ int genphy_update_link(struct phy_device { int status; diff --git a/target/linux/generic/patches-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/patches-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch index 68b60ac4a8..c85937d21a 100644 --- a/target/linux/generic/patches-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/patches-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -12,7 +12,7 @@ phy_suspend(phydev); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -514,6 +514,12 @@ struct phy_driver { +@@ -517,6 +517,12 @@ struct phy_driver { */ int (*did_interrupt)(struct phy_device *phydev); diff --git a/target/linux/generic/patches-4.9/704-phy-no-genphy-soft-reset.patch b/target/linux/generic/patches-4.9/704-phy-no-genphy-soft-reset.patch index 6672bbe8a2..baab044777 100644 --- a/target/linux/generic/patches-4.9/704-phy-no-genphy-soft-reset.patch +++ b/target/linux/generic/patches-4.9/704-phy-no-genphy-soft-reset.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1485,7 +1485,7 @@ int genphy_config_init(struct phy_device +@@ -1527,7 +1527,7 @@ int genphy_config_init(struct phy_device return 0; } @@ -9,7 +9,7 @@ { /* Do nothing for now */ return 0; -@@ -1724,7 +1724,7 @@ static struct phy_driver genphy_driver[] +@@ -1798,7 +1798,7 @@ static struct phy_driver genphy_driver[] .phy_id = 0xffffffff, .phy_id_mask = 0xffffffff, .name = "Generic PHY", @@ -18,7 +18,7 @@ .config_init = genphy_config_init, .features = PHY_GBIT_FEATURES | SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE | -@@ -1738,7 +1738,7 @@ static struct phy_driver genphy_driver[] +@@ -1812,7 +1812,7 @@ static struct phy_driver genphy_driver[] .phy_id = 0xffffffff, .phy_id_mask = 0xffffffff, .name = "Generic 10G PHY", diff --git a/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch b/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch index 08c094b629..55607bc6ea 100644 --- a/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch +++ b/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch @@ -50,7 +50,7 @@ phy_device_free(phydev); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -856,6 +856,23 @@ void mdio_bus_exit(void); +@@ -859,6 +859,23 @@ void mdio_bus_exit(void); extern struct bus_type mdio_bus_type; diff --git a/target/linux/generic/patches-4.9/721-phy_packets.patch b/target/linux/generic/patches-4.9/721-phy_packets.patch index 717aba8ffb..2123f01cb2 100644 --- a/target/linux/generic/patches-4.9/721-phy_packets.patch +++ b/target/linux/generic/patches-4.9/721-phy_packets.patch @@ -86,7 +86,7 @@ help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2931,10 +2931,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -2932,10 +2932,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/patches-4.9/902-debloat_proc.patch b/target/linux/generic/patches-4.9/902-debloat_proc.patch index 2b1e7b2cd4..1894757f22 100644 --- a/target/linux/generic/patches-4.9/902-debloat_proc.patch +++ b/target/linux/generic/patches-4.9/902-debloat_proc.patch @@ -122,7 +122,7 @@ return -ENOMEM; --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -2703,6 +2703,8 @@ static const struct file_operations proc +@@ -2713,6 +2713,8 @@ static const struct file_operations proc static int __init proc_vmalloc_init(void) { diff --git a/target/linux/ipq806x/patches-4.9/130-pinctrl-ipq4019-add-pinctrl.patch b/target/linux/ipq806x/patches-4.9/130-pinctrl-ipq4019-add-pinctrl.patch deleted file mode 100644 index 2c285df7f3..0000000000 --- a/target/linux/ipq806x/patches-4.9/130-pinctrl-ipq4019-add-pinctrl.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e7748d641ae37081e2034869491f1629461ae13c Mon Sep 17 00:00:00 2001 -From: Christian Lamparter -Date: Thu, 16 Mar 2017 21:00:18 +0100 -Subject: [PATCH] pinctrl: ipq4019: Add missing pingroups - -This patch adds the missing PINGROUP for GPIO70-99. -This fixes a crash that happens in pinctrl-msm, if any -of the GPIO70-99 are accessed. - -Fixes: 5303f7827fcd41d ("pinctrl: qcom: ipq4019: set ngpios to correct value") -Signed-off-by: Christian Lamparter ---- ---- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c -+++ b/drivers/pinctrl/qcom/pinctrl-ipq4019.c -@@ -405,6 +405,36 @@ static const struct msm_pingroup ipq4019 - PINGROUP(67, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), - PINGROUP(68, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), - PINGROUP(69, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(70, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(71, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(72, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(82, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(83, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(84, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(85, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(89, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(90, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(91, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(92, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(95, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(96, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(97, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(98, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), -+ PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), - }; - - static const struct msm_pinctrl_soc_data ipq4019_pinctrl = { diff --git a/target/linux/lantiq/patches-4.9/0093-spi-double-time-out-tolerance.patch b/target/linux/lantiq/patches-4.9/0093-spi-double-time-out-tolerance.patch deleted file mode 100644 index 68b0ffe570..0000000000 --- a/target/linux/lantiq/patches-4.9/0093-spi-double-time-out-tolerance.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 833bfade96561216aa2129516a5926a0326860a2 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 17 Apr 2017 01:38:05 +0200 -Subject: spi: double time out tolerance - -The generic SPI code calculates how long the issued transfer would take -and adds 100ms in addition to the timeout as tolerance. On my 500 MHz -Lantiq Mips SoC I am getting timeouts from the SPI like this when the -system boots up: - -m25p80 spi32766.4: SPI transfer timed out -blk_update_request: I/O error, dev mtdblock3, sector 2 -SQUASHFS error: squashfs_read_data failed to read block 0x6e - -After increasing the tolerance for the timeout to 200ms I haven't seen -these SPI transfer time outs any more. -The Lantiq SPI driver in use here has an extra work queue in between, -which gets triggered when the controller send the last word and the -hardware FIFOs used for reading and writing are only 8 words long. - -Signed-off-by: Hauke Mehrtens -Signed-off-by: Mark Brown ---- - drivers/spi/spi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/spi/spi.c -+++ b/drivers/spi/spi.c -@@ -1004,7 +1004,7 @@ static int spi_transfer_one_message(stru - ret = 0; - ms = 8LL * 1000LL * xfer->len; - do_div(ms, xfer->speed_hz); -- ms += ms + 100; /* some tolerance */ -+ ms += ms + 200; /* some tolerance */ - - if (ms > UINT_MAX) - ms = UINT_MAX; diff --git a/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch b/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch index 1a74e6387e..6394e14412 100644 --- a/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch +++ b/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch @@ -229,7 +229,7 @@ struct netpoll *netpoll; int err = 0; -@@ -1235,11 +1235,16 @@ int dsa_slave_create(struct dsa_switch * +@@ -1233,11 +1233,16 @@ int dsa_slave_create(struct dsa_switch * struct net_device *master; struct net_device *slave_dev; struct dsa_slave_priv *p; @@ -248,7 +248,7 @@ slave_dev = alloc_netdev(sizeof(struct dsa_slave_priv), name, NET_NAME_UNKNOWN, ether_setup); -@@ -1265,6 +1270,7 @@ int dsa_slave_create(struct dsa_switch * +@@ -1263,6 +1268,7 @@ int dsa_slave_create(struct dsa_switch * p->parent = ds; p->port = port; p->xmit = dst->tag_ops->xmit; diff --git a/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch b/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch index c5bb0c02f2..73b76cd7c1 100644 --- a/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch +++ b/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch @@ -167,7 +167,7 @@ Signed-off-by: Russell King --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -426,6 +426,7 @@ struct phy_device { +@@ -429,6 +429,7 @@ struct phy_device { u8 mdix; diff --git a/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch b/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch index a0352e20d9..a7c3107164 100644 --- a/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch +++ b/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch @@ -256,7 +256,7 @@ Signed-off-by: Russell King +EXPORT_SYMBOL(phy_write_mmd); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -627,14 +627,7 @@ struct phy_fixup { +@@ -630,14 +630,7 @@ struct phy_fixup { * * Same rules as for phy_read(); */ @@ -272,7 +272,7 @@ Signed-off-by: Russell King /** * phy_read_mmd_indirect - reads data from the MMD registers -@@ -728,16 +721,7 @@ static inline bool phy_is_pseudo_fixed_l +@@ -731,16 +724,7 @@ static inline bool phy_is_pseudo_fixed_l * * Same rules as for phy_write(); */ diff --git a/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch b/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch index a37b0a7527..fcb274d557 100644 --- a/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch +++ b/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch @@ -64,7 +64,7 @@ Signed-off-by: Russell King EXPORT_SYMBOL(phy_write_mmd); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -570,6 +570,30 @@ struct phy_driver { +@@ -573,6 +573,30 @@ struct phy_driver { */ void (*link_change_notify)(struct phy_device *dev); diff --git a/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch b/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch index ecf7a26fa1..7d69c5aff1 100644 --- a/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch +++ b/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch @@ -30,22 +30,27 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1343,11 +1343,16 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); +@@ -1343,14 +1343,19 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); */ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) { - int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised); + int cap, adv; -- phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV, MDIO_MMD_AN, val); +- /* Mask prohibited EEE modes */ +- val &= ~phydev->eee_broken_modes; + /* Get Supported EEE */ + cap = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); + if (cap < 0) + return cap; ++ ++ adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap; + +- phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV, MDIO_MMD_AN, val); ++ /* Mask prohibited EEE modes */ ++ adv &= ~phydev->eee_broken_modes; - return 0; -+ adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap; -+ + return phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv); } EXPORT_SYMBOL(phy_ethtool_set_eee); diff --git a/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch b/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch index 72951e8a3a..35d7ba9feb 100644 --- a/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch +++ b/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1343,16 +1343,33 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); +@@ -1343,19 +1343,36 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); */ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) { @@ -30,6 +30,9 @@ Signed-off-by: Russell King + adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap; + /* Mask prohibited EEE modes */ + adv &= ~phydev->eee_broken_modes; + - return phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv); + if (old_adv != adv) { + ret = phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv); diff --git a/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch b/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch index 352d678328..dfa93c5781 100644 --- a/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch +++ b/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch @@ -258,7 +258,7 @@ Signed-off-by: Russell King +EXPORT_SYMBOL_GPL(genphy_c45_read_pma); --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1410,27 +1410,19 @@ EXPORT_SYMBOL(genphy_read_status); +@@ -1452,27 +1452,19 @@ EXPORT_SYMBOL(genphy_read_status); static int gen10g_read_status(struct phy_device *phydev) { @@ -295,7 +295,7 @@ Signed-off-by: Russell King } --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -807,6 +807,8 @@ static inline const char *phydev_name(co +@@ -810,6 +810,8 @@ static inline const char *phydev_name(co void phy_attached_print(struct phy_device *phydev, const char *fmt, ...) __printf(2, 3); void phy_attached_info(struct phy_device *phydev); @@ -304,7 +304,7 @@ Signed-off-by: Russell King int genphy_config_init(struct phy_device *phydev); int genphy_setup_forced(struct phy_device *phydev); int genphy_restart_aneg(struct phy_device *phydev); -@@ -817,6 +819,16 @@ int genphy_read_status(struct phy_device +@@ -820,6 +822,16 @@ int genphy_read_status(struct phy_device int genphy_suspend(struct phy_device *phydev); int genphy_resume(struct phy_device *phydev); int genphy_soft_reset(struct phy_device *phydev); diff --git a/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch b/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch index 32922c1a9c..8de0793704 100644 --- a/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch +++ b/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch @@ -37,7 +37,7 @@ Signed-off-by: Russell King /** * phy_aneg_done - return auto-negotiation status -@@ -1439,3 +1457,14 @@ int phy_ethtool_set_link_ksettings(struc +@@ -1442,3 +1460,14 @@ int phy_ethtool_set_link_ksettings(struc return phy_ethtool_ksettings_set(phydev, cmd); } EXPORT_SYMBOL(phy_ethtool_set_link_ksettings); diff --git a/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch b/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch index 4111b004d2..f4da7e92e0 100644 --- a/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch +++ b/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch @@ -91,7 +91,7 @@ Signed-off-by: Russell King { --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -642,6 +642,9 @@ struct phy_fixup { +@@ -645,6 +645,9 @@ struct phy_fixup { int (*run)(struct phy_device *phydev); }; diff --git a/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch b/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch index 02a8fa5748..051a9ed68e 100644 --- a/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch +++ b/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch @@ -305,7 +305,7 @@ Signed-off-by: Russell King { --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -645,6 +645,21 @@ struct phy_fixup { +@@ -648,6 +648,21 @@ struct phy_fixup { const char *phy_speed_to_str(int speed); const char *phy_duplex_to_str(unsigned int duplex); diff --git a/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch b/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch index fe3f7c2972..59e8aa81b7 100644 --- a/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch +++ b/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch @@ -1007,7 +1007,7 @@ Signed-off-by: Russell King struct sk_buff; /* -@@ -422,6 +423,7 @@ struct phy_device { +@@ -425,6 +426,7 @@ struct phy_device { struct mutex lock; diff --git a/target/linux/mvebu/patches-4.9/432-phy-marvell-88E1512-add-flow-control-support.patch b/target/linux/mvebu/patches-4.9/432-phy-marvell-88E1512-add-flow-control-support.patch index 407d23ab2e..f694b82af0 100644 --- a/target/linux/mvebu/patches-4.9/432-phy-marvell-88E1512-add-flow-control-support.patch +++ b/target/linux/mvebu/patches-4.9/432-phy-marvell-88E1512-add-flow-control-support.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c -@@ -1679,7 +1679,8 @@ static struct phy_driver marvell_drivers +@@ -1678,7 +1678,8 @@ static struct phy_driver marvell_drivers .phy_id = MARVELL_PHY_ID_88E1510, .phy_id_mask = MARVELL_PHY_ID_MASK, .name = "Marvell 88E1510", diff --git a/target/linux/mvebu/patches-4.9/433-phy-marvell-88E1111-add-flow-control-support.patch b/target/linux/mvebu/patches-4.9/433-phy-marvell-88E1111-add-flow-control-support.patch index 9a165fdf48..cf525a29c3 100644 --- a/target/linux/mvebu/patches-4.9/433-phy-marvell-88E1111-add-flow-control-support.patch +++ b/target/linux/mvebu/patches-4.9/433-phy-marvell-88E1111-add-flow-control-support.patch @@ -11,7 +11,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c -@@ -1531,7 +1531,7 @@ static struct phy_driver marvell_drivers +@@ -1530,7 +1530,7 @@ static struct phy_driver marvell_drivers .phy_id = MARVELL_PHY_ID_88E1111, .phy_id_mask = MARVELL_PHY_ID_MASK, .name = "Marvell 88E1111", diff --git a/target/linux/mvebu/patches-4.9/434-phy-marvell-88E1540-add-flow-control-support.patch b/target/linux/mvebu/patches-4.9/434-phy-marvell-88E1540-add-flow-control-support.patch index e452f019d2..607d173fc2 100644 --- a/target/linux/mvebu/patches-4.9/434-phy-marvell-88E1540-add-flow-control-support.patch +++ b/target/linux/mvebu/patches-4.9/434-phy-marvell-88E1540-add-flow-control-support.patch @@ -11,7 +11,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c -@@ -1699,7 +1699,7 @@ static struct phy_driver marvell_drivers +@@ -1698,7 +1698,7 @@ static struct phy_driver marvell_drivers .phy_id = MARVELL_PHY_ID_88E1540, .phy_id_mask = MARVELL_PHY_ID_MASK, .name = "Marvell 88E1540", diff --git a/target/linux/mvebu/patches-4.9/435-net-phy-fix-marvell-phy-status-reading.patch b/target/linux/mvebu/patches-4.9/435-net-phy-fix-marvell-phy-status-reading.patch deleted file mode 100644 index a39b6949a8..0000000000 --- a/target/linux/mvebu/patches-4.9/435-net-phy-fix-marvell-phy-status-reading.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Russell King -Date: Fri, 23 Dec 2016 18:54:01 +0000 -Subject: [PATCH] net: phy: fix marvell phy status reading - -The Marvell driver incorrectly provides phydev->lp_advertising as the -logical and of the link partner's advert and our advert. This is -incorrect - this field is supposed to store the link parter's unmodified -advertisment. - -This allows ethtool to report the correct link partner auto-negotiation -status. - -Signed-off-by: Russell King ---- - ---- a/drivers/net/phy/marvell.c -+++ b/drivers/net/phy/marvell.c -@@ -1114,8 +1114,6 @@ static int marvell_read_status_page(stru - if (adv < 0) - return adv; - -- lpa &= adv; -- - if (status & MII_M1011_PHY_STATUS_FULLDUPLEX) - phydev->duplex = DUPLEX_FULL; - else diff --git a/target/linux/mvebu/patches-4.9/473-fix-marvell-phy-initialization-issues.patch b/target/linux/mvebu/patches-4.9/473-fix-marvell-phy-initialization-issues.patch index c48195150f..eca7e121e0 100644 --- a/target/linux/mvebu/patches-4.9/473-fix-marvell-phy-initialization-issues.patch +++ b/target/linux/mvebu/patches-4.9/473-fix-marvell-phy-initialization-issues.patch @@ -49,13 +49,3 @@ Signed-off-by: Marko Ratkaj i = phy_write(phydev, MII_MARVELL_PHY_PAGE, saved_page); if (ret == 0) ret = i; -@@ -1200,7 +1198,8 @@ static int marvell_read_status(struct ph - int err; - - /* Check the fiber mode first */ -- if (phydev->supported & SUPPORTED_FIBRE) { -+ if (phydev->supported & SUPPORTED_FIBRE && -+ phydev->interface != PHY_INTERFACE_MODE_SGMII) { - err = phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_M1111_FIBER); - if (err < 0) - goto error; diff --git a/target/linux/pistachio/patches-4.9/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-4.9/401-mtd-nor-support-mtd-name-from-device-tree.patch index 6e3c7111e6..9c4d04452d 100644 --- a/target/linux/pistachio/patches-4.9/401-mtd-nor-support-mtd-name-from-device-tree.patch +++ b/target/linux/pistachio/patches-4.9/401-mtd-nor-support-mtd-name-from-device-tree.patch @@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1534,6 +1534,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1541,6 +1541,7 @@ int spi_nor_scan(struct spi_nor *nor, co struct device *dev = nor->dev; struct mtd_info *mtd = &nor->mtd; struct device_node *np = spi_nor_get_flash_node(nor); @@ -18,7 +18,7 @@ Signed-off-by: Abhimanyu Vishwakarma int ret; int i; -@@ -1598,7 +1599,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1605,7 +1606,12 @@ int spi_nor_scan(struct spi_nor *nor, co spi_nor_wait_till_ready(nor); } 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 ffea0b45db..40994fb8d3 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 @@ -67,7 +67,7 @@ static int macronix_quad_enable(struct spi_nor *nor) { int ret, val; -@@ -1623,10 +1683,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1630,10 +1690,12 @@ int spi_nor_scan(struct spi_nor *nor, co } /* sst nor chips use AAI word program */ @@ -82,7 +82,7 @@ if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; -@@ -1656,11 +1718,20 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1663,11 +1725,20 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->writebufsize = nor->page_size; if (np) {