From 701cc08ea001986eb14139dfa6bc78dda93b024b Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Tue, 22 May 2018 14:51:26 +0800 Subject: [PATCH] kernel version sync to openwrt-18.06 --- feeds.conf.default | 8 +- include/kernel-version.mk | 8 +- ...mware-loader-for-uPD720201-and-uPD72.patch | 6 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- .../patches-4.9/300-add-ac49x-platform.patch | 4 +- ...mtd_fix_cfi_cmdset_0002_status_check.patch | 14 +- ...mtd-cfi_cmdset_0002-force-word-write.patch | 6 +- .../432-spi-rb4xx-spi-driver.patch | 2 +- .../433-spi-rb4xx-cpld-driver.patch | 2 +- .../patches-4.9/435-spi-vsc7385_driver.patch | 2 +- .../patches-4.9/500-MIPS-fw-myloader.patch | 2 +- .../patches-4.9/604-MIPS-ath79-no-of.patch | 2 +- .../910-unaligned_access_hacks.patch | 4 +- .../patches-4.9/930-chipidea-pullup.patch | 6 +- .../ath25/patches-4.9/107-ar5312_gpio.patch | 2 +- .../ath25/patches-4.9/130-watchdog.patch | 2 +- ...-serial-drop-QCA-pecific-SoC-symbols.patch | 7 +- ...2-watchdog-ath79-fix-maximum-timeout.patch | 7 +- ...ds-add-reset-controller-based-driver.patch | 16 +- .../0004-phy-add-ath79-usb-phys.patch | 20 +- ...005-usb-add-more-OF-quirk-properties.patch | 7 +- .../0006-usb-drop-deprecated-symbols.patch | 9 +- ...9-intc-add-irq-cascade-driver-for-QC.patch | 8 - ...ip-irq-ath79-cpu-drop-OF-init-helper.patch | 5 - ...-ath79-add-lots-of-missing-registers.patch | 8 +- ...S-ath79-select-the-PINCTRL-subsystem.patch | 7 +- ...egister-address-in-ath79_ddr_wb_flus.patch | 5 - ...Avoid-using-unitialized-reg-variable.patch | 5 - .../0013-MIPS-ath79-fix-system-restart.patch | 11 +- ...14-MIPS-ath79-finetune-cpu-overrides.patch | 5 - ...ath79-enable-uart-during-early_prink.patch | 7 +- ...PS-ath79-add-support-for-QCA953x-SoC.patch | 27 +- ...PS-ath79-add-support-for-qca956x-soc.patch | 29 +- ...h79-get-PCIe-controller-out-of-reset.patch | 9 +- ...pci-ar71xx-driver-into-a-pure-OF-dri.patch | 17 +- ...pci-ar724x-driver-into-a-pure-OF-dri.patch | 13 +- .../0022-MIPS-ath79-drop-pci.c.patch | 20 +- .../0023-MIPS-ath79-drop-mach-files.patch | 32 +- .../0024-MIPS-ath79-drop-pdata-helpers.patch | 41 -- .../0025-MIPS-ath79-drop-irq.c.patch | 10 - ...-MIPS-ath79-sanitize-Kconfig-symbols.patch | 24 +- ...MIPS-ath79-drop-mips_machine-support.patch | 22 +- ...elpers-for-setting-clocks-and-expose.patch | 4 +- .../004-register_gpio_driver_earlier.patch | 6 +- .../405-mtd-tp-link-partition-parser.patch | 12 +- .../420-net-ar71xx_mac_driver.patch | 2 +- .../430-drivers-link-spi-before-mtd.patch | 2 +- .../461-spi-ath79-add-fast-flash-read.patch | 6 +- ...ath79-swizzle-pci-address-for-ar71xx.patch | 10 +- ...490-usb-ehci-add-quirks-for-qca-socs.patch | 6 +- ...-prevent-rescheduling-during-command.patch | 6 +- .../910-unaligned_access_hacks.patch | 258 +++---- ...initialise-baud-field-of-earlycon-de.patch | 2 +- ...ct-JEDEC-incompatible-w25q128-using-.patch | 2 +- ...-GPIO-clocks-enabled-at-boot-as-crit.patch | 2 +- ...clocks-early-during-the-boot-process.patch | 4 +- .../950-0031-Add-dwc_otg-driver.patch | 2 +- ...uspending-if-we-re-in-gadget-mode-18.patch | 2 +- ...rate-change-propagation-on-bcm2835-c.patch | 6 +- ...te-change-propagation-to-PLLH_AUX-on.patch | 2 +- ...e-uninitialized-warning-in-bcm2835_c.patch | 2 +- ...t-rate-change-PLLs-on-behalf-of-DSI-.patch | 28 +- ...-Register-the-DSI0-DSI1-pixel-clocks.patch | 14 +- ...leaf-clock-measurement-support-disab.patch | 26 +- ...user-BO-creation-requests-from-the-k.patch | 2 +- ...es-from-trying-to-cache-a-partially-.patch | 2 +- ...Mark-used-PLLs-and-dividers-CRITICAL.patch | 2 +- ...lk-bcm2835-Add-claim-clocks-property.patch | 14 +- .../brcm47xx/patches-4.14/159-cpu_fixes.patch | 8 +- .../patches-4.9/831-old_gpio_wdt.patch | 2 +- ..._table-parsing-for-partition-parsers.patch | 6 +- ...PS-BCM63XX-add-clkdev-lookup-support.patch | 2 +- ..._table-parsing-for-partition-parsers.patch | 6 +- ...22-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch | 2 +- .../patches-4.14/075-spi_support.patch | 2 +- ...tfilter-exit_net-cleanup-check-added.patch | 2 +- ...50-usb-dwc2-Remove-unnecessary-kfree.patch | 2 +- ...90-net-generalize-napi_complete_done.patch | 4 +- target/linux/generic/config-4.14 | 1 + target/linux/generic/config-4.9 | 1 + .../generic/hack-4.9/204-module_strip.patch | 4 +- .../generic/hack-4.9/220-gc_sections.patch | 2 +- .../301-mips_image_cmdline_hack.patch | 2 +- .../generic/hack-4.9/902-debloat_proc.patch | 2 +- ...sb-add-lte-modem-wistron-neweb-d18q1.patch | 2 +- ..._wwan-add-BroadMobi-BM806U-2020-2033.patch | 2 +- ...et_0002-add-buffer-write-cmd-timeout.patch | 2 +- ...mtd-device-named-ubi-or-data-on-boot.patch | 4 +- ...etfilter_match_bypass_default_checks.patch | 2 +- .../pending-4.14/630-packet_socket_type.patch | 16 +- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 22 +- .../pending-4.14/834-ledtrig-libata.patch | 8 +- ...sb-add-lte-modem-wistron-neweb-d18q1.patch | 2 +- ..._wwan-add-BroadMobi-BM806U-2020-2033.patch | 2 +- ...ng-comment-related-to-link-detection.patch | 4 +- .../300-mips_expose_boot_raw.patch | 4 +- .../pending-4.9/304-mips_disable_fpu.patch | 2 +- ...ove-no-op-dma_map_ops-where-possible.patch | 12 +- ...et_0002-add-buffer-write-cmd-timeout.patch | 2 +- ...mtd-device-named-ubi-or-data-on-boot.patch | 4 +- .../pending-4.9/630-packet_socket_type.patch | 16 +- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 30 +- ...ng-with-source-address-failed-policy.patch | 18 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 +- .../pending-4.9/701-phy_extension.patch | 2 +- .../pending-4.9/834-ledtrig-libata.patch | 8 +- .../pending-4.9/890-uart_optional_sysrq.patch | 2 +- .../pending-4.9/920-mangle_bootargs.patch | 4 +- ...dd-quirk-to-autoload-ubi-on-rt-ac58u.patch | 2 +- ...Mangle-bootloader-s-kernel-arguments.patch | 4 +- .../090-increase_entropy_pools.patch | 2 +- .../patches-4.9/600-skb_avoid_dmabounce.patch | 2 +- .../0026-NET-multi-phy-support.patch | 6 +- ...dd-support-for-Lantiq-SSC-SPI-contro.patch | 2 +- .../202-core-linux-support-layerscape.patch | 6 +- .../301-arch-support-layerscape.patch | 2 +- .../302-dts-support-layercape.patch | 8 +- .../401-mtd-spi-nor-support-layerscape.patch | 14 +- .../703-phy-support-layerscape.patch | 18 +- .../803-cpufreq-support-layerscape.patch | 6 +- .../812-mmc-layerscape-support.patch | 12 +- .../813-qe-support-layerscape.patch | 2 +- .../817-usb-support-layerscape.patch | 18 +- ...6-reset-mediatek-mt2701-reset-driver.patch | 2 +- .../mediatek/patches-4.14/0064-dts.patch | 10 +- .../102-powerpc-add-cmdline-override.patch | 2 +- ...I-configuration-read-write-functions.patch | 66 -- ...DR_LS-correctly-in-advk_pcie_rd_conf.patch | 53 -- ...-device-to-the-same-MAX-payload-size.patch | 11 +- ...of-isr0-interrupt-in-legacy-irq-mode.patch | 143 ---- ...x-PCIe-max-read-request-size-setting.patch | 63 -- ...x-cfi-cmdset-0002-erase-status-check.patch | 4 +- ...mtd-cfi-cmdset-0002-force-word-write.patch | 6 +- .../patches-4.9/0050-stmmac-form-4-10.patch | 140 ++-- .../patches-4.9/0051-stmmac-form-4-11.patch | 56 +- .../patches-4.9/0052-stmmac-form-4-12.patch | 648 +++++++++--------- .../uml/patches-4.9/101-mconsole-exec.patch | 2 +- 137 files changed, 865 insertions(+), 1540 deletions(-) delete mode 100644 target/linux/mvebu/patches-4.14/522-PCI-aardvark-fix-logic-in-PCI-configuration-read-write-functions.patch delete mode 100644 target/linux/mvebu/patches-4.14/523-PCI-aardvark-set-PIO_ADDR_LS-correctly-in-advk_pcie_rd_conf.patch delete mode 100644 target/linux/mvebu/patches-4.14/525-PCI-aardvark-use-isr1-instead-of-isr0-interrupt-in-legacy-irq-mode.patch delete mode 100644 target/linux/mvebu/patches-4.14/527-PCI-aardvark-fix-PCIe-max-read-request-size-setting.patch diff --git a/feeds.conf.default b/feeds.conf.default index e417f5bec..f2dcacc04 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,9 +1,9 @@ #src-git packages https://git.openwrt.org/feed/packages.git^1b73f267eae2dedc18969b70ed7c5d9b02288bac src-git packages https://github.com/openwrt/packages.git -src-git luci https://git.openwrt.org/project/luci.git^7d55be315d758b2a40494e732d7bdc300ee15c00 -#src-git luci https://github.com/openwrt/luci.git -src-git routing https://git.openwrt.org/feed/routing.git^ba5d2fc76e1cee2cb656d955514c8aa526875a6a -src-git telephony https://git.openwrt.org/feed/telephony.git +#src-git luci https://git.openwrt.org/project/luci.git^7d55be315d758b2a40494e732d7bdc300ee15c00 +src-git luci https://github.com/openwrt/luci.git;openwrt-18.06 +src-git routing https://git.openwrt.org/feed/routing.git;openwrt-18.06 +src-git telephony https://github.com/openwrt/telephony.git;openwrt-18.06 #src-git video https://github.com/openwrt/video.git #src-git targets https://github.com/openwrt/targets.git #src-git management https://github.com/openwrt-management/packages.git diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3e9ddaa81..7aa9bdaae 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,13 +4,13 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .121 -LINUX_VERSION-4.9 = .91 -LINUX_VERSION-4.14 = .34 +LINUX_VERSION-4.9 = .100 +LINUX_VERSION-4.14 = .41 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729 -LINUX_KERNEL_HASH-4.9.91 = 60caa752ec9fa1c426f6a2f37db3f268d0961b67a723b6443949112167b39832 -LINUX_KERNEL_HASH-4.14.34 = 782b6c4c85275c382c820e1934d3e6003ef468f43cfc5e7c22bc07c331a12bb9 +LINUX_KERNEL_HASH-4.9.100 = c5bb6f3a7113e05cbaf6e48b2b485dea4f7edae5e42b3fe81c963ba63413a77c +LINUX_KERNEL_HASH-4.14.41 = ccf1147a9b05c986728bc9fa1b407e029c23a16c9f915134dc3f6f8663d8ce6d remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index 49304ef87..efaf61a5f 100644 --- a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.14/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" -@@ -241,6 +243,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -244,6 +246,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) { -@@ -276,6 +730,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -279,6 +733,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; /* For some HW implementation, a XHCI reset is just not enough... */ -@@ -340,6 +810,16 @@ static void xhci_pci_remove(struct pci_d +@@ -343,6 +813,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch index ae05d291f..b78a7881c 100644 --- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.14/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 -@@ -199,7 +199,7 @@ static void xhci_pci_quirks(struct devic +@@ -202,7 +202,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) diff --git a/target/linux/ar7/patches-4.9/300-add-ac49x-platform.patch b/target/linux/ar7/patches-4.9/300-add-ac49x-platform.patch index 67ed3e494..639f09709 100644 --- a/target/linux/ar7/patches-4.9/300-add-ac49x-platform.patch +++ b/target/linux/ar7/patches-4.9/300-add-ac49x-platform.patch @@ -37,7 +37,7 @@ #define AR7_IRQ_UART0 15 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -160,7 +160,7 @@ config AR7 +@@ -161,7 +161,7 @@ config AR7 select HAVE_CLK help Support for the Texas Instruments AR7 System-on-a-Chip @@ -46,7 +46,7 @@ config ATH25 bool "Atheros AR231x/AR531x SoC support" -@@ -1004,6 +1004,7 @@ config MIPS_PARAVIRT +@@ -1005,6 +1005,7 @@ config MIPS_PARAVIRT endchoice source "arch/mips/alchemy/Kconfig" diff --git a/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch b/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch index 415d835ee..3a7fe99e6 100644 --- a/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch +++ b/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -1630,8 +1630,8 @@ static int __xipram do_write_oneword(str +@@ -1631,8 +1631,8 @@ static int __xipram do_write_oneword(str break; } @@ -11,7 +11,7 @@ /* Latency issues. Drop the lock, wait a while and retry */ UDELAY(map, chip, adr, 1); -@@ -1647,6 +1647,8 @@ static int __xipram do_write_oneword(str +@@ -1648,6 +1648,8 @@ static int __xipram do_write_oneword(str ret = -EIO; } @@ -20,7 +20,7 @@ xip_enable(map, chip, adr); op_done: if (mode == FL_OTP_WRITE) -@@ -2225,7 +2227,6 @@ static int cfi_amdstd_panic_write(struct +@@ -2226,7 +2228,6 @@ static int cfi_amdstd_panic_write(struct return 0; } @@ -28,7 +28,7 @@ /* * Handle devices with one erase region, that only implement * the chip erase command. -@@ -2289,8 +2290,8 @@ static int __xipram do_erase_chip(struct +@@ -2291,8 +2292,8 @@ static int __xipram do_erase_chip(struct chip->erase_suspended = 0; } @@ -39,7 +39,7 @@ if (time_after(jiffies, timeo)) { printk(KERN_WARNING "MTD %s(): software timeout\n", -@@ -2310,6 +2311,7 @@ static int __xipram do_erase_chip(struct +@@ -2312,6 +2313,7 @@ static int __xipram do_erase_chip(struct ret = -EIO; } @@ -47,7 +47,7 @@ chip->state = FL_READY; xip_enable(map, chip, adr); DISABLE_VPP(map); -@@ -2378,9 +2380,9 @@ static int __xipram do_erase_oneblock(st +@@ -2381,9 +2383,9 @@ static int __xipram do_erase_oneblock(st chip->erase_suspended = 0; } @@ -59,7 +59,7 @@ } if (time_after(jiffies, timeo)) { -@@ -2402,6 +2404,7 @@ static int __xipram do_erase_oneblock(st +@@ -2405,6 +2407,7 @@ static int __xipram do_erase_oneblock(st ret = -EIO; } diff --git a/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch index 7f5b2f55a..25a73dcdf 100644 --- a/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch +++ b/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch @@ -35,7 +35,7 @@ /* Atmel chips don't use the same PRI format as AMD chips */ static void fixup_convert_atmel_pri(struct mtd_info *mtd) -@@ -1789,6 +1793,7 @@ static int cfi_amdstd_write_words(struct +@@ -1790,6 +1794,7 @@ static int cfi_amdstd_write_words(struct /* * FIXME: interleaved mode not tested, and probably not supported! */ @@ -43,7 +43,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, unsigned long adr, const u_char *buf, int len) -@@ -1917,7 +1922,6 @@ static int __xipram do_write_buffer(stru +@@ -1918,7 +1923,6 @@ static int __xipram do_write_buffer(stru return ret; } @@ -51,7 +51,7 @@ static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) { -@@ -1992,6 +1996,7 @@ static int cfi_amdstd_write_buffers(stru +@@ -1993,6 +1997,7 @@ static int cfi_amdstd_write_buffers(stru return 0; } diff --git a/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch b/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch index 5428d3d1c..e896d0bdf 100644 --- a/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch +++ b/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -534,6 +534,12 @@ config SPI_QUP +@@ -533,6 +533,12 @@ config SPI_QUP This driver can also be built as a module. If so, the module will be called spi_qup. diff --git a/target/linux/ar71xx/patches-4.9/433-spi-rb4xx-cpld-driver.patch b/target/linux/ar71xx/patches-4.9/433-spi-rb4xx-cpld-driver.patch index b1cd6a545..c44acab32 100644 --- a/target/linux/ar71xx/patches-4.9/433-spi-rb4xx-cpld-driver.patch +++ b/target/linux/ar71xx/patches-4.9/433-spi-rb4xx-cpld-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -762,6 +762,13 @@ config SPI_TLE62X0 +@@ -761,6 +761,13 @@ config SPI_TLE62X0 sysfs interface, with each line presented as a kind of GPIO exposing both switch control and diagnostic feedback. diff --git a/target/linux/ar71xx/patches-4.9/435-spi-vsc7385_driver.patch b/target/linux/ar71xx/patches-4.9/435-spi-vsc7385_driver.patch index fe6acde70..f9f1f7a1e 100644 --- a/target/linux/ar71xx/patches-4.9/435-spi-vsc7385_driver.patch +++ b/target/linux/ar71xx/patches-4.9/435-spi-vsc7385_driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -769,6 +769,11 @@ config SPI_RB4XX_CPLD +@@ -768,6 +768,11 @@ config SPI_RB4XX_CPLD SPI driver for the Xilinx CPLD chip present on the MikroTik RB4xx boards. diff --git a/target/linux/ar71xx/patches-4.9/500-MIPS-fw-myloader.patch b/target/linux/ar71xx/patches-4.9/500-MIPS-fw-myloader.patch index d6a9276c3..301422a7d 100644 --- a/target/linux/ar71xx/patches-4.9/500-MIPS-fw-myloader.patch +++ b/target/linux/ar71xx/patches-4.9/500-MIPS-fw-myloader.patch @@ -10,7 +10,7 @@ --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1149,6 +1149,9 @@ config MIPS_MSC +@@ -1150,6 +1150,9 @@ config MIPS_MSC config MIPS_NILE4 bool diff --git a/target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch b/target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch index c0b5459e4..89dd32a7c 100644 --- a/target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch +++ b/target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch @@ -1,6 +1,6 @@ --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -195,7 +195,6 @@ config ATH79 +@@ -196,7 +196,6 @@ config ATH79 select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_MIPS16 select SYS_SUPPORTS_ZBOOT_UART_PROM diff --git a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch index 464a930f3..4c59876b8 100644 --- a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch @@ -267,7 +267,7 @@ case IPV6_2292HOPOPTS: --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c -@@ -395,7 +395,7 @@ static void ip6gre_err(struct sk_buff *s +@@ -397,7 +397,7 @@ static void ip6gre_err(struct sk_buff *s return; ipv6h = (const struct ipv6hdr *)skb->data; greh = (const struct gre_base_hdr *)(skb->data + offset); @@ -795,7 +795,7 @@ --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -3892,14 +3892,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -3894,14 +3894,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/ar71xx/patches-4.9/930-chipidea-pullup.patch b/target/linux/ar71xx/patches-4.9/930-chipidea-pullup.patch index ce31595d9..1c4ef3891 100644 --- a/target/linux/ar71xx/patches-4.9/930-chipidea-pullup.patch +++ b/target/linux/ar71xx/patches-4.9/930-chipidea-pullup.patch @@ -22,7 +22,7 @@ { ci_hdrc_gadget_destroy(ci); ci_hdrc_host_destroy(ci); -- if (ci->is_otg) +- if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) + if (!ci->dp_always_pullup && ci->roles[CI_ROLE_GADGET]) ci_hdrc_otg_destroy(ci); } @@ -37,8 +37,8 @@ ret = hw_device_init(ci, base); if (ret < 0) { dev_err(dev, "can't initialize hardware\n"); -@@ -955,7 +958,7 @@ static int ci_hdrc_probe(struct platform - goto deinit_phy; +@@ -963,7 +966,7 @@ static int ci_hdrc_probe(struct platform + goto deinit_gadget; } - if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) { diff --git a/target/linux/ath25/patches-4.9/107-ar5312_gpio.patch b/target/linux/ath25/patches-4.9/107-ar5312_gpio.patch index ac729ee48..f42108702 100644 --- a/target/linux/ath25/patches-4.9/107-ar5312_gpio.patch +++ b/target/linux/ath25/patches-4.9/107-ar5312_gpio.patch @@ -202,7 +202,7 @@ +subsys_initcall(ar5312_gpio_init); --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -167,6 +167,7 @@ config ATH25 +@@ -168,6 +168,7 @@ config ATH25 select CEVT_R4K select CSRC_R4K select DMA_NONCOHERENT diff --git a/target/linux/ath25/patches-4.9/130-watchdog.patch b/target/linux/ath25/patches-4.9/130-watchdog.patch index fef3ac098..7009dd928 100644 --- a/target/linux/ath25/patches-4.9/130-watchdog.patch +++ b/target/linux/ath25/patches-4.9/130-watchdog.patch @@ -212,7 +212,7 @@ +MODULE_ALIAS("platform:" DRIVER_NAME); --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -1554,6 +1554,13 @@ config PIC32_DMT +@@ -1555,6 +1555,13 @@ config PIC32_DMT To compile this driver as a loadable module, choose M here. The module will be called pic32-dmt. diff --git a/target/linux/ath79/patches-4.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch b/target/linux/ath79/patches-4.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch index 0d3f9b51c..6c4b907e2 100644 --- a/target/linux/ath79/patches-4.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch +++ b/target/linux/ath79/patches-4.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch @@ -8,11 +8,9 @@ Signed-off-by: John Crispin drivers/tty/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig -index 3682fd3e960c..c92bd969bbf9 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig -@@ -1469,7 +1469,7 @@ config SERIAL_XILINX_PS_UART_CONSOLE +@@ -1463,7 +1463,7 @@ config SERIAL_XILINX_PS_UART_CONSOLE config SERIAL_AR933X tristate "AR933X serial port support" @@ -21,6 +19,3 @@ index 3682fd3e960c..c92bd969bbf9 100644 select SERIAL_CORE help If you have an Atheros AR933X SOC based board and want to use the --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0002-watchdog-ath79-fix-maximum-timeout.patch b/target/linux/ath79/patches-4.14/0002-watchdog-ath79-fix-maximum-timeout.patch index 8cf4fb3c9..36234d8d8 100644 --- a/target/linux/ath79/patches-4.14/0002-watchdog-ath79-fix-maximum-timeout.patch +++ b/target/linux/ath79/patches-4.14/0002-watchdog-ath79-fix-maximum-timeout.patch @@ -11,11 +11,9 @@ Signed-off-by: John Crispin drivers/watchdog/ath79_wdt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c -index e2209bf5fa8a..c2fc6c3d0092 100644 --- a/drivers/watchdog/ath79_wdt.c +++ b/drivers/watchdog/ath79_wdt.c -@@ -115,10 +115,14 @@ static inline void ath79_wdt_disable(void) +@@ -115,10 +115,14 @@ static inline void ath79_wdt_disable(voi static int ath79_wdt_set_timeout(int val) { @@ -32,6 +30,3 @@ index e2209bf5fa8a..c2fc6c3d0092 100644 ath79_wdt_keepalive(); return 0; --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch index 358da3b83..495d79288 100644 --- a/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch +++ b/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch @@ -11,10 +11,8 @@ Signed-off-by: John Crispin 3 files changed, 149 insertions(+) create mode 100644 drivers/leds/leds-reset.c -Index: linux-4.14.32/drivers/leds/Kconfig -=================================================================== ---- linux-4.14.32.orig/drivers/leds/Kconfig -+++ linux-4.14.32/drivers/leds/Kconfig +--- a/drivers/leds/Kconfig ++++ b/drivers/leds/Kconfig @@ -696,6 +696,17 @@ config LEDS_NIC78BX To compile this driver as a module, choose M here: the module will be called leds-nic78bx. @@ -33,10 +31,8 @@ Index: linux-4.14.32/drivers/leds/Kconfig comment "LED Triggers" source "drivers/leds/trigger/Kconfig" -Index: linux-4.14.32/drivers/leds/leds-reset.c -=================================================================== --- /dev/null -+++ linux-4.14.32/drivers/leds/leds-reset.c ++++ b/drivers/leds/leds-reset.c @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2018 John Crispin @@ -175,10 +171,8 @@ Index: linux-4.14.32/drivers/leds/leds-reset.c +MODULE_DESCRIPTION("reset controller LED driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:leds-reset"); -Index: linux-4.14.32/drivers/leds/Makefile -=================================================================== ---- linux-4.14.32.orig/drivers/leds/Makefile -+++ linux-4.14.32/drivers/leds/Makefile +--- a/drivers/leds/Makefile ++++ b/drivers/leds/Makefile @@ -73,6 +73,7 @@ obj-$(CONFIG_LEDS_PM8058) += leds-pm805 obj-$(CONFIG_LEDS_MLXCPLD) += leds-mlxcpld.o obj-$(CONFIG_LEDS_NIC78BX) += leds-nic78bx.o diff --git a/target/linux/ath79/patches-4.14/0004-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-4.14/0004-phy-add-ath79-usb-phys.patch index 38763d2d7..6280baf91 100644 --- a/target/linux/ath79/patches-4.14/0004-phy-add-ath79-usb-phys.patch +++ b/target/linux/ath79/patches-4.14/0004-phy-add-ath79-usb-phys.patch @@ -13,10 +13,8 @@ Signed-off-by: John Crispin create mode 100644 drivers/phy/phy-ar7100-usb.c create mode 100644 drivers/phy/phy-ar7200-usb.c -Index: linux-4.14.37/drivers/phy/Kconfig -=================================================================== ---- linux-4.14.37.orig/drivers/phy/Kconfig -+++ linux-4.14.37/drivers/phy/Kconfig +--- a/drivers/phy/Kconfig ++++ b/drivers/phy/Kconfig @@ -15,6 +15,22 @@ config GENERIC_PHY phy users can obtain reference to the PHY. All the users of this framework should select this config. @@ -40,10 +38,8 @@ Index: linux-4.14.37/drivers/phy/Kconfig config PHY_LPC18XX_USB_OTG tristate "NXP LPC18xx/43xx SoC USB OTG PHY driver" depends on OF && (ARCH_LPC18XX || COMPILE_TEST) -Index: linux-4.14.37/drivers/phy/Makefile -=================================================================== ---- linux-4.14.37.orig/drivers/phy/Makefile -+++ linux-4.14.37/drivers/phy/Makefile +--- a/drivers/phy/Makefile ++++ b/drivers/phy/Makefile @@ -4,6 +4,8 @@ # @@ -53,10 +49,8 @@ Index: linux-4.14.37/drivers/phy/Makefile obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o obj-$(CONFIG_PHY_XGENE) += phy-xgene.o obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o -Index: linux-4.14.37/drivers/phy/phy-ar7100-usb.c -=================================================================== --- /dev/null -+++ linux-4.14.37/drivers/phy/phy-ar7100-usb.c ++++ b/drivers/phy/phy-ar7100-usb.c @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2018 John Crispin @@ -198,10 +192,8 @@ Index: linux-4.14.37/drivers/phy/phy-ar7100-usb.c +MODULE_DESCRIPTION("ATH79 USB PHY driver"); +MODULE_AUTHOR("Alban Bedel "); +MODULE_LICENSE("GPL"); -Index: linux-4.14.37/drivers/phy/phy-ar7200-usb.c -=================================================================== --- /dev/null -+++ linux-4.14.37/drivers/phy/phy-ar7200-usb.c ++++ b/drivers/phy/phy-ar7200-usb.c @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2015 Alban Bedel diff --git a/target/linux/ath79/patches-4.14/0005-usb-add-more-OF-quirk-properties.patch b/target/linux/ath79/patches-4.14/0005-usb-add-more-OF-quirk-properties.patch index a87fd7097..ec1bc3f7f 100644 --- a/target/linux/ath79/patches-4.14/0005-usb-add-more-OF-quirk-properties.patch +++ b/target/linux/ath79/patches-4.14/0005-usb-add-more-OF-quirk-properties.patch @@ -8,11 +8,9 @@ Signed-off-by: John Crispin drivers/usb/host/ehci-platform.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c -index b065a960adc2..b1cc841b5399 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -185,6 +185,11 @@ static int ehci_platform_probe(struct platform_device *dev) +@@ -187,6 +187,11 @@ static int ehci_platform_probe(struct pl ehci = hcd_to_ehci(hcd); if (pdata == &ehci_platform_defaults && dev->dev.of_node) { @@ -24,6 +22,3 @@ index b065a960adc2..b1cc841b5399 100644 if (of_property_read_bool(dev->dev.of_node, "big-endian-regs")) ehci->big_endian_mmio = 1; --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0006-usb-drop-deprecated-symbols.patch b/target/linux/ath79/patches-4.14/0006-usb-drop-deprecated-symbols.patch index 6821aa74f..a97fab71f 100644 --- a/target/linux/ath79/patches-4.14/0006-usb-drop-deprecated-symbols.patch +++ b/target/linux/ath79/patches-4.14/0006-usb-drop-deprecated-symbols.patch @@ -8,11 +8,9 @@ Signed-off-by: John Crispin drivers/usb/host/Kconfig | 25 ------------------------- 1 file changed, 25 deletions(-) -diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 4fcfb3084b36..55b45dcd7a4b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig -@@ -293,19 +293,6 @@ config USB_CNS3XXX_EHCI +@@ -297,19 +297,6 @@ config USB_CNS3XXX_EHCI It is needed for high-speed (480Mbit/sec) USB 2.0 device support. @@ -32,7 +30,7 @@ index 4fcfb3084b36..55b45dcd7a4b 100644 config USB_EHCI_HCD_PLATFORM tristate "Generic EHCI driver for a platform device" default n -@@ -489,18 +476,6 @@ config USB_OHCI_HCD_DAVINCI +@@ -493,18 +480,6 @@ config USB_OHCI_HCD_DAVINCI controller. This driver cannot currently be a loadable module because it lacks a proper PHY abstraction. @@ -51,6 +49,3 @@ index 4fcfb3084b36..55b45dcd7a4b 100644 config USB_OHCI_HCD_PPC_OF_BE bool "OHCI support for OF platform bus (big endian)" depends on PPC --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0007-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch b/target/linux/ath79/patches-4.14/0007-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch index 18c9fd4e1..72a7a5ee2 100644 --- a/target/linux/ath79/patches-4.14/0007-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch +++ b/target/linux/ath79/patches-4.14/0007-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch @@ -11,8 +11,6 @@ Signed-off-by: John Crispin 2 files changed, 105 insertions(+) create mode 100644 drivers/irqchip/irq-ath79-intc.c -diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile -index d27e3e3619e0..f63c94a92e25 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -3,6 +3,7 @@ obj-$(CONFIG_IRQCHIP) += irqchip.o @@ -23,9 +21,6 @@ index d27e3e3619e0..f63c94a92e25 100644 obj-$(CONFIG_ATH79) += irq-ath79-misc.o obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2836.o -diff --git a/drivers/irqchip/irq-ath79-intc.c b/drivers/irqchip/irq-ath79-intc.c -new file mode 100644 -index 000000000000..a26d3efe6e10 --- /dev/null +++ b/drivers/irqchip/irq-ath79-intc.c @@ -0,0 +1,104 @@ @@ -133,6 +128,3 @@ index 000000000000..a26d3efe6e10 +} +IRQCHIP_DECLARE(qca9556_intc, "qcom,qca9556-intc", + qca9556_intc_of_init); --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0008-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch b/target/linux/ath79/patches-4.14/0008-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch index 8c364cbce..84e066e2a 100644 --- a/target/linux/ath79/patches-4.14/0008-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch +++ b/target/linux/ath79/patches-4.14/0008-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch @@ -8,8 +8,6 @@ Signed-off-by: John Crispin drivers/irqchip/irq-ath79-cpu.c | 7 ------- 1 file changed, 7 deletions(-) -diff --git a/drivers/irqchip/irq-ath79-cpu.c b/drivers/irqchip/irq-ath79-cpu.c -index befe93c5a51a..f29cb9c933f5 100644 --- a/drivers/irqchip/irq-ath79-cpu.c +++ b/drivers/irqchip/irq-ath79-cpu.c @@ -88,10 +88,3 @@ static int __init ar79_cpu_intc_of_init( @@ -23,6 +21,3 @@ index befe93c5a51a..f29cb9c933f5 100644 - irq_wb_chan[3] = irq_wb_chan3; - mips_cpu_irq_init(); -} --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0009-MIPS-ath79-add-lots-of-missing-registers.patch b/target/linux/ath79/patches-4.14/0009-MIPS-ath79-add-lots-of-missing-registers.patch index 6b6d93450..5963ee899 100644 --- a/target/linux/ath79/patches-4.14/0009-MIPS-ath79-add-lots-of-missing-registers.patch +++ b/target/linux/ath79/patches-4.14/0009-MIPS-ath79-add-lots-of-missing-registers.patch @@ -8,8 +8,6 @@ Signed-off-by: John Crispin arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 773 ++++++++++++++++++++++++- 1 file changed, 771 insertions(+), 2 deletions(-) -diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -index aa3800c82332..284b4fa23e03 100644 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h @@ -20,6 +20,10 @@ @@ -399,7 +397,6 @@ index aa3800c82332..284b4fa23e03 100644 #define AR934X_RESET_USB_HOST BIT(5) #define AR934X_RESET_USB_PHY BIT(4) #define AR934X_RESET_USBSUS_OVERRIDE BIT(3) -- +#define AR934X_RESET_LUT BIT(2) +#define AR934X_RESET_MBOX BIT(1) +#define AR934X_RESET_I2S BIT(0) @@ -476,7 +473,7 @@ index aa3800c82332..284b4fa23e03 100644 +#define QCA956X_RESET_USBSUS_OVERRIDE BIT(3) +#define QCA956X_RESET_SWITCH_ANALOG BIT(2) +#define QCA956X_RESET_SWITCH BIT(0) -+ + +#define AR933X_BOOTSTRAP_MDIO_GPIO_EN BIT(18) +#define AR933X_BOOTSTRAP_EEPBUSY BIT(4) #define AR933X_BOOTSTRAP_REF_CLK_40 BIT(0) @@ -972,6 +969,3 @@ index aa3800c82332..284b4fa23e03 100644 +#define QCA956X_SGMII_CONFIG_MODE_CTRL_MASK 0x7 + #endif /* __ASM_MACH_AR71XX_REGS_H */ --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0010-MIPS-ath79-select-the-PINCTRL-subsystem.patch b/target/linux/ath79/patches-4.14/0010-MIPS-ath79-select-the-PINCTRL-subsystem.patch index b6704708a..cd3f96c3f 100644 --- a/target/linux/ath79/patches-4.14/0010-MIPS-ath79-select-the-PINCTRL-subsystem.patch +++ b/target/linux/ath79/patches-4.14/0010-MIPS-ath79-select-the-PINCTRL-subsystem.patch @@ -8,11 +8,9 @@ Signed-off-by: John Crispin arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig -index 8128c3b68d6b..922a53cb1b3d 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -188,6 +188,7 @@ config ATH79 +@@ -191,6 +191,7 @@ config ATH79 select CSRC_R4K select DMA_NONCOHERENT select GPIOLIB @@ -20,6 +18,3 @@ index 8128c3b68d6b..922a53cb1b3d 100644 select HAVE_CLK select COMMON_CLK select CLKDEV_LOOKUP --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch b/target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch index c7ad39e12..85ee24c20 100644 --- a/target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch +++ b/target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch @@ -14,8 +14,6 @@ Signed-off-by: Felix Fietkau arch/mips/ath79/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c -index 10a405d593df..c782b10ddf50 100644 --- a/arch/mips/ath79/common.c +++ b/arch/mips/ath79/common.c @@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init); @@ -27,6 +25,3 @@ index 10a405d593df..c782b10ddf50 100644 /* Flush the DDR write buffer. */ __raw_writel(0x1, flush_reg); --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0012-MIPS-ath79-Avoid-using-unitialized-reg-variable.patch b/target/linux/ath79/patches-4.14/0012-MIPS-ath79-Avoid-using-unitialized-reg-variable.patch index c622617e5..2b744ee94 100644 --- a/target/linux/ath79/patches-4.14/0012-MIPS-ath79-Avoid-using-unitialized-reg-variable.patch +++ b/target/linux/ath79/patches-4.14/0012-MIPS-ath79-Avoid-using-unitialized-reg-variable.patch @@ -20,8 +20,6 @@ Acked-by: Gabor Juhos arch/mips/ath79/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c -index c782b10ddf50..a32a9181a296 100644 --- a/arch/mips/ath79/common.c +++ b/arch/mips/ath79/common.c @@ -106,7 +106,7 @@ void ath79_device_reset_set(u32 mask) @@ -42,6 +40,3 @@ index c782b10ddf50..a32a9181a296 100644 spin_lock_irqsave(&ath79_device_reset_lock, flags); t = ath79_reset_rr(reg); --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0013-MIPS-ath79-fix-system-restart.patch b/target/linux/ath79/patches-4.14/0013-MIPS-ath79-fix-system-restart.patch index ecf275db8..969636128 100644 --- a/target/linux/ath79/patches-4.14/0013-MIPS-ath79-fix-system-restart.patch +++ b/target/linux/ath79/patches-4.14/0013-MIPS-ath79-fix-system-restart.patch @@ -10,11 +10,9 @@ Signed-off-by: John Crispin arch/mips/include/asm/mach-ath79/ath79.h | 1 + 2 files changed, 2 insertions(+) -diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c -index f206dafbb0a3..26a058d58d37 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c -@@ -40,6 +40,7 @@ static char ath79_sys_type[ATH79_SYS_TYPE_LEN]; +@@ -40,6 +40,7 @@ static char ath79_sys_type[ATH79_SYS_TYP static void ath79_restart(char *command) { @@ -22,11 +20,9 @@ index f206dafbb0a3..26a058d58d37 100644 ath79_device_reset_set(AR71XX_RESET_FULL_CHIP); for (;;) if (cpu_wait) -diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h -index 441faa92c3cd..6e6c0fead776 100644 --- a/arch/mips/include/asm/mach-ath79/ath79.h +++ b/arch/mips/include/asm/mach-ath79/ath79.h -@@ -134,6 +134,7 @@ static inline u32 ath79_pll_rr(unsigned reg) +@@ -134,6 +134,7 @@ static inline u32 ath79_pll_rr(unsigned static inline void ath79_reset_wr(unsigned reg, u32 val) { __raw_writel(val, ath79_reset_base + reg); @@ -34,6 +30,3 @@ index 441faa92c3cd..6e6c0fead776 100644 } static inline u32 ath79_reset_rr(unsigned reg) --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0014-MIPS-ath79-finetune-cpu-overrides.patch b/target/linux/ath79/patches-4.14/0014-MIPS-ath79-finetune-cpu-overrides.patch index d3f981070..e390e584f 100644 --- a/target/linux/ath79/patches-4.14/0014-MIPS-ath79-finetune-cpu-overrides.patch +++ b/target/linux/ath79/patches-4.14/0014-MIPS-ath79-finetune-cpu-overrides.patch @@ -8,8 +8,6 @@ Signed-off-by: Felix Fietkau arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h | 6 ++++++ 1 file changed, 6 insertions(+) -diff --git a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h -index 0089a740e5ae..026ad90c8ac0 100644 --- a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h @@ -36,6 +36,7 @@ @@ -38,6 +36,3 @@ index 0089a740e5ae..026ad90c8ac0 100644 +#define cpu_has_pindexed_dcache 0 #endif /* __ASM_MACH_ATH79_CPU_FEATURE_OVERRIDES_H */ --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0015-MIPS-ath79-enable-uart-during-early_prink.patch b/target/linux/ath79/patches-4.14/0015-MIPS-ath79-enable-uart-during-early_prink.patch index a46603727..5826d0176 100644 --- a/target/linux/ath79/patches-4.14/0015-MIPS-ath79-enable-uart-during-early_prink.patch +++ b/target/linux/ath79/patches-4.14/0015-MIPS-ath79-enable-uart-during-early_prink.patch @@ -8,11 +8,9 @@ Signed-off-by: Gabor Juhos arch/mips/ath79/early_printk.c | 44 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) -diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c -index d1adc59af5bf..ec3978678653 100644 --- a/arch/mips/ath79/early_printk.c +++ b/arch/mips/ath79/early_printk.c -@@ -58,6 +58,46 @@ static void prom_putchar_dummy(unsigned char ch) +@@ -58,6 +58,46 @@ static void prom_putchar_dummy(unsigned /* nothing to do */ } @@ -71,6 +69,3 @@ index d1adc59af5bf..ec3978678653 100644 } void prom_putchar(unsigned char ch) --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0016-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ath79/patches-4.14/0016-MIPS-ath79-add-support-for-QCA953x-SoC.patch index 0eb1831c5..0432a23d1 100644 --- a/target/linux/ath79/patches-4.14/0016-MIPS-ath79-add-support-for-QCA953x-SoC.patch +++ b/target/linux/ath79/patches-4.14/0016-MIPS-ath79-add-support-for-QCA953x-SoC.patch @@ -18,8 +18,6 @@ Signed-off-by: Matthias Schiffer arch/mips/include/asm/mach-ath79/ath79.h | 11 ++++ 8 files changed, 162 insertions(+), 6 deletions(-) -diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig -index 9547cf1ea38d..b03f5c8b9d1e 100644 --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig @@ -94,6 +94,10 @@ config SOC_AR934X @@ -42,11 +40,9 @@ index 9547cf1ea38d..b03f5c8b9d1e 100644 def_bool n endif -diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c -index 6b1000b6a6a6..b9595b2d1b65 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c -@@ -355,6 +355,91 @@ static void __init ar934x_clocks_init(void) +@@ -355,6 +355,91 @@ static void __init ar934x_clocks_init(vo iounmap(dpll_base); } @@ -147,8 +143,6 @@ index 6b1000b6a6a6..b9595b2d1b65 100644 else if (soc_is_qca955x()) qca955x_clocks_init(); else -diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c -index a32a9181a296..a485a7c35b9b 100644 --- a/arch/mips/ath79/common.c +++ b/arch/mips/ath79/common.c @@ -103,6 +103,8 @@ void ath79_device_reset_set(u32 mask) @@ -169,8 +163,6 @@ index a32a9181a296..a485a7c35b9b 100644 else if (soc_is_qca955x()) reg = QCA955X_RESET_REG_RESET_MODULE; else -diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c -index 9d0172a4dc69..99d8b88f1e6d 100644 --- a/arch/mips/ath79/dev-common.c +++ b/arch/mips/ath79/dev-common.c @@ -85,6 +85,7 @@ void __init ath79_register_uart(void) @@ -191,8 +183,6 @@ index 9d0172a4dc69..99d8b88f1e6d 100644 } else if (soc_is_qca955x()) { ath79_gpio_pdata.ngpios = QCA955X_GPIO_COUNT; ath79_gpio_pdata.oe_inverted = 1; -diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c -index ec3978678653..cc00839b7181 100644 --- a/arch/mips/ath79/early_printk.c +++ b/arch/mips/ath79/early_printk.c @@ -116,6 +116,8 @@ static void prom_putchar_init(void) @@ -204,8 +194,6 @@ index ec3978678653..cc00839b7181 100644 case REV_ID_MAJOR_QCA9556: case REV_ID_MAJOR_QCA9558: _prom_putchar = prom_putchar_ar71xx; -diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c -index 2dfff1f19004..756b5aee3500 100644 --- a/arch/mips/ath79/irq.c +++ b/arch/mips/ath79/irq.c @@ -56,6 +56,34 @@ static void ar934x_ip2_irq_init(void) @@ -269,11 +257,9 @@ index 2dfff1f19004..756b5aee3500 100644 else if (soc_is_qca955x()) qca955x_irq_init(); } -diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c -index 26a058d58d37..f782ae6c77d6 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c -@@ -60,6 +60,7 @@ static void __init ath79_detect_sys_type(void) +@@ -60,6 +60,7 @@ static void __init ath79_detect_sys_type u32 major; u32 minor; u32 rev = 0; @@ -281,7 +267,7 @@ index 26a058d58d37..f782ae6c77d6 100644 id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID); major = id & REV_ID_MAJOR_MASK; -@@ -152,6 +153,17 @@ static void __init ath79_detect_sys_type(void) +@@ -152,6 +153,17 @@ static void __init ath79_detect_sys_type rev = id & AR934X_REV_ID_REVISION_MASK; break; @@ -299,7 +285,7 @@ index 26a058d58d37..f782ae6c77d6 100644 case REV_ID_MAJOR_QCA9556: ath79_soc = ATH79_SOC_QCA9556; chip = "9556"; -@@ -168,11 +180,12 @@ static void __init ath79_detect_sys_type(void) +@@ -168,11 +180,12 @@ static void __init ath79_detect_sys_type panic("ath79: unknown SoC, id:0x%08x", id); } @@ -316,8 +302,6 @@ index 26a058d58d37..f782ae6c77d6 100644 else sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); pr_info("SoC: %s\n", ath79_sys_type); -diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h -index 6e6c0fead776..98a7ccf3d358 100644 --- a/arch/mips/include/asm/mach-ath79/ath79.h +++ b/arch/mips/include/asm/mach-ath79/ath79.h @@ -32,6 +32,7 @@ enum ath79_soc_type { @@ -345,6 +329,3 @@ index 6e6c0fead776..98a7ccf3d358 100644 static inline int soc_is_qca9556(void) { return ath79_soc == ATH79_SOC_QCA9556; --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0017-MIPS-ath79-add-support-for-qca956x-soc.patch b/target/linux/ath79/patches-4.14/0017-MIPS-ath79-add-support-for-qca956x-soc.patch index 052d23c8b..294fb32a1 100644 --- a/target/linux/ath79/patches-4.14/0017-MIPS-ath79-add-support-for-qca956x-soc.patch +++ b/target/linux/ath79/patches-4.14/0017-MIPS-ath79-add-support-for-qca956x-soc.patch @@ -22,8 +22,6 @@ Signed-off-by: Weijie Gao arch/mips/include/asm/mach-ath79/ath79.h | 22 ++++++++ 9 files changed, 245 insertions(+), 4 deletions(-) -diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig -index b03f5c8b9d1e..ad56cdbc8abd 100644 --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig @@ -119,7 +119,7 @@ config ATH79_DEV_USB @@ -35,11 +33,9 @@ index b03f5c8b9d1e..ad56cdbc8abd 100644 def_bool n endif -diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c -index b9595b2d1b65..65701b45fb1b 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c -@@ -525,6 +525,100 @@ static void __init qca955x_clocks_init(void) +@@ -525,6 +525,100 @@ static void __init qca955x_clocks_init(v clk_add_alias("uart", NULL, "ref", NULL); } @@ -149,8 +145,6 @@ index b9595b2d1b65..65701b45fb1b 100644 else BUG(); } -diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c -index a485a7c35b9b..fc3438150b3e 100644 --- a/arch/mips/ath79/common.c +++ b/arch/mips/ath79/common.c @@ -107,6 +107,8 @@ void ath79_device_reset_set(u32 mask) @@ -171,8 +165,6 @@ index a485a7c35b9b..fc3438150b3e 100644 else panic("Reset register not defined for this SOC"); -diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c -index 99d8b88f1e6d..ac8bfe86b656 100644 --- a/arch/mips/ath79/dev-common.c +++ b/arch/mips/ath79/dev-common.c @@ -86,7 +86,9 @@ void __init ath79_register_uart(void) @@ -196,8 +188,6 @@ index 99d8b88f1e6d..ac8bfe86b656 100644 } else { BUG(); } -diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c -index cc00839b7181..2024a0bb9144 100644 --- a/arch/mips/ath79/early_printk.c +++ b/arch/mips/ath79/early_printk.c @@ -120,6 +120,8 @@ static void prom_putchar_init(void) @@ -209,8 +199,6 @@ index cc00839b7181..2024a0bb9144 100644 _prom_putchar = prom_putchar_ar71xx; break; -diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c -index 756b5aee3500..58d17ef6f58f 100644 --- a/arch/mips/ath79/irq.c +++ b/arch/mips/ath79/irq.c @@ -156,6 +156,87 @@ static void qca955x_irq_init(void) @@ -319,11 +307,9 @@ index 756b5aee3500..58d17ef6f58f 100644 + else if (soc_is_qca956x() || soc_is_tp9343()) + qca956x_irq_init(); } -diff --git a/arch/mips/ath79/pci.c b/arch/mips/ath79/pci.c -index b816cb4a25ff..d905a67e1a07 100644 --- a/arch/mips/ath79/pci.c +++ b/arch/mips/ath79/pci.c -@@ -82,6 +82,9 @@ int pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin) +@@ -82,6 +82,9 @@ int pcibios_map_irq(const struct pci_dev } else if (soc_is_qca955x()) { ath79_pci_irq_map = qca955x_pci_irq_map; ath79_pci_nr_irqs = ARRAY_SIZE(qca955x_pci_irq_map); @@ -349,11 +335,9 @@ index b816cb4a25ff..d905a67e1a07 100644 } else { /* No PCI support */ return -ENODEV; -diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c -index f782ae6c77d6..4c7a93f4039a 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c -@@ -176,6 +176,18 @@ static void __init ath79_detect_sys_type(void) +@@ -176,6 +176,18 @@ static void __init ath79_detect_sys_type rev = id & QCA955X_REV_ID_REVISION_MASK; break; @@ -372,7 +356,7 @@ index f782ae6c77d6..4c7a93f4039a 100644 default: panic("ath79: unknown SoC, id:0x%08x", id); } -@@ -183,9 +195,12 @@ static void __init ath79_detect_sys_type(void) +@@ -183,9 +195,12 @@ static void __init ath79_detect_sys_type if (ver == 1) ath79_soc_rev = rev; @@ -386,8 +370,6 @@ index f782ae6c77d6..4c7a93f4039a 100644 else sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); pr_info("SoC: %s\n", ath79_sys_type); -diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h -index 98a7ccf3d358..73dcd63b8243 100644 --- a/arch/mips/include/asm/mach-ath79/ath79.h +++ b/arch/mips/include/asm/mach-ath79/ath79.h @@ -35,6 +35,8 @@ enum ath79_soc_type { @@ -426,6 +408,3 @@ index 98a7ccf3d358..73dcd63b8243 100644 void ath79_ddr_wb_flush(unsigned int reg); void ath79_ddr_set_pci_windows(void); --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0019-MIPS-ath79-get-PCIe-controller-out-of-reset.patch b/target/linux/ath79/patches-4.14/0019-MIPS-ath79-get-PCIe-controller-out-of-reset.patch index 2148637f9..f435e9bc1 100644 --- a/target/linux/ath79/patches-4.14/0019-MIPS-ath79-get-PCIe-controller-out-of-reset.patch +++ b/target/linux/ath79/patches-4.14/0019-MIPS-ath79-get-PCIe-controller-out-of-reset.patch @@ -25,8 +25,6 @@ Signed-off-by: Mathias Kresin arch/mips/pci/pci-ar724x.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) -diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c -index 1e23c8d587bd..64b58cc48a91 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c @@ -12,14 +12,18 @@ @@ -48,7 +46,7 @@ index 1e23c8d587bd..64b58cc48a91 100644 #define AR724X_PCI_RESET_LINK_UP BIT(0) #define AR724X_PCI_INT_DEV0 BIT(14) -@@ -325,6 +329,37 @@ static void ar724x_pci_irq_init(struct ar724x_pci_controller *apc, +@@ -325,6 +329,37 @@ static void ar724x_pci_irq_init(struct a apc); } @@ -86,7 +84,7 @@ index 1e23c8d587bd..64b58cc48a91 100644 static int ar724x_pci_probe(struct platform_device *pdev) { struct ar724x_pci_controller *apc; -@@ -383,6 +418,13 @@ static int ar724x_pci_probe(struct platform_device *pdev) +@@ -383,6 +418,13 @@ static int ar724x_pci_probe(struct platf apc->pci_controller.io_resource = &apc->io_res; apc->pci_controller.mem_resource = &apc->mem_res; @@ -100,6 +98,3 @@ index 1e23c8d587bd..64b58cc48a91 100644 apc->link_up = ar724x_pci_check_link(apc); if (!apc->link_up) dev_warn(&pdev->dev, "PCIe link is down\n"); --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0020-MIPS-ath79-turn-pci-ar71xx-driver-into-a-pure-OF-dri.patch b/target/linux/ath79/patches-4.14/0020-MIPS-ath79-turn-pci-ar71xx-driver-into-a-pure-OF-dri.patch index d25f265d8..2d9ddf4a2 100644 --- a/target/linux/ath79/patches-4.14/0020-MIPS-ath79-turn-pci-ar71xx-driver-into-a-pure-OF-dri.patch +++ b/target/linux/ath79/patches-4.14/0020-MIPS-ath79-turn-pci-ar71xx-driver-into-a-pure-OF-dri.patch @@ -9,8 +9,6 @@ Signed-off-by: John Crispin arch/mips/pci/pci-ar71xx.c | 81 +++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 41 deletions(-) -diff --git a/arch/mips/pci/pci-ar71xx.c b/arch/mips/pci/pci-ar71xx.c -index bdf87b43633f..1dc9f01a495d 100644 --- a/arch/mips/pci/pci-ar71xx.c +++ b/arch/mips/pci/pci-ar71xx.c @@ -18,8 +18,11 @@ @@ -78,7 +76,7 @@ index bdf87b43633f..1dc9f01a495d 100644 } static void ar71xx_pci_irq_unmask(struct irq_data *d) -@@ -261,7 +266,7 @@ static void ar71xx_pci_irq_unmask(struct irq_data *d) +@@ -261,7 +266,7 @@ static void ar71xx_pci_irq_unmask(struct u32 t; apc = irq_data_get_irq_chip_data(d); @@ -87,7 +85,7 @@ index bdf87b43633f..1dc9f01a495d 100644 t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE); __raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE); -@@ -278,7 +283,7 @@ static void ar71xx_pci_irq_mask(struct irq_data *d) +@@ -278,7 +283,7 @@ static void ar71xx_pci_irq_mask(struct i u32 t; apc = irq_data_get_irq_chip_data(d); @@ -96,7 +94,7 @@ index bdf87b43633f..1dc9f01a495d 100644 t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE); __raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE); -@@ -294,24 +299,30 @@ static struct irq_chip ar71xx_pci_irq_chip = { +@@ -294,24 +299,30 @@ static struct irq_chip ar71xx_pci_irq_ch .irq_mask_ack = ar71xx_pci_irq_mask, }; @@ -150,7 +148,7 @@ index bdf87b43633f..1dc9f01a495d 100644 static int ar71xx_pci_probe(struct platform_device *pdev) { struct ar71xx_pci_controller *apc; -@@ -348,26 +364,6 @@ static int ar71xx_pci_probe(struct platform_device *pdev) +@@ -348,26 +364,6 @@ static int ar71xx_pci_probe(struct platf if (apc->irq < 0) return -EINVAL; @@ -177,7 +175,7 @@ index bdf87b43633f..1dc9f01a495d 100644 ar71xx_pci_reset(); /* setup COMMAND register */ -@@ -380,9 +376,11 @@ static int ar71xx_pci_probe(struct platform_device *pdev) +@@ -380,9 +376,11 @@ static int ar71xx_pci_probe(struct platf ar71xx_pci_irq_init(apc); @@ -189,7 +187,7 @@ index bdf87b43633f..1dc9f01a495d 100644 register_pci_controller(&apc->pci_ctrl); -@@ -393,6 +391,7 @@ static struct platform_driver ar71xx_pci_driver = { +@@ -393,6 +391,7 @@ static struct platform_driver ar71xx_pci .probe = ar71xx_pci_probe, .driver = { .name = "ar71xx-pci", @@ -197,6 +195,3 @@ index bdf87b43633f..1dc9f01a495d 100644 }, }; --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0021-MIPS-ath79-turn-pci-ar724x-driver-into-a-pure-OF-dri.patch b/target/linux/ath79/patches-4.14/0021-MIPS-ath79-turn-pci-ar724x-driver-into-a-pure-OF-dri.patch index e3eba5a5f..d5ebeb87a 100644 --- a/target/linux/ath79/patches-4.14/0021-MIPS-ath79-turn-pci-ar724x-driver-into-a-pure-OF-dri.patch +++ b/target/linux/ath79/patches-4.14/0021-MIPS-ath79-turn-pci-ar724x-driver-into-a-pure-OF-dri.patch @@ -9,8 +9,6 @@ Signed-off-by: John Crispin arch/mips/pci/pci-ar724x.c | 86 +++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 46 deletions(-) -diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c -index 64b58cc48a91..7eb9b0999c8c 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c @@ -14,8 +14,11 @@ @@ -91,7 +89,7 @@ index 64b58cc48a91..7eb9b0999c8c 100644 case 0: t = __raw_readl(base + AR724X_PCI_REG_INT_MASK); __raw_writel(t | AR724X_PCI_INT_DEV0, -@@ -273,14 +275,12 @@ static void ar724x_pci_irq_mask(struct irq_data *d) +@@ -273,14 +275,12 @@ static void ar724x_pci_irq_mask(struct i { struct ar724x_pci_controller *apc; void __iomem *base; @@ -107,7 +105,7 @@ index 64b58cc48a91..7eb9b0999c8c 100644 case 0: t = __raw_readl(base + AR724X_PCI_REG_INT_MASK); __raw_writel(t & ~AR724X_PCI_INT_DEV0, -@@ -305,26 +305,32 @@ static struct irq_chip ar724x_pci_irq_chip = { +@@ -305,26 +305,32 @@ static struct irq_chip ar724x_pci_irq_ch .irq_mask_ack = ar724x_pci_irq_mask, }; @@ -150,7 +148,7 @@ index 64b58cc48a91..7eb9b0999c8c 100644 irq_set_chained_handler_and_data(apc->irq, ar724x_pci_irq_handler, apc); } -@@ -394,29 +400,11 @@ static int ar724x_pci_probe(struct platform_device *pdev) +@@ -394,29 +400,11 @@ static int ar724x_pci_probe(struct platf if (apc->irq < 0) return -EINVAL; @@ -182,7 +180,7 @@ index 64b58cc48a91..7eb9b0999c8c 100644 /* * Do the full PCIE Root Complex Initialization Sequence if the PCIe -@@ -438,10 +426,16 @@ static int ar724x_pci_probe(struct platform_device *pdev) +@@ -438,10 +426,16 @@ static int ar724x_pci_probe(struct platf return 0; } @@ -199,6 +197,3 @@ index 64b58cc48a91..7eb9b0999c8c 100644 }, }; --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0022-MIPS-ath79-drop-pci.c.patch b/target/linux/ath79/patches-4.14/0022-MIPS-ath79-drop-pci.c.patch index 036bfc31c..58ed122c6 100644 --- a/target/linux/ath79/patches-4.14/0022-MIPS-ath79-drop-pci.c.patch +++ b/target/linux/ath79/patches-4.14/0022-MIPS-ath79-drop-pci.c.patch @@ -16,10 +16,8 @@ Signed-off-by: John Crispin delete mode 100644 arch/mips/ath79/pci.c create mode 100644 arch/mips/pci/fixup-ath79.c -Index: linux-4.14.25/arch/mips/ath79/Makefile -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/Makefile -+++ linux-4.14.25/arch/mips/ath79/Makefile +--- a/arch/mips/ath79/Makefile ++++ b/arch/mips/ath79/Makefile @@ -11,7 +11,6 @@ obj-y := prom.o setup.o irq.o common.o clock.o @@ -28,9 +26,7 @@ Index: linux-4.14.25/arch/mips/ath79/Makefile # # Devices -Index: linux-4.14.25/arch/mips/ath79/pci.c -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/pci.c +--- a/arch/mips/ath79/pci.c +++ /dev/null @@ -1,285 +0,0 @@ -/* @@ -318,10 +314,8 @@ Index: linux-4.14.25/arch/mips/ath79/pci.c - - return pdev ? 0 : -ENODEV; -} -Index: linux-4.14.25/arch/mips/pci/Makefile -=================================================================== ---- linux-4.14.25.orig/arch/mips/pci/Makefile -+++ linux-4.14.25/arch/mips/pci/Makefile +--- a/arch/mips/pci/Makefile ++++ b/arch/mips/pci/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_MIPS_PCI_VIRTIO) += pci-vir # # These are still pretty much in the old state, watch, go blind. @@ -330,10 +324,8 @@ Index: linux-4.14.25/arch/mips/pci/Makefile obj-$(CONFIG_LASAT) += pci-lasat.o obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-loongson2.o -Index: linux-4.14.25/arch/mips/pci/fixup-ath79.c -=================================================================== --- /dev/null -+++ linux-4.14.25/arch/mips/pci/fixup-ath79.c ++++ b/arch/mips/pci/fixup-ath79.c @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2018 John Crispin diff --git a/target/linux/ath79/patches-4.14/0023-MIPS-ath79-drop-mach-files.patch b/target/linux/ath79/patches-4.14/0023-MIPS-ath79-drop-mach-files.patch index b491371e0..2d9a9bc97 100644 --- a/target/linux/ath79/patches-4.14/0023-MIPS-ath79-drop-mach-files.patch +++ b/target/linux/ath79/patches-4.14/0023-MIPS-ath79-drop-mach-files.patch @@ -21,10 +21,8 @@ Signed-off-by: John Crispin delete mode 100644 arch/mips/ath79/mach-pb44.c delete mode 100644 arch/mips/ath79/mach-ubnt-xm.c -Index: linux-4.14.25/arch/mips/ath79/Kconfig -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/Kconfig -+++ linux-4.14.25/arch/mips/ath79/Kconfig +--- a/arch/mips/ath79/Kconfig ++++ b/arch/mips/ath79/Kconfig @@ -1,79 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 if ATH79 @@ -105,10 +103,8 @@ Index: linux-4.14.25/arch/mips/ath79/Kconfig config SOC_AR71XX select HW_HAS_PCI def_bool n -Index: linux-4.14.25/arch/mips/ath79/Makefile -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/Makefile -+++ linux-4.14.25/arch/mips/ath79/Makefile +--- a/arch/mips/ath79/Makefile ++++ b/arch/mips/ath79/Makefile @@ -21,13 +21,3 @@ obj-$(CONFIG_ATH79_DEV_LEDS_GPIO) += dev obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o obj-$(CONFIG_ATH79_DEV_USB) += dev-usb.o @@ -123,9 +119,7 @@ Index: linux-4.14.25/arch/mips/ath79/Makefile -obj-$(CONFIG_ATH79_MACH_DB120) += mach-db120.o -obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o -obj-$(CONFIG_ATH79_MACH_UBNT_XM) += mach-ubnt-xm.o -Index: linux-4.14.25/arch/mips/ath79/mach-ap121.c -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/mach-ap121.c +--- a/arch/mips/ath79/mach-ap121.c +++ /dev/null @@ -1,92 +0,0 @@ -/* @@ -220,9 +214,7 @@ Index: linux-4.14.25/arch/mips/ath79/mach-ap121.c - -MIPS_MACHINE(ATH79_MACH_AP121, "AP121", "Atheros AP121 reference board", - ap121_setup); -Index: linux-4.14.25/arch/mips/ath79/mach-ap136.c -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/mach-ap136.c +--- a/arch/mips/ath79/mach-ap136.c +++ /dev/null @@ -1,156 +0,0 @@ -/* @@ -381,9 +373,7 @@ Index: linux-4.14.25/arch/mips/ath79/mach-ap136.c -MIPS_MACHINE(ATH79_MACH_AP136_010, "AP136-010", - "Atheros AP136-010 reference board", - ap136_setup); -Index: linux-4.14.25/arch/mips/ath79/mach-ap81.c -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/mach-ap81.c +--- a/arch/mips/ath79/mach-ap81.c +++ /dev/null @@ -1,100 +0,0 @@ -/* @@ -486,9 +476,7 @@ Index: linux-4.14.25/arch/mips/ath79/mach-ap81.c - -MIPS_MACHINE(ATH79_MACH_AP81, "AP81", "Atheros AP81 reference board", - ap81_setup); -Index: linux-4.14.25/arch/mips/ath79/mach-db120.c -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/mach-db120.c +--- a/arch/mips/ath79/mach-db120.c +++ /dev/null @@ -1,136 +0,0 @@ -/* @@ -627,9 +615,7 @@ Index: linux-4.14.25/arch/mips/ath79/mach-db120.c - -MIPS_MACHINE(ATH79_MACH_DB120, "DB120", "Atheros DB120 reference board", - db120_setup); -Index: linux-4.14.25/arch/mips/ath79/mach-pb44.c -=================================================================== ---- linux-4.14.25.orig/arch/mips/ath79/mach-pb44.c +--- a/arch/mips/ath79/mach-pb44.c +++ /dev/null @@ -1,122 +0,0 @@ -/* diff --git a/target/linux/ath79/patches-4.14/0024-MIPS-ath79-drop-pdata-helpers.patch b/target/linux/ath79/patches-4.14/0024-MIPS-ath79-drop-pdata-helpers.patch index a5d517093..8c4956ec3 100644 --- a/target/linux/ath79/patches-4.14/0024-MIPS-ath79-drop-pdata-helpers.patch +++ b/target/linux/ath79/patches-4.14/0024-MIPS-ath79-drop-pdata-helpers.patch @@ -32,9 +32,6 @@ Signed-off-by: John Crispin delete mode 100644 arch/mips/ath79/dev-wmac.c delete mode 100644 arch/mips/ath79/dev-wmac.h -diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c -deleted file mode 100644 -index ac8bfe86b656..000000000000 --- a/arch/mips/ath79/dev-common.c +++ /dev/null @@ -1,168 +0,0 @@ @@ -206,9 +203,6 @@ index ac8bfe86b656..000000000000 - - platform_device_register(&ath79_gpio_device); -} -diff --git a/arch/mips/ath79/dev-common.h b/arch/mips/ath79/dev-common.h -deleted file mode 100644 -index 0f514e1affce..000000000000 --- a/arch/mips/ath79/dev-common.h +++ /dev/null @@ -1,18 +0,0 @@ @@ -230,9 +224,6 @@ index 0f514e1affce..000000000000 -void ath79_register_wdt(void); - -#endif /* _ATH79_DEV_COMMON_H */ -diff --git a/arch/mips/ath79/dev-gpio-buttons.c b/arch/mips/ath79/dev-gpio-buttons.c -deleted file mode 100644 -index 366b35fb164d..000000000000 --- a/arch/mips/ath79/dev-gpio-buttons.c +++ /dev/null @@ -1,56 +0,0 @@ @@ -292,9 +283,6 @@ index 366b35fb164d..000000000000 -err_free_buttons: - kfree(p); -} -diff --git a/arch/mips/ath79/dev-gpio-buttons.h b/arch/mips/ath79/dev-gpio-buttons.h -deleted file mode 100644 -index 481847ac1cba..000000000000 --- a/arch/mips/ath79/dev-gpio-buttons.h +++ /dev/null @@ -1,23 +0,0 @@ @@ -321,9 +309,6 @@ index 481847ac1cba..000000000000 - struct gpio_keys_button *buttons); - -#endif /* _ATH79_DEV_GPIO_BUTTONS_H */ -diff --git a/arch/mips/ath79/dev-leds-gpio.c b/arch/mips/ath79/dev-leds-gpio.c -deleted file mode 100644 -index dcb1debcefb8..000000000000 --- a/arch/mips/ath79/dev-leds-gpio.c +++ /dev/null @@ -1,54 +0,0 @@ @@ -381,9 +366,6 @@ index dcb1debcefb8..000000000000 -err_free_leds: - kfree(p); -} -diff --git a/arch/mips/ath79/dev-leds-gpio.h b/arch/mips/ath79/dev-leds-gpio.h -deleted file mode 100644 -index 6e5d8851ebcf..000000000000 --- a/arch/mips/ath79/dev-leds-gpio.h +++ /dev/null @@ -1,21 +0,0 @@ @@ -408,9 +390,6 @@ index 6e5d8851ebcf..000000000000 - struct gpio_led *leds); - -#endif /* _ATH79_DEV_LEDS_GPIO_H */ -diff --git a/arch/mips/ath79/dev-spi.c b/arch/mips/ath79/dev-spi.c -deleted file mode 100644 -index aa30163efbfd..000000000000 --- a/arch/mips/ath79/dev-spi.c +++ /dev/null @@ -1,38 +0,0 @@ @@ -452,9 +431,6 @@ index aa30163efbfd..000000000000 - ath79_spi_device.dev.platform_data = pdata; - platform_device_register(&ath79_spi_device); -} -diff --git a/arch/mips/ath79/dev-spi.h b/arch/mips/ath79/dev-spi.h -deleted file mode 100644 -index d732565ca736..000000000000 --- a/arch/mips/ath79/dev-spi.h +++ /dev/null @@ -1,22 +0,0 @@ @@ -480,9 +456,6 @@ index d732565ca736..000000000000 - unsigned n); - -#endif /* _ATH79_DEV_SPI_H */ -diff --git a/arch/mips/ath79/dev-usb.c b/arch/mips/ath79/dev-usb.c -deleted file mode 100644 -index 8227265bcc2d..000000000000 --- a/arch/mips/ath79/dev-usb.c +++ /dev/null @@ -1,242 +0,0 @@ @@ -728,9 +701,6 @@ index 8227265bcc2d..000000000000 - else - BUG(); -} -diff --git a/arch/mips/ath79/dev-usb.h b/arch/mips/ath79/dev-usb.h -deleted file mode 100644 -index 4b86a69ca080..000000000000 --- a/arch/mips/ath79/dev-usb.h +++ /dev/null @@ -1,17 +0,0 @@ @@ -751,9 +721,6 @@ index 4b86a69ca080..000000000000 -void ath79_register_usb(void); - -#endif /* _ATH79_DEV_USB_H */ -diff --git a/arch/mips/ath79/dev-wmac.c b/arch/mips/ath79/dev-wmac.c -deleted file mode 100644 -index da190b1b87ce..000000000000 --- a/arch/mips/ath79/dev-wmac.c +++ /dev/null @@ -1,155 +0,0 @@ @@ -912,9 +879,6 @@ index da190b1b87ce..000000000000 - - platform_device_register(&ath79_wmac_device); -} -diff --git a/arch/mips/ath79/dev-wmac.h b/arch/mips/ath79/dev-wmac.h -deleted file mode 100644 -index c9cd8709f090..000000000000 --- a/arch/mips/ath79/dev-wmac.h +++ /dev/null @@ -1,17 +0,0 @@ @@ -935,8 +899,6 @@ index c9cd8709f090..000000000000 -void ath79_register_wmac(u8 *cal_data); - -#endif /* _ATH79_DEV_WMAC_H */ -diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c -index 4c7a93f4039a..8d7ffa2e8265 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c @@ -31,7 +31,6 @@ @@ -958,6 +920,3 @@ index 4c7a93f4039a..8d7ffa2e8265 100644 mips_machine_setup(); return 0; --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0025-MIPS-ath79-drop-irq.c.patch b/target/linux/ath79/patches-4.14/0025-MIPS-ath79-drop-irq.c.patch index 738f239af..95b29455f 100644 --- a/target/linux/ath79/patches-4.14/0025-MIPS-ath79-drop-irq.c.patch +++ b/target/linux/ath79/patches-4.14/0025-MIPS-ath79-drop-irq.c.patch @@ -13,8 +13,6 @@ Signed-off-by: John Crispin 3 files changed, 7 insertions(+), 286 deletions(-) delete mode 100644 arch/mips/ath79/irq.c -diff --git a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile -index 783369bc1c5b..bd0c9b8b1b5b 100644 --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile @@ -8,7 +8,7 @@ @@ -26,9 +24,6 @@ index 783369bc1c5b..bd0c9b8b1b5b 100644 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c -deleted file mode 100644 -index 58d17ef6f58f..000000000000 --- a/arch/mips/ath79/irq.c +++ /dev/null @@ -1,285 +0,0 @@ @@ -317,8 +312,6 @@ index 58d17ef6f58f..000000000000 - else if (soc_is_qca956x() || soc_is_tp9343()) - qca956x_irq_init(); -} -diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c -index 8d7ffa2e8265..7b089c07d2fa 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c @@ -19,6 +19,7 @@ @@ -341,6 +334,3 @@ index 8d7ffa2e8265..7b089c07d2fa 100644 static int __init ath79_setup(void) { if (mips_machtype == ATH79_MACH_GENERIC_OF) --- -2.11.0 - diff --git a/target/linux/ath79/patches-4.14/0026-MIPS-ath79-sanitize-Kconfig-symbols.patch b/target/linux/ath79/patches-4.14/0026-MIPS-ath79-sanitize-Kconfig-symbols.patch index 5f41656d1..f9906516d 100644 --- a/target/linux/ath79/patches-4.14/0026-MIPS-ath79-sanitize-Kconfig-symbols.patch +++ b/target/linux/ath79/patches-4.14/0026-MIPS-ath79-sanitize-Kconfig-symbols.patch @@ -11,10 +11,8 @@ Signed-off-by: John Crispin arch/mips/pci/Makefile | 2 +- 4 files changed, 8 insertions(+), 54 deletions(-) -Index: linux-4.14.18/arch/mips/Kconfig -=================================================================== ---- linux-4.14.18.orig/arch/mips/Kconfig -+++ linux-4.14.18/arch/mips/Kconfig +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig @@ -203,6 +203,8 @@ config ATH79 select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_MIPS16 @@ -24,10 +22,8 @@ Index: linux-4.14.18/arch/mips/Kconfig select USE_OF help Support for the Atheros AR71XX/AR724X/AR913X SoCs. -Index: linux-4.14.18/arch/mips/ath79/Kconfig -=================================================================== ---- linux-4.14.18.orig/arch/mips/ath79/Kconfig -+++ linux-4.14.18/arch/mips/ath79/Kconfig +--- a/arch/mips/ath79/Kconfig ++++ b/arch/mips/ath79/Kconfig @@ -1,52 +1,14 @@ # SPDX-License-Identifier: GPL-2.0 if ATH79 @@ -86,10 +82,8 @@ Index: linux-4.14.18/arch/mips/ath79/Kconfig def_bool n endif -Index: linux-4.14.18/arch/mips/ath79/Makefile -=================================================================== ---- linux-4.14.18.orig/arch/mips/ath79/Makefile -+++ linux-4.14.18/arch/mips/ath79/Makefile +--- a/arch/mips/ath79/Makefile ++++ b/arch/mips/ath79/Makefile @@ -11,13 +11,3 @@ obj-y := prom.o setup.o common.o clock.o @@ -104,10 +98,8 @@ Index: linux-4.14.18/arch/mips/ath79/Makefile -obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o -obj-$(CONFIG_ATH79_DEV_USB) += dev-usb.o -obj-$(CONFIG_ATH79_DEV_WMAC) += dev-wmac.o -Index: linux-4.14.18/arch/mips/pci/Makefile -=================================================================== ---- linux-4.14.18.orig/arch/mips/pci/Makefile -+++ linux-4.14.18/arch/mips/pci/Makefile +--- a/arch/mips/pci/Makefile ++++ b/arch/mips/pci/Makefile @@ -23,7 +23,7 @@ obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o ops-bcm63xx.o obj-$(CONFIG_MIPS_ALCHEMY) += pci-alchemy.o diff --git a/target/linux/ath79/patches-4.14/0027-MIPS-ath79-drop-mips_machine-support.patch b/target/linux/ath79/patches-4.14/0027-MIPS-ath79-drop-mips_machine-support.patch index fd47b775f..cde3bae67 100644 --- a/target/linux/ath79/patches-4.14/0027-MIPS-ath79-drop-mips_machine-support.patch +++ b/target/linux/ath79/patches-4.14/0027-MIPS-ath79-drop-mips_machine-support.patch @@ -11,10 +11,8 @@ Signed-off-by: John Crispin 3 files changed, 10 insertions(+), 93 deletions(-) delete mode 100644 arch/mips/ath79/machtypes.h -Index: linux-4.14.18/arch/mips/Kconfig -=================================================================== ---- linux-4.14.18.orig/arch/mips/Kconfig -+++ linux-4.14.18/arch/mips/Kconfig +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig @@ -196,7 +196,6 @@ config ATH79 select COMMON_CLK select CLKDEV_LOOKUP @@ -23,9 +21,7 @@ Index: linux-4.14.18/arch/mips/Kconfig select SYS_HAS_CPU_MIPS32_R2 select SYS_HAS_EARLY_PRINTK select SYS_SUPPORTS_32BIT_KERNEL -Index: linux-4.14.18/arch/mips/ath79/machtypes.h -=================================================================== ---- linux-4.14.18.orig/arch/mips/ath79/machtypes.h +--- a/arch/mips/ath79/machtypes.h +++ /dev/null @@ -1,28 +0,0 @@ -/* @@ -56,10 +52,8 @@ Index: linux-4.14.18/arch/mips/ath79/machtypes.h -}; - -#endif /* _ATH79_MACHTYPE_H */ -Index: linux-4.14.18/arch/mips/ath79/setup.c -=================================================================== ---- linux-4.14.18.orig/arch/mips/ath79/setup.c -+++ linux-4.14.18/arch/mips/ath79/setup.c +--- a/arch/mips/ath79/setup.c ++++ b/arch/mips/ath79/setup.c @@ -32,7 +32,6 @@ #include #include @@ -166,10 +160,8 @@ Index: linux-4.14.18/arch/mips/ath79/setup.c - "DTB", - "Generic AR71XX/AR724X/AR913X based board (DT)", - NULL); -Index: linux-4.14.18/arch/mips/ath79/clock.c -=================================================================== ---- linux-4.14.18.orig/arch/mips/ath79/clock.c -+++ linux-4.14.18/arch/mips/ath79/clock.c +--- a/arch/mips/ath79/clock.c ++++ b/arch/mips/ath79/clock.c @@ -26,7 +26,6 @@ #include #include diff --git a/target/linux/ath79/patches-4.14/0028-MIPS-ath79-add-helpers-for-setting-clocks-and-expose.patch b/target/linux/ath79/patches-4.14/0028-MIPS-ath79-add-helpers-for-setting-clocks-and-expose.patch index 4e73c0a7f..15f6b1f8c 100644 --- a/target/linux/ath79/patches-4.14/0028-MIPS-ath79-add-helpers-for-setting-clocks-and-expose.patch +++ b/target/linux/ath79/patches-4.14/0028-MIPS-ath79-add-helpers-for-setting-clocks-and-expose.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau + clks[type] = clk; + clk_register_clkdev(clk, name, NULL); +} -+ + +static struct clk * __init ath79_set_clk(int type, unsigned long rate) +{ + const char *name = ath79_clk_name(type); @@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau +{ + const char *name = ath79_clk_name(type); + struct clk *clk; - ++ + clk = clk_register_fixed_factor(NULL, name, parent, 0, mult, div); + __ath79_set_clk(type, name, clk); return clk; diff --git a/target/linux/ath79/patches-4.14/004-register_gpio_driver_earlier.patch b/target/linux/ath79/patches-4.14/004-register_gpio_driver_earlier.patch index 9090491f9..cc30e2d91 100644 --- a/target/linux/ath79/patches-4.14/004-register_gpio_driver_earlier.patch +++ b/target/linux/ath79/patches-4.14/004-register_gpio_driver_earlier.patch @@ -1,10 +1,8 @@ HACK: register the GPIO driver earlier to ensure that gpio_request calls from mach files succeed. -Index: linux-4.14.18/drivers/gpio/gpio-ath79.c -=================================================================== ---- linux-4.14.18.orig/drivers/gpio/gpio-ath79.c -+++ linux-4.14.18/drivers/gpio/gpio-ath79.c +--- a/drivers/gpio/gpio-ath79.c ++++ b/drivers/gpio/gpio-ath79.c @@ -322,7 +322,11 @@ static struct platform_driver ath79_gpio .remove = ath79_gpio_remove, }; diff --git a/target/linux/ath79/patches-4.14/405-mtd-tp-link-partition-parser.patch b/target/linux/ath79/patches-4.14/405-mtd-tp-link-partition-parser.patch index 3734d3e5c..846b7f0a0 100644 --- a/target/linux/ath79/patches-4.14/405-mtd-tp-link-partition-parser.patch +++ b/target/linux/ath79/patches-4.14/405-mtd-tp-link-partition-parser.patch @@ -1,7 +1,5 @@ -Index: linux-4.14.18/drivers/mtd/Kconfig -=================================================================== ---- linux-4.14.18.orig/drivers/mtd/Kconfig -+++ linux-4.14.18/drivers/mtd/Kconfig +--- a/drivers/mtd/Kconfig ++++ b/drivers/mtd/Kconfig @@ -194,6 +194,12 @@ config MTD_MYLOADER_PARTS You will still need the parsing functions to be called by the driver for your particular device. It won't happen automatically. @@ -15,10 +13,8 @@ Index: linux-4.14.18/drivers/mtd/Kconfig comment "User Modules And Translation Layers" # -Index: linux-4.14.18/drivers/mtd/Makefile -=================================================================== ---- linux-4.14.18.orig/drivers/mtd/Makefile -+++ linux-4.14.18/drivers/mtd/Makefile +--- a/drivers/mtd/Makefile ++++ b/drivers/mtd/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63 obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o diff --git a/target/linux/ath79/patches-4.14/420-net-ar71xx_mac_driver.patch b/target/linux/ath79/patches-4.14/420-net-ar71xx_mac_driver.patch index feb2e6a39..6377db0ac 100644 --- a/target/linux/ath79/patches-4.14/420-net-ar71xx_mac_driver.patch +++ b/target/linux/ath79/patches-4.14/420-net-ar71xx_mac_driver.patch @@ -18,7 +18,7 @@ endif # NET_VENDOR_ATHEROS --- a/drivers/net/ethernet/atheros/Makefile +++ b/drivers/net/ethernet/atheros/Makefile -@@ -2,6 +2,7 @@ +@@ -3,6 +3,7 @@ # Makefile for the Atheros network device drivers. # diff --git a/target/linux/ath79/patches-4.14/430-drivers-link-spi-before-mtd.patch b/target/linux/ath79/patches-4.14/430-drivers-link-spi-before-mtd.patch index a86245459..2f1549710 100644 --- a/target/linux/ath79/patches-4.14/430-drivers-link-spi-before-mtd.patch +++ b/target/linux/ath79/patches-4.14/430-drivers-link-spi-before-mtd.patch @@ -1,6 +1,6 @@ --- a/drivers/Makefile +++ b/drivers/Makefile -@@ -77,8 +77,8 @@ obj-$(CONFIG_SCSI) += scsi/ +@@ -83,8 +83,8 @@ obj-$(CONFIG_SCSI) += scsi/ obj-y += nvme/ obj-$(CONFIG_ATA) += ata/ obj-$(CONFIG_TARGET_CORE) += target/ diff --git a/target/linux/ath79/patches-4.14/461-spi-ath79-add-fast-flash-read.patch b/target/linux/ath79/patches-4.14/461-spi-ath79-add-fast-flash-read.patch index 5c3583f75..06da2b34e 100644 --- a/target/linux/ath79/patches-4.14/461-spi-ath79-add-fast-flash-read.patch +++ b/target/linux/ath79/patches-4.14/461-spi-ath79-add-fast-flash-read.patch @@ -10,7 +10,7 @@ } static void ath79_spi_disable(struct ath79_spi *sp) -@@ -205,6 +202,38 @@ static u32 ath79_spi_txrx_mode0(struct s +@@ -204,6 +201,38 @@ static u32 ath79_spi_txrx_mode0(struct s return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS); } @@ -49,9 +49,9 @@ static int ath79_spi_probe(struct platform_device *pdev) { struct spi_master *master; -@@ -234,6 +263,8 @@ static int ath79_spi_probe(struct platfo +@@ -232,6 +261,8 @@ static int ath79_spi_probe(struct platfo + master->bus_num = pdata->bus_num; master->num_chipselect = pdata->num_chipselect; - master->cs_gpios = pdata->cs_gpios; } + master->spi_flash_read = ath79_spi_read_flash_data; + master->flash_read_supported = ath79_spi_flash_read_supported; diff --git a/target/linux/ath79/patches-4.14/470-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch b/target/linux/ath79/patches-4.14/470-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch index c0d30eaef..ad8b7b47d 100644 --- a/target/linux/ath79/patches-4.14/470-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch +++ b/target/linux/ath79/patches-4.14/470-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch @@ -1,7 +1,5 @@ -Index: linux-4.14.18/arch/mips/include/asm/mach-ath79/mangle-port.h -=================================================================== --- /dev/null -+++ linux-4.14.18/arch/mips/include/asm/mach-ath79/mangle-port.h ++++ b/arch/mips/include/asm/mach-ath79/mangle-port.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2012 Gabor Juhos @@ -40,10 +38,8 @@ Index: linux-4.14.18/arch/mips/include/asm/mach-ath79/mangle-port.h +# define __mem_ioswabq(a, x) cpu_to_le64(x) + +#endif /* __ASM_MACH_ATH79_MANGLE_PORT_H */ -Index: linux-4.14.18/arch/mips/pci/pci-ar71xx.c -=================================================================== ---- linux-4.14.18.orig/arch/mips/pci/pci-ar71xx.c -+++ linux-4.14.18/arch/mips/pci/pci-ar71xx.c +--- a/arch/mips/pci/pci-ar71xx.c ++++ b/arch/mips/pci/pci-ar71xx.c @@ -73,6 +73,45 @@ static const u32 ar71xx_pci_read_mask[8] 0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0 }; diff --git a/target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch b/target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch index 8a05adb05..1d1979cd6 100644 --- a/target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch +++ b/target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch @@ -40,7 +40,7 @@ retval = ehci_handshake(ehci, &ehci->regs->command, --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h -@@ -231,6 +231,10 @@ struct ehci_hcd { /* one per controlle +@@ -232,6 +232,10 @@ struct ehci_hcd { /* one per controlle unsigned need_oc_pp_cycle:1; /* MPC834X port power */ unsigned imx28_write_fix:1; /* For Freescale i.MX28 */ unsigned ignore_oc:1; @@ -72,7 +72,7 @@ #endif /* __USB_CORE_EHCI_PDRIVER_H */ --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -52,6 +52,14 @@ struct ehci_platform_priv { +@@ -53,6 +53,14 @@ struct ehci_platform_priv { static const char hcd_name[] = "ehci-platform"; @@ -87,7 +87,7 @@ static int ehci_platform_reset(struct usb_hcd *hcd) { struct platform_device *pdev = to_platform_device(hcd->self.controller); -@@ -261,6 +269,13 @@ static int ehci_platform_probe(struct pl +@@ -270,6 +278,13 @@ static int ehci_platform_probe(struct pl priv->reset_on_resume = true; if (pdata->ignore_oc) ehci->ignore_oc = 1; diff --git a/target/linux/ath79/patches-4.14/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch b/target/linux/ath79/patches-4.14/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch index 6151cc292..a830346a3 100644 --- a/target/linux/ath79/patches-4.14/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch +++ b/target/linux/ath79/patches-4.14/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch @@ -12,10 +12,8 @@ Signed-off-by: Jonas Gorski drivers/net/phy/mdio-bitbang.c | 9 +++++++++ 1 file changed, 9 insertions(+) -Index: linux-4.14.18/drivers/net/phy/mdio-bitbang.c -=================================================================== ---- linux-4.14.18.orig/drivers/net/phy/mdio-bitbang.c -+++ linux-4.14.18/drivers/net/phy/mdio-bitbang.c +--- a/drivers/net/phy/mdio-bitbang.c ++++ b/drivers/net/phy/mdio-bitbang.c @@ -17,6 +17,7 @@ * kind, whether express or implied. */ diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch index 1ac28e67c..e2ca932af 100644 --- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch @@ -1,7 +1,5 @@ -Index: linux-4.14.18/arch/mips/include/asm/checksum.h -=================================================================== ---- linux-4.14.18.orig/arch/mips/include/asm/checksum.h -+++ linux-4.14.18/arch/mips/include/asm/checksum.h +--- a/arch/mips/include/asm/checksum.h ++++ b/arch/mips/include/asm/checksum.h @@ -134,26 +134,30 @@ static inline __sum16 ip_fast_csum(const const unsigned int *stop = word + ihl; unsigned int csum; @@ -118,10 +116,8 @@ Index: linux-4.14.18/arch/mips/include/asm/checksum.h #include #endif /* CONFIG_GENERIC_CSUM */ -Index: linux-4.14.18/include/uapi/linux/ip.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/ip.h -+++ linux-4.14.18/include/uapi/linux/ip.h +--- a/include/uapi/linux/ip.h ++++ b/include/uapi/linux/ip.h @@ -103,7 +103,7 @@ struct iphdr { __be32 saddr; __be32 daddr; @@ -131,10 +127,8 @@ Index: linux-4.14.18/include/uapi/linux/ip.h struct ip_auth_hdr { -Index: linux-4.14.18/include/uapi/linux/ipv6.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/ipv6.h -+++ linux-4.14.18/include/uapi/linux/ipv6.h +--- a/include/uapi/linux/ipv6.h ++++ b/include/uapi/linux/ipv6.h @@ -131,7 +131,7 @@ struct ipv6hdr { struct in6_addr saddr; @@ -144,10 +138,8 @@ Index: linux-4.14.18/include/uapi/linux/ipv6.h /* index values for the variables in ipv6_devconf */ -Index: linux-4.14.18/include/uapi/linux/tcp.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/tcp.h -+++ linux-4.14.18/include/uapi/linux/tcp.h +--- a/include/uapi/linux/tcp.h ++++ b/include/uapi/linux/tcp.h @@ -55,7 +55,7 @@ struct tcphdr { __be16 window; __sum16 check; @@ -166,10 +158,8 @@ Index: linux-4.14.18/include/uapi/linux/tcp.h #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) -Index: linux-4.14.18/include/uapi/linux/udp.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/udp.h -+++ linux-4.14.18/include/uapi/linux/udp.h +--- a/include/uapi/linux/udp.h ++++ b/include/uapi/linux/udp.h @@ -25,7 +25,7 @@ struct udphdr { __be16 dest; __be16 len; @@ -179,10 +169,8 @@ Index: linux-4.14.18/include/uapi/linux/udp.h /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments */ -Index: linux-4.14.18/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c -=================================================================== ---- linux-4.14.18.orig/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c -+++ linux-4.14.18/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c ++++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c @@ -48,8 +48,8 @@ static bool ipv4_pkt_to_tuple(const stru if (ap == NULL) return false; @@ -194,10 +182,8 @@ Index: linux-4.14.18/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c return true; } -Index: linux-4.14.18/include/uapi/linux/icmp.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/icmp.h -+++ linux-4.14.18/include/uapi/linux/icmp.h +--- a/include/uapi/linux/icmp.h ++++ b/include/uapi/linux/icmp.h @@ -82,7 +82,7 @@ struct icmphdr { } frag; __u8 reserved[4]; @@ -207,10 +193,8 @@ Index: linux-4.14.18/include/uapi/linux/icmp.h /* -Index: linux-4.14.18/include/uapi/linux/in6.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/in6.h -+++ linux-4.14.18/include/uapi/linux/in6.h +--- a/include/uapi/linux/in6.h ++++ b/include/uapi/linux/in6.h @@ -43,7 +43,7 @@ struct in6_addr { #define s6_addr16 in6_u.u6_addr16 #define s6_addr32 in6_u.u6_addr32 @@ -220,10 +204,8 @@ Index: linux-4.14.18/include/uapi/linux/in6.h #endif /* __UAPI_DEF_IN6_ADDR */ #if __UAPI_DEF_SOCKADDR_IN6 -Index: linux-4.14.18/net/ipv6/tcp_ipv6.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/tcp_ipv6.c -+++ linux-4.14.18/net/ipv6/tcp_ipv6.c +--- a/net/ipv6/tcp_ipv6.c ++++ b/net/ipv6/tcp_ipv6.c @@ -39,6 +39,7 @@ #include #include @@ -247,10 +229,8 @@ Index: linux-4.14.18/net/ipv6/tcp_ipv6.c } #ifdef CONFIG_TCP_MD5SIG -Index: linux-4.14.18/include/linux/ipv6.h -=================================================================== ---- linux-4.14.18.orig/include/linux/ipv6.h -+++ linux-4.14.18/include/linux/ipv6.h +--- a/include/linux/ipv6.h ++++ b/include/linux/ipv6.h @@ -6,6 +6,7 @@ #define ipv6_optlen(p) (((p)->hdrlen+1) << 3) @@ -259,11 +239,9 @@ Index: linux-4.14.18/include/linux/ipv6.h /* * This structure contains configuration options per IPv6 link. */ -Index: linux-4.14.18/net/ipv6/datagram.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/datagram.c -+++ linux-4.14.18/net/ipv6/datagram.c -@@ -478,7 +478,7 @@ int ipv6_recv_error(struct sock *sk, str +--- a/net/ipv6/datagram.c ++++ b/net/ipv6/datagram.c +@@ -485,7 +485,7 @@ int ipv6_recv_error(struct sock *sk, str ipv6_iface_scope_id(&sin->sin6_addr, IP6CB(skb)->iif); } else { @@ -272,7 +250,7 @@ Index: linux-4.14.18/net/ipv6/datagram.c &sin->sin6_addr); sin->sin6_scope_id = 0; } -@@ -826,12 +826,12 @@ int ip6_datagram_send_ctl(struct net *ne +@@ -833,12 +833,12 @@ int ip6_datagram_send_ctl(struct net *ne } if (fl6->flowlabel&IPV6_FLOWINFO_MASK) { @@ -287,11 +265,9 @@ Index: linux-4.14.18/net/ipv6/datagram.c break; case IPV6_2292HOPOPTS: -Index: linux-4.14.18/net/ipv6/ip6_gre.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/ip6_gre.c -+++ linux-4.14.18/net/ipv6/ip6_gre.c -@@ -395,7 +395,7 @@ static void ip6gre_err(struct sk_buff *s +--- a/net/ipv6/ip6_gre.c ++++ b/net/ipv6/ip6_gre.c +@@ -397,7 +397,7 @@ static void ip6gre_err(struct sk_buff *s return; ipv6h = (const struct ipv6hdr *)skb->data; greh = (const struct gre_base_hdr *)(skb->data + offset); @@ -300,10 +276,8 @@ Index: linux-4.14.18/net/ipv6/ip6_gre.c t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr, key, greh->protocol); -Index: linux-4.14.18/net/ipv6/exthdrs.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/exthdrs.c -+++ linux-4.14.18/net/ipv6/exthdrs.c +--- a/net/ipv6/exthdrs.c ++++ b/net/ipv6/exthdrs.c @@ -733,7 +733,7 @@ static bool ipv6_hop_jumbo(struct sk_buf goto drop; } @@ -313,10 +287,8 @@ Index: linux-4.14.18/net/ipv6/exthdrs.c if (pkt_len <= IPV6_MAXPLEN) { __IP6_INC_STATS(net, ipv6_skb_idev(skb), IPSTATS_MIB_INHDRERRORS); -Index: linux-4.14.18/include/linux/types.h -=================================================================== ---- linux-4.14.18.orig/include/linux/types.h -+++ linux-4.14.18/include/linux/types.h +--- a/include/linux/types.h ++++ b/include/linux/types.h @@ -229,5 +229,11 @@ struct callback_head { typedef void (*rcu_callback_t)(struct rcu_head *head); typedef void (*call_rcu_func_t)(struct rcu_head *head, rcu_callback_t func); @@ -329,10 +301,8 @@ Index: linux-4.14.18/include/linux/types.h + #endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ -Index: linux-4.14.18/net/ipv4/af_inet.c -=================================================================== ---- linux-4.14.18.orig/net/ipv4/af_inet.c -+++ linux-4.14.18/net/ipv4/af_inet.c +--- a/net/ipv4/af_inet.c ++++ b/net/ipv4/af_inet.c @@ -1351,8 +1351,8 @@ struct sk_buff **inet_gro_receive(struct if (unlikely(ip_fast_csum((u8 *)iph, 5))) goto out_unlock; @@ -344,11 +314,9 @@ Index: linux-4.14.18/net/ipv4/af_inet.c id >>= 16; for (p = *head; p; p = p->next) { -Index: linux-4.14.18/net/ipv4/route.c -=================================================================== ---- linux-4.14.18.orig/net/ipv4/route.c -+++ linux-4.14.18/net/ipv4/route.c -@@ -462,7 +462,7 @@ static struct neighbour *ipv4_neigh_look +--- a/net/ipv4/route.c ++++ b/net/ipv4/route.c +@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look else if (skb) pkey = &ip_hdr(skb)->daddr; @@ -357,10 +325,8 @@ Index: linux-4.14.18/net/ipv4/route.c if (n) return n; return neigh_create(&arp_tbl, pkey, dev); -Index: linux-4.14.18/net/ipv4/tcp_output.c -=================================================================== ---- linux-4.14.18.orig/net/ipv4/tcp_output.c -+++ linux-4.14.18/net/ipv4/tcp_output.c +--- a/net/ipv4/tcp_output.c ++++ b/net/ipv4/tcp_output.c @@ -449,48 +449,53 @@ static void tcp_options_write(__be32 *pt u16 options = opts->options; /* mungable copy */ @@ -480,10 +446,8 @@ Index: linux-4.14.18/net/ipv4/tcp_output.c } memcpy(p, foc->val, foc->len); -Index: linux-4.14.18/include/uapi/linux/igmp.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/igmp.h -+++ linux-4.14.18/include/uapi/linux/igmp.h +--- a/include/uapi/linux/igmp.h ++++ b/include/uapi/linux/igmp.h @@ -33,7 +33,7 @@ struct igmphdr { __u8 code; /* For newer IGMP */ __sum16 csum; @@ -520,10 +484,8 @@ Index: linux-4.14.18/include/uapi/linux/igmp.h #define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* From RFC1112 */ #define IGMP_HOST_MEMBERSHIP_REPORT 0x12 /* Ditto */ -Index: linux-4.14.18/net/core/flow_dissector.c -=================================================================== ---- linux-4.14.18.orig/net/core/flow_dissector.c -+++ linux-4.14.18/net/core/flow_dissector.c +--- a/net/core/flow_dissector.c ++++ b/net/core/flow_dissector.c @@ -108,7 +108,7 @@ __be32 __skb_flow_get_ports(const struct ports = __skb_header_pointer(skb, thoff + poff, sizeof(_ports), data, hlen, &_ports); @@ -533,10 +495,8 @@ Index: linux-4.14.18/net/core/flow_dissector.c } return 0; -Index: linux-4.14.18/include/uapi/linux/icmpv6.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/icmpv6.h -+++ linux-4.14.18/include/uapi/linux/icmpv6.h +--- a/include/uapi/linux/icmpv6.h ++++ b/include/uapi/linux/icmpv6.h @@ -77,7 +77,7 @@ struct icmp6hdr { #define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other #define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime @@ -546,10 +506,8 @@ Index: linux-4.14.18/include/uapi/linux/icmpv6.h #define ICMPV6_ROUTER_PREF_LOW 0x3 -Index: linux-4.14.18/include/net/ndisc.h -=================================================================== ---- linux-4.14.18.orig/include/net/ndisc.h -+++ linux-4.14.18/include/net/ndisc.h +--- a/include/net/ndisc.h ++++ b/include/net/ndisc.h @@ -89,7 +89,7 @@ struct ra_msg { struct icmp6hdr icmph; __be32 reachable_time; @@ -574,10 +532,8 @@ Index: linux-4.14.18/include/net/ndisc.h } static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey) -Index: linux-4.14.18/net/sched/cls_u32.c -=================================================================== ---- linux-4.14.18.orig/net/sched/cls_u32.c -+++ linux-4.14.18/net/sched/cls_u32.c +--- a/net/sched/cls_u32.c ++++ b/net/sched/cls_u32.c @@ -165,7 +165,7 @@ next_knode: data = skb_header_pointer(skb, toff, 4, &hdata); if (!data) @@ -598,10 +554,8 @@ Index: linux-4.14.18/net/sched/cls_u32.c } if (!(n->sel.flags & (TC_U32_VAROFFSET | TC_U32_OFFSET | TC_U32_EAT))) goto next_ht; -Index: linux-4.14.18/net/ipv6/ip6_offload.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/ip6_offload.c -+++ linux-4.14.18/net/ipv6/ip6_offload.c +--- a/net/ipv6/ip6_offload.c ++++ b/net/ipv6/ip6_offload.c @@ -220,7 +220,7 @@ static struct sk_buff **ipv6_gro_receive continue; @@ -611,10 +565,8 @@ Index: linux-4.14.18/net/ipv6/ip6_offload.c /* All fields must match except length and Traffic Class. * XXX skbs on the gro_list have all been parsed and pulled -Index: linux-4.14.18/include/net/addrconf.h -=================================================================== ---- linux-4.14.18.orig/include/net/addrconf.h -+++ linux-4.14.18/include/net/addrconf.h +--- a/include/net/addrconf.h ++++ b/include/net/addrconf.h @@ -47,7 +47,7 @@ struct prefix_info { __be32 reserved2; @@ -624,10 +576,8 @@ Index: linux-4.14.18/include/net/addrconf.h #include #include -Index: linux-4.14.18/include/net/inet_ecn.h -=================================================================== ---- linux-4.14.18.orig/include/net/inet_ecn.h -+++ linux-4.14.18/include/net/inet_ecn.h +--- a/include/net/inet_ecn.h ++++ b/include/net/inet_ecn.h @@ -125,9 +125,9 @@ static inline int IP6_ECN_set_ce(struct if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph))) return 0; @@ -649,10 +599,8 @@ Index: linux-4.14.18/include/net/inet_ecn.h } static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner) -Index: linux-4.14.18/include/net/ipv6.h -=================================================================== ---- linux-4.14.18.orig/include/net/ipv6.h -+++ linux-4.14.18/include/net/ipv6.h +--- a/include/net/ipv6.h ++++ b/include/net/ipv6.h @@ -108,7 +108,7 @@ struct frag_hdr { __u8 reserved; __be16 frag_off; @@ -731,10 +679,8 @@ Index: linux-4.14.18/include/net/ipv6.h } static inline u8 ip6_tclass(__be32 flowinfo) -Index: linux-4.14.18/include/net/secure_seq.h -=================================================================== ---- linux-4.14.18.orig/include/net/secure_seq.h -+++ linux-4.14.18/include/net/secure_seq.h +--- a/include/net/secure_seq.h ++++ b/include/net/secure_seq.h @@ -3,6 +3,7 @@ #define _NET_SECURE_SEQ @@ -743,10 +689,8 @@ Index: linux-4.14.18/include/net/secure_seq.h u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, -Index: linux-4.14.18/include/uapi/linux/in.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/in.h -+++ linux-4.14.18/include/uapi/linux/in.h +--- a/include/uapi/linux/in.h ++++ b/include/uapi/linux/in.h @@ -84,7 +84,7 @@ enum { /* Internet address. */ struct in_addr { @@ -756,10 +700,8 @@ Index: linux-4.14.18/include/uapi/linux/in.h #endif #define IP_TOS 1 -Index: linux-4.14.18/net/ipv6/ip6_fib.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/ip6_fib.c -+++ linux-4.14.18/net/ipv6/ip6_fib.c +--- a/net/ipv6/ip6_fib.c ++++ b/net/ipv6/ip6_fib.c @@ -137,7 +137,7 @@ static __be32 addr_bit_set(const void *t * See include/asm-generic/bitops/le.h. */ @@ -769,11 +711,9 @@ Index: linux-4.14.18/net/ipv6/ip6_fib.c } static struct fib6_node *node_alloc(void) -Index: linux-4.14.18/net/netfilter/nf_conntrack_proto_tcp.c -=================================================================== ---- linux-4.14.18.orig/net/netfilter/nf_conntrack_proto_tcp.c -+++ linux-4.14.18/net/netfilter/nf_conntrack_proto_tcp.c -@@ -444,7 +444,7 @@ static void tcp_sack(const struct sk_buf +--- a/net/netfilter/nf_conntrack_proto_tcp.c ++++ b/net/netfilter/nf_conntrack_proto_tcp.c +@@ -447,7 +447,7 @@ static void tcp_sack(const struct sk_buf /* Fast path for timestamp-only option */ if (length == TCPOLEN_TSTAMP_ALIGNED @@ -782,11 +722,9 @@ Index: linux-4.14.18/net/netfilter/nf_conntrack_proto_tcp.c | (TCPOPT_NOP << 16) | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) -Index: linux-4.14.18/net/xfrm/xfrm_input.c -=================================================================== ---- linux-4.14.18.orig/net/xfrm/xfrm_input.c -+++ linux-4.14.18/net/xfrm/xfrm_input.c -@@ -171,8 +171,8 @@ int xfrm_parse_spi(struct sk_buff *skb, +--- a/net/xfrm/xfrm_input.c ++++ b/net/xfrm/xfrm_input.c +@@ -187,8 +187,8 @@ int xfrm_parse_spi(struct sk_buff *skb, if (!pskb_may_pull(skb, hlen)) return -EINVAL; @@ -797,11 +735,9 @@ Index: linux-4.14.18/net/xfrm/xfrm_input.c return 0; } EXPORT_SYMBOL(xfrm_parse_spi); -Index: linux-4.14.18/net/ipv4/tcp_input.c -=================================================================== ---- linux-4.14.18.orig/net/ipv4/tcp_input.c -+++ linux-4.14.18/net/ipv4/tcp_input.c -@@ -3851,14 +3851,16 @@ static bool tcp_parse_aligned_timestamp( +--- a/net/ipv4/tcp_input.c ++++ b/net/ipv4/tcp_input.c +@@ -3842,14 +3842,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); @@ -823,10 +759,8 @@ Index: linux-4.14.18/net/ipv4/tcp_input.c else tp->rx_opt.rcv_tsecr = 0; return true; -Index: linux-4.14.18/include/uapi/linux/if_pppox.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/if_pppox.h -+++ linux-4.14.18/include/uapi/linux/if_pppox.h +--- a/include/uapi/linux/if_pppox.h ++++ b/include/uapi/linux/if_pppox.h @@ -51,6 +51,7 @@ struct pppoe_addr { */ struct pptp_addr { @@ -835,10 +769,8 @@ Index: linux-4.14.18/include/uapi/linux/if_pppox.h struct in_addr sin_addr; }; -Index: linux-4.14.18/net/ipv6/netfilter/nf_log_ipv6.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/netfilter/nf_log_ipv6.c -+++ linux-4.14.18/net/ipv6/netfilter/nf_log_ipv6.c +--- a/net/ipv6/netfilter/nf_log_ipv6.c ++++ b/net/ipv6/netfilter/nf_log_ipv6.c @@ -66,9 +66,9 @@ static void dump_ipv6_packet(struct nf_l /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */ nf_log_buf_add(m, "LEN=%zu TC=%u HOPLIMIT=%u FLOWLBL=%u ", @@ -851,10 +783,8 @@ Index: linux-4.14.18/net/ipv6/netfilter/nf_log_ipv6.c fragment = 0; ptr = ip6hoff + sizeof(struct ipv6hdr); -Index: linux-4.14.18/include/net/neighbour.h -=================================================================== ---- linux-4.14.18.orig/include/net/neighbour.h -+++ linux-4.14.18/include/net/neighbour.h +--- a/include/net/neighbour.h ++++ b/include/net/neighbour.h @@ -265,8 +265,10 @@ static inline bool neigh_key_eq128(const const u32 *n32 = (const u32 *)n->primary_key; const u32 *p32 = pkey; @@ -868,10 +798,8 @@ Index: linux-4.14.18/include/net/neighbour.h } static inline struct neighbour *___neigh_lookup_noref( -Index: linux-4.14.18/include/uapi/linux/netfilter_arp/arp_tables.h -=================================================================== ---- linux-4.14.18.orig/include/uapi/linux/netfilter_arp/arp_tables.h -+++ linux-4.14.18/include/uapi/linux/netfilter_arp/arp_tables.h +--- a/include/uapi/linux/netfilter_arp/arp_tables.h ++++ b/include/uapi/linux/netfilter_arp/arp_tables.h @@ -70,7 +70,7 @@ struct arpt_arp { __u8 flags; /* Inverse flags */ @@ -881,10 +809,8 @@ Index: linux-4.14.18/include/uapi/linux/netfilter_arp/arp_tables.h /* Values for "flag" field in struct arpt_ip (general arp structure). * No flags defined yet. -Index: linux-4.14.18/net/core/utils.c -=================================================================== ---- linux-4.14.18.orig/net/core/utils.c -+++ linux-4.14.18/net/core/utils.c +--- a/net/core/utils.c ++++ b/net/core/utils.c @@ -424,8 +424,14 @@ void inet_proto_csum_replace16(__sum16 * bool pseudohdr) { @@ -902,10 +828,8 @@ Index: linux-4.14.18/net/core/utils.c }; if (skb->ip_summed != CHECKSUM_PARTIAL) { *sum = csum_fold(csum_partial(diff, sizeof(diff), -Index: linux-4.14.18/include/linux/etherdevice.h -=================================================================== ---- linux-4.14.18.orig/include/linux/etherdevice.h -+++ linux-4.14.18/include/linux/etherdevice.h +--- a/include/linux/etherdevice.h ++++ b/include/linux/etherdevice.h @@ -480,7 +480,7 @@ static inline bool is_etherdev_addr(cons * @b: Pointer to Ethernet header * @@ -932,10 +856,8 @@ Index: linux-4.14.18/include/linux/etherdevice.h #endif } -Index: linux-4.14.18/net/ipv4/tcp_offload.c -=================================================================== ---- linux-4.14.18.orig/net/ipv4/tcp_offload.c -+++ linux-4.14.18/net/ipv4/tcp_offload.c +--- a/net/ipv4/tcp_offload.c ++++ b/net/ipv4/tcp_offload.c @@ -226,7 +226,7 @@ struct sk_buff **tcp_gro_receive(struct th2 = tcp_hdr(p); @@ -956,11 +878,9 @@ Index: linux-4.14.18/net/ipv4/tcp_offload.c /* When we receive our second frame we can made a decision on if we * continue this flow as an atomic flow with a fixed ID or if we use -Index: linux-4.14.18/net/ipv6/netfilter/ip6table_mangle.c -=================================================================== ---- linux-4.14.18.orig/net/ipv6/netfilter/ip6table_mangle.c -+++ linux-4.14.18/net/ipv6/netfilter/ip6table_mangle.c -@@ -58,7 +58,7 @@ ip6t_mangle_out(struct sk_buff *skb, con +--- a/net/ipv6/netfilter/ip6table_mangle.c ++++ b/net/ipv6/netfilter/ip6table_mangle.c +@@ -50,7 +50,7 @@ ip6t_mangle_out(struct sk_buff *skb, con hop_limit = ipv6_hdr(skb)->hop_limit; /* flowlabel and prio (includes version, which shouldn't change either */ @@ -969,7 +889,7 @@ Index: linux-4.14.18/net/ipv6/netfilter/ip6table_mangle.c ret = ip6t_do_table(skb, state, state->net->ipv6.ip6table_mangle); -@@ -67,7 +67,7 @@ ip6t_mangle_out(struct sk_buff *skb, con +@@ -59,7 +59,7 @@ ip6t_mangle_out(struct sk_buff *skb, con !ipv6_addr_equal(&ipv6_hdr(skb)->daddr, &daddr) || skb->mark != mark || ipv6_hdr(skb)->hop_limit != hop_limit || diff --git a/target/linux/bcm53xx/patches-4.14/910-Revert-earlycon-initialise-baud-field-of-earlycon-de.patch b/target/linux/bcm53xx/patches-4.14/910-Revert-earlycon-initialise-baud-field-of-earlycon-de.patch index 025781a86..c00cae2df 100644 --- a/target/linux/bcm53xx/patches-4.14/910-Revert-earlycon-initialise-baud-field-of-earlycon-de.patch +++ b/target/linux/bcm53xx/patches-4.14/910-Revert-earlycon-initialise-baud-field-of-earlycon-de.patch @@ -18,7 +18,7 @@ Signed-off-by: RafaÅ‚ MiÅ‚ecki --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c -@@ -283,12 +283,7 @@ int __init of_setup_earlycon(const struc +@@ -285,12 +285,7 @@ int __init of_setup_earlycon(const struc } } diff --git a/target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch b/target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch index 665c9786c..caed9ec41 100644 --- a/target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch +++ b/target/linux/bcm53xx/patches-4.9/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch @@ -13,7 +13,7 @@ Signed-off-by: RafaÅ‚ MiÅ‚ecki --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1190,6 +1190,18 @@ static const struct flash_info *spi_nor_ +@@ -1194,6 +1194,18 @@ static const struct flash_info *spi_nor_ } dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n", id[0], id[1], id[2]); diff --git a/target/linux/brcm2708/patches-4.9/950-0021-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch b/target/linux/brcm2708/patches-4.9/950-0021-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch index 152f9abc8..fc662619d 100644 --- a/target/linux/brcm2708/patches-4.9/950-0021-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch +++ b/target/linux/brcm2708/patches-4.9/950-0021-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch @@ -19,7 +19,7 @@ Signed-off-by: Eric Anholt --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1266,6 +1266,15 @@ static struct clk_hw *bcm2835_register_c +@@ -1268,6 +1268,15 @@ static struct clk_hw *bcm2835_register_c init.name = data->name; init.flags = data->flags | CLK_IGNORE_UNUSED; diff --git a/target/linux/brcm2708/patches-4.9/950-0026-Register-the-clocks-early-during-the-boot-process.patch b/target/linux/brcm2708/patches-4.9/950-0026-Register-the-clocks-early-during-the-boot-process.patch index be69c175f..ec174b0c9 100644 --- a/target/linux/brcm2708/patches-4.9/950-0026-Register-the-clocks-early-during-the-boot-process.patch +++ b/target/linux/brcm2708/patches-4.9/950-0026-Register-the-clocks-early-during-the-boot-process.patch @@ -13,7 +13,7 @@ Signed-off-by: Martin Sperl --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1907,8 +1907,15 @@ static int bcm2835_clk_probe(struct plat +@@ -1909,8 +1909,15 @@ static int bcm2835_clk_probe(struct plat if (ret) return ret; @@ -30,7 +30,7 @@ Signed-off-by: Martin Sperl } static const struct of_device_id bcm2835_clk_of_match[] = { -@@ -1925,7 +1932,11 @@ static struct platform_driver bcm2835_cl +@@ -1927,7 +1934,11 @@ static struct platform_driver bcm2835_cl .probe = bcm2835_clk_probe, }; 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 3006fefc2..34e776466 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 } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5054,7 +5054,7 @@ static void port_event(struct usb_hub *h +@@ -5062,7 +5062,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/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch b/target/linux/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch index 50e1f47f6..9f6049b6c 100644 --- a/target/linux/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch +++ b/target/linux/brcm2708/patches-4.9/950-0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch @@ -39,7 +39,7 @@ Signed-off-by: Felipe Balbi --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c -@@ -4366,6 +4366,9 @@ static int _dwc2_hcd_suspend(struct usb_ +@@ -4369,6 +4369,9 @@ static int _dwc2_hcd_suspend(struct usb_ if (!HCD_HW_ACCESSIBLE(hcd)) goto unlock; diff --git a/target/linux/brcm2708/patches-4.9/950-0152-clk-bcm-Support-rate-change-propagation-on-bcm2835-c.patch b/target/linux/brcm2708/patches-4.9/950-0152-clk-bcm-Support-rate-change-propagation-on-bcm2835-c.patch index d8617dd6d..0fa32dc7b 100644 --- a/target/linux/brcm2708/patches-4.9/950-0152-clk-bcm-Support-rate-change-propagation-on-bcm2835-c.patch +++ b/target/linux/brcm2708/patches-4.9/950-0152-clk-bcm-Support-rate-change-propagation-on-bcm2835-c.patch @@ -34,7 +34,7 @@ Signed-off-by: Stephen Boyd u32 ctl_reg; u32 div_reg; -@@ -1021,10 +1024,60 @@ bcm2835_clk_is_pllc(struct clk_hw *hw) +@@ -1023,10 +1026,60 @@ bcm2835_clk_is_pllc(struct clk_hw *hw) return strncmp(clk_hw_get_name(hw), "pllc", 4) == 0; } @@ -96,7 +96,7 @@ Signed-off-by: Stephen Boyd struct clk_hw *parent, *best_parent = NULL; bool current_parent_is_pllc; unsigned long rate, best_rate = 0; -@@ -1052,9 +1105,8 @@ static int bcm2835_clock_determine_rate( +@@ -1054,9 +1107,8 @@ static int bcm2835_clock_determine_rate( if (bcm2835_clk_is_pllc(parent) && !current_parent_is_pllc) continue; @@ -108,7 +108,7 @@ Signed-off-by: Stephen Boyd if (rate > best_rate && rate <= req->rate) { best_parent = parent; best_prate = prate; -@@ -1275,6 +1327,13 @@ static struct clk_hw *bcm2835_register_c +@@ -1277,6 +1329,13 @@ static struct clk_hw *bcm2835_register_c if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) init.flags &= ~CLK_IS_CRITICAL; diff --git a/target/linux/brcm2708/patches-4.9/950-0153-clk-bcm-Allow-rate-change-propagation-to-PLLH_AUX-on.patch b/target/linux/brcm2708/patches-4.9/950-0153-clk-bcm-Allow-rate-change-propagation-to-PLLH_AUX-on.patch index 57517a9f0..bab716142 100644 --- a/target/linux/brcm2708/patches-4.9/950-0153-clk-bcm-Allow-rate-change-propagation-to-PLLH_AUX-on.patch +++ b/target/linux/brcm2708/patches-4.9/950-0153-clk-bcm-Allow-rate-change-propagation-to-PLLH_AUX-on.patch @@ -19,7 +19,7 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1874,7 +1874,12 @@ static const struct bcm2835_clk_desc clk +@@ -1876,7 +1876,12 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_VECCTL, .div_reg = CM_VECDIV, .int_bits = 4, diff --git a/target/linux/brcm2708/patches-4.9/950-0154-clk-bcm-Fix-maybe-uninitialized-warning-in-bcm2835_c.patch b/target/linux/brcm2708/patches-4.9/950-0154-clk-bcm-Fix-maybe-uninitialized-warning-in-bcm2835_c.patch index 4ed991173..a40245b8e 100644 --- a/target/linux/brcm2708/patches-4.9/950-0154-clk-bcm-Fix-maybe-uninitialized-warning-in-bcm2835_c.patch +++ b/target/linux/brcm2708/patches-4.9/950-0154-clk-bcm-Fix-maybe-uninitialized-warning-in-bcm2835_c.patch @@ -18,7 +18,7 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1033,7 +1033,7 @@ static unsigned long bcm2835_clock_choos +@@ -1035,7 +1035,7 @@ static unsigned long bcm2835_clock_choos struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); struct bcm2835_cprman *cprman = clock->cprman; const struct bcm2835_clock_data *data = clock->data; diff --git a/target/linux/brcm2708/patches-4.9/950-0155-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-DSI-.patch b/target/linux/brcm2708/patches-4.9/950-0155-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-DSI-.patch index 138220424..842e57676 100644 --- a/target/linux/brcm2708/patches-4.9/950-0155-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-DSI-.patch +++ b/target/linux/brcm2708/patches-4.9/950-0155-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-DSI-.patch @@ -31,7 +31,7 @@ Signed-off-by: Stephen Boyd }; struct bcm2835_clock_data { -@@ -1256,7 +1257,7 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1258,7 +1259,7 @@ bcm2835_register_pll_divider(struct bcm2 init.num_parents = 1; init.name = divider_name; init.ops = &bcm2835_pll_divider_clk_ops; @@ -40,7 +40,7 @@ Signed-off-by: Stephen Boyd divider = devm_kzalloc(cprman->dev, sizeof(*divider), GFP_KERNEL); if (!divider) -@@ -1479,7 +1480,8 @@ static const struct bcm2835_clk_desc clk +@@ -1481,7 +1482,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLA_CORE, .load_mask = CM_PLLA_LOADCORE, .hold_mask = CM_PLLA_HOLDCORE, @@ -50,7 +50,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLA_PER] = REGISTER_PLL_DIV( .name = "plla_per", .source_pll = "plla", -@@ -1487,7 +1489,8 @@ static const struct bcm2835_clk_desc clk +@@ -1489,7 +1491,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLA_PER, .load_mask = CM_PLLA_LOADPER, .hold_mask = CM_PLLA_HOLDPER, @@ -60,7 +60,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( .name = "plla_dsi0", .source_pll = "plla", -@@ -1503,7 +1506,8 @@ static const struct bcm2835_clk_desc clk +@@ -1505,7 +1508,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLA_CCP2, .load_mask = CM_PLLA_LOADCCP2, .hold_mask = CM_PLLA_HOLDCCP2, @@ -70,7 +70,7 @@ Signed-off-by: Stephen Boyd /* PLLB is used for the ARM's clock. */ [BCM2835_PLLB] = REGISTER_PLL( -@@ -1527,7 +1531,8 @@ static const struct bcm2835_clk_desc clk +@@ -1529,7 +1533,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLB_ARM, .load_mask = CM_PLLB_LOADARM, .hold_mask = CM_PLLB_HOLDARM, @@ -80,7 +80,7 @@ Signed-off-by: Stephen Boyd /* * PLLC is the core PLL, used to drive the core VPU clock. -@@ -1556,7 +1561,8 @@ static const struct bcm2835_clk_desc clk +@@ -1558,7 +1563,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLC_CORE0, .load_mask = CM_PLLC_LOADCORE0, .hold_mask = CM_PLLC_HOLDCORE0, @@ -90,7 +90,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV( .name = "pllc_core1", .source_pll = "pllc", -@@ -1564,7 +1570,8 @@ static const struct bcm2835_clk_desc clk +@@ -1566,7 +1572,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLC_CORE1, .load_mask = CM_PLLC_LOADCORE1, .hold_mask = CM_PLLC_HOLDCORE1, @@ -100,7 +100,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV( .name = "pllc_core2", .source_pll = "pllc", -@@ -1572,7 +1579,8 @@ static const struct bcm2835_clk_desc clk +@@ -1574,7 +1581,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLC_CORE2, .load_mask = CM_PLLC_LOADCORE2, .hold_mask = CM_PLLC_HOLDCORE2, @@ -110,7 +110,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLC_PER] = REGISTER_PLL_DIV( .name = "pllc_per", .source_pll = "pllc", -@@ -1580,7 +1588,8 @@ static const struct bcm2835_clk_desc clk +@@ -1582,7 +1590,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLC_PER, .load_mask = CM_PLLC_LOADPER, .hold_mask = CM_PLLC_HOLDPER, @@ -120,7 +120,7 @@ Signed-off-by: Stephen Boyd /* * PLLD is the display PLL, used to drive DSI display panels. -@@ -1609,7 +1618,8 @@ static const struct bcm2835_clk_desc clk +@@ -1611,7 +1620,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLD_CORE, .load_mask = CM_PLLD_LOADCORE, .hold_mask = CM_PLLD_HOLDCORE, @@ -130,7 +130,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLD_PER] = REGISTER_PLL_DIV( .name = "plld_per", .source_pll = "plld", -@@ -1617,7 +1627,8 @@ static const struct bcm2835_clk_desc clk +@@ -1619,7 +1629,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLD_PER, .load_mask = CM_PLLD_LOADPER, .hold_mask = CM_PLLD_HOLDPER, @@ -140,7 +140,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLD_DSI0] = REGISTER_PLL_DIV( .name = "plld_dsi0", .source_pll = "plld", -@@ -1662,7 +1673,8 @@ static const struct bcm2835_clk_desc clk +@@ -1664,7 +1675,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLH_RCAL, .load_mask = CM_PLLH_LOADRCAL, .hold_mask = 0, @@ -150,7 +150,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV( .name = "pllh_aux", .source_pll = "pllh", -@@ -1670,7 +1682,8 @@ static const struct bcm2835_clk_desc clk +@@ -1672,7 +1684,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLH_AUX, .load_mask = CM_PLLH_LOADAUX, .hold_mask = 0, @@ -160,7 +160,7 @@ Signed-off-by: Stephen Boyd [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV( .name = "pllh_pix", .source_pll = "pllh", -@@ -1678,7 +1691,8 @@ static const struct bcm2835_clk_desc clk +@@ -1680,7 +1693,8 @@ static const struct bcm2835_clk_desc clk .a2w_reg = A2W_PLLH_PIX, .load_mask = CM_PLLH_LOADPIX, .hold_mask = 0, diff --git a/target/linux/brcm2708/patches-4.9/950-0156-clk-bcm2835-Register-the-DSI0-DSI1-pixel-clocks.patch b/target/linux/brcm2708/patches-4.9/950-0156-clk-bcm2835-Register-the-DSI0-DSI1-pixel-clocks.patch index 61fae23cf..0a06cabe6 100644 --- a/target/linux/brcm2708/patches-4.9/950-0156-clk-bcm2835-Register-the-DSI0-DSI1-pixel-clocks.patch +++ b/target/linux/brcm2708/patches-4.9/950-0156-clk-bcm2835-Register-the-DSI0-DSI1-pixel-clocks.patch @@ -76,7 +76,7 @@ Signed-off-by: Stephen Boyd /* Must be last */ struct clk_hw_onecell_data onecell; -@@ -911,6 +932,9 @@ static long bcm2835_clock_rate_from_divi +@@ -913,6 +934,9 @@ static long bcm2835_clock_rate_from_divi const struct bcm2835_clock_data *data = clock->data; u64 temp; @@ -86,7 +86,7 @@ Signed-off-by: Stephen Boyd /* * The divisor is a 12.12 fixed point field, but only some of * the bits are populated in any given clock. -@@ -934,7 +958,12 @@ static unsigned long bcm2835_clock_get_r +@@ -936,7 +960,12 @@ static unsigned long bcm2835_clock_get_r struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); struct bcm2835_cprman *cprman = clock->cprman; const struct bcm2835_clock_data *data = clock->data; @@ -100,7 +100,7 @@ Signed-off-by: Stephen Boyd return bcm2835_clock_rate_from_divisor(clock, parent_rate, div); } -@@ -1213,7 +1242,7 @@ static struct clk_hw *bcm2835_register_p +@@ -1215,7 +1244,7 @@ static struct clk_hw *bcm2835_register_p memset(&init, 0, sizeof(init)); /* All of the PLLs derive from the external oscillator. */ @@ -109,7 +109,7 @@ Signed-off-by: Stephen Boyd init.num_parents = 1; init.name = data->name; init.ops = &bcm2835_pll_clk_ops; -@@ -1299,18 +1328,22 @@ static struct clk_hw *bcm2835_register_c +@@ -1301,18 +1330,22 @@ static struct clk_hw *bcm2835_register_c struct bcm2835_clock *clock; struct clk_init_data init; const char *parents[1 << CM_SRC_BITS]; @@ -139,7 +139,7 @@ Signed-off-by: Stephen Boyd } memset(&init, 0, sizeof(init)); -@@ -1446,6 +1479,47 @@ static const char *const bcm2835_clock_v +@@ -1448,6 +1481,47 @@ static const char *const bcm2835_clock_v __VA_ARGS__) /* @@ -187,7 +187,7 @@ Signed-off-by: Stephen Boyd * the real definition of all the pll, pll_dividers and clocks * these make use of the above REGISTER_* macros */ -@@ -1908,6 +1982,18 @@ static const struct bcm2835_clk_desc clk +@@ -1910,6 +1984,18 @@ static const struct bcm2835_clk_desc clk .div_reg = CM_DSI1EDIV, .int_bits = 4, .frac_bits = 8), @@ -206,7 +206,7 @@ Signed-off-by: Stephen Boyd /* the gates */ -@@ -1966,8 +2052,19 @@ static int bcm2835_clk_probe(struct plat +@@ -1968,8 +2054,19 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/brcm2708/patches-4.9/950-0157-clk-bcm2835-Add-leaf-clock-measurement-support-disab.patch b/target/linux/brcm2708/patches-4.9/950-0157-clk-bcm2835-Add-leaf-clock-measurement-support-disab.patch index f4190864c..d10f60017 100644 --- a/target/linux/brcm2708/patches-4.9/950-0157-clk-bcm2835-Add-leaf-clock-measurement-support-disab.patch +++ b/target/linux/brcm2708/patches-4.9/950-0157-clk-bcm2835-Add-leaf-clock-measurement-support-disab.patch @@ -107,7 +107,7 @@ Signed-off-by: Stephen Boyd }; struct bcm2835_gate_data { -@@ -1012,6 +1071,17 @@ static int bcm2835_clock_on(struct clk_h +@@ -1014,6 +1073,17 @@ static int bcm2835_clock_on(struct clk_h CM_GATE); spin_unlock(&cprman->regs_lock); @@ -125,7 +125,7 @@ Signed-off-by: Stephen Boyd return 0; } -@@ -1778,7 +1848,8 @@ static const struct bcm2835_clk_desc clk +@@ -1780,7 +1850,8 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_OTPCTL, .div_reg = CM_OTPDIV, .int_bits = 4, @@ -135,7 +135,7 @@ Signed-off-by: Stephen Boyd /* * Used for a 1Mhz clock for the system clocksource, and also used * bythe watchdog timer and the camera pulse generator. -@@ -1812,13 +1883,15 @@ static const struct bcm2835_clk_desc clk +@@ -1814,13 +1885,15 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_H264CTL, .div_reg = CM_H264DIV, .int_bits = 4, @@ -153,7 +153,7 @@ Signed-off-by: Stephen Boyd /* * Secondary SDRAM clock. Used for low-voltage modes when the PLL -@@ -1829,13 +1902,15 @@ static const struct bcm2835_clk_desc clk +@@ -1831,13 +1904,15 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_SDCCTL, .div_reg = CM_SDCDIV, .int_bits = 6, @@ -171,7 +171,7 @@ Signed-off-by: Stephen Boyd /* * VPU clock. This doesn't have an enable bit, since it drives * the bus for everything else, and is special so it doesn't need -@@ -1849,7 +1924,8 @@ static const struct bcm2835_clk_desc clk +@@ -1851,7 +1926,8 @@ static const struct bcm2835_clk_desc clk .int_bits = 12, .frac_bits = 8, .flags = CLK_IS_CRITICAL, @@ -181,7 +181,7 @@ Signed-off-by: Stephen Boyd /* clocks with per parent mux */ [BCM2835_CLOCK_AVEO] = REGISTER_PER_CLK( -@@ -1857,19 +1933,22 @@ static const struct bcm2835_clk_desc clk +@@ -1859,19 +1935,22 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_AVEOCTL, .div_reg = CM_AVEODIV, .int_bits = 4, @@ -207,7 +207,7 @@ Signed-off-by: Stephen Boyd [BCM2835_CLOCK_DFT] = REGISTER_PER_CLK( .name = "dft", .ctl_reg = CM_DFTCTL, -@@ -1881,7 +1960,8 @@ static const struct bcm2835_clk_desc clk +@@ -1883,7 +1962,8 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_DPICTL, .div_reg = CM_DPIDIV, .int_bits = 4, @@ -217,7 +217,7 @@ Signed-off-by: Stephen Boyd /* Arasan EMMC clock */ [BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK( -@@ -1889,7 +1969,8 @@ static const struct bcm2835_clk_desc clk +@@ -1891,7 +1971,8 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_EMMCCTL, .div_reg = CM_EMMCDIV, .int_bits = 4, @@ -227,7 +227,7 @@ Signed-off-by: Stephen Boyd /* General purpose (GPIO) clocks */ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( -@@ -1898,7 +1979,8 @@ static const struct bcm2835_clk_desc clk +@@ -1900,7 +1981,8 @@ static const struct bcm2835_clk_desc clk .div_reg = CM_GP0DIV, .int_bits = 12, .frac_bits = 12, @@ -237,7 +237,7 @@ Signed-off-by: Stephen Boyd [BCM2835_CLOCK_GP1] = REGISTER_PER_CLK( .name = "gp1", .ctl_reg = CM_GP1CTL, -@@ -1906,7 +1988,8 @@ static const struct bcm2835_clk_desc clk +@@ -1908,7 +1990,8 @@ static const struct bcm2835_clk_desc clk .int_bits = 12, .frac_bits = 12, .flags = CLK_IS_CRITICAL, @@ -247,7 +247,7 @@ Signed-off-by: Stephen Boyd [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( .name = "gp2", .ctl_reg = CM_GP2CTL, -@@ -1921,40 +2004,46 @@ static const struct bcm2835_clk_desc clk +@@ -1923,40 +2006,46 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_HSMCTL, .div_reg = CM_HSMDIV, .int_bits = 4, @@ -300,7 +300,7 @@ Signed-off-by: Stephen Boyd /* TV encoder clock. Only operating frequency is 108Mhz. */ [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK( -@@ -1967,7 +2056,8 @@ static const struct bcm2835_clk_desc clk +@@ -1969,7 +2058,8 @@ static const struct bcm2835_clk_desc clk * Allow rate change propagation only on PLLH_AUX which is * assigned index 7 in the parent array. */ @@ -310,7 +310,7 @@ Signed-off-by: Stephen Boyd /* dsi clocks */ [BCM2835_CLOCK_DSI0E] = REGISTER_PER_CLK( -@@ -1975,25 +2065,29 @@ static const struct bcm2835_clk_desc clk +@@ -1977,25 +2067,29 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_DSI0ECTL, .div_reg = CM_DSI0EDIV, .int_bits = 4, diff --git a/target/linux/brcm2708/patches-4.9/950-0180-drm-vc4-Fulfill-user-BO-creation-requests-from-the-k.patch b/target/linux/brcm2708/patches-4.9/950-0180-drm-vc4-Fulfill-user-BO-creation-requests-from-the-k.patch index c0967b463..71118e26c 100644 --- a/target/linux/brcm2708/patches-4.9/950-0180-drm-vc4-Fulfill-user-BO-creation-requests-from-the-k.patch +++ b/target/linux/brcm2708/patches-4.9/950-0180-drm-vc4-Fulfill-user-BO-creation-requests-from-the-k.patch @@ -22,7 +22,7 @@ Signed-off-by: Eric Anholt --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c -@@ -208,21 +208,22 @@ struct drm_gem_object *vc4_create_object +@@ -209,21 +209,22 @@ struct drm_gem_object *vc4_create_object } struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size, diff --git a/target/linux/brcm2708/patches-4.9/950-0181-drm-vc4-Fix-OOPSes-from-trying-to-cache-a-partially-.patch b/target/linux/brcm2708/patches-4.9/950-0181-drm-vc4-Fix-OOPSes-from-trying-to-cache-a-partially-.patch index 3fed370be..52d0de391 100644 --- a/target/linux/brcm2708/patches-4.9/950-0181-drm-vc4-Fix-OOPSes-from-trying-to-cache-a-partially-.patch +++ b/target/linux/brcm2708/patches-4.9/950-0181-drm-vc4-Fix-OOPSes-from-trying-to-cache-a-partially-.patch @@ -17,7 +17,7 @@ Fixes: c826a6e10644 ("drm/vc4: Add a BO cache.") --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c -@@ -322,6 +322,14 @@ void vc4_free_object(struct drm_gem_obje +@@ -323,6 +323,14 @@ void vc4_free_object(struct drm_gem_obje goto out; } diff --git a/target/linux/brcm2708/patches-4.9/950-0185-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch b/target/linux/brcm2708/patches-4.9/950-0185-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch index c8e715100..a8e5e1b64 100644 --- a/target/linux/brcm2708/patches-4.9/950-0185-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch +++ b/target/linux/brcm2708/patches-4.9/950-0185-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1370,6 +1370,11 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1372,6 +1372,11 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.hw.init = &init; divider->div.table = NULL; diff --git a/target/linux/brcm2708/patches-4.9/950-0186-clk-bcm2835-Add-claim-clocks-property.patch b/target/linux/brcm2708/patches-4.9/950-0186-clk-bcm2835-Add-claim-clocks-property.patch index 09d449a8c..021f7521b 100644 --- a/target/linux/brcm2708/patches-4.9/950-0186-clk-bcm2835-Add-claim-clocks-property.patch +++ b/target/linux/brcm2708/patches-4.9/950-0186-clk-bcm2835-Add-claim-clocks-property.patch @@ -48,7 +48,7 @@ Signed-off-by: Phil Elwell cma-192 = <0>,"-0+1-2-3-4"; --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1302,6 +1302,8 @@ static const struct clk_ops bcm2835_vpu_ +@@ -1304,6 +1304,8 @@ static const struct clk_ops bcm2835_vpu_ .debug_init = bcm2835_clock_debug_init, }; @@ -57,7 +57,7 @@ Signed-off-by: Phil Elwell static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, const struct bcm2835_pll_data *data) { -@@ -1318,6 +1320,9 @@ static struct clk_hw *bcm2835_register_p +@@ -1320,6 +1322,9 @@ static struct clk_hw *bcm2835_register_p init.ops = &bcm2835_pll_clk_ops; init.flags = CLK_IGNORE_UNUSED; @@ -67,7 +67,7 @@ Signed-off-by: Phil Elwell pll = kzalloc(sizeof(*pll), GFP_KERNEL); if (!pll) return NULL; -@@ -1371,8 +1376,10 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1373,8 +1378,10 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.table = NULL; if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { @@ -80,7 +80,7 @@ Signed-off-by: Phil Elwell } divider->cprman = cprman; -@@ -2108,6 +2115,8 @@ static const struct bcm2835_clk_desc clk +@@ -2110,6 +2117,8 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_PERIICTL), }; @@ -89,7 +89,7 @@ Signed-off-by: Phil Elwell /* * Permanently take a reference on the parent of the SDRAM clock. * -@@ -2127,6 +2136,19 @@ static int bcm2835_mark_sdc_parent_criti +@@ -2129,6 +2138,19 @@ static int bcm2835_mark_sdc_parent_criti return clk_prepare_enable(parent); } @@ -109,7 +109,7 @@ Signed-off-by: Phil Elwell static int bcm2835_clk_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -2136,6 +2158,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2138,6 +2160,7 @@ static int bcm2835_clk_probe(struct plat const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); size_t i; @@ -117,7 +117,7 @@ Signed-off-by: Phil Elwell int ret; cprman = devm_kzalloc(dev, sizeof(*cprman) + -@@ -2151,6 +2174,13 @@ static int bcm2835_clk_probe(struct plat +@@ -2153,6 +2176,13 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/brcm47xx/patches-4.14/159-cpu_fixes.patch b/target/linux/brcm47xx/patches-4.14/159-cpu_fixes.patch index 32df8009e..ca5530ae9 100644 --- a/target/linux/brcm47xx/patches-4.14/159-cpu_fixes.patch +++ b/target/linux/brcm47xx/patches-4.14/159-cpu_fixes.patch @@ -396,7 +396,7 @@ if (dc_lsize == 0) r4k_blast_dcache = (void *)cache_noop; else if (dc_lsize == 16) -@@ -952,6 +964,8 @@ static void local_r4k_flush_cache_sigtra +@@ -955,6 +967,8 @@ static void local_r4k_flush_cache_sigtra } R4600_HIT_CACHEOP_WAR_IMPL; @@ -405,7 +405,7 @@ if (!cpu_has_ic_fills_f_dc) { if (dc_lsize) vaddr ? flush_dcache_line(addr & ~(dc_lsize - 1)) -@@ -1846,6 +1860,17 @@ static void coherency_setup(void) +@@ -1849,6 +1863,17 @@ static void coherency_setup(void) * silly idea of putting something else there ... */ switch (current_cpu_type()) { @@ -423,7 +423,7 @@ case CPU_R4000PC: case CPU_R4000SC: case CPU_R4000MC: -@@ -1892,6 +1917,15 @@ void r4k_cache_init(void) +@@ -1895,6 +1920,15 @@ void r4k_cache_init(void) extern void build_copy_page(void); struct cpuinfo_mips *c = ¤t_cpu_data; @@ -439,7 +439,7 @@ probe_pcache(); probe_vcache(); setup_scache(); -@@ -1969,7 +2003,15 @@ void r4k_cache_init(void) +@@ -1972,7 +2006,15 @@ void r4k_cache_init(void) */ local_r4k___flush_cache_all(NULL); diff --git a/target/linux/brcm47xx/patches-4.9/831-old_gpio_wdt.patch b/target/linux/brcm47xx/patches-4.9/831-old_gpio_wdt.patch index ac71864d0..3eb67dfd6 100644 --- a/target/linux/brcm47xx/patches-4.9/831-old_gpio_wdt.patch +++ b/target/linux/brcm47xx/patches-4.9/831-old_gpio_wdt.patch @@ -4,7 +4,7 @@ Signed-off-by: Mathias Adam --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -1388,6 +1388,15 @@ config WDT_MTX1 +@@ -1389,6 +1389,15 @@ config WDT_MTX1 Hardware driver for the MTX-1 boards. This is a watchdog timer that will reboot the machine after a 100 seconds timer expired. diff --git a/target/linux/brcm63xx/patches-4.14/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch b/target/linux/brcm63xx/patches-4.14/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch index 2e663259d..b9009bbee 100644 --- a/target/linux/brcm63xx/patches-4.14/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch +++ b/target/linux/brcm63xx/patches-4.14/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch @@ -42,7 +42,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -961,8 +961,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -948,8 +948,7 @@ int add_mtd_partitions(struct mtd_info * add_mtd_device(&slave->mtd); mtd_partition_split(master, slave); mtd_add_partition_attrs(slave); @@ -52,7 +52,7 @@ Signed-off-by: Jonas Gorski cur_offset = slave->offset + slave->mtd.size; } -@@ -1134,7 +1133,9 @@ static int mtd_part_of_parse(struct mtd_ +@@ -1121,7 +1120,9 @@ static int mtd_part_of_parse(struct mtd_ const char *fixed = "fixed-partitions"; int ret, err = 0; @@ -63,7 +63,7 @@ Signed-off-by: Jonas Gorski of_property_for_each_string(np, "compatible", prop, compat) { parser = mtd_part_get_compatible_parser(compat); if (!parser) -@@ -1206,8 +1207,12 @@ int parse_mtd_partitions(struct mtd_info +@@ -1190,8 +1191,12 @@ int parse_mtd_partitions(struct mtd_info types = types_of; } diff --git a/target/linux/brcm63xx/patches-4.9/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch b/target/linux/brcm63xx/patches-4.9/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch index 59e9933e5..c193c72ab 100644 --- a/target/linux/brcm63xx/patches-4.9/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch +++ b/target/linux/brcm63xx/patches-4.9/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch @@ -16,7 +16,7 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -271,6 +271,7 @@ config BCM63XX +@@ -272,6 +272,7 @@ config BCM63XX select GPIOLIB select HAVE_CLK select MIPS_L1_CACHE_SHIFT_4 diff --git a/target/linux/brcm63xx/patches-4.9/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch b/target/linux/brcm63xx/patches-4.9/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch index 6a93398c7..5ae903b93 100644 --- a/target/linux/brcm63xx/patches-4.9/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch +++ b/target/linux/brcm63xx/patches-4.9/120-mtd-add-of_match_table-parsing-for-partition-parsers.patch @@ -42,7 +42,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -953,8 +953,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -940,8 +940,7 @@ int add_mtd_partitions(struct mtd_info * add_mtd_device(&slave->mtd); mtd_partition_split(master, slave); mtd_add_partition_attrs(slave); @@ -52,7 +52,7 @@ Signed-off-by: Jonas Gorski cur_offset = slave->offset + slave->mtd.size; } -@@ -1136,7 +1135,9 @@ static int mtd_part_of_parse(struct mtd_ +@@ -1123,7 +1122,9 @@ static int mtd_part_of_parse(struct mtd_ const char *fixed = "fixed-partitions"; int ret, err = 0; @@ -63,7 +63,7 @@ Signed-off-by: Jonas Gorski of_property_for_each_string(np, "compatible", prop, compat) { parser = mtd_part_get_compatible_parser(compat); if (!parser) -@@ -1208,8 +1209,12 @@ int parse_mtd_partitions(struct mtd_info +@@ -1192,8 +1193,12 @@ int parse_mtd_partitions(struct mtd_info types = types_of; } diff --git a/target/linux/brcm63xx/patches-4.9/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch b/target/linux/brcm63xx/patches-4.9/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch index 0c4d034c0..ee0d4d657 100644 --- a/target/linux/brcm63xx/patches-4.9/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch +++ b/target/linux/brcm63xx/patches-4.9/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch @@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -264,6 +264,9 @@ config BCM63XX +@@ -265,6 +265,9 @@ config BCM63XX select SYNC_R4K select DMA_NONCOHERENT select IRQ_MIPS_CPU diff --git a/target/linux/cns3xxx/patches-4.14/075-spi_support.patch b/target/linux/cns3xxx/patches-4.14/075-spi_support.patch index 8a51eb396..e38dbdb75 100644 --- a/target/linux/cns3xxx/patches-4.14/075-spi_support.patch +++ b/target/linux/cns3xxx/patches-4.14/075-spi_support.patch @@ -39,7 +39,7 @@ /** --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1021,6 +1021,9 @@ static int spi_transfer_one_message(stru +@@ -1027,6 +1027,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/backport-4.14/336-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-netfilter-exit_net-cleanup-check-added.patch index 92d7942d8..d930751d4 100644 --- a/target/linux/generic/backport-4.14/336-netfilter-exit_net-cleanup-check-added.patch +++ b/target/linux/generic/backport-4.14/336-netfilter-exit_net-cleanup-check-added.patch @@ -80,7 +80,7 @@ Signed-off-by: Pablo Neira Ayuso static void nfnl_queue_net_exit_batch(struct list_head *net_exit_list) --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c -@@ -1754,8 +1754,17 @@ static int __net_init xt_net_init(struct +@@ -1785,8 +1785,17 @@ static int __net_init xt_net_init(struct return 0; } diff --git a/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch b/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch index 01bf7983f..3bb486c95 100644 --- a/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch +++ b/target/linux/generic/backport-4.9/050-usb-dwc2-Remove-unnecessary-kfree.patch @@ -14,7 +14,7 @@ Signed-off-by: Felipe Balbi --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c -@@ -5185,7 +5185,6 @@ error3: +@@ -5188,7 +5188,6 @@ error3: error2: usb_put_hcd(hcd); error1: 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 477c498b2..8d51e1b1d 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 @@ -1095,7 +1095,7 @@ Signed-off-by: David S. Miller dma_intr_ena = smsc9420_reg_read(pd, DMAC_INTR_ENA); --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -2684,7 +2684,7 @@ static int stmmac_poll(struct napi_struc +@@ -2693,7 +2693,7 @@ static int stmmac_poll(struct napi_struc work_done = stmmac_rx(priv, budget); if (work_done < budget) { @@ -1150,7 +1150,7 @@ Signed-off-by: David S. Miller return work_done; --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c -@@ -839,7 +839,7 @@ static int cpsw_rx_poll(struct napi_stru +@@ -843,7 +843,7 @@ static int cpsw_rx_poll(struct napi_stru } if (num_rx < budget) { diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index a27198335..1ea2feb30 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -281,6 +281,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_ERRATUM_843419 is not set # CONFIG_ARM64_ERRATUM_845719 is not set # CONFIG_ARM64_ERRATUM_858921 is not set +# CONFIG_ARM64_ERRATUM_1024718 is not set # CONFIG_ARM64_RELOC_TEST is not set # CONFIG_ARM_APPENDED_DTB is not set # CONFIG_ARM_ARCH_TIMER is not set diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9 index 3f050c205..2a76635b6 100644 --- a/target/linux/generic/config-4.9 +++ b/target/linux/generic/config-4.9 @@ -268,6 +268,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_ERRATUM_834220 is not set # CONFIG_ARM64_ERRATUM_843419 is not set # CONFIG_ARM64_ERRATUM_845719 is not set +# CONFIG_ARM64_ERRATUM_1024718 is not set # CONFIG_ARM_APPENDED_DTB is not set # CONFIG_ARM_ARCH_TIMER is not set # CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set diff --git a/target/linux/generic/hack-4.9/204-module_strip.patch b/target/linux/generic/hack-4.9/204-module_strip.patch index 3dc0c88db..c6484a8f9 100644 --- a/target/linux/generic/hack-4.9/204-module_strip.patch +++ b/target/linux/generic/hack-4.9/204-module_strip.patch @@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -2954,9 +2954,11 @@ static struct module *setup_load_info(st +@@ -2968,9 +2968,11 @@ static struct module *setup_load_info(st static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -2977,6 +2979,7 @@ static int check_modinfo(struct module * +@@ -2991,6 +2993,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/hack-4.9/220-gc_sections.patch b/target/linux/generic/hack-4.9/220-gc_sections.patch index 02e36b664..40e4905db 100644 --- a/target/linux/generic/hack-4.9/220-gc_sections.patch +++ b/target/linux/generic/hack-4.9/220-gc_sections.patch @@ -261,7 +261,7 @@ Signed-off-by: Gabor Juhos #define TRACE_SYSCALLS() @@ -172,7 +172,7 @@ #ifdef CONFIG_SERIAL_EARLYCON - #define EARLYCON_TABLE() STRUCT_ALIGN(); \ + #define EARLYCON_TABLE() . = ALIGN(8); \ VMLINUX_SYMBOL(__earlycon_table) = .; \ - *(__earlycon_table) \ + KEEP(*(__earlycon_table)) \ diff --git a/target/linux/generic/hack-4.9/301-mips_image_cmdline_hack.patch b/target/linux/generic/hack-4.9/301-mips_image_cmdline_hack.patch index 7c3e38efc..96ae77ba0 100644 --- a/target/linux/generic/hack-4.9/301-mips_image_cmdline_hack.patch +++ b/target/linux/generic/hack-4.9/301-mips_image_cmdline_hack.patch @@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1155,6 +1155,10 @@ config SYNC_R4K +@@ -1156,6 +1156,10 @@ config SYNC_R4K config MIPS_MACHINE def_bool n diff --git a/target/linux/generic/hack-4.9/902-debloat_proc.patch b/target/linux/generic/hack-4.9/902-debloat_proc.patch index 01c67c229..ae2dad61e 100644 --- a/target/linux/generic/hack-4.9/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.9/902-debloat_proc.patch @@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau } --- a/mm/vmstat.c +++ b/mm/vmstat.c -@@ -1798,10 +1798,12 @@ static int __init setup_vmstat(void) +@@ -1796,10 +1796,12 @@ static int __init setup_vmstat(void) cpu_notifier_register_done(); #endif #ifdef CONFIG_PROC_FS diff --git a/target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch b/target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch index 4bc7d29b5..d3362fdfe 100644 --- a/target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch +++ b/target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1104,6 +1104,9 @@ static const struct usb_device_id produc +@@ -1105,6 +1105,9 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */ diff --git a/target/linux/generic/pending-4.14/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch b/target/linux/generic/pending-4.14/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch index 3b849466c..8ed0bde02 100644 --- a/target/linux/generic/pending-4.14/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch +++ b/target/linux/generic/pending-4.14/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1183,6 +1183,7 @@ static const struct usb_device_id produc +@@ -1184,6 +1184,7 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ diff --git a/target/linux/generic/pending-4.14/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch b/target/linux/generic/pending-4.14/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch index f4ba5b72f..ed84c6974 100644 --- a/target/linux/generic/pending-4.14/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch +++ b/target/linux/generic/pending-4.14/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch @@ -7,7 +7,7 @@ Signed-off-by: George Kashperko 1 file changed, 1 insertion(+) --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -1832,6 +1832,7 @@ static int __xipram do_write_buffer(stru +@@ -1833,6 +1833,7 @@ static int __xipram do_write_buffer(stru /* Write Buffer Load */ map_write(map, CMD(0x25), cmd_adr); diff --git a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index 180d1407d..2a09caf44 100644 --- a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1157,6 +1157,49 @@ static struct mtd_info * __init open_mtd +@@ -1168,6 +1168,49 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1240,6 +1283,12 @@ static int __init ubi_init(void) +@@ -1251,6 +1294,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch index ec269b6cd..361187960 100644 --- a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch +++ b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau for (i = sizeof(struct ipt_entry); i < e->target_offset; i += m->u.match_size) { -@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent +@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent compat_uint_t origsize; const struct xt_entry_match *ematch; int ret = 0; diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch index ed48128c9..82e2c51af 100644 --- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1822,6 +1822,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1829,6 +1829,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1829,6 +1830,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1836,6 +1837,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1841,7 +1843,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1848,7 +1850,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2068,12 +2070,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2075,12 +2077,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2199,12 +2201,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2206,12 +2208,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3251,6 +3253,7 @@ static int packet_create(struct net *net +@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3837,6 +3840,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3889,6 +3902,13 @@ static int packet_getsockopt(struct sock +@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 4a76db0ff..11f12bb6d 100644 --- a/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -300,7 +300,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1304,6 +1444,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1303,6 +1443,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str { struct ip6_tnl *t = netdev_priv(dev); struct ipv6hdr *ipv6h = ipv6_hdr(skb); @@ -308,7 +308,7 @@ Signed-off-by: Steven Barth int encap_limit = -1; __u16 offset; struct flowi6 fl6; -@@ -1366,6 +1507,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1365,6 +1506,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); @@ -327,7 +327,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1494,6 +1647,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1493,6 +1646,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.link = p->link; t->parms.proto = p->proto; t->parms.fwmark = p->fwmark; @@ -342,7 +342,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1532,6 +1693,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1531,6 +1692,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -350,7 +350,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1913,6 +2075,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1912,6 +2074,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -366,7 +366,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1950,6 +2121,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1949,6 +2120,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_FWMARK]) parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); @@ -413,7 +413,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2061,6 +2272,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2060,6 +2271,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -426,7 +426,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2090,6 +2307,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2089,6 +2306,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -451,7 +451,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2097,6 +2332,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2096,6 +2331,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -461,7 +461,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2106,9 +2344,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2105,9 +2343,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) || @@ -490,7 +490,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2148,6 +2404,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2147,6 +2403,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, [IFLA_IPTUN_FWMARK] = { .type = NLA_U32 }, diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch index 83bc42fe3..608bad00c 100644 --- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5111,6 +5124,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5114,6 +5127,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -6012,6 +6028,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6015,6 +6031,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6033,6 +6052,12 @@ static void ata_host_release(struct devi +@@ -6036,6 +6055,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6479,7 +6504,23 @@ int ata_host_register(struct ata_host *h +@@ -6482,7 +6507,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch b/target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch index 3ec5d7518..8403382de 100644 --- a/target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch +++ b/target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -809,6 +809,9 @@ static const struct usb_device_id produc +@@ -810,6 +810,9 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */ diff --git a/target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch b/target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch index 9d9bb4ce1..2a41a6a95 100644 --- a/target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch +++ b/target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -888,6 +888,7 @@ static const struct usb_device_id produc +@@ -889,6 +889,7 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ diff --git a/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch b/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch index c8258e5cb..87b12b9cb 100644 --- a/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch +++ b/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch @@ -23,7 +23,7 @@ Tested-by: Aaron Brown --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c -@@ -5072,7 +5072,7 @@ static bool e1000e_has_link(struct e1000 +@@ -5078,7 +5078,7 @@ static bool e1000e_has_link(struct e1000 /* get_link_status is set on LSC (link status) interrupt or * Rx sequence error interrupt. get_link_status will stay @@ -32,7 +32,7 @@ Tested-by: Aaron Brown * for copper adapters ONLY */ switch (hw->phy.media_type) { -@@ -5090,7 +5090,7 @@ static bool e1000e_has_link(struct e1000 +@@ -5096,7 +5096,7 @@ static bool e1000e_has_link(struct e1000 break; case e1000_media_type_internal_serdes: ret_val = hw->mac.ops.check_for_link(hw); diff --git a/target/linux/generic/pending-4.9/300-mips_expose_boot_raw.patch b/target/linux/generic/pending-4.9/300-mips_expose_boot_raw.patch index cd58eb12e..d7a3effa4 100644 --- a/target/linux/generic/pending-4.9/300-mips_expose_boot_raw.patch +++ b/target/linux/generic/pending-4.9/300-mips_expose_boot_raw.patch @@ -9,7 +9,7 @@ Acked-by: Rob Landley --- --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1064,9 +1064,6 @@ config FW_ARC +@@ -1065,9 +1065,6 @@ config FW_ARC config ARCH_MAY_HAVE_PC_FDC bool @@ -19,7 +19,7 @@ Acked-by: Rob Landley config CEVT_BCM1480 bool -@@ -2963,6 +2960,18 @@ choice +@@ -2964,6 +2961,18 @@ choice bool "Extend builtin kernel arguments with bootloader arguments" endchoice diff --git a/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch b/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch index a2ec0760f..5707f90be 100644 --- a/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch +++ b/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch @@ -24,7 +24,7 @@ v2: incorporated changes suggested by Jonas Gorski --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -2887,6 +2887,20 @@ config MIPS_O32_FP64_SUPPORT +@@ -2888,6 +2888,20 @@ config MIPS_O32_FP64_SUPPORT If unsure, say N. diff --git a/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch b/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch index 5b237a6d2..393046cf2 100644 --- a/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch +++ b/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -213,6 +213,7 @@ config BMIPS_GENERIC +@@ -214,6 +214,7 @@ config BMIPS_GENERIC select BRCMSTB_L2_IRQ select IRQ_MIPS_CPU select DMA_NONCOHERENT @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN -@@ -338,6 +339,7 @@ config MACH_JAZZ +@@ -339,6 +340,7 @@ config MACH_JAZZ select CSRC_R4K select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select GENERIC_ISA_DMA @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau select HAVE_PCSPKR_PLATFORM select IRQ_MIPS_CPU select I8253 -@@ -1125,6 +1127,9 @@ config DMA_NONCOHERENT +@@ -1126,6 +1128,9 @@ config DMA_NONCOHERENT bool select NEED_DMA_MAP_STATE @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau config NEED_DMA_MAP_STATE bool -@@ -1649,6 +1654,7 @@ config CPU_R10000 +@@ -1650,6 +1655,7 @@ config CPU_R10000 select CPU_SUPPORTS_64BIT_KERNEL select CPU_SUPPORTS_HIGHMEM select CPU_SUPPORTS_HUGEPAGES @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau help MIPS Technologies R10000-series processors. -@@ -1894,9 +1900,11 @@ config SYS_HAS_CPU_MIPS32_R3_5 +@@ -1895,9 +1901,11 @@ config SYS_HAS_CPU_MIPS32_R3_5 bool config SYS_HAS_CPU_MIPS32_R5 @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau bool config SYS_HAS_CPU_MIPS64_R1 -@@ -1906,6 +1914,7 @@ config SYS_HAS_CPU_MIPS64_R2 +@@ -1907,6 +1915,7 @@ config SYS_HAS_CPU_MIPS64_R2 bool config SYS_HAS_CPU_MIPS64_R6 diff --git a/target/linux/generic/pending-4.9/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch b/target/linux/generic/pending-4.9/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch index c1b0d4f16..905675e50 100644 --- a/target/linux/generic/pending-4.9/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch +++ b/target/linux/generic/pending-4.9/461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch @@ -7,7 +7,7 @@ Signed-off-by: George Kashperko 1 file changed, 1 insertion(+) --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -1828,6 +1828,7 @@ static int __xipram do_write_buffer(stru +@@ -1829,6 +1829,7 @@ static int __xipram do_write_buffer(stru /* Write Buffer Load */ map_write(map, CMD(0x25), cmd_adr); diff --git a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index 76d031002..1d44cdb9f 100644 --- a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1212,6 +1212,49 @@ static struct mtd_info * __init open_mtd +@@ -1223,6 +1223,49 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1295,6 +1338,12 @@ static int __init ubi_init(void) +@@ -1306,6 +1349,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch index 092011d0e..08d730ac3 100644 --- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1773,6 +1773,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1780,6 +1780,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1780,6 +1781,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1787,6 +1788,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1792,7 +1794,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1799,7 +1801,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2030,12 +2032,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2037,12 +2039,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2161,12 +2163,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2168,12 +2170,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3251,6 +3253,7 @@ static int packet_create(struct net *net +@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3837,6 +3840,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3889,6 +3902,13 @@ static int packet_getsockopt(struct sock +@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index aeefcaf39..b922be6f3 100644 --- a/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -143,7 +143,7 @@ Signed-off-by: Steven Barth } return &ip6n->tnls[prio][h]; } -@@ -381,6 +392,12 @@ ip6_tnl_dev_uninit(struct net_device *de +@@ -384,6 +395,12 @@ ip6_tnl_dev_uninit(struct net_device *de struct net *net = t->net; struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); @@ -156,7 +156,7 @@ Signed-off-by: Steven Barth if (dev == ip6n->fb_tnl_dev) RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); else -@@ -777,6 +794,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, +@@ -780,6 +797,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, } EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl); @@ -264,7 +264,7 @@ Signed-off-by: Steven Barth static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, -@@ -829,6 +947,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl +@@ -832,6 +950,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl skb_reset_network_header(skb); memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); @@ -292,7 +292,7 @@ Signed-off-by: Steven Barth __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); -@@ -958,6 +1097,7 @@ static void init_tel_txopt(struct ipv6_t +@@ -961,6 +1100,7 @@ static void init_tel_txopt(struct ipv6_t opt->ops.opt_nflen = 8; } @@ -300,7 +300,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1292,6 +1432,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1298,6 +1438,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str { struct ip6_tnl *t = netdev_priv(dev); struct ipv6hdr *ipv6h = ipv6_hdr(skb); @@ -308,7 +308,7 @@ Signed-off-by: Steven Barth int encap_limit = -1; __u16 offset; struct flowi6 fl6; -@@ -1350,6 +1491,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1356,6 +1497,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_mark = skb->mark; } @@ -327,7 +327,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1477,6 +1630,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1483,6 +1636,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.flowinfo = p->flowinfo; t->parms.link = p->link; t->parms.proto = p->proto; @@ -342,7 +342,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1515,6 +1676,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1521,6 +1682,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -350,7 +350,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1892,6 +2054,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1898,6 +2060,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -366,7 +366,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1926,6 +2097,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1932,6 +2103,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_COLLECT_METADATA]) parms->collect_md = true; @@ -413,7 +413,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2035,6 +2246,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2041,6 +2252,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -426,7 +426,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2062,6 +2279,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2068,6 +2285,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(2) + /* IFLA_IPTUN_COLLECT_METADATA */ nla_total_size(0) + @@ -451,7 +451,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2069,6 +2304,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2075,6 +2310,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -461,7 +461,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2077,9 +2315,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2083,9 +2321,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) || nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || @@ -490,7 +490,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2117,6 +2373,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2123,6 +2379,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_SPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, diff --git a/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 85293a2da..ad3a15705 100644 --- a/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -1967,6 +1984,11 @@ static struct rt6_info *ip6_route_info_c +@@ -1970,6 +1987,11 @@ static struct rt6_info *ip6_route_info_c rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -153,7 +153,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -2610,6 +2632,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -2613,6 +2635,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2845,7 +2878,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2848,7 +2881,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3217,6 +3251,9 @@ static int rt6_fill_node(struct net *net +@@ -3220,6 +3254,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3493,6 +3530,8 @@ static int ip6_route_dev_notify(struct n +@@ -3496,6 +3533,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3719,6 +3758,17 @@ static int __net_init ip6_route_net_init +@@ -3722,6 +3761,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3737,6 +3787,8 @@ out: +@@ -3740,6 +3790,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3754,6 +3806,7 @@ static void __net_exit ip6_route_net_exi +@@ -3757,6 +3809,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3827,6 +3880,9 @@ void __init ip6_route_init_special_entri +@@ -3830,6 +3883,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 86a64d842..4d1f6c4c2 100644 --- a/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4542,6 +4542,9 @@ static enum gro_result dev_gro_receive(s +@@ -4550,6 +4550,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau if (!(skb->dev->features & NETIF_F_GRO)) goto normal; -@@ -5830,6 +5833,48 @@ static void __netdev_adjacent_dev_unlink +@@ -5838,6 +5841,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -93,7 +93,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) -@@ -5902,6 +5947,7 @@ static int __netdev_upper_dev_link(struc +@@ -5910,6 +5955,7 @@ static int __netdev_upper_dev_link(struc goto rollback_lower_mesh; } @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -6028,6 +6074,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -6036,6 +6082,7 @@ 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); @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6628,6 +6675,7 @@ int dev_set_mac_address(struct net_devic +@@ -6636,6 +6683,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/pending-4.9/701-phy_extension.patch b/target/linux/generic/pending-4.9/701-phy_extension.patch index 4569336bf..628e1d31b 100644 --- a/target/linux/generic/pending-4.9/701-phy_extension.patch +++ b/target/linux/generic/pending-4.9/701-phy_extension.patch @@ -9,7 +9,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -466,6 +466,50 @@ int phy_ethtool_ksettings_get(struct phy +@@ -472,6 +472,50 @@ int phy_ethtool_ksettings_get(struct phy } EXPORT_SYMBOL(phy_ethtool_ksettings_get); diff --git a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch index 197e01a27..913957370 100644 --- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -4985,6 +4998,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4988,6 +5001,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -5886,6 +5902,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5889,6 +5905,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5907,6 +5926,12 @@ static void ata_host_release(struct devi +@@ -5910,6 +5929,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6353,7 +6378,23 @@ int ata_host_register(struct ata_host *h +@@ -6356,7 +6381,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch index e3a1c8a7e..6cb745ee3 100644 --- a/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch +++ b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h -@@ -448,7 +448,7 @@ extern void uart_handle_cts_change(struc +@@ -455,7 +455,7 @@ extern void uart_handle_cts_change(struc extern void uart_insert_char(struct uart_port *port, unsigned int status, unsigned int overrun, unsigned int ch, unsigned int flag); diff --git a/target/linux/generic/pending-4.9/920-mangle_bootargs.patch b/target/linux/generic/pending-4.9/920-mangle_bootargs.patch index ec2f34009..3422f4151 100644 --- a/target/linux/generic/pending-4.9/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-4.9/920-mangle_bootargs.patch @@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz help --- a/init/main.c +++ b/init/main.c -@@ -352,6 +352,29 @@ static inline void setup_nr_cpu_ids(void +@@ -353,6 +353,29 @@ static inline void setup_nr_cpu_ids(void static inline void smp_prepare_cpus(unsigned int maxcpus) { } #endif @@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -505,6 +528,7 @@ asmlinkage __visible void __init start_k +@@ -506,6 +529,7 @@ asmlinkage __visible void __init start_k pr_notice("%s", linux_banner); setup_arch(&command_line); mm_init_cpumask(&init_mm); diff --git a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch index 86cb45461..8a9da2c08 100644 --- a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch +++ b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch @@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1170,6 +1170,9 @@ static void __init ubi_auto_attach(void) +@@ -1181,6 +1181,9 @@ static void __init ubi_auto_attach(void) mtd = open_mtd_device("ubi"); if (IS_ERR(mtd)) mtd = open_mtd_device("data"); diff --git a/target/linux/ipq806x/patches-4.9/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-4.9/0067-generic-Mangle-bootloader-s-kernel-arguments.patch index 478dad786..be1a7e564 100644 --- a/target/linux/ipq806x/patches-4.9/0067-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/ipq806x/patches-4.9/0067-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -157,7 +157,7 @@ Signed-off-by: Adrian Panella } --- a/init/main.c +++ b/init/main.c -@@ -88,6 +88,10 @@ +@@ -89,6 +89,10 @@ #include #include @@ -168,7 +168,7 @@ Signed-off-by: Adrian Panella static int kernel_init(void *); extern void init_IRQ(void); -@@ -539,6 +543,18 @@ asmlinkage __visible void __init start_k +@@ -540,6 +544,18 @@ asmlinkage __visible void __init start_k page_alloc_init(); pr_notice("Kernel command line: %s\n", boot_command_line); diff --git a/target/linux/ixp4xx/patches-4.9/090-increase_entropy_pools.patch b/target/linux/ixp4xx/patches-4.9/090-increase_entropy_pools.patch index 2b4db053c..9da213911 100644 --- a/target/linux/ixp4xx/patches-4.9/090-increase_entropy_pools.patch +++ b/target/linux/ixp4xx/patches-4.9/090-increase_entropy_pools.patch @@ -1,6 +1,6 @@ --- a/drivers/char/random.c +++ b/drivers/char/random.c -@@ -278,11 +278,11 @@ +@@ -279,11 +279,11 @@ /* * Configuration information */ diff --git a/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch b/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch index 3f3621b0d..80688a4c0 100644 --- a/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch +++ b/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch @@ -10,7 +10,7 @@ /* Get the HEAD */ skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node); -@@ -1222,6 +1225,10 @@ int pskb_expand_head(struct sk_buff *skb +@@ -1223,6 +1226,10 @@ int pskb_expand_head(struct sk_buff *skb if (skb_shared(skb)) BUG(); diff --git a/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch b/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch index 6046d6cde..eb6acdb2f 100644 --- a/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch +++ b/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1032,7 +1032,8 @@ void phy_state_machine(struct work_struc +@@ -1038,7 +1038,8 @@ void phy_state_machine(struct work_struc /* If the link is down, give up on negotiation for now */ if (!phydev->link) { phydev->state = PHY_NOLINK; @@ -21,7 +21,7 @@ Signed-off-by: John Crispin phydev->adjust_link(phydev->attached_dev); break; } -@@ -1124,7 +1125,8 @@ void phy_state_machine(struct work_struc +@@ -1130,7 +1131,8 @@ void phy_state_machine(struct work_struc netif_carrier_on(phydev->attached_dev); } else { phydev->state = PHY_NOLINK; @@ -31,7 +31,7 @@ Signed-off-by: John Crispin } phydev->adjust_link(phydev->attached_dev); -@@ -1136,7 +1138,8 @@ void phy_state_machine(struct work_struc +@@ -1142,7 +1144,8 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/lantiq/patches-4.9/0090-spi-lantiq-ssc-add-support-for-Lantiq-SSC-SPI-contro.patch b/target/linux/lantiq/patches-4.9/0090-spi-lantiq-ssc-add-support-for-Lantiq-SSC-SPI-contro.patch index 64597cec8..da48ae3a1 100644 --- a/target/linux/lantiq/patches-4.9/0090-spi-lantiq-ssc-add-support-for-Lantiq-SSC-SPI-contro.patch +++ b/target/linux/lantiq/patches-4.9/0090-spi-lantiq-ssc-add-support-for-Lantiq-SSC-SPI-contro.patch @@ -65,7 +65,7 @@ Signed-off-by: Mark Brown +}; --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -404,6 +404,14 @@ config SPI_NUC900 +@@ -403,6 +403,14 @@ config SPI_NUC900 help SPI driver for Nuvoton NUC900 series ARM SoCs diff --git a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch index 77e54f834..026fce7dc 100644 --- a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch @@ -421,7 +421,7 @@ Signed-off-by: Yangbo Lu * These are the defined Ethernet Protocol ID's. --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6622,9 +6622,18 @@ int dev_set_mtu(struct net_device *dev, +@@ -6630,9 +6630,18 @@ int dev_set_mtu(struct net_device *dev, if (new_mtu == dev->mtu) return 0; @@ -477,7 +477,7 @@ Signed-off-by: Yangbo Lu /* 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) < \ -@@ -1073,7 +1099,7 @@ static void skb_headers_offset_update(st +@@ -1074,7 +1100,7 @@ static void skb_headers_offset_update(st skb->inner_mac_header += off; } @@ -486,7 +486,7 @@ Signed-off-by: Yangbo Lu { __copy_skb_header(new, old); -@@ -1081,6 +1107,7 @@ static void copy_skb_header(struct sk_bu +@@ -1082,6 +1108,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; } diff --git a/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch b/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch index 0276ebe33..52dfced2b 100644 --- a/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch @@ -335,7 +335,7 @@ Signed-off-by: Yangbo Lu return 1; --- a/arch/arm64/include/asm/pgtable-prot.h +++ b/arch/arm64/include/asm/pgtable-prot.h -@@ -42,6 +42,7 @@ +@@ -48,6 +48,7 @@ #define PROT_NORMAL_NC (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL_NC)) #define PROT_NORMAL_WT (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL_WT)) #define PROT_NORMAL (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL)) diff --git a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch index 361f43c6b..37dc5ee5f 100644 --- a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch +++ b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch @@ -340,7 +340,7 @@ Signed-off-by: Yangbo Lu reg = <0x0 0x1570e08 0x0 0x8>; msi-controller; interrupts = ; -@@ -137,16 +144,17 @@ +@@ -137,11 +144,12 @@ compatible = "fsl,ifc", "simple-bus"; reg = <0x0 0x1530000 0x0 0x10000>; interrupts = ; @@ -354,12 +354,6 @@ Signed-off-by: Yangbo Lu big-endian; }; - esdhc: esdhc@1560000 { -- compatible = "fsl,esdhc"; -+ compatible = "fsl,ls1021a-esdhc","fsl,esdhc"; - reg = <0x0 0x1560000 0x0 0x10000>; - interrupts = ; - clock-frequency = <0>; @@ -163,7 +171,7 @@ <0x0 0x20220520 0x0 0x4>; reg-names = "ahci", "sata-ecc"; 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 6ffc2e109..9d8496860 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 @@ -768,7 +768,7 @@ Signed-off-by: Yangbo Lu { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) }, { "w25q32dw", INFO(0xef6016, 0, 64 * 1024, 64, -@@ -1192,6 +1216,53 @@ static const struct flash_info *spi_nor_ +@@ -1196,6 +1220,53 @@ static const struct flash_info *spi_nor_ id[0], id[1], id[2]); return ERR_PTR(-ENODEV); } @@ -822,7 +822,7 @@ Signed-off-by: Yangbo Lu static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) -@@ -1411,7 +1482,7 @@ static int macronix_quad_enable(struct s +@@ -1415,7 +1486,7 @@ static int macronix_quad_enable(struct s * Write status Register and configuration register with 2 bytes * The first byte will be written to the status register, while the * second byte will be written to the configuration register. @@ -831,7 +831,7 @@ Signed-off-by: Yangbo Lu */ static int write_sr_cr(struct spi_nor *nor, u16 val) { -@@ -1459,6 +1530,24 @@ static int spansion_quad_enable(struct s +@@ -1463,6 +1534,24 @@ static int spansion_quad_enable(struct s return 0; } @@ -856,7 +856,7 @@ Signed-off-by: Yangbo Lu static int set_quad_mode(struct spi_nor *nor, const struct flash_info *info) { int status; -@@ -1605,9 +1694,25 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1609,9 +1698,25 @@ int spi_nor_scan(struct spi_nor *nor, co write_sr(nor, 0); spi_nor_wait_till_ready(nor); } @@ -882,7 +882,7 @@ Signed-off-by: Yangbo Lu mtd->priv = nor; mtd->type = MTD_NORFLASH; mtd->writesize = 1; -@@ -1641,6 +1746,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1645,6 +1750,8 @@ int spi_nor_scan(struct spi_nor *nor, co nor->flags |= SNOR_F_USE_FSR; if (info->flags & SPI_NOR_HAS_TB) nor->flags |= SNOR_F_HAS_SR_TB; @@ -891,7 +891,7 @@ Signed-off-by: Yangbo Lu #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ -@@ -1680,9 +1787,15 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1684,9 +1791,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; @@ -910,7 +910,7 @@ Signed-off-by: Yangbo Lu ret = set_quad_mode(nor, info); if (ret) { dev_err(dev, "quad mode not supported\n"); -@@ -1695,6 +1808,9 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1699,6 +1812,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/703-phy-support-layerscape.patch b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch index 197fd9c50..acc75cdc2 100644 --- a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch @@ -1618,7 +1618,7 @@ Signed-off-by: Yangbo Lu .config_intr = &marvell_config_intr, --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -585,7 +585,7 @@ int phy_mii_ioctl(struct phy_device *phy +@@ -591,7 +591,7 @@ int phy_mii_ioctl(struct phy_device *phy return 0; case SIOCSHWTSTAMP: @@ -1627,7 +1627,7 @@ Signed-off-by: Yangbo Lu return phydev->drv->hwtstamp(phydev, ifr); /* fall through */ -@@ -610,6 +610,9 @@ static int phy_start_aneg_priv(struct ph +@@ -616,6 +616,9 @@ static int phy_start_aneg_priv(struct ph bool trigger = 0; int err; @@ -1637,7 +1637,7 @@ Signed-off-by: Yangbo Lu mutex_lock(&phydev->lock); if (AUTONEG_DISABLE == phydev->autoneg) -@@ -1009,7 +1012,7 @@ void phy_state_machine(struct work_struc +@@ -1015,7 +1018,7 @@ void phy_state_machine(struct work_struc old_state = phydev->state; @@ -1646,7 +1646,7 @@ Signed-off-by: Yangbo Lu phydev->drv->link_change_notify(phydev); switch (phydev->state) { -@@ -1311,6 +1314,9 @@ EXPORT_SYMBOL(phy_write_mmd_indirect); +@@ -1317,6 +1320,9 @@ EXPORT_SYMBOL(phy_write_mmd_indirect); */ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) { @@ -1656,7 +1656,7 @@ Signed-off-by: Yangbo Lu /* According to 802.3az,the EEE is supported only in full duplex-mode. * Also EEE feature is active when core is operating with MII, GMII * or RGMII (all kinds). Internal PHYs are also allowed to proceed and -@@ -1388,6 +1394,9 @@ EXPORT_SYMBOL(phy_init_eee); +@@ -1394,6 +1400,9 @@ EXPORT_SYMBOL(phy_init_eee); */ int phy_get_eee_err(struct phy_device *phydev) { @@ -1666,7 +1666,7 @@ Signed-off-by: Yangbo Lu return phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_WK_ERR, MDIO_MMD_PCS); } EXPORT_SYMBOL(phy_get_eee_err); -@@ -1404,6 +1413,9 @@ int phy_ethtool_get_eee(struct phy_devic +@@ -1410,6 +1419,9 @@ int phy_ethtool_get_eee(struct phy_devic { int val; @@ -1676,7 +1676,7 @@ Signed-off-by: Yangbo Lu /* Get Supported EEE */ val = phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_ABLE, MDIO_MMD_PCS); if (val < 0) -@@ -1437,6 +1449,9 @@ int phy_ethtool_set_eee(struct phy_devic +@@ -1443,6 +1455,9 @@ int phy_ethtool_set_eee(struct phy_devic { int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised); @@ -1686,7 +1686,7 @@ Signed-off-by: Yangbo Lu /* Mask prohibited EEE modes */ val &= ~phydev->eee_broken_modes; -@@ -1448,7 +1463,7 @@ EXPORT_SYMBOL(phy_ethtool_set_eee); +@@ -1454,7 +1469,7 @@ EXPORT_SYMBOL(phy_ethtool_set_eee); int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) { @@ -1695,7 +1695,7 @@ Signed-off-by: Yangbo Lu return phydev->drv->set_wol(phydev, wol); return -EOPNOTSUPP; -@@ -1457,7 +1472,7 @@ EXPORT_SYMBOL(phy_ethtool_set_wol); +@@ -1463,7 +1478,7 @@ EXPORT_SYMBOL(phy_ethtool_set_wol); void phy_ethtool_get_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) { diff --git a/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch b/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch index 465f909a9..ac9b4b068 100644 --- a/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch @@ -328,7 +328,7 @@ Signed-off-by: Yangbo Lu pr_info("Freescale QorIQ CPU frequency scaling driver\n"); --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c -@@ -418,8 +418,12 @@ CPUIDLE_METHOD_OF_DECLARE(psci, "psci", +@@ -437,8 +437,12 @@ CPUIDLE_METHOD_OF_DECLARE(psci, "psci", static int psci_system_suspend(unsigned long unused) { @@ -343,7 +343,7 @@ Signed-off-by: Yangbo Lu } static int psci_system_suspend_enter(suspend_state_t state) -@@ -439,6 +443,8 @@ static void __init psci_init_system_susp +@@ -458,6 +462,8 @@ static void __init psci_init_system_susp if (!IS_ENABLED(CONFIG_SUSPEND)) return; @@ -352,7 +352,7 @@ Signed-off-by: Yangbo Lu ret = psci_features(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND)); if (ret != PSCI_RET_NOT_SUPPORTED) -@@ -516,6 +522,8 @@ static void __init psci_0_2_set_function +@@ -562,6 +568,8 @@ static void __init psci_0_2_set_function arm_pm_restart = psci_sys_reset; pm_power_off = psci_sys_poweroff; diff --git a/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch b/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch index 67c32dc4a..4b3241737 100644 --- a/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch +++ b/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch @@ -482,7 +482,7 @@ Signed-off-by: Yangbo Lu sdhci_get_of_property(pdev); --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -1624,26 +1624,24 @@ static void sdhci_set_ios(struct mmc_hos +@@ -1631,26 +1631,24 @@ static void sdhci_set_ios(struct mmc_hos ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); @@ -523,7 +523,7 @@ Signed-off-by: Yangbo Lu if (!host->preset_enabled) { sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); /* -@@ -1956,7 +1954,7 @@ static int sdhci_prepare_hs400_tuning(st +@@ -1963,7 +1961,7 @@ static int sdhci_prepare_hs400_tuning(st return 0; } @@ -532,7 +532,7 @@ Signed-off-by: Yangbo Lu { struct sdhci_host *host = mmc_priv(mmc); u16 ctrl; -@@ -2015,6 +2013,9 @@ static int sdhci_execute_tuning(struct m +@@ -2022,6 +2020,9 @@ static int sdhci_execute_tuning(struct m return err; } @@ -542,7 +542,7 @@ Signed-off-by: Yangbo Lu ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); ctrl |= SDHCI_CTRL_EXEC_TUNING; if (host->quirks2 & SDHCI_QUIRK2_TUNING_WORK_AROUND) -@@ -2127,9 +2128,10 @@ static int sdhci_execute_tuning(struct m +@@ -2134,9 +2135,10 @@ static int sdhci_execute_tuning(struct m ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); @@ -556,7 +556,7 @@ Signed-off-by: Yangbo Lu } while (ctrl & SDHCI_CTRL_EXEC_TUNING); /* -@@ -2165,6 +2167,7 @@ out_unlock: +@@ -2172,6 +2174,7 @@ out_unlock: spin_unlock_irqrestore(&host->lock, flags); return err; } @@ -564,7 +564,7 @@ Signed-off-by: Yangbo Lu static int sdhci_select_drive_strength(struct mmc_card *card, unsigned int max_dtr, int host_drv, -@@ -2997,6 +3000,8 @@ struct sdhci_host *sdhci_alloc_host(stru +@@ -3004,6 +3007,8 @@ struct sdhci_host *sdhci_alloc_host(stru host->flags = SDHCI_SIGNALING_330; diff --git a/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch b/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch index c1431306a..1dfa46e83 100644 --- a/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch @@ -1162,7 +1162,7 @@ Signed-off-by: Yangbo Lu /* Move to next BD in the ring */ if (!(bd_status & T_W_S)) @@ -457,7 +457,7 @@ static int hdlc_rx_done(struct ucc_hdlc_ - struct sk_buff *skb; + struct sk_buff *skb = NULL; hdlc_device *hdlc = dev_to_hdlc(dev); struct qe_bd *bd; - u32 bd_status; 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 c01db458a..f8917291e 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 @@ -44,15 +44,15 @@ Signed-off-by: Yangbo Lu --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c -@@ -532,6 +532,7 @@ static const struct driver_info wwan_inf - #define LENOVO_VENDOR_ID 0x17ef +@@ -533,6 +533,7 @@ static const struct driver_info wwan_inf + #define LINKSYS_VENDOR_ID 0x13b1 #define NVIDIA_VENDOR_ID 0x0955 #define HP_VENDOR_ID 0x03f0 +#define TPLINK_VENDOR_ID 0x2357 static const struct usb_device_id products[] = { /* BLACKLIST !! -@@ -732,6 +733,13 @@ static const struct usb_device_id produc +@@ -742,6 +743,13 @@ static const struct usb_device_id produc USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), .driver_info = 0, }, @@ -68,15 +68,15 @@ Signed-off-by: Yangbo Lu * --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -520,6 +520,7 @@ enum rtl8152_flags { - #define VENDOR_ID_SAMSUNG 0x04e8 +@@ -521,6 +521,7 @@ enum rtl8152_flags { #define VENDOR_ID_LENOVO 0x17ef + #define VENDOR_ID_LINKSYS 0x13b1 #define VENDOR_ID_NVIDIA 0x0955 +#define VENDOR_ID_TPLINK 0x2357 #define MCU_TYPE_PLA 0x0100 #define MCU_TYPE_USB 0x0000 -@@ -1816,6 +1817,10 @@ static int rx_bottom(struct r8152 *tp, i +@@ -1817,6 +1818,10 @@ static int rx_bottom(struct r8152 *tp, i unsigned int pkt_len; struct sk_buff *skb; @@ -87,9 +87,9 @@ Signed-off-by: Yangbo Lu pkt_len = le32_to_cpu(rx_desc->opts1) & RX_LEN_MASK; if (pkt_len < ETH_ZLEN) break; -@@ -4507,6 +4512,7 @@ static struct usb_device_id rtl8152_tabl - {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7205)}, +@@ -4509,6 +4514,7 @@ static struct usb_device_id rtl8152_tabl {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, + {REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041)}, {REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff)}, + {REALTEK_USB_DEVICE(VENDOR_ID_TPLINK, 0x0601)}, {} @@ -156,7 +156,7 @@ Signed-off-by: Yangbo Lu int ret; --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4415,6 +4415,14 @@ hub_port_init(struct usb_hub *hub, struc +@@ -4423,6 +4423,14 @@ hub_port_init(struct usb_hub *hub, struc else speed = usb_speed_string(udev->speed); diff --git a/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch b/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch index a0fdc14f7..a443adfe6 100644 --- a/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch +++ b/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch @@ -16,7 +16,7 @@ Acked-by: Philipp Zabel --- a/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c -@@ -771,6 +771,8 @@ static void mtk_infrasys_init_early(stru +@@ -772,6 +772,8 @@ static void mtk_infrasys_init_early(stru if (r) pr_err("%s(): could not register clock provider: %d\n", __func__, r); diff --git a/target/linux/mediatek/patches-4.14/0064-dts.patch b/target/linux/mediatek/patches-4.14/0064-dts.patch index 47fc2b1b2..cfae4fee6 100644 --- a/target/linux/mediatek/patches-4.14/0064-dts.patch +++ b/target/linux/mediatek/patches-4.14/0064-dts.patch @@ -11,7 +11,7 @@ cpus { cpu@0 { proc-supply = <&mt6323_vproc_reg>; -@@ -84,6 +88,10 @@ +@@ -102,6 +106,10 @@ memory@80000000 { reg = <0 0x80000000 0 0x40000000>; }; @@ -22,7 +22,7 @@ }; &cir { -@@ -111,11 +119,24 @@ +@@ -129,11 +137,24 @@ }; }; @@ -49,7 +49,7 @@ compatible = "mediatek,mt7530"; #address-cells = <1>; #size-cells = <0>; -@@ -125,6 +146,8 @@ +@@ -143,6 +164,8 @@ core-supply = <&mt6323_vpa_reg>; io-supply = <&mt6323_vemc3v3_reg>; @@ -58,7 +58,7 @@ ports { #address-cells = <1>; #size-cells = <0>; -@@ -133,29 +156,46 @@ +@@ -151,29 +174,46 @@ port@0 { reg = <0>; label = "wan"; @@ -106,7 +106,7 @@ reg = <6>; label = "cpu"; ethernet = <&gmac0>; -@@ -168,8 +208,6 @@ +@@ -186,8 +226,6 @@ }; }; }; diff --git a/target/linux/mpc85xx/patches-4.9/102-powerpc-add-cmdline-override.patch b/target/linux/mpc85xx/patches-4.9/102-powerpc-add-cmdline-override.patch index c70ac1bb9..55976c32b 100644 --- a/target/linux/mpc85xx/patches-4.9/102-powerpc-add-cmdline-override.patch +++ b/target/linux/mpc85xx/patches-4.9/102-powerpc-add-cmdline-override.patch @@ -17,7 +17,7 @@ help --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c -@@ -1079,6 +1079,17 @@ int __init early_init_dt_scan_chosen(uns +@@ -1082,6 +1082,17 @@ int __init early_init_dt_scan_chosen(uns if (p != NULL && l > 0) strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); diff --git a/target/linux/mvebu/patches-4.14/522-PCI-aardvark-fix-logic-in-PCI-configuration-read-write-functions.patch b/target/linux/mvebu/patches-4.14/522-PCI-aardvark-fix-logic-in-PCI-configuration-read-write-functions.patch deleted file mode 100644 index 0dead7d61..000000000 --- a/target/linux/mvebu/patches-4.14/522-PCI-aardvark-fix-logic-in-PCI-configuration-read-write-functions.patch +++ /dev/null @@ -1,66 +0,0 @@ -From patchwork Thu Sep 28 12:58:32 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2, 1/7] PCI: aardvark: fix logic in PCI configuration read/write - functions -X-Patchwork-Submitter: Thomas Petazzoni -X-Patchwork-Id: 819586 -Message-Id: <20170928125838.11887-2-thomas.petazzoni@free-electrons.com> -To: Bjorn Helgaas , linux-pci@vger.kernel.org -Cc: Jason Cooper , Andrew Lunn , - Sebastian Hesselbarth , Gregory Clement - , - Nadav Haklai , Hanna Hawa , - Yehuda Yitschak , - linux-arm-kernel@lists.infradead.org, Antoine Tenart - , =?utf-8?q?Miqu=C3=A8l_Raynal?= - , Victor Gu , - stable@vger.kernel.org, Thomas Petazzoni - -Date: Thu, 28 Sep 2017 14:58:32 +0200 -From: Thomas Petazzoni -List-Id: - -From: Victor Gu - -The PCI configuration space read/write functions were special casing -the situation where PCI_SLOT(devfn) != 0, and returned -PCIBIOS_DEVICE_NOT_FOUND in this case. - -However, will this is what is intended for the root bus, it is not -intended for the child busses, as it prevents discovering devices with -PCI_SLOT(x) != 0. Therefore, we return PCIBIOS_DEVICE_NOT_FOUND only -if we're on the root bus. - -Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") -Cc: -Signed-off-by: Victor Gu -Reviewed-by: Wilson Ding -Reviewed-by: Nadav Haklai -[Thomas: tweak commit log.] -Signed-off-by: Thomas Petazzoni ---- - drivers/pci/host/pci-aardvark.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/pci/host/pci-aardvark.c -+++ b/drivers/pci/host/pci-aardvark.c -@@ -440,7 +440,7 @@ static int advk_pcie_rd_conf(struct pci_ - u32 reg; - int ret; - -- if (PCI_SLOT(devfn) != 0) { -+ if ((bus->number == pcie->root_bus_nr) && (PCI_SLOT(devfn) != 0)) { - *val = 0xffffffff; - return PCIBIOS_DEVICE_NOT_FOUND; - } -@@ -494,7 +494,7 @@ static int advk_pcie_wr_conf(struct pci_ - int offset; - int ret; - -- if (PCI_SLOT(devfn) != 0) -+ if ((bus->number == pcie->root_bus_nr) && (PCI_SLOT(devfn) != 0)) - return PCIBIOS_DEVICE_NOT_FOUND; - - if (where % size) diff --git a/target/linux/mvebu/patches-4.14/523-PCI-aardvark-set-PIO_ADDR_LS-correctly-in-advk_pcie_rd_conf.patch b/target/linux/mvebu/patches-4.14/523-PCI-aardvark-set-PIO_ADDR_LS-correctly-in-advk_pcie_rd_conf.patch deleted file mode 100644 index 238eb5626..000000000 --- a/target/linux/mvebu/patches-4.14/523-PCI-aardvark-set-PIO_ADDR_LS-correctly-in-advk_pcie_rd_conf.patch +++ /dev/null @@ -1,53 +0,0 @@ -From patchwork Thu Sep 28 12:58:33 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2, - 2/7] PCI: aardvark: set PIO_ADDR_LS correctly in advk_pcie_rd_conf() -X-Patchwork-Submitter: Thomas Petazzoni -X-Patchwork-Id: 819589 -Message-Id: <20170928125838.11887-3-thomas.petazzoni@free-electrons.com> -To: Bjorn Helgaas , linux-pci@vger.kernel.org -Cc: Jason Cooper , Andrew Lunn , - Sebastian Hesselbarth , Gregory Clement - , - Nadav Haklai , Hanna Hawa , - Yehuda Yitschak , - linux-arm-kernel@lists.infradead.org, Antoine Tenart - , =?utf-8?q?Miqu=C3=A8l_Raynal?= - , Victor Gu , - stable@vger.kernel.org, Thomas Petazzoni - -Date: Thu, 28 Sep 2017 14:58:33 +0200 -From: Thomas Petazzoni -List-Id: - -From: Victor Gu - -When setting the PIO_ADDR_LS register during a configuration read, we -were properly passing the device number, function number and register -number, but not the bus number, causing issues when reading the -configuration of PCIe devices. - -Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") -Cc: -Signed-off-by: Victor Gu -Reviewed-by: Wilson Ding -Reviewed-by: Nadav Haklai -[Thomas: tweak commit log.] -Signed-off-by: Thomas Petazzoni ---- - drivers/pci/host/pci-aardvark.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/pci/host/pci-aardvark.c -+++ b/drivers/pci/host/pci-aardvark.c -@@ -459,7 +459,7 @@ static int advk_pcie_rd_conf(struct pci_ - advk_writel(pcie, reg, PIO_CTRL); - - /* Program the address registers */ -- reg = PCIE_BDF(devfn) | PCIE_CONF_REG(where); -+ reg = PCIE_CONF_ADDR(bus->number, devfn, where); - advk_writel(pcie, reg, PIO_ADDR_LS); - advk_writel(pcie, 0, PIO_ADDR_MS); - diff --git a/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch b/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch index f7e71aa06..1847c4480 100644 --- a/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch +++ b/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch @@ -45,13 +45,14 @@ Signed-off-by: Thomas Petazzoni --- a/drivers/pci/host/pci-aardvark.c +++ b/drivers/pci/host/pci-aardvark.c -@@ -30,8 +30,10 @@ +@@ -30,9 +30,11 @@ #define PCIE_CORE_DEV_CTRL_STATS_REG 0xc8 #define PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE (0 << 4) #define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT 5 +#define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ 0x2 #define PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE (0 << 11) #define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT 12 + #define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ 0x2 +#define PCIE_CORE_MPS_UNIT_BYTE 128 #define PCIE_CORE_LINK_CTRL_STAT_REG 0xd0 #define PCIE_CORE_LINK_L0S_ENTRY BIT(0) @@ -64,9 +65,9 @@ Signed-off-by: Thomas Petazzoni + (PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ << + PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) | PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE | - PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT; - advk_writel(pcie, reg, PCIE_CORE_DEV_CTRL_STATS_REG); -@@ -879,6 +882,58 @@ out_release_res: + (PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ << + PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT); +@@ -886,6 +889,58 @@ out_release_res: return err; } @@ -125,7 +126,7 @@ Signed-off-by: Thomas Petazzoni static int advk_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -952,6 +1007,9 @@ static int advk_pcie_probe(struct platfo +@@ -959,6 +1014,9 @@ static int advk_pcie_probe(struct platfo list_for_each_entry(child, &bus->children, node) pcie_bus_configure_settings(child); diff --git a/target/linux/mvebu/patches-4.14/525-PCI-aardvark-use-isr1-instead-of-isr0-interrupt-in-legacy-irq-mode.patch b/target/linux/mvebu/patches-4.14/525-PCI-aardvark-use-isr1-instead-of-isr0-interrupt-in-legacy-irq-mode.patch deleted file mode 100644 index 777a078ef..000000000 --- a/target/linux/mvebu/patches-4.14/525-PCI-aardvark-use-isr1-instead-of-isr0-interrupt-in-legacy-irq-mode.patch +++ /dev/null @@ -1,143 +0,0 @@ -From patchwork Thu Sep 28 12:58:35 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2, - 4/7] PCI: aardvark: use isr1 instead of isr0 interrupt in legacy irq - mode -X-Patchwork-Submitter: Thomas Petazzoni -X-Patchwork-Id: 819592 -Message-Id: <20170928125838.11887-5-thomas.petazzoni@free-electrons.com> -To: Bjorn Helgaas , linux-pci@vger.kernel.org -Cc: Jason Cooper , Andrew Lunn , - Sebastian Hesselbarth , Gregory Clement - , - Nadav Haklai , Hanna Hawa , - Yehuda Yitschak , - linux-arm-kernel@lists.infradead.org, Antoine Tenart - , =?utf-8?q?Miqu=C3=A8l_Raynal?= - , Victor Gu , - Thomas Petazzoni -Date: Thu, 28 Sep 2017 14:58:35 +0200 -From: Thomas Petazzoni -List-Id: - -From: Victor Gu - -The Aardvark has two interrupts sets: - - - first set is bit[23:16] of PCIe ISR 0 register(RD0074840h) - - - second set is bit[11:8] of PCIe ISR 1 register(RD0074848h) - -Only one set should be used, while another set should be masked. - -The second set, ISR1, is more advanced, the Legacy INT_X status bit is -asserted once Assert_INTX message is received, and de-asserted after -Deassert_INTX message is received. Therefore, it matches what the -driver is currently doing in the ->irq_mask() and ->irq_unmask() -functions. The ISR0 requires additional work to deassert the -interrupt, which the driver doesn't do currently. - -This commit resolves a number of issues with legacy interrupts. - -This is part of fixing bug -https://bugzilla.kernel.org/show_bug.cgi?id=196339, this commit was -reported as the user to be important to get a Intel 7260 mini-PCIe -WiFi card working. - -Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") -Signed-off-by: Victor Gu -Reviewed-by: Evan Wang -Reviewed-by: Nadav Haklai -[Thomas: tweak commit log.] -Signed-off-by: Thomas Petazzoni ---- - drivers/pci/host/pci-aardvark.c | 41 ++++++++++++++++++++++++----------------- - 1 file changed, 24 insertions(+), 17 deletions(-) - ---- a/drivers/pci/host/pci-aardvark.c -+++ b/drivers/pci/host/pci-aardvark.c -@@ -105,7 +105,8 @@ - #define PCIE_ISR1_MASK_REG (CONTROL_BASE_ADDR + 0x4C) - #define PCIE_ISR1_POWER_STATE_CHANGE BIT(4) - #define PCIE_ISR1_FLUSH BIT(5) --#define PCIE_ISR1_ALL_MASK GENMASK(5, 4) -+#define PCIE_ISR1_INTX_ASSERT(val) BIT(8 + (val)) -+#define PCIE_ISR1_ALL_MASK GENMASK(11, 4) - #define PCIE_MSI_ADDR_LOW_REG (CONTROL_BASE_ADDR + 0x50) - #define PCIE_MSI_ADDR_HIGH_REG (CONTROL_BASE_ADDR + 0x54) - #define PCIE_MSI_STATUS_REG (CONTROL_BASE_ADDR + 0x58) -@@ -615,9 +616,9 @@ static void advk_pcie_irq_mask(struct ir - irq_hw_number_t hwirq = irqd_to_hwirq(d); - u32 mask; - -- mask = advk_readl(pcie, PCIE_ISR0_MASK_REG); -- mask |= PCIE_ISR0_INTX_ASSERT(hwirq); -- advk_writel(pcie, mask, PCIE_ISR0_MASK_REG); -+ mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); -+ mask |= PCIE_ISR1_INTX_ASSERT(hwirq); -+ advk_writel(pcie, mask, PCIE_ISR1_MASK_REG); - } - - static void advk_pcie_irq_unmask(struct irq_data *d) -@@ -626,9 +627,9 @@ static void advk_pcie_irq_unmask(struct - irq_hw_number_t hwirq = irqd_to_hwirq(d); - u32 mask; - -- mask = advk_readl(pcie, PCIE_ISR0_MASK_REG); -- mask &= ~PCIE_ISR0_INTX_ASSERT(hwirq); -- advk_writel(pcie, mask, PCIE_ISR0_MASK_REG); -+ mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); -+ mask &= ~PCIE_ISR1_INTX_ASSERT(hwirq); -+ advk_writel(pcie, mask, PCIE_ISR1_MASK_REG); - } - - static int advk_pcie_irq_map(struct irq_domain *h, -@@ -771,29 +772,35 @@ static void advk_pcie_handle_msi(struct - - static void advk_pcie_handle_int(struct advk_pcie *pcie) - { -- u32 val, mask, status; -+ u32 isr0_val, isr0_mask, isr0_status; -+ u32 isr1_val, isr1_mask, isr1_status; - int i, virq; - -- val = advk_readl(pcie, PCIE_ISR0_REG); -- mask = advk_readl(pcie, PCIE_ISR0_MASK_REG); -- status = val & ((~mask) & PCIE_ISR0_ALL_MASK); -- -- if (!status) { -- advk_writel(pcie, val, PCIE_ISR0_REG); -+ isr0_val = advk_readl(pcie, PCIE_ISR0_REG); -+ isr0_mask = advk_readl(pcie, PCIE_ISR0_MASK_REG); -+ isr0_status = isr0_val & ((~isr0_mask) & PCIE_ISR0_ALL_MASK); -+ -+ isr1_val = advk_readl(pcie, PCIE_ISR1_REG); -+ isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); -+ isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); -+ -+ if (!isr0_status && !isr1_status) { -+ advk_writel(pcie, isr0_val, PCIE_ISR0_REG); -+ advk_writel(pcie, isr1_val, PCIE_ISR1_REG); - return; - } - - /* Process MSI interrupts */ -- if (status & PCIE_ISR0_MSI_INT_PENDING) -+ if (isr0_status & PCIE_ISR0_MSI_INT_PENDING) - advk_pcie_handle_msi(pcie); - - /* Process legacy interrupts */ - for (i = 0; i < PCI_NUM_INTX; i++) { -- if (!(status & PCIE_ISR0_INTX_ASSERT(i))) -+ if (!(isr1_status & PCIE_ISR1_INTX_ASSERT(i))) - continue; - -- advk_writel(pcie, PCIE_ISR0_INTX_ASSERT(i), -- PCIE_ISR0_REG); -+ advk_writel(pcie, PCIE_ISR1_INTX_ASSERT(i), -+ PCIE_ISR1_REG); - - virq = irq_find_mapping(pcie->irq_domain, i); - generic_handle_irq(virq); diff --git a/target/linux/mvebu/patches-4.14/527-PCI-aardvark-fix-PCIe-max-read-request-size-setting.patch b/target/linux/mvebu/patches-4.14/527-PCI-aardvark-fix-PCIe-max-read-request-size-setting.patch deleted file mode 100644 index eaf7b097b..000000000 --- a/target/linux/mvebu/patches-4.14/527-PCI-aardvark-fix-PCIe-max-read-request-size-setting.patch +++ /dev/null @@ -1,63 +0,0 @@ -From patchwork Thu Sep 28 12:58:37 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2,6/7] PCI: aardvark: fix PCIe max read request size setting -X-Patchwork-Submitter: Thomas Petazzoni -X-Patchwork-Id: 819591 -Message-Id: <20170928125838.11887-7-thomas.petazzoni@free-electrons.com> -To: Bjorn Helgaas , linux-pci@vger.kernel.org -Cc: Jason Cooper , Andrew Lunn , - Sebastian Hesselbarth , Gregory Clement - , - Nadav Haklai , Hanna Hawa , - Yehuda Yitschak , - linux-arm-kernel@lists.infradead.org, Antoine Tenart - , =?utf-8?q?Miqu=C3=A8l_Raynal?= - , Evan Wang , - Thomas Petazzoni -Date: Thu, 28 Sep 2017 14:58:37 +0200 -From: Thomas Petazzoni -List-Id: - -From: Evan Wang - -There is an obvious typo issue in the definition of the PCIe maximum -read request size: a bit shift is directly used as a value, while it -should be used to shift the correct value. - -This is part of fixing bug -https://bugzilla.kernel.org/show_bug.cgi?id=196339, this commit was -reported as the user to be important to get a Intel 7260 mini-PCIe -WiFi card working. - -Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") -Signed-off-by: Evan Wang -Reviewed-by: Victor Gu -Reviewed-by: Nadav Haklai -[Thomas: tweak commit log.] -Signed-off-by: Thomas Petazzoni ---- - drivers/pci/host/pci-aardvark.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/drivers/pci/host/pci-aardvark.c -+++ b/drivers/pci/host/pci-aardvark.c -@@ -33,6 +33,7 @@ - #define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ 0x2 - #define PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE (0 << 11) - #define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT 12 -+#define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ 0x2 - #define PCIE_CORE_MPS_UNIT_BYTE 128 - #define PCIE_CORE_LINK_CTRL_STAT_REG 0xd0 - #define PCIE_CORE_LINK_L0S_ENTRY BIT(0) -@@ -303,7 +304,8 @@ static void advk_pcie_setup_hw(struct ad - (PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ << - PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) | - PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE | -- PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT; -+ (PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ << -+ PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT); - advk_writel(pcie, reg, PCIE_CORE_DEV_CTRL_STATS_REG); - - /* Program PCIe Control 2 to disable strict ordering */ diff --git a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch b/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch index 0b3a6c40e..9226202b7 100644 --- a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch +++ b/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch @@ -9,7 +9,7 @@ Subject: [PATCH 36/53] mtd: fix cfi cmdset 0002 erase status check --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2293,7 +2293,7 @@ static int __xipram do_erase_chip(struct +@@ -2295,7 +2295,7 @@ static int __xipram do_erase_chip(struct chip->erase_suspended = 0; } @@ -18,7 +18,7 @@ Subject: [PATCH 36/53] mtd: fix cfi cmdset 0002 erase status check break; if (time_after(jiffies, timeo)) { -@@ -2382,7 +2382,7 @@ static int __xipram do_erase_oneblock(st +@@ -2385,7 +2385,7 @@ static int __xipram do_erase_oneblock(st chip->erase_suspended = 0; } diff --git a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch index 8ac6964cd..7ee828453 100644 --- a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch +++ b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch @@ -44,7 +44,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write /* Atmel chips don't use the same PRI format as AMD chips */ static void fixup_convert_atmel_pri(struct mtd_info *mtd) -@@ -1791,6 +1795,7 @@ static int cfi_amdstd_write_words(struct +@@ -1792,6 +1796,7 @@ static int cfi_amdstd_write_words(struct /* * FIXME: interleaved mode not tested, and probably not supported! */ @@ -52,7 +52,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, unsigned long adr, const u_char *buf, int len) -@@ -1919,7 +1924,6 @@ static int __xipram do_write_buffer(stru +@@ -1920,7 +1925,6 @@ static int __xipram do_write_buffer(stru return ret; } @@ -60,7 +60,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) { -@@ -1994,6 +1998,7 @@ static int cfi_amdstd_write_buffers(stru +@@ -1995,6 +1999,7 @@ static int cfi_amdstd_write_buffers(stru return 0; } diff --git a/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch b/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch index 69bbb411d..e6ca1447f 100644 --- a/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch +++ b/target/linux/sunxi/patches-4.9/0050-stmmac-form-4-10.patch @@ -2177,7 +2177,7 @@ /* reserved for future extensions */ if (config.flags) -@@ -703,7 +705,7 @@ static void stmmac_release_ptp(struct st +@@ -712,7 +714,7 @@ static void stmmac_release_ptp(struct st static void stmmac_adjust_link(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); @@ -2186,7 +2186,7 @@ unsigned long flags; int new_state = 0; unsigned int fc = priv->flow_ctrl, pause_time = priv->pause; -@@ -756,9 +758,9 @@ static void stmmac_adjust_link(struct ne +@@ -765,9 +767,9 @@ static void stmmac_adjust_link(struct ne stmmac_hw_fix_mac_speed(priv); break; default: @@ -2199,7 +2199,7 @@ break; } -@@ -811,10 +813,10 @@ static void stmmac_check_pcs_mode(struct +@@ -820,10 +822,10 @@ static void stmmac_check_pcs_mode(struct (interface == PHY_INTERFACE_MODE_RGMII_ID) || (interface == PHY_INTERFACE_MODE_RGMII_RXID) || (interface == PHY_INTERFACE_MODE_RGMII_TXID)) { @@ -2212,7 +2212,7 @@ priv->hw->pcs = STMMAC_PCS_SGMII; } } -@@ -849,15 +851,15 @@ static int stmmac_init_phy(struct net_de +@@ -858,15 +860,15 @@ static int stmmac_init_phy(struct net_de snprintf(phy_id_fmt, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id, priv->plat->phy_addr); @@ -2231,7 +2231,7 @@ if (!phydev) return -ENODEV; -@@ -890,10 +892,8 @@ static int stmmac_init_phy(struct net_de +@@ -899,10 +901,8 @@ static int stmmac_init_phy(struct net_de if (phydev->is_pseudo_fixed_link) phydev->irq = PHY_POLL; @@ -2244,7 +2244,7 @@ return 0; } -@@ -979,7 +979,8 @@ static int stmmac_init_rx_buffers(struct +@@ -988,7 +988,8 @@ static int stmmac_init_rx_buffers(struct skb = __netdev_alloc_skb_ip_align(priv->dev, priv->dma_buf_sz, flags); if (!skb) { @@ -2254,7 +2254,7 @@ return -ENOMEM; } priv->rx_skbuff[i] = skb; -@@ -987,15 +988,15 @@ static int stmmac_init_rx_buffers(struct +@@ -996,15 +997,15 @@ static int stmmac_init_rx_buffers(struct priv->dma_buf_sz, DMA_FROM_DEVICE); if (dma_mapping_error(priv->device, priv->rx_skbuff_dma[i])) { @@ -2273,7 +2273,7 @@ if ((priv->hw->mode->init_desc3) && (priv->dma_buf_sz == BUF_SIZE_16KiB)) -@@ -1037,13 +1038,14 @@ static int init_dma_desc_rings(struct ne +@@ -1046,13 +1047,14 @@ static int init_dma_desc_rings(struct ne priv->dma_buf_sz = bfsize; @@ -2294,7 +2294,7 @@ for (i = 0; i < DMA_RX_SIZE; i++) { struct dma_desc *p; if (priv->extend_desc) -@@ -1055,10 +1057,9 @@ static int init_dma_desc_rings(struct ne +@@ -1064,10 +1066,9 @@ static int init_dma_desc_rings(struct ne if (ret) goto err_init_rx_buffers; @@ -2308,7 +2308,7 @@ } priv->cur_rx = 0; priv->dirty_rx = (unsigned int)(i - DMA_RX_SIZE); -@@ -1313,7 +1314,7 @@ static void stmmac_tx_clean(struct stmma +@@ -1322,7 +1323,7 @@ static void stmmac_tx_clean(struct stmma unsigned int bytes_compl = 0, pkts_compl = 0; unsigned int entry = priv->dirty_tx; @@ -2317,7 +2317,7 @@ priv->xstats.tx_clean++; -@@ -1384,22 +1385,17 @@ static void stmmac_tx_clean(struct stmma +@@ -1393,22 +1394,17 @@ static void stmmac_tx_clean(struct stmma netdev_completed_queue(priv->dev, pkts_compl, bytes_compl); if (unlikely(netif_queue_stopped(priv->dev) && @@ -2345,7 +2345,7 @@ } static inline void stmmac_enable_dma_irq(struct stmmac_priv *priv) -@@ -1503,7 +1499,7 @@ static void stmmac_mmc_setup(struct stmm +@@ -1512,7 +1508,7 @@ static void stmmac_mmc_setup(struct stmm dwmac_mmc_ctrl(priv->mmcaddr, mode); memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); } else @@ -2354,7 +2354,7 @@ } /** -@@ -1516,18 +1512,18 @@ static void stmmac_mmc_setup(struct stmm +@@ -1525,18 +1521,18 @@ static void stmmac_mmc_setup(struct stmm static void stmmac_selec_desc_mode(struct stmmac_priv *priv) { if (priv->plat->enh_desc) { @@ -2377,7 +2377,7 @@ priv->hw->desc = &ndesc_ops; } } -@@ -1568,8 +1564,8 @@ static void stmmac_check_ether_addr(stru +@@ -1577,8 +1573,8 @@ static void stmmac_check_ether_addr(stru priv->dev->dev_addr, 0); if (!is_valid_ether_addr(priv->dev->dev_addr)) eth_hw_addr_random(priv->dev); @@ -2388,7 +2388,7 @@ } } -@@ -1583,16 +1579,12 @@ static void stmmac_check_ether_addr(stru +@@ -1592,16 +1588,12 @@ static void stmmac_check_ether_addr(stru */ static int stmmac_init_dma_engine(struct stmmac_priv *priv) { @@ -2408,7 +2408,7 @@ } if (priv->extend_desc && (priv->mode == STMMAC_RING_MODE)) -@@ -1604,8 +1596,8 @@ static int stmmac_init_dma_engine(struct +@@ -1613,8 +1605,8 @@ static int stmmac_init_dma_engine(struct return ret; } @@ -2419,7 +2419,7 @@ if (priv->synopsys_id >= DWMAC_CORE_4_00) { priv->rx_tail_addr = priv->dma_rx_phy + -@@ -1677,7 +1669,8 @@ static int stmmac_hw_setup(struct net_de +@@ -1686,7 +1678,8 @@ static int stmmac_hw_setup(struct net_de /* DMA initialization and SW reset */ ret = stmmac_init_dma_engine(priv); if (ret < 0) { @@ -2429,7 +2429,7 @@ return ret; } -@@ -1706,7 +1699,7 @@ static int stmmac_hw_setup(struct net_de +@@ -1715,7 +1708,7 @@ static int stmmac_hw_setup(struct net_de ret = priv->hw->mac->rx_ipc(priv->hw); if (!ret) { @@ -2438,7 +2438,7 @@ priv->plat->rx_coe = STMMAC_RX_COE_NONE; priv->hw->rx_csum = 0; } -@@ -1731,10 +1724,11 @@ static int stmmac_hw_setup(struct net_de +@@ -1740,10 +1733,11 @@ static int stmmac_hw_setup(struct net_de #ifdef CONFIG_DEBUG_FS ret = stmmac_init_fs(dev); if (ret < 0) @@ -2452,7 +2452,7 @@ priv->hw->dma->start_tx(priv->ioaddr); priv->hw->dma->start_rx(priv->ioaddr); -@@ -1789,8 +1783,9 @@ static int stmmac_open(struct net_device +@@ -1798,8 +1792,9 @@ static int stmmac_open(struct net_device priv->hw->pcs != STMMAC_PCS_RTBI) { ret = stmmac_init_phy(dev); if (ret) { @@ -2464,7 +2464,7 @@ return ret; } } -@@ -1805,33 +1800,36 @@ static int stmmac_open(struct net_device +@@ -1814,33 +1809,36 @@ static int stmmac_open(struct net_device ret = alloc_dma_desc_resources(priv); if (ret < 0) { @@ -2508,7 +2508,7 @@ goto init_error; } -@@ -1840,8 +1838,9 @@ static int stmmac_open(struct net_device +@@ -1849,8 +1847,9 @@ static int stmmac_open(struct net_device ret = request_irq(priv->wol_irq, stmmac_interrupt, IRQF_SHARED, dev->name, dev); if (unlikely(ret < 0)) { @@ -2520,7 +2520,7 @@ goto wolirq_error; } } -@@ -1851,8 +1850,9 @@ static int stmmac_open(struct net_device +@@ -1860,8 +1859,9 @@ static int stmmac_open(struct net_device ret = request_irq(priv->lpi_irq, stmmac_interrupt, IRQF_SHARED, dev->name, dev); if (unlikely(ret < 0)) { @@ -2532,7 +2532,7 @@ goto lpiirq_error; } } -@@ -1871,8 +1871,8 @@ wolirq_error: +@@ -1880,8 +1880,8 @@ wolirq_error: init_error: free_dma_desc_resources(priv); dma_desc_error: @@ -2543,7 +2543,7 @@ return ret; } -@@ -1891,10 +1891,9 @@ static int stmmac_release(struct net_dev +@@ -1900,10 +1900,9 @@ static int stmmac_release(struct net_dev del_timer_sync(&priv->eee_ctrl_timer); /* Stop and disconnect the PHY */ @@ -2557,7 +2557,7 @@ } netif_stop_queue(dev); -@@ -1954,13 +1953,13 @@ static void stmmac_tso_allocator(struct +@@ -1963,13 +1962,13 @@ static void stmmac_tso_allocator(struct priv->cur_tx = STMMAC_GET_ENTRY(priv->cur_tx, DMA_TX_SIZE); desc = priv->dma_tx + priv->cur_tx; @@ -2573,7 +2573,7 @@ 0, 0); tmp_len -= TSO_MAX_BUFF_SIZE; -@@ -2005,8 +2004,6 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2014,8 +2013,6 @@ static netdev_tx_t stmmac_tso_xmit(struc u8 proto_hdr_len; int i; @@ -2582,7 +2582,7 @@ /* Compute header lengths */ proto_hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); -@@ -2016,9 +2013,10 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2025,9 +2022,10 @@ static netdev_tx_t stmmac_tso_xmit(struc if (!netif_queue_stopped(dev)) { netif_stop_queue(dev); /* This is a hard error, log it. */ @@ -2595,7 +2595,7 @@ return NETDEV_TX_BUSY; } -@@ -2056,11 +2054,11 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2065,11 +2063,11 @@ static netdev_tx_t stmmac_tso_xmit(struc priv->tx_skbuff_dma[first_entry].len = skb_headlen(skb); priv->tx_skbuff[first_entry] = skb; @@ -2609,7 +2609,7 @@ /* If needed take extra descriptors to fill the remaining payload */ tmp_pay_len = pay_len - TSO_MAX_BUFF_SIZE; -@@ -2089,8 +2087,8 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2098,8 +2096,8 @@ static netdev_tx_t stmmac_tso_xmit(struc priv->cur_tx = STMMAC_GET_ENTRY(priv->cur_tx, DMA_TX_SIZE); if (unlikely(stmmac_tx_avail(priv) <= (MAX_SKB_FRAGS + 1))) { @@ -2620,7 +2620,7 @@ netif_stop_queue(dev); } -@@ -2134,7 +2132,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2143,7 +2141,7 @@ static netdev_tx_t stmmac_tso_xmit(struc * descriptor and then barrier is needed to make sure that * all is coherent before granting the DMA engine. */ @@ -2629,7 +2629,7 @@ if (netif_msg_pktdata(priv)) { pr_info("%s: curr=%d dirty=%d f=%d, e=%d, f_p=%p, nfrags %d\n", -@@ -2153,11 +2151,9 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2162,11 +2160,9 @@ static netdev_tx_t stmmac_tso_xmit(struc priv->hw->dma->set_tx_tail_ptr(priv->ioaddr, priv->tx_tail_addr, STMMAC_CHAN0); @@ -2641,7 +2641,7 @@ dev_err(priv->device, "Tx dma map failed\n"); dev_kfree_skb(skb); priv->dev->stats.tx_dropped++; -@@ -2189,14 +2185,13 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2198,14 +2194,13 @@ static netdev_tx_t stmmac_xmit(struct sk return stmmac_tso_xmit(skb, dev); } @@ -2659,7 +2659,7 @@ } return NETDEV_TX_BUSY; } -@@ -2249,13 +2244,11 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2258,13 +2253,11 @@ static netdev_tx_t stmmac_xmit(struct sk priv->tx_skbuff[entry] = NULL; @@ -2678,7 +2678,7 @@ priv->tx_skbuff_dma[entry].map_as_page = true; priv->tx_skbuff_dma[entry].len = len; -@@ -2273,9 +2266,10 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2282,9 +2275,10 @@ static netdev_tx_t stmmac_xmit(struct sk if (netif_msg_pktdata(priv)) { void *tx_head; @@ -2692,7 +2692,7 @@ if (priv->extend_desc) tx_head = (void *)priv->dma_etx; -@@ -2284,13 +2278,13 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2293,13 +2287,13 @@ static netdev_tx_t stmmac_xmit(struct sk priv->hw->desc->display_ring(tx_head, DMA_TX_SIZE, false); @@ -2709,7 +2709,7 @@ netif_stop_queue(dev); } -@@ -2326,13 +2320,11 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2335,13 +2329,11 @@ static netdev_tx_t stmmac_xmit(struct sk if (dma_mapping_error(priv->device, des)) goto dma_map_err; @@ -2728,7 +2728,7 @@ priv->tx_skbuff_dma[first_entry].len = nopaged_len; priv->tx_skbuff_dma[first_entry].last_segment = last_segment; -@@ -2353,7 +2345,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2362,7 +2354,7 @@ static netdev_tx_t stmmac_xmit(struct sk * descriptor and then barrier is needed to make sure that * all is coherent before granting the DMA engine. */ @@ -2737,7 +2737,7 @@ } netdev_sent_queue(dev, skb->len); -@@ -2364,12 +2356,10 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2373,12 +2365,10 @@ static netdev_tx_t stmmac_xmit(struct sk priv->hw->dma->set_tx_tail_ptr(priv->ioaddr, priv->tx_tail_addr, STMMAC_CHAN0); @@ -2751,7 +2751,7 @@ dev_kfree_skb(skb); priv->dev->stats.tx_dropped++; return NETDEV_TX_OK; -@@ -2440,16 +2430,16 @@ static inline void stmmac_rx_refill(stru +@@ -2449,16 +2439,16 @@ static inline void stmmac_rx_refill(stru DMA_FROM_DEVICE); if (dma_mapping_error(priv->device, priv->rx_skbuff_dma[entry])) { @@ -2771,7 +2771,7 @@ } if (priv->hw->mode->refill_desc3) priv->hw->mode->refill_desc3(priv, p); -@@ -2457,17 +2447,17 @@ static inline void stmmac_rx_refill(stru +@@ -2466,17 +2456,17 @@ static inline void stmmac_rx_refill(stru if (priv->rx_zeroc_thresh > 0) priv->rx_zeroc_thresh--; @@ -2793,7 +2793,7 @@ entry = STMMAC_GET_ENTRY(entry, DMA_RX_SIZE); } -@@ -2491,7 +2481,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -2500,7 +2490,7 @@ static int stmmac_rx(struct stmmac_priv if (netif_msg_rx_status(priv)) { void *rx_head; @@ -2802,7 +2802,7 @@ if (priv->extend_desc) rx_head = (void *)priv->dma_erx; else -@@ -2553,9 +2543,9 @@ static int stmmac_rx(struct stmmac_priv +@@ -2562,9 +2552,9 @@ static int stmmac_rx(struct stmmac_priv unsigned int des; if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00)) @@ -2814,7 +2814,7 @@ frame_len = priv->hw->desc->get_rx_frame_len(p, coe); -@@ -2564,9 +2554,9 @@ static int stmmac_rx(struct stmmac_priv +@@ -2573,9 +2563,9 @@ static int stmmac_rx(struct stmmac_priv * ignored */ if (frame_len > priv->dma_buf_sz) { @@ -2827,7 +2827,7 @@ priv->dev->stats.rx_length_errors++; break; } -@@ -2578,11 +2568,11 @@ static int stmmac_rx(struct stmmac_priv +@@ -2587,11 +2577,11 @@ static int stmmac_rx(struct stmmac_priv frame_len -= ETH_FCS_LEN; if (netif_msg_rx_status(priv)) { @@ -2843,7 +2843,7 @@ } /* The zero-copy is always used for all the sizes -@@ -2619,8 +2609,9 @@ static int stmmac_rx(struct stmmac_priv +@@ -2628,8 +2618,9 @@ static int stmmac_rx(struct stmmac_priv } else { skb = priv->rx_skbuff[entry]; if (unlikely(!skb)) { @@ -2855,7 +2855,7 @@ priv->dev->stats.rx_dropped++; break; } -@@ -2636,7 +2627,8 @@ static int stmmac_rx(struct stmmac_priv +@@ -2645,7 +2636,8 @@ static int stmmac_rx(struct stmmac_priv } if (netif_msg_pktdata(priv)) { @@ -2865,7 +2865,7 @@ print_pkt(skb->data, frame_len); } -@@ -2739,7 +2731,7 @@ static int stmmac_change_mtu(struct net_ +@@ -2748,7 +2740,7 @@ static int stmmac_change_mtu(struct net_ int max_mtu; if (netif_running(dev)) { @@ -2874,7 +2874,7 @@ return -EBUSY; } -@@ -2831,7 +2823,7 @@ static irqreturn_t stmmac_interrupt(int +@@ -2840,7 +2832,7 @@ static irqreturn_t stmmac_interrupt(int pm_wakeup_event(priv->device, 0); if (unlikely(!dev)) { @@ -2883,7 +2883,7 @@ return IRQ_NONE; } -@@ -2889,7 +2881,6 @@ static void stmmac_poll_controller(struc +@@ -2898,7 +2890,6 @@ static void stmmac_poll_controller(struc */ static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { @@ -2891,7 +2891,7 @@ int ret = -EOPNOTSUPP; if (!netif_running(dev)) -@@ -2899,9 +2890,9 @@ static int stmmac_ioctl(struct net_devic +@@ -2908,9 +2899,9 @@ static int stmmac_ioctl(struct net_devic case SIOCGMIIPHY: case SIOCGMIIREG: case SIOCSMIIREG: @@ -2903,7 +2903,7 @@ break; case SIOCSHWTSTAMP: ret = stmmac_hwtstamp_ioctl(dev, rq); -@@ -2929,14 +2920,17 @@ static void sysfs_display_ring(void *hea +@@ -2938,14 +2929,17 @@ static void sysfs_display_ring(void *hea x = *(u64 *) ep; seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n", i, (unsigned int)virt_to_phys(ep), @@ -2924,7 +2924,7 @@ p++; } seq_printf(seq, "\n"); -@@ -2968,6 +2962,8 @@ static int stmmac_sysfs_ring_open(struct +@@ -2977,6 +2971,8 @@ static int stmmac_sysfs_ring_open(struct return single_open(file, stmmac_sysfs_ring_read, inode->i_private); } @@ -2933,7 +2933,7 @@ static const struct file_operations stmmac_rings_status_fops = { .owner = THIS_MODULE, .open = stmmac_sysfs_ring_open, -@@ -2990,11 +2986,11 @@ static int stmmac_sysfs_dma_cap_read(str +@@ -2999,11 +2995,11 @@ static int stmmac_sysfs_dma_cap_read(str seq_printf(seq, "\tDMA HW features\n"); seq_printf(seq, "==============================\n"); @@ -2948,7 +2948,7 @@ (priv->dma_cap.half_duplex) ? "Y" : "N"); seq_printf(seq, "\tHash Filter: %s\n", (priv->dma_cap.hash_filter) ? "Y" : "N"); -@@ -3012,9 +3008,9 @@ static int stmmac_sysfs_dma_cap_read(str +@@ -3021,9 +3017,9 @@ static int stmmac_sysfs_dma_cap_read(str (priv->dma_cap.rmon) ? "Y" : "N"); seq_printf(seq, "\tIEEE 1588-2002 Time Stamp: %s\n", (priv->dma_cap.time_stamp) ? "Y" : "N"); @@ -2960,7 +2960,7 @@ (priv->dma_cap.eee) ? "Y" : "N"); seq_printf(seq, "\tAV features: %s\n", (priv->dma_cap.av) ? "Y" : "N"); seq_printf(seq, "\tChecksum Offload in TX: %s\n", -@@ -3061,8 +3057,7 @@ static int stmmac_init_fs(struct net_dev +@@ -3070,8 +3066,7 @@ static int stmmac_init_fs(struct net_dev priv->dbgfs_dir = debugfs_create_dir(dev->name, stmmac_fs_dir); if (!priv->dbgfs_dir || IS_ERR(priv->dbgfs_dir)) { @@ -2970,7 +2970,7 @@ return -ENOMEM; } -@@ -3074,7 +3069,7 @@ static int stmmac_init_fs(struct net_dev +@@ -3083,7 +3078,7 @@ static int stmmac_init_fs(struct net_dev &stmmac_rings_status_fops); if (!priv->dbgfs_rings_status || IS_ERR(priv->dbgfs_rings_status)) { @@ -2979,7 +2979,7 @@ debugfs_remove_recursive(priv->dbgfs_dir); return -ENOMEM; -@@ -3086,7 +3081,7 @@ static int stmmac_init_fs(struct net_dev +@@ -3095,7 +3090,7 @@ static int stmmac_init_fs(struct net_dev dev, &stmmac_dma_cap_fops); if (!priv->dbgfs_dma_cap || IS_ERR(priv->dbgfs_dma_cap)) { @@ -2988,7 +2988,7 @@ debugfs_remove_recursive(priv->dbgfs_dir); return -ENOMEM; -@@ -3158,11 +3153,11 @@ static int stmmac_hw_init(struct stmmac_ +@@ -3167,11 +3162,11 @@ static int stmmac_hw_init(struct stmmac_ } else { if (chain_mode) { priv->hw->mode = &chain_mode_ops; @@ -3002,7 +3002,7 @@ priv->mode = STMMAC_RING_MODE; } } -@@ -3170,7 +3165,7 @@ static int stmmac_hw_init(struct stmmac_ +@@ -3179,7 +3174,7 @@ static int stmmac_hw_init(struct stmmac_ /* Get the HW capability (new GMAC newer than 3.50a) */ priv->hw_cap_support = stmmac_get_hw_features(priv); if (priv->hw_cap_support) { @@ -3011,7 +3011,7 @@ /* We can override some gmac/dma configuration fields: e.g. * enh_desc, tx_coe (e.g. that are passed through the -@@ -3195,8 +3190,9 @@ static int stmmac_hw_init(struct stmmac_ +@@ -3204,8 +3199,9 @@ static int stmmac_hw_init(struct stmmac_ else if (priv->dma_cap.rx_coe_type1) priv->plat->rx_coe = STMMAC_RX_COE_TYPE1; @@ -3023,7 +3023,7 @@ /* To use alternate (extended), normal or GMAC4 descriptor structures */ if (priv->synopsys_id >= DWMAC_CORE_4_00) -@@ -3206,20 +3202,20 @@ static int stmmac_hw_init(struct stmmac_ +@@ -3215,20 +3211,20 @@ static int stmmac_hw_init(struct stmmac_ if (priv->plat->rx_coe) { priv->hw->rx_csum = priv->plat->rx_coe; @@ -3049,7 +3049,7 @@ return 0; } -@@ -3278,8 +3274,8 @@ int stmmac_dvr_probe(struct device *devi +@@ -3287,8 +3283,8 @@ int stmmac_dvr_probe(struct device *devi priv->stmmac_clk = devm_clk_get(priv->device, STMMAC_RESOURCE_NAME); if (IS_ERR(priv->stmmac_clk)) { @@ -3060,7 +3060,7 @@ /* If failed to obtain stmmac_clk and specific clk_csr value * is NOT passed from the platform, probe fail. */ -@@ -3328,7 +3324,7 @@ int stmmac_dvr_probe(struct device *devi +@@ -3337,7 +3333,7 @@ int stmmac_dvr_probe(struct device *devi if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) { ndev->hw_features |= NETIF_F_TSO; priv->tso = true; @@ -3069,7 +3069,7 @@ } ndev->features |= ndev->hw_features | NETIF_F_HIGHDMA; ndev->watchdog_timeo = msecs_to_jiffies(watchdog); -@@ -3348,13 +3344,13 @@ int stmmac_dvr_probe(struct device *devi +@@ -3357,13 +3353,13 @@ int stmmac_dvr_probe(struct device *devi */ if ((priv->synopsys_id >= DWMAC_CORE_3_50) && (!priv->plat->riwt_off)) { priv->use_riwt = 1; @@ -3085,7 +3085,7 @@ /* If a specific clk_csr value is passed from the platform * this means that the CSR Clock Range selection cannot be -@@ -3375,15 +3371,17 @@ int stmmac_dvr_probe(struct device *devi +@@ -3384,15 +3380,17 @@ int stmmac_dvr_probe(struct device *devi /* MDIO bus Registration */ ret = stmmac_mdio_register(ndev); if (ret < 0) { @@ -3107,7 +3107,7 @@ goto error_netdev_register; } -@@ -3394,7 +3392,7 @@ error_netdev_register: +@@ -3403,7 +3401,7 @@ error_netdev_register: priv->hw->pcs != STMMAC_PCS_TBI && priv->hw->pcs != STMMAC_PCS_RTBI) stmmac_mdio_unregister(ndev); @@ -3116,7 +3116,7 @@ netif_napi_del(&priv->napi); error_hw_init: clk_disable_unprepare(priv->pclk); -@@ -3418,7 +3416,7 @@ int stmmac_dvr_remove(struct device *dev +@@ -3427,7 +3425,7 @@ int stmmac_dvr_remove(struct device *dev struct net_device *ndev = dev_get_drvdata(dev); struct stmmac_priv *priv = netdev_priv(ndev); @@ -3125,7 +3125,7 @@ priv->hw->dma->stop_rx(priv->ioaddr); priv->hw->dma->stop_tx(priv->ioaddr); -@@ -3456,8 +3454,8 @@ int stmmac_suspend(struct device *dev) +@@ -3465,8 +3463,8 @@ int stmmac_suspend(struct device *dev) if (!ndev || !netif_running(ndev)) return 0; @@ -3136,7 +3136,7 @@ spin_lock_irqsave(&priv->lock, flags); -@@ -3551,8 +3549,8 @@ int stmmac_resume(struct device *dev) +@@ -3560,8 +3558,8 @@ int stmmac_resume(struct device *dev) spin_unlock_irqrestore(&priv->lock, flags); diff --git a/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch b/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch index 31d045670..95eb3deeb 100644 --- a/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch +++ b/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch @@ -1469,7 +1469,7 @@ * a proprietary structure used to pass information to the driver. * Description: * This function configures the MAC to enable/disable both outgoing(TX) -@@ -612,7 +609,7 @@ static int stmmac_hwtstamp_ioctl(struct +@@ -621,7 +618,7 @@ static int stmmac_hwtstamp_ioctl(struct /* program Sub Second Increment reg */ sec_inc = priv->hw->ptp->config_sub_second_increment( @@ -1478,7 +1478,7 @@ priv->plat->has_gmac4); temp = div_u64(1000000000ULL, sec_inc); -@@ -622,7 +619,7 @@ static int stmmac_hwtstamp_ioctl(struct +@@ -631,7 +628,7 @@ static int stmmac_hwtstamp_ioctl(struct * where, freq_div_ratio = 1e9ns/sec_inc */ temp = (u64)(temp << 32); @@ -1487,7 +1487,7 @@ priv->hw->ptp->config_addend(priv->ptpaddr, priv->default_addend); -@@ -650,18 +647,6 @@ static int stmmac_init_ptp(struct stmmac +@@ -659,18 +656,6 @@ static int stmmac_init_ptp(struct stmmac if (!(priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp)) return -EOPNOTSUPP; @@ -1506,7 +1506,7 @@ priv->adv_ts = 0; /* Check if adv_ts can be enabled for dwmac 4.x core */ if (priv->plat->has_gmac4 && priv->dma_cap.atime_stamp) -@@ -688,8 +673,8 @@ static int stmmac_init_ptp(struct stmmac +@@ -697,8 +682,8 @@ static int stmmac_init_ptp(struct stmmac static void stmmac_release_ptp(struct stmmac_priv *priv) { @@ -1517,7 +1517,7 @@ stmmac_ptp_unregister(priv); } -@@ -710,7 +695,7 @@ static void stmmac_adjust_link(struct ne +@@ -719,7 +704,7 @@ static void stmmac_adjust_link(struct ne int new_state = 0; unsigned int fc = priv->flow_ctrl, pause_time = priv->pause; @@ -1526,7 +1526,7 @@ return; spin_lock_irqsave(&priv->lock, flags); -@@ -737,33 +722,36 @@ static void stmmac_adjust_link(struct ne +@@ -746,33 +731,36 @@ static void stmmac_adjust_link(struct ne new_state = 1; switch (phydev->speed) { case 1000: @@ -1577,7 +1577,7 @@ priv->speed = phydev->speed; } -@@ -776,8 +764,8 @@ static void stmmac_adjust_link(struct ne +@@ -785,8 +773,8 @@ static void stmmac_adjust_link(struct ne } else if (priv->oldlink) { new_state = 1; priv->oldlink = 0; @@ -1588,7 +1588,7 @@ } if (new_state && netif_msg_link(priv)) -@@ -839,8 +827,8 @@ static int stmmac_init_phy(struct net_de +@@ -848,8 +836,8 @@ static int stmmac_init_phy(struct net_de int interface = priv->plat->interface; int max_speed = priv->plat->max_speed; priv->oldlink = 0; @@ -1599,7 +1599,7 @@ if (priv->plat->phy_node) { phydev = of_phy_connect(dev, priv->plat->phy_node, -@@ -892,9 +880,7 @@ static int stmmac_init_phy(struct net_de +@@ -901,9 +889,7 @@ static int stmmac_init_phy(struct net_de if (phydev->is_pseudo_fixed_link) phydev->irq = PHY_POLL; @@ -1610,7 +1610,7 @@ return 0; } -@@ -1020,7 +1006,7 @@ static void stmmac_free_rx_buffers(struc +@@ -1029,7 +1015,7 @@ static void stmmac_free_rx_buffers(struc * @dev: net device structure * @flags: gfp flag. * Description: this function initializes the DMA RX/TX descriptors @@ -1619,7 +1619,7 @@ * modes. */ static int init_dma_desc_rings(struct net_device *dev, gfp_t flags) -@@ -1133,13 +1119,6 @@ static void dma_free_tx_skbufs(struct st +@@ -1142,13 +1128,6 @@ static void dma_free_tx_skbufs(struct st int i; for (i = 0; i < DMA_TX_SIZE; i++) { @@ -1633,7 +1633,7 @@ if (priv->tx_skbuff_dma[i].buf) { if (priv->tx_skbuff_dma[i].map_as_page) dma_unmap_page(priv->device, -@@ -1153,7 +1132,7 @@ static void dma_free_tx_skbufs(struct st +@@ -1162,7 +1141,7 @@ static void dma_free_tx_skbufs(struct st DMA_TO_DEVICE); } @@ -1642,7 +1642,7 @@ dev_kfree_skb_any(priv->tx_skbuff[i]); priv->tx_skbuff[i] = NULL; priv->tx_skbuff_dma[i].buf = 0; -@@ -1277,6 +1256,28 @@ static void free_dma_desc_resources(stru +@@ -1286,6 +1265,28 @@ static void free_dma_desc_resources(stru } /** @@ -1671,7 +1671,7 @@ * stmmac_dma_operation_mode - HW DMA operation mode * @priv: driver private structure * Description: it is used for configuring the DMA operation mode register in -@@ -1677,10 +1678,6 @@ static int stmmac_hw_setup(struct net_de +@@ -1686,10 +1687,6 @@ static int stmmac_hw_setup(struct net_de /* Copy the MAC addr into the HW */ priv->hw->mac->set_umac_addr(priv->hw, dev->dev_addr, 0); @@ -1682,7 +1682,7 @@ /* PS and related bits will be programmed according to the speed */ if (priv->hw->pcs) { int speed = priv->plat->mac_port_sel_speed; -@@ -1697,6 +1694,10 @@ static int stmmac_hw_setup(struct net_de +@@ -1706,6 +1703,10 @@ static int stmmac_hw_setup(struct net_de /* Initialize the MAC Core */ priv->hw->mac->core_init(priv->hw, dev->mtu); @@ -1693,7 +1693,7 @@ ret = priv->hw->mac->rx_ipc(priv->hw); if (!ret) { netdev_warn(priv->dev, "RX IPC Checksum Offload disabled\n"); -@@ -1717,8 +1718,10 @@ static int stmmac_hw_setup(struct net_de +@@ -1726,8 +1727,10 @@ static int stmmac_hw_setup(struct net_de if (init_ptp) { ret = stmmac_init_ptp(priv); @@ -1706,7 +1706,7 @@ } #ifdef CONFIG_DEBUG_FS -@@ -1732,11 +1735,6 @@ static int stmmac_hw_setup(struct net_de +@@ -1741,11 +1744,6 @@ static int stmmac_hw_setup(struct net_de priv->hw->dma->start_tx(priv->ioaddr); priv->hw->dma->start_rx(priv->ioaddr); @@ -1718,7 +1718,7 @@ priv->tx_lpi_timer = STMMAC_DEFAULT_TWT_LS; if ((priv->use_riwt) && (priv->hw->dma->rx_watchdog)) { -@@ -2526,7 +2524,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -2535,7 +2533,7 @@ static int stmmac_rx(struct stmmac_priv if (unlikely(status == discard_frame)) { priv->dev->stats.rx_errors++; if (priv->hwts_rx_en && !priv->extend_desc) { @@ -1727,7 +1727,7 @@ * with timestamp value, hence reinitialize * them in stmmac_rx_refill() function so that * device can reuse it. -@@ -2549,7 +2547,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -2558,7 +2556,7 @@ static int stmmac_rx(struct stmmac_priv frame_len = priv->hw->desc->get_rx_frame_len(p, coe); @@ -1736,7 +1736,7 @@ * (preallocated during init) then the packet is * ignored */ -@@ -2769,7 +2767,7 @@ static netdev_features_t stmmac_fix_feat +@@ -2778,7 +2776,7 @@ static netdev_features_t stmmac_fix_feat /* Some GMAC devices have a bugged Jumbo frame support that * needs to have the Tx COE disabled for oversized frames * (due to limited buffer sizes). In this case we disable @@ -1745,7 +1745,7 @@ */ if (priv->plat->bugged_jumbo && (dev->mtu > ETH_DATA_LEN)) features &= ~NETIF_F_CSUM_MASK; -@@ -2915,9 +2913,7 @@ static void sysfs_display_ring(void *hea +@@ -2924,9 +2922,7 @@ static void sysfs_display_ring(void *hea struct dma_desc *p = (struct dma_desc *)head; for (i = 0; i < size; i++) { @@ -1755,7 +1755,7 @@ seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n", i, (unsigned int)virt_to_phys(ep), le32_to_cpu(ep->basic.des0), -@@ -2926,7 +2922,6 @@ static void sysfs_display_ring(void *hea +@@ -2935,7 +2931,6 @@ static void sysfs_display_ring(void *hea le32_to_cpu(ep->basic.des3)); ep++; } else { @@ -1763,7 +1763,7 @@ seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n", i, (unsigned int)virt_to_phys(ep), le32_to_cpu(p->des0), le32_to_cpu(p->des1), -@@ -2996,7 +2991,7 @@ static int stmmac_sysfs_dma_cap_read(str +@@ -3005,7 +3000,7 @@ static int stmmac_sysfs_dma_cap_read(str (priv->dma_cap.hash_filter) ? "Y" : "N"); seq_printf(seq, "\tMultiple MAC address registers: %s\n", (priv->dma_cap.multi_addr) ? "Y" : "N"); @@ -1772,7 +1772,7 @@ (priv->dma_cap.pcs) ? "Y" : "N"); seq_printf(seq, "\tSMA (MDIO) Interface: %s\n", (priv->dma_cap.sma_mdio) ? "Y" : "N"); -@@ -3272,44 +3267,8 @@ int stmmac_dvr_probe(struct device *devi +@@ -3281,44 +3276,8 @@ int stmmac_dvr_probe(struct device *devi if ((phyaddr >= 0) && (phyaddr <= 31)) priv->plat->phy_addr = phyaddr; @@ -1819,7 +1819,7 @@ /* Init MAC and get the capabilities */ ret = stmmac_hw_init(priv); -@@ -3395,10 +3354,6 @@ error_netdev_register: +@@ -3404,10 +3363,6 @@ error_netdev_register: error_mdio_register: netif_napi_del(&priv->napi); error_hw_init: @@ -1830,7 +1830,7 @@ free_netdev(ndev); return ret; -@@ -3424,10 +3379,10 @@ int stmmac_dvr_remove(struct device *dev +@@ -3433,10 +3388,10 @@ int stmmac_dvr_remove(struct device *dev stmmac_set_mac(priv->ioaddr, false); netif_carrier_off(ndev); unregister_netdev(ndev); @@ -1845,7 +1845,7 @@ if (priv->hw->pcs != STMMAC_PCS_RGMII && priv->hw->pcs != STMMAC_PCS_TBI && priv->hw->pcs != STMMAC_PCS_RTBI) -@@ -3476,14 +3431,14 @@ int stmmac_suspend(struct device *dev) +@@ -3485,14 +3440,14 @@ int stmmac_suspend(struct device *dev) stmmac_set_mac(priv->ioaddr, false); pinctrl_pm_select_sleep_state(priv->device); /* Disable clock in case of PWM is off */ @@ -1864,7 +1864,7 @@ return 0; } EXPORT_SYMBOL_GPL(stmmac_suspend); -@@ -3516,9 +3471,9 @@ int stmmac_resume(struct device *dev) +@@ -3525,9 +3480,9 @@ int stmmac_resume(struct device *dev) priv->irq_wake = 0; } else { pinctrl_pm_select_default_state(priv->device); diff --git a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch index 1356a4b9e..3d9bbb229 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 @@ -2782,43 +2782,7 @@ } } -@@ -477,7 +552,10 @@ static int stmmac_hwtstamp_ioctl(struct - /* PTP v1, UDP, any kind of event packet */ - config.rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT; - /* take time stamp for all event messages */ -- snap_type_sel = PTP_TCR_SNAPTYPSEL_1; -+ if (priv->plat->has_gmac4) -+ snap_type_sel = PTP_GMAC4_TCR_SNAPTYPSEL_1; -+ else -+ snap_type_sel = PTP_TCR_SNAPTYPSEL_1; - - ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA; - ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA; -@@ -509,7 +587,10 @@ static int stmmac_hwtstamp_ioctl(struct - config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT; - ptp_v2 = PTP_TCR_TSVER2ENA; - /* take time stamp for all event messages */ -- snap_type_sel = PTP_TCR_SNAPTYPSEL_1; -+ if (priv->plat->has_gmac4) -+ snap_type_sel = PTP_GMAC4_TCR_SNAPTYPSEL_1; -+ else -+ snap_type_sel = PTP_TCR_SNAPTYPSEL_1; - - ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA; - ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA; -@@ -543,7 +624,10 @@ static int stmmac_hwtstamp_ioctl(struct - config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; - ptp_v2 = PTP_TCR_TSVER2ENA; - /* take time stamp for all event messages */ -- snap_type_sel = PTP_TCR_SNAPTYPSEL_1; -+ if (priv->plat->has_gmac4) -+ snap_type_sel = PTP_GMAC4_TCR_SNAPTYPSEL_1; -+ else -+ snap_type_sel = PTP_TCR_SNAPTYPSEL_1; - - ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA; - ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA; -@@ -679,6 +763,19 @@ static void stmmac_release_ptp(struct st +@@ -688,6 +763,19 @@ static void stmmac_release_ptp(struct st } /** @@ -2838,7 +2802,7 @@ * stmmac_adjust_link - adjusts the link parameters * @dev: net device structure * Description: this is the helper called by the physical abstraction layer -@@ -693,7 +790,6 @@ static void stmmac_adjust_link(struct ne +@@ -702,7 +790,6 @@ static void stmmac_adjust_link(struct ne struct phy_device *phydev = dev->phydev; unsigned long flags; int new_state = 0; @@ -2846,7 +2810,7 @@ if (!phydev) return; -@@ -715,8 +811,7 @@ static void stmmac_adjust_link(struct ne +@@ -724,8 +811,7 @@ static void stmmac_adjust_link(struct ne } /* Flow Control operation */ if (phydev->pause) @@ -2856,7 +2820,7 @@ if (phydev->speed != priv->speed) { new_state = 1; -@@ -884,22 +979,56 @@ static int stmmac_init_phy(struct net_de +@@ -893,22 +979,56 @@ static int stmmac_init_phy(struct net_de return 0; } @@ -2887,7 +2851,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,26 +2870,26 @@ + head_tx = (void *)tx_q->dma_etx; + else + head_tx = (void *)tx_q->dma_tx; - -- /* 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 */ + stmmac_display_rx_rings(priv); -+ + +- /* 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); + /* Display TX ring */ + stmmac_display_tx_rings(priv); } static int stmmac_set_bfsize(int mtu, int bufsize) -@@ -919,48 +1048,88 @@ static int stmmac_set_bfsize(int mtu, in +@@ -928,48 +1048,88 @@ static int stmmac_set_bfsize(int mtu, in } /** @@ -3024,7 +2988,7 @@ struct sk_buff *skb; skb = __netdev_alloc_skb_ip_align(priv->dev, priv->dma_buf_sz, flags); -@@ -969,20 +1138,20 @@ static int stmmac_init_rx_buffers(struct +@@ -978,20 +1138,20 @@ static int stmmac_init_rx_buffers(struct "%s: Rx init fails; skb is NULL\n", __func__); return -ENOMEM; } @@ -3050,7 +3014,7 @@ if ((priv->hw->mode->init_desc3) && (priv->dma_buf_sz == BUF_SIZE_16KiB)) -@@ -991,30 +1160,71 @@ static int stmmac_init_rx_buffers(struct +@@ -1000,30 +1160,71 @@ static int stmmac_init_rx_buffers(struct return 0; } @@ -3131,7 +3095,7 @@ if (priv->hw->mode->set_16kib_bfsize) bfsize = priv->hw->mode->set_16kib_bfsize(dev->mtu); -@@ -1024,235 +1234,409 @@ static int init_dma_desc_rings(struct ne +@@ -1033,257 +1234,516 @@ static int init_dma_desc_rings(struct ne priv->dma_buf_sz = bfsize; @@ -3151,11 +3115,17 @@ - p = priv->dma_rx + i; + for (queue = 0; queue < rx_count; queue++) { + struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue]; -+ + +- ret = stmmac_init_rx_buffers(priv, p, i, flags); +- if (ret) +- goto err_init_rx_buffers; + netif_dbg(priv, probe, priv->dev, + "(%s) dma_rx_phy=0x%08x\n", __func__, + (u32)rx_q->dma_rx_phy); -+ + +- 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]); + for (i = 0; i < DMA_RX_SIZE; i++) { + struct dma_desc *p; + @@ -3173,16 +3143,10 @@ + 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); - -- 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 */ @@ -3387,17 +3351,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 +3383,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 +3419,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 +3469,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 +3531,7 @@ + GFP_KERNEL); + if (!tx_q->dma_tx) + goto err_dma_buffers; -+ } + } + } + + return 0; @@ -3644,9 +3539,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,7 +3567,176 @@ + * free_dma_desc_resources - free dma desc resources + * @priv: private structure + */ - static void free_dma_desc_resources(struct stmmac_priv *priv) ++static void free_dma_desc_resources(struct stmmac_priv *priv) ++{ ++ /* Release the DMA RX socket buffers */ ++ free_dma_rx_desc_resources(priv); ++ ++ /* Release the DMA TX socket buffers */ ++ free_dma_tx_desc_resources(priv); ++} ++ ++/** ++ * stmmac_mac_enable_rx_queues - Enable MAC rx queues ++ * @priv: driver private structure ++ * Description: It is used for enabling the rx queues in the MAC ++ */ ++static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) ++{ ++ u32 rx_queues_count = priv->plat->rx_queues_to_use; ++ int queue; ++ u8 mode; + +- 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); + } + } + + /** +- * 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 ++ * @chan: TX channel index ++ * Description: ++ * This starts a TX DMA channel ++ */ ++static void stmmac_start_tx_dma(struct stmmac_priv *priv, u32 chan) ++{ ++ 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 ++ * @chan: RX channel index ++ * Description: ++ * This stops a RX DMA channel ++ */ ++static void stmmac_stop_rx_dma(struct stmmac_priv *priv, u32 chan) ++{ ++ 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 ++ * @chan: TX channel index ++ * Description: ++ * This stops a TX DMA channel ++ */ ++static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan) ++{ ++ 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 ++ * Description: ++ * 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); @@ -3698,99 +3762,6 @@ - kfree(priv->rx_skbuff); - kfree(priv->tx_skbuff_dma); - kfree(priv->tx_skbuff); -+ /* Release the DMA RX socket buffers */ -+ free_dma_rx_desc_resources(priv); -+ -+ /* Release the DMA TX socket buffers */ -+ free_dma_tx_desc_resources(priv); - } - - /** -@@ -1262,19 +1646,104 @@ static void free_dma_desc_resources(stru - */ - static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) - { -- int rx_count = priv->dma_cap.number_rx_queues; -- int queue = 0; -+ 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; -+ 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); -+/** -+ * stmmac_start_rx_dma - start RX DMA channel -+ * @priv: driver private structure -+ * @chan: RX channel index -+ * Description: -+ * This starts a RX DMA channel -+ */ -+static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan) -+{ -+ netdev_dbg(priv->dev, "DMA RX processes started in channel %d\n", chan); -+ priv->hw->dma->start_rx(priv->ioaddr, chan); -+} -+ -+/** -+ * stmmac_start_tx_dma - start TX DMA channel -+ * @priv: driver private structure -+ * @chan: TX channel index -+ * Description: -+ * This starts a TX DMA channel -+ */ -+static void stmmac_start_tx_dma(struct stmmac_priv *priv, u32 chan) -+{ -+ netdev_dbg(priv->dev, "DMA TX processes started in channel %d\n", chan); -+ priv->hw->dma->start_tx(priv->ioaddr, chan); -+} -+ -+/** -+ * stmmac_stop_rx_dma - stop RX DMA channel -+ * @priv: driver private structure -+ * @chan: RX channel index -+ * Description: -+ * This stops a RX DMA channel -+ */ -+static void stmmac_stop_rx_dma(struct stmmac_priv *priv, u32 chan) -+{ -+ netdev_dbg(priv->dev, "DMA RX processes stopped in channel %d\n", chan); -+ priv->hw->dma->stop_rx(priv->ioaddr, chan); -+} -+ -+/** -+ * stmmac_stop_tx_dma - stop TX DMA channel -+ * @priv: driver private structure -+ * @chan: TX channel index -+ * Description: -+ * This stops a TX DMA channel -+ */ -+static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan) -+{ -+ netdev_dbg(priv->dev, "DMA TX processes stopped in channel %d\n", chan); -+ priv->hw->dma->stop_tx(priv->ioaddr, chan); -+} -+ -+/** -+ * stmmac_start_all_dma - start all RX and TX DMA channels -+ * @priv: driver private structure -+ * Description: -+ * This starts all the RX and TX DMA channels -+ */ -+static void stmmac_start_all_dma(struct stmmac_priv *priv) -+{ + u32 rx_channels_count = priv->plat->rx_queues_to_use; + u32 tx_channels_count = priv->plat->tx_queues_to_use; + u32 chan = 0; @@ -3800,29 +3771,44 @@ + + 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); } /** -@@ -1285,11 +1754,20 @@ static void stmmac_mac_enable_rx_queues( +@@ -1294,11 +1754,20 @@ static void stmmac_mac_enable_rx_queues( */ static void stmmac_dma_operation_mode(struct stmmac_priv *priv) { @@ -3847,7 +3833,7 @@ /* * In case of GMAC, SF mode can be enabled * to perform the TX COE in HW. This depends on: -@@ -1297,37 +1775,53 @@ static void stmmac_dma_operation_mode(st +@@ -1306,37 +1775,53 @@ static void stmmac_dma_operation_mode(st * 2) There is no bugged Jumbo frame support * that needs to not insert csum in the TDES. */ @@ -3911,7 +3897,7 @@ status = priv->hw->desc->tx_status(&priv->dev->stats, &priv->xstats, p, -@@ -1348,48 +1842,51 @@ static void stmmac_tx_clean(struct stmma +@@ -1357,48 +1842,51 @@ static void stmmac_tx_clean(struct stmma stmmac_get_tx_hwtstamp(priv, p, skb); } @@ -3981,7 +3967,7 @@ } if ((priv->eee_enabled) && (!priv->tx_path_in_lpi_mode)) { -@@ -1399,45 +1896,76 @@ static void stmmac_tx_clean(struct stmma +@@ -1408,45 +1896,76 @@ static void stmmac_tx_clean(struct stmma netif_tx_unlock(priv->dev); } @@ -4073,7 +4059,7 @@ } /** -@@ -1449,31 +1977,43 @@ static void stmmac_tx_err(struct stmmac_ +@@ -1458,31 +1977,43 @@ static void stmmac_tx_err(struct stmmac_ */ static void stmmac_dma_interrupt(struct stmmac_priv *priv) { @@ -4138,7 +4124,7 @@ } /** -@@ -1580,6 +2120,13 @@ static void stmmac_check_ether_addr(stru +@@ -1589,6 +2120,13 @@ static void stmmac_check_ether_addr(stru */ static int stmmac_init_dma_engine(struct stmmac_priv *priv) { @@ -4152,7 +4138,7 @@ int atds = 0; int ret = 0; -@@ -1597,19 +2144,49 @@ static int stmmac_init_dma_engine(struct +@@ -1606,19 +2144,49 @@ static int stmmac_init_dma_engine(struct return ret; } @@ -4214,7 +4200,7 @@ } if (priv->plat->axi && priv->hw->dma->axi) -@@ -1627,8 +2204,12 @@ static int stmmac_init_dma_engine(struct +@@ -1636,8 +2204,12 @@ static int stmmac_init_dma_engine(struct static void stmmac_tx_timer(unsigned long data) { struct stmmac_priv *priv = (struct stmmac_priv *)data; @@ -4228,7 +4214,7 @@ } /** -@@ -1650,6 +2231,196 @@ static void stmmac_init_tx_coalesce(stru +@@ -1659,6 +2231,196 @@ static void stmmac_init_tx_coalesce(stru add_timer(&priv->txtimer); } @@ -4425,7 +4411,7 @@ /** * stmmac_hw_setup - setup mac in a usable state. * @dev : pointer to the device structure. -@@ -1665,6 +2436,9 @@ static void stmmac_init_tx_coalesce(stru +@@ -1674,6 +2436,9 @@ static void stmmac_init_tx_coalesce(stru static int stmmac_hw_setup(struct net_device *dev, bool init_ptp) { struct stmmac_priv *priv = netdev_priv(dev); @@ -4435,7 +4421,7 @@ int ret; /* DMA initialization and SW reset */ -@@ -1694,9 +2468,9 @@ static int stmmac_hw_setup(struct net_de +@@ -1703,9 +2468,9 @@ static int stmmac_hw_setup(struct net_de /* Initialize the MAC Core */ priv->hw->mac->core_init(priv->hw, dev->mtu); @@ -4448,7 +4434,7 @@ ret = priv->hw->mac->rx_ipc(priv->hw); if (!ret) { -@@ -1706,10 +2480,7 @@ static int stmmac_hw_setup(struct net_de +@@ -1715,10 +2480,7 @@ static int stmmac_hw_setup(struct net_de } /* Enable the MAC Rx/Tx */ @@ -4460,7 +4446,7 @@ /* Set the HW DMA mode and the COE */ stmmac_dma_operation_mode(priv); -@@ -1717,6 +2488,10 @@ static int stmmac_hw_setup(struct net_de +@@ -1726,6 +2488,10 @@ static int stmmac_hw_setup(struct net_de stmmac_mmc_setup(priv); if (init_ptp) { @@ -4471,7 +4457,7 @@ ret = stmmac_init_ptp(priv); if (ret == -EOPNOTSUPP) netdev_warn(priv->dev, "PTP not supported by HW\n"); -@@ -1731,35 +2506,37 @@ static int stmmac_hw_setup(struct net_de +@@ -1740,35 +2506,37 @@ static int stmmac_hw_setup(struct net_de __func__); #endif /* Start the ball rolling... */ @@ -4523,7 +4509,7 @@ /** * stmmac_open - open entry point of the driver * @dev : pointer to the device structure. -@@ -1828,7 +2605,7 @@ static int stmmac_open(struct net_device +@@ -1837,7 +2605,7 @@ static int stmmac_open(struct net_device netdev_err(priv->dev, "%s: ERROR: allocating the IRQ %d (error: %d)\n", __func__, dev->irq, ret); @@ -4532,7 +4518,7 @@ } /* Request the Wake IRQ in case of another line is used for WoL */ -@@ -1855,8 +2632,8 @@ static int stmmac_open(struct net_device +@@ -1864,8 +2632,8 @@ static int stmmac_open(struct net_device } } @@ -4543,7 +4529,7 @@ return 0; -@@ -1865,7 +2642,12 @@ lpiirq_error: +@@ -1874,7 +2642,12 @@ lpiirq_error: free_irq(priv->wol_irq, dev); wolirq_error: free_irq(dev->irq, dev); @@ -4556,7 +4542,7 @@ init_error: free_dma_desc_resources(priv); dma_desc_error: -@@ -1894,9 +2676,9 @@ static int stmmac_release(struct net_dev +@@ -1903,9 +2676,9 @@ static int stmmac_release(struct net_dev phy_disconnect(dev->phydev); } @@ -4568,7 +4554,7 @@ del_timer_sync(&priv->txtimer); -@@ -1908,14 +2690,13 @@ static int stmmac_release(struct net_dev +@@ -1917,14 +2690,13 @@ static int stmmac_release(struct net_dev free_irq(priv->lpi_irq, dev); /* Stop TX/RX DMA and clear the descriptors */ @@ -4585,7 +4571,7 @@ netif_carrier_off(dev); -@@ -1934,22 +2715,24 @@ static int stmmac_release(struct net_dev +@@ -1943,22 +2715,24 @@ static int stmmac_release(struct net_dev * @des: buffer start address * @total_len: total length to fill in descriptors * @last_segmant: condition for the last descriptor @@ -4614,7 +4600,7 @@ desc->des0 = cpu_to_le32(des + (total_len - tmp_len)); buff_size = tmp_len >= TSO_MAX_BUFF_SIZE ? -@@ -1957,7 +2740,7 @@ static void stmmac_tso_allocator(struct +@@ -1966,7 +2740,7 @@ static void stmmac_tso_allocator(struct priv->hw->desc->prepare_tso_tx_desc(desc, 0, buff_size, 0, 1, @@ -4623,7 +4609,7 @@ 0, 0); tmp_len -= TSO_MAX_BUFF_SIZE; -@@ -1993,23 +2776,28 @@ static void stmmac_tso_allocator(struct +@@ -2002,23 +2776,28 @@ static void stmmac_tso_allocator(struct */ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev) { @@ -4658,7 +4644,7 @@ /* This is a hard error, log it. */ netdev_err(priv->dev, "%s: Tx Ring full when queue awake\n", -@@ -2024,10 +2812,10 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2033,10 +2812,10 @@ static netdev_tx_t stmmac_tso_xmit(struc /* set new MSS value if needed */ if (mss != priv->mss) { @@ -4671,7 +4657,7 @@ } if (netif_msg_tx_queued(priv)) { -@@ -2037,9 +2825,9 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2046,9 +2825,9 @@ static netdev_tx_t stmmac_tso_xmit(struc skb->data_len); } @@ -4683,7 +4669,7 @@ first = desc; /* first descriptor: fill Headers on Buf1 */ -@@ -2048,9 +2836,8 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2057,9 +2836,8 @@ static netdev_tx_t stmmac_tso_xmit(struc if (dma_mapping_error(priv->device, des)) goto dma_map_err; @@ -4695,7 +4681,7 @@ first->des0 = cpu_to_le32(des); -@@ -2061,7 +2848,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2070,7 +2848,7 @@ static netdev_tx_t stmmac_tso_xmit(struc /* If needed take extra descriptors to fill the remaining payload */ tmp_pay_len = pay_len - TSO_MAX_BUFF_SIZE; @@ -4704,7 +4690,7 @@ /* Prepare fragments */ for (i = 0; i < nfrags; i++) { -@@ -2070,24 +2857,34 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2079,24 +2857,34 @@ static netdev_tx_t stmmac_tso_xmit(struc des = skb_frag_dma_map(priv->device, frag, 0, skb_frag_size(frag), DMA_TO_DEVICE); @@ -4748,7 +4734,7 @@ } dev->stats.tx_bytes += skb->len; -@@ -2119,7 +2916,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2128,7 +2916,7 @@ static netdev_tx_t stmmac_tso_xmit(struc priv->hw->desc->prepare_tso_tx_desc(first, 1, proto_hdr_len, pay_len, @@ -4757,7 +4743,7 @@ tcp_hdrlen(skb) / 4, (skb->len - proto_hdr_len)); /* If context desc is used to change MSS */ -@@ -2134,20 +2931,20 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -2143,20 +2931,20 @@ static netdev_tx_t stmmac_tso_xmit(struc if (netif_msg_pktdata(priv)) { pr_info("%s: curr=%d dirty=%d f=%d, e=%d, f_p=%p, nfrags %d\n", @@ -4784,7 +4770,7 @@ return NETDEV_TX_OK; -@@ -2171,21 +2968,27 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2180,21 +2968,27 @@ static netdev_tx_t stmmac_xmit(struct sk struct stmmac_priv *priv = netdev_priv(dev); unsigned int nopaged_len = skb_headlen(skb); int i, csum_insertion = 0, is_jumbo = 0; @@ -4816,7 +4802,7 @@ /* This is a hard error, log it. */ netdev_err(priv->dev, "%s: Tx Ring full when queue awake\n", -@@ -2197,20 +3000,18 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2206,20 +3000,18 @@ static netdev_tx_t stmmac_xmit(struct sk if (priv->tx_path_in_lpi_mode) stmmac_disable_eee_mode(priv); @@ -4840,7 +4826,7 @@ enh_desc = priv->plat->enh_desc; /* To program the descriptors according to the size of the frame */ if (enh_desc) -@@ -2218,7 +3019,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2227,7 +3019,7 @@ static netdev_tx_t stmmac_xmit(struct sk if (unlikely(is_jumbo) && likely(priv->synopsys_id < DWMAC_CORE_4_00)) { @@ -4849,7 +4835,7 @@ if (unlikely(entry < 0)) goto dma_map_err; } -@@ -2231,48 +3032,56 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2240,48 +3032,56 @@ static netdev_tx_t stmmac_xmit(struct sk entry = STMMAC_GET_ENTRY(entry, DMA_TX_SIZE); if (likely(priv->extend_desc)) @@ -4919,7 +4905,7 @@ priv->hw->desc->display_ring(tx_head, DMA_TX_SIZE, false); -@@ -2280,10 +3089,10 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2289,10 +3089,10 @@ static netdev_tx_t stmmac_xmit(struct sk print_pkt(skb->data, skb->len); } @@ -4932,7 +4918,7 @@ } dev->stats.tx_bytes += skb->len; -@@ -2318,14 +3127,14 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2327,14 +3127,14 @@ static netdev_tx_t stmmac_xmit(struct sk if (dma_mapping_error(priv->device, des)) goto dma_map_err; @@ -4950,7 +4936,7 @@ if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && priv->hwts_tx_en)) { -@@ -2337,7 +3146,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2346,7 +3146,7 @@ static netdev_tx_t stmmac_xmit(struct sk /* Prepare the first descriptor setting the OWN bit too */ priv->hw->desc->prepare_tx_desc(first, 1, nopaged_len, csum_insertion, priv->mode, 1, @@ -4959,7 +4945,7 @@ /* The own bit must be the latest setting done when prepare the * descriptor and then barrier is needed to make sure that -@@ -2346,13 +3155,13 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -2355,13 +3155,13 @@ static netdev_tx_t stmmac_xmit(struct sk dma_wmb(); } @@ -4976,7 +4962,7 @@ return NETDEV_TX_OK; -@@ -2380,9 +3189,9 @@ static void stmmac_rx_vlan(struct net_de +@@ -2389,9 +3189,9 @@ static void stmmac_rx_vlan(struct net_de } @@ -4988,7 +4974,7 @@ return 0; return 1; -@@ -2391,30 +3200,33 @@ static inline int stmmac_rx_threshold_co +@@ -2400,30 +3200,33 @@ static inline int stmmac_rx_threshold_co /** * stmmac_rx_refill - refill used skb preallocated buffers * @priv: driver private structure @@ -5029,7 +5015,7 @@ if (unlikely(net_ratelimit())) dev_err(priv->device, "fail to alloc skb entry %d\n", -@@ -2422,28 +3234,28 @@ static inline void stmmac_rx_refill(stru +@@ -2431,28 +3234,28 @@ static inline void stmmac_rx_refill(stru break; } @@ -5066,7 +5052,7 @@ netif_dbg(priv, rx_status, priv->dev, "refill entry #%d\n", entry); -@@ -2459,31 +3271,33 @@ static inline void stmmac_rx_refill(stru +@@ -2468,31 +3271,33 @@ static inline void stmmac_rx_refill(stru entry = STMMAC_GET_ENTRY(entry, DMA_RX_SIZE); } @@ -5107,7 +5093,7 @@ priv->hw->desc->display_ring(rx_head, DMA_RX_SIZE, true); } -@@ -2493,9 +3307,9 @@ static int stmmac_rx(struct stmmac_priv +@@ -2502,9 +3307,9 @@ static int stmmac_rx(struct stmmac_priv struct dma_desc *np; if (priv->extend_desc) @@ -5119,7 +5105,7 @@ /* read the status of the incoming frame */ status = priv->hw->desc->rx_status(&priv->dev->stats, -@@ -2506,20 +3320,20 @@ static int stmmac_rx(struct stmmac_priv +@@ -2515,20 +3320,20 @@ static int stmmac_rx(struct stmmac_priv count++; @@ -5145,7 +5131,7 @@ entry); if (unlikely(status == discard_frame)) { priv->dev->stats.rx_errors++; -@@ -2529,9 +3343,9 @@ static int stmmac_rx(struct stmmac_priv +@@ -2538,9 +3343,9 @@ static int stmmac_rx(struct stmmac_priv * them in stmmac_rx_refill() function so that * device can reuse it. */ @@ -5157,7 +5143,7 @@ priv->dma_buf_sz, DMA_FROM_DEVICE); } -@@ -2579,7 +3393,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -2588,7 +3393,7 @@ static int stmmac_rx(struct stmmac_priv */ if (unlikely(!priv->plat->has_gmac4 && ((frame_len < priv->rx_copybreak) || @@ -5166,7 +5152,7 @@ skb = netdev_alloc_skb_ip_align(priv->dev, frame_len); if (unlikely(!skb)) { -@@ -2591,21 +3405,21 @@ static int stmmac_rx(struct stmmac_priv +@@ -2600,21 +3405,21 @@ static int stmmac_rx(struct stmmac_priv } dma_sync_single_for_cpu(priv->device, @@ -5192,7 +5178,7 @@ if (unlikely(!skb)) { netdev_err(priv->dev, "%s: Inconsistent Rx chain\n", -@@ -2614,12 +3428,12 @@ static int stmmac_rx(struct stmmac_priv +@@ -2623,12 +3428,12 @@ static int stmmac_rx(struct stmmac_priv break; } prefetch(skb->data - NET_IP_ALIGN); @@ -5208,7 +5194,7 @@ priv->dma_buf_sz, DMA_FROM_DEVICE); } -@@ -2641,7 +3455,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -2650,7 +3455,7 @@ static int stmmac_rx(struct stmmac_priv else skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -5217,7 +5203,7 @@ priv->dev->stats.rx_packets++; priv->dev->stats.rx_bytes += frame_len; -@@ -2649,7 +3463,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -2658,7 +3463,7 @@ static int stmmac_rx(struct stmmac_priv entry = next_entry; } @@ -5226,7 +5212,7 @@ priv->xstats.rx_pkt_n += count; -@@ -2666,16 +3480,24 @@ static int stmmac_rx(struct stmmac_priv +@@ -2675,16 +3480,24 @@ static int stmmac_rx(struct stmmac_priv */ static int stmmac_poll(struct napi_struct *napi, int budget) { @@ -5255,7 +5241,7 @@ } return work_done; } -@@ -2691,9 +3513,12 @@ static int stmmac_poll(struct napi_struc +@@ -2700,9 +3513,12 @@ static int stmmac_poll(struct napi_struc static void stmmac_tx_timeout(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); @@ -5269,7 +5255,7 @@ } /** -@@ -2816,6 +3641,12 @@ static irqreturn_t stmmac_interrupt(int +@@ -2825,6 +3641,12 @@ static irqreturn_t stmmac_interrupt(int { struct net_device *dev = (struct net_device *)dev_id; struct stmmac_priv *priv = netdev_priv(dev); @@ -5282,7 +5268,7 @@ if (priv->irq_wake) pm_wakeup_event(priv->device, 0); -@@ -2829,16 +3660,30 @@ static irqreturn_t stmmac_interrupt(int +@@ -2838,16 +3660,30 @@ static irqreturn_t stmmac_interrupt(int if ((priv->plat->has_gmac) || (priv->plat->has_gmac4)) { int status = priv->hw->mac->host_irq_status(priv->hw, &priv->xstats); @@ -5317,7 +5303,7 @@ } /* PCS link status */ -@@ -2923,7 +3768,7 @@ static void sysfs_display_ring(void *hea +@@ -2932,7 +3768,7 @@ static void sysfs_display_ring(void *hea ep++; } else { seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n", @@ -5326,7 +5312,7 @@ le32_to_cpu(p->des0), le32_to_cpu(p->des1), le32_to_cpu(p->des2), le32_to_cpu(p->des3)); p++; -@@ -2936,17 +3781,40 @@ static int stmmac_sysfs_ring_read(struct +@@ -2945,17 +3781,40 @@ static int stmmac_sysfs_ring_read(struct { struct net_device *dev = seq->private; struct stmmac_priv *priv = netdev_priv(dev); @@ -5377,7 +5363,7 @@ } return 0; -@@ -3229,11 +4097,14 @@ int stmmac_dvr_probe(struct device *devi +@@ -3238,11 +4097,14 @@ int stmmac_dvr_probe(struct device *devi struct plat_stmmacenet_data *plat_dat, struct stmmac_resources *res) { @@ -5394,7 +5380,7 @@ if (!ndev) return -ENOMEM; -@@ -3275,6 +4146,10 @@ int stmmac_dvr_probe(struct device *devi +@@ -3284,6 +4146,10 @@ int stmmac_dvr_probe(struct device *devi if (ret) goto error_hw_init; @@ -5405,7 +5391,7 @@ ndev->netdev_ops = &stmmac_netdev_ops; ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | -@@ -3307,7 +4182,12 @@ int stmmac_dvr_probe(struct device *devi +@@ -3316,7 +4182,12 @@ int stmmac_dvr_probe(struct device *devi "Enable RX Mitigation via HW Watchdog Timer\n"); } @@ -5419,7 +5405,7 @@ spin_lock_init(&priv->lock); -@@ -3352,7 +4232,11 @@ error_netdev_register: +@@ -3361,7 +4232,11 @@ error_netdev_register: priv->hw->pcs != STMMAC_PCS_RTBI) stmmac_mdio_unregister(ndev); error_mdio_register: @@ -5432,7 +5418,7 @@ error_hw_init: free_netdev(ndev); -@@ -3373,10 +4257,9 @@ int stmmac_dvr_remove(struct device *dev +@@ -3382,10 +4257,9 @@ int stmmac_dvr_remove(struct device *dev netdev_info(priv->dev, "%s: removing driver", __func__); @@ -5445,7 +5431,7 @@ netif_carrier_off(ndev); unregister_netdev(ndev); if (priv->plat->stmmac_rst) -@@ -3415,20 +4298,19 @@ int stmmac_suspend(struct device *dev) +@@ -3424,20 +4298,19 @@ int stmmac_suspend(struct device *dev) spin_lock_irqsave(&priv->lock, flags); netif_device_detach(ndev); @@ -5470,7 +5456,7 @@ pinctrl_pm_select_sleep_state(priv->device); /* Disable clock in case of PWM is off */ clk_disable(priv->plat->pclk); -@@ -3444,6 +4326,31 @@ int stmmac_suspend(struct device *dev) +@@ -3453,6 +4326,31 @@ int stmmac_suspend(struct device *dev) EXPORT_SYMBOL_GPL(stmmac_suspend); /** @@ -5502,7 +5488,7 @@ * stmmac_resume - resume callback * @dev: device pointer * Description: when resume this function is invoked to setup the DMA and CORE -@@ -3483,10 +4390,8 @@ int stmmac_resume(struct device *dev) +@@ -3492,10 +4390,8 @@ int stmmac_resume(struct device *dev) spin_lock_irqsave(&priv->lock, flags); @@ -5515,7 +5501,7 @@ /* reset private mss value to force mss context settings at * next tso xmit (only used for gmac4). */ -@@ -3498,9 +4403,9 @@ int stmmac_resume(struct device *dev) +@@ -3507,9 +4403,9 @@ int stmmac_resume(struct device *dev) stmmac_init_tx_coalesce(priv); stmmac_set_rx_mode(ndev); @@ -5867,18 +5853,6 @@ plat->clk_ptp_rate = clk_get_rate(plat->clk_ptp_ref); dev_dbg(&pdev->dev, "PTP rate %d\n", plat->clk_ptp_rate); } ---- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h -+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h -@@ -59,7 +59,8 @@ - /* Enable Snapshot for Messages Relevant to Master */ - #define PTP_TCR_TSMSTRENA BIT(15) - /* Select PTP packets for Taking Snapshots */ --#define PTP_TCR_SNAPTYPSEL_1 GENMASK(17, 16) -+#define PTP_TCR_SNAPTYPSEL_1 BIT(16) -+#define PTP_GMAC4_TCR_SNAPTYPSEL_1 GENMASK(17, 16) - /* Enable MAC address for PTP Frame Filtering */ - #define PTP_TCR_TSENMACADDR BIT(18) - --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -28,6 +28,9 @@ diff --git a/target/linux/uml/patches-4.9/101-mconsole-exec.patch b/target/linux/uml/patches-4.9/101-mconsole-exec.patch index 6682338f3..ea9da8d8c 100644 --- a/target/linux/uml/patches-4.9/101-mconsole-exec.patch +++ b/target/linux/uml/patches-4.9/101-mconsole-exec.patch @@ -123,7 +123,7 @@ }; --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c -@@ -554,6 +554,8 @@ int os_create_unix_socket(const char *fi +@@ -555,6 +555,8 @@ int os_create_unix_socket(const char *fi addr.sun_family = AF_UNIX;