diff options
Diffstat (limited to 'target')
70 files changed, 147 insertions, 1087 deletions
diff --git a/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index be5cb83..e25e15b 100644 --- a/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.9/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> #include "xhci.h" #include "xhci-trace.h" -@@ -221,6 +223,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -224,6 +226,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 <chunkeey@googlemail.com> /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -260,6 +714,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -263,6 +717,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 <chunkeey@googlemail.com> driver = (struct hc_driver *)id->driver_data; /* Prevent runtime suspending between USB-2 and USB-3 initialization */ -@@ -317,6 +787,16 @@ static void xhci_pci_remove(struct pci_d +@@ -320,6 +790,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch index a201d79..66699a8 100644 --- a/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.9/802-usb-xhci-force-msi-renesas-xhci.patch @@ -44,7 +44,7 @@ produce a noisy warning. /* hcd->irq is 0, we have MSI */ --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1674,6 +1674,7 @@ struct xhci_hcd { +@@ -1678,6 +1678,7 @@ struct xhci_hcd { /* support xHCI 0.96 spec USB2 software LPM */ unsigned sw_lpm_support:1; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/arc770/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch b/target/linux/arc770/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch index cd66de8..58094ae 100644 --- a/target/linux/arc770/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch +++ b/target/linux/arc770/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch @@ -20,8 +20,8 @@ Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h -@@ -42,7 +42,7 @@ - #define DWMAC_CORE_3_50 0x35 +@@ -49,7 +49,7 @@ + #define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1)) #undef FRAME_FILTER_DEBUG -/* #define FRAME_FILTER_DEBUG */ diff --git a/target/linux/archs38/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch b/target/linux/archs38/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch index cd66de8..58094ae 100644 --- a/target/linux/archs38/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch +++ b/target/linux/archs38/patches-4.9/700-stmmac-Disable-frame-filtering-completely.patch @@ -20,8 +20,8 @@ Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h -@@ -42,7 +42,7 @@ - #define DWMAC_CORE_3_50 0x35 +@@ -49,7 +49,7 @@ + #define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1)) #undef FRAME_FILTER_DEBUG -/* #define FRAME_FILTER_DEBUG */ diff --git a/target/linux/bcm53xx/patches-4.9/031-ARM-BCM5301X-Add-back-handler-ignoring-external-impr.patch b/target/linux/bcm53xx/patches-4.9/031-ARM-BCM5301X-Add-back-handler-ignoring-external-impr.patch deleted file mode 100644 index a4f32f5..0000000 --- a/target/linux/bcm53xx/patches-4.9/031-ARM-BCM5301X-Add-back-handler-ignoring-external-impr.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 09f3510fb70a46c8921f2cf4a90dbcae460a6820 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> -Date: Sat, 29 Oct 2016 13:12:29 +0200 -Subject: [PATCH] ARM: BCM5301X: Add back handler ignoring external imprecise - aborts -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Since early BCM5301X days we got abort handler that was removed by -commit 937b12306ea79 ("ARM: BCM5301X: remove workaround imprecise abort -fault handler"). It assumed we need to deal only with pending aborts -left by the bootloader. Unfortunately this isn't true for BCM5301X. - -When probing PCI config space (device enumeration) it is expected to -have master aborts on the PCI bus. Most bridges don't forward (or they -allow disabling it) these errors onto the AXI/AMBA bus but not the -Northstar (BCM5301X) one. - -iProc PCIe controller on Northstar seems to be some older one, without -a control register for errors forwarding. It means we need to workaround -this at platform level. All newer platforms are not affected by this -issue. - -Signed-off-by: Rafał Miłecki <rafal@milecki.pl> -Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> ---- - arch/arm/mach-bcm/bcm_5301x.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - ---- a/arch/arm/mach-bcm/bcm_5301x.c -+++ b/arch/arm/mach-bcm/bcm_5301x.c -@@ -9,14 +9,42 @@ - #include <asm/hardware/cache-l2x0.h> - - #include <asm/mach/arch.h> -+#include <asm/siginfo.h> -+#include <asm/signal.h> -+ -+#define FSR_EXTERNAL (1 << 12) -+#define FSR_READ (0 << 10) -+#define FSR_IMPRECISE 0x0406 - - static const char *const bcm5301x_dt_compat[] __initconst = { - "brcm,bcm4708", - NULL, - }; - -+static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr, -+ struct pt_regs *regs) -+{ -+ /* -+ * We want to ignore aborts forwarded from the PCIe bus that are -+ * expected and shouldn't really be passed by the PCIe controller. -+ * The biggest disadvantage is the same FSR code may be reported when -+ * reading non-existing APB register and we shouldn't ignore that. -+ */ -+ if (fsr == (FSR_EXTERNAL | FSR_READ | FSR_IMPRECISE)) -+ return 0; -+ -+ return 1; -+} -+ -+static void __init bcm5301x_init_early(void) -+{ -+ hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR, -+ "imprecise external abort"); -+} -+ - DT_MACHINE_START(BCM5301X, "BCM5301X") - .l2c_aux_val = 0, - .l2c_aux_mask = ~0, - .dt_compat = bcm5301x_dt_compat, -+ .init_early = bcm5301x_init_early, - MACHINE_END diff --git a/target/linux/bcm53xx/patches-4.9/033-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch b/target/linux/bcm53xx/patches-4.9/033-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch deleted file mode 100644 index 70df201..0000000 --- a/target/linux/bcm53xx/patches-4.9/033-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0e34079cd1f674449749aafe4be07336177de90d Mon Sep 17 00:00:00 2001 -From: Jon Mason <jon.mason@broadcom.com> -Date: Thu, 2 Mar 2017 19:21:32 -0500 -Subject: [PATCH] ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GIC_PPI flags were misconfigured for the timers, resulting in errors -like: -[ 0.000000] GIC: PPI11 is secure or misconfigured - -Changing them to being edge triggered corrects the issue - -Suggested-by: Rafał Miłecki <rafal@milecki.pl> -Signed-off-by: Jon Mason <jon.mason@broadcom.com> -Fixes: d27509f1 ("ARM: BCM5301X: add dts files for BCM4708 SoC") -Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> ---- - arch/arm/boot/dts/bcm5301x.dtsi | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/arch/arm/boot/dts/bcm5301x.dtsi -+++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -66,14 +66,14 @@ - timer@20200 { - compatible = "arm,cortex-a9-global-timer"; - reg = <0x20200 0x100>; -- interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; -+ interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>; - clocks = <&periph_clk>; - }; - - local-timer@20600 { - compatible = "arm,cortex-a9-twd-timer"; - reg = <0x20600 0x100>; -- interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; -+ interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>; - clocks = <&periph_clk>; - }; - diff --git a/target/linux/bcm53xx/patches-4.9/089-PCI-iproc-Save-host-bridge-window-resource-in-struct.patch b/target/linux/bcm53xx/patches-4.9/089-PCI-iproc-Save-host-bridge-window-resource-in-struct.patch deleted file mode 100644 index 3de4395..0000000 --- a/target/linux/bcm53xx/patches-4.9/089-PCI-iproc-Save-host-bridge-window-resource-in-struct.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 6e347b5e05ea2ac4ac467a5a1cfaebb2c7f06f80 Mon Sep 17 00:00:00 2001 -From: Bjorn Helgaas <bhelgaas@google.com> -Date: Thu, 9 Mar 2017 11:27:07 -0600 -Subject: [PATCH] PCI: iproc: Save host bridge window resource in struct - iproc_pcie -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The host bridge memory window resource is inserted into the iomem_resource -tree and cannot be deallocated until the host bridge itself is removed. - -Previously, the window was on the stack, which meant the iomem_resource -entry pointed into the stack and was corrupted as soon as the probe -function returned, which caused memory corruption and errors like this: - - pcie_iproc_bcma bcma0:8: resource collision: [mem 0x40000000-0x47ffffff] conflicts with PCIe MEM space [mem 0x40000000-0x47ffffff] - -Move the memory window resource from the stack into struct iproc_pcie so -its lifetime matches that of the host bridge. - -Fixes: c3245a566400 ("PCI: iproc: Request host bridge window resources") -Reported-and-tested-by: Rafał Miłecki <zajec5@gmail.com> -Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> -CC: stable@vger.kernel.org # v4.8+ ---- - drivers/pci/host/pcie-iproc-bcma.c | 24 ++++++++++++------------ - drivers/pci/host/pcie-iproc-platform.c | 19 ++++++++++--------- - drivers/pci/host/pcie-iproc.h | 1 + - 3 files changed, 23 insertions(+), 21 deletions(-) - ---- a/drivers/pci/host/pcie-iproc-bcma.c -+++ b/drivers/pci/host/pcie-iproc-bcma.c -@@ -44,8 +44,7 @@ static int iproc_pcie_bcma_probe(struct - { - struct device *dev = &bdev->dev; - struct iproc_pcie *pcie; -- LIST_HEAD(res); -- struct resource res_mem; -+ LIST_HEAD(resources); - int ret; - - pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); -@@ -62,22 +61,23 @@ static int iproc_pcie_bcma_probe(struct - - pcie->base_addr = bdev->addr; - -- res_mem.start = bdev->addr_s[0]; -- res_mem.end = bdev->addr_s[0] + SZ_128M - 1; -- res_mem.name = "PCIe MEM space"; -- res_mem.flags = IORESOURCE_MEM; -- pci_add_resource(&res, &res_mem); -+ pcie->mem.start = bdev->addr_s[0]; -+ pcie->mem.end = bdev->addr_s[0] + SZ_128M - 1; -+ pcie->mem.name = "PCIe MEM space"; -+ pcie->mem.flags = IORESOURCE_MEM; -+ pci_add_resource(&resources, &pcie->mem); - - pcie->map_irq = iproc_pcie_bcma_map_irq; - -- ret = iproc_pcie_setup(pcie, &res); -- if (ret) -+ ret = iproc_pcie_setup(pcie, &resources); -+ if (ret) { - dev_err(dev, "PCIe controller setup failed\n"); -- -- pci_free_resource_list(&res); -+ pci_free_resource_list(&resources); -+ return ret; -+ } - - bcma_set_drvdata(bdev, pcie); -- return ret; -+ return 0; - } - - static void iproc_pcie_bcma_remove(struct bcma_device *bdev) ---- a/drivers/pci/host/pcie-iproc-platform.c -+++ b/drivers/pci/host/pcie-iproc-platform.c -@@ -46,7 +46,7 @@ static int iproc_pcie_pltfm_probe(struct - struct device_node *np = dev->of_node; - struct resource reg; - resource_size_t iobase = 0; -- LIST_HEAD(res); -+ LIST_HEAD(resources); - int ret; - - of_id = of_match_device(iproc_pcie_of_match_table, dev); -@@ -108,23 +108,24 @@ static int iproc_pcie_pltfm_probe(struct - pcie->phy = NULL; - } - -- ret = of_pci_get_host_bridge_resources(np, 0, 0xff, &res, &iobase); -+ ret = of_pci_get_host_bridge_resources(np, 0, 0xff, &resources, -+ &iobase); - if (ret) { -- dev_err(dev, -- "unable to get PCI host bridge resources\n"); -+ dev_err(dev, "unable to get PCI host bridge resources\n"); - return ret; - } - - pcie->map_irq = of_irq_parse_and_map_pci; - -- ret = iproc_pcie_setup(pcie, &res); -- if (ret) -+ ret = iproc_pcie_setup(pcie, &resources); -+ if (ret) { - dev_err(dev, "PCIe controller setup failed\n"); -- -- pci_free_resource_list(&res); -+ pci_free_resource_list(&resources); -+ return ret; -+ } - - platform_set_drvdata(pdev, pcie); -- return ret; -+ return 0; - } - - static int iproc_pcie_pltfm_remove(struct platform_device *pdev) ---- a/drivers/pci/host/pcie-iproc.h -+++ b/drivers/pci/host/pcie-iproc.h -@@ -68,6 +68,7 @@ struct iproc_pcie { - #ifdef CONFIG_ARM - struct pci_sys_data sysdata; - #endif -+ struct resource mem; - struct pci_bus *root_bus; - struct phy *phy; - int (*map_irq)(const struct pci_dev *, u8, u8); diff --git a/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 9e5bd83..7c91161 100644 --- a/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -127,11 +127,11 @@ it on BCM4708 family. /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1657,6 +1657,7 @@ struct xhci_hcd { - #define XHCI_SSIC_PORT_UNUSED (1 << 22) - #define XHCI_NO_64BIT_SUPPORT (1 << 23) - #define XHCI_MISSING_CAS (1 << 24) -+#define XHCI_FAKE_DOORBELL (1 << 25) +@@ -1660,6 +1660,7 @@ struct xhci_hcd { + /* For controller with a broken Port Disable implementation */ + #define XHCI_BROKEN_PORT_PED (1 << 25) + #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26) ++#define XHCI_FAKE_DOORBELL (1 << 27) + unsigned int num_active_eps; unsigned int limit_active_eps; - /* There are two roothubs to keep track of bus suspend info for */ diff --git a/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch b/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch index c702390..3245269 100644 --- a/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch +++ b/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch @@ -69,7 +69,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl> #include <linux/clockchips.h> #include <linux/clocksource.h> #include <linux/interrupt.h> -@@ -513,6 +514,16 @@ arch_timer_detect_rate(void __iomem *cnt +@@ -514,6 +515,16 @@ arch_timer_detect_rate(void __iomem *cnt arch_timer_rate = arch_timer_get_cntfrq(); } diff --git a/target/linux/brcm2708/patches-4.9/950-0005-mm-Remove-the-PFN-busy-warning.patch b/target/linux/brcm2708/patches-4.9/950-0005-mm-Remove-the-PFN-busy-warning.patch index b271d26..c7b7e85 100644 --- a/target/linux/brcm2708/patches-4.9/950-0005-mm-Remove-the-PFN-busy-warning.patch +++ b/target/linux/brcm2708/patches-4.9/950-0005-mm-Remove-the-PFN-busy-warning.patch @@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net> --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7323,8 +7323,6 @@ int alloc_contig_range(unsigned long sta +@@ -7324,8 +7324,6 @@ int alloc_contig_range(unsigned long sta /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { 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 0610d03..b311876 100644 --- a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch @@ -696,7 +696,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5009,7 +5009,7 @@ static void port_event(struct usb_hub *h +@@ -5025,7 +5025,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-0047-Added-hwmon-thermal-driver-for-reporting-core-temper.patch b/target/linux/brcm2708/patches-4.9/950-0047-Added-hwmon-thermal-driver-for-reporting-core-temper.patch index ff6084f..cbae56b 100644 --- a/target/linux/brcm2708/patches-4.9/950-0047-Added-hwmon-thermal-driver-for-reporting-core-temper.patch +++ b/target/linux/brcm2708/patches-4.9/950-0047-Added-hwmon-thermal-driver-for-reporting-core-temper.patch @@ -39,7 +39,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> depends on X86_THERMAL_VECTOR --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile -@@ -41,6 +41,7 @@ obj-$(CONFIG_MAX77620_THERMAL) += max776 +@@ -42,6 +42,7 @@ obj-$(CONFIG_MAX77620_THERMAL) += max776 obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o diff --git a/target/linux/brcm2708/patches-4.9/950-0060-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch b/target/linux/brcm2708/patches-4.9/950-0060-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch index 73c9ede..e17a84d 100644 --- a/target/linux/brcm2708/patches-4.9/950-0060-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch +++ b/target/linux/brcm2708/patches-4.9/950-0060-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch @@ -10,7 +10,7 @@ Subject: [PATCH] config: Enable CONFIG_MEMCG, but leave it disabled (due to --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5626,7 +5626,7 @@ int __init cgroup_init_early(void) +@@ -5627,7 +5627,7 @@ int __init cgroup_init_early(void) return 0; } @@ -19,7 +19,7 @@ Subject: [PATCH] config: Enable CONFIG_MEMCG, but leave it disabled (due to /** * cgroup_init - cgroup initialization -@@ -6163,6 +6163,28 @@ static int __init cgroup_no_v1(char *str +@@ -6164,6 +6164,28 @@ static int __init cgroup_no_v1(char *str } __setup("cgroup_no_v1=", cgroup_no_v1); diff --git a/target/linux/brcm2708/patches-4.9/950-0106-i2c-bcm2835-Fix-hang-for-writing-messages-larger-tha.patch b/target/linux/brcm2708/patches-4.9/950-0106-i2c-bcm2835-Fix-hang-for-writing-messages-larger-tha.patch deleted file mode 100644 index 899c75e..0000000 --- a/target/linux/brcm2708/patches-4.9/950-0106-i2c-bcm2835-Fix-hang-for-writing-messages-larger-tha.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 89b466914a0d49f08d00be25556ba22497b9a284 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org> -Date: Sat, 17 Sep 2016 15:07:10 +0200 -Subject: [PATCH] i2c: bcm2835: Fix hang for writing messages larger than 16 - bytes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Writing messages larger than the FIFO size results in a hang, rendering -the machine unusable. This is because the RXD status flag is set on the -first interrupt which results in bcm2835_drain_rxfifo() stealing bytes -from the buffer. The controller continues to trigger interrupts waiting -for the missing bytes, but bcm2835_fill_txfifo() has none to give. -In this situation wait_for_completion_timeout() apparently is unable to -stop the madness. - -The BCM2835 ARM Peripherals datasheet has this to say about the flags: - TXD: is set when the FIFO has space for at least one byte of data. - RXD: is set when the FIFO contains at least one byte of data. - TXW: is set during a write transfer and the FIFO is less than full. - RXR: is set during a read transfer and the FIFO is or more full. - -Implementing the logic from the downstream i2c-bcm2708 driver solved -the hang problem. - -Signed-off-by: Noralf Trønnes <noralf@tronnes.org> -Reviewed-by: Eric Anholt <eric@anholt.net> -Reviewed-by: Martin Sperl <kernel@martin.sperl.org> ---- - drivers/i2c/busses/i2c-bcm2835.c | 22 ++++++++++++++-------- - 1 file changed, 14 insertions(+), 8 deletions(-) - ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -64,6 +64,7 @@ struct bcm2835_i2c_dev { - int irq; - struct i2c_adapter adapter; - struct completion completion; -+ struct i2c_msg *curr_msg; - u32 msg_err; - u8 *msg_buf; - size_t msg_buf_remaining; -@@ -126,14 +127,13 @@ static irqreturn_t bcm2835_i2c_isr(int t - return IRQ_HANDLED; - } - -- if (val & BCM2835_I2C_S_RXD) { -- bcm2835_drain_rxfifo(i2c_dev); -- if (!(val & BCM2835_I2C_S_DONE)) -- return IRQ_HANDLED; -- } -- - if (val & BCM2835_I2C_S_DONE) { -- if (i2c_dev->msg_buf_remaining) -+ if (i2c_dev->curr_msg->flags & I2C_M_RD) { -+ bcm2835_drain_rxfifo(i2c_dev); -+ val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S); -+ } -+ -+ if ((val & BCM2835_I2C_S_RXD) || i2c_dev->msg_buf_remaining) - i2c_dev->msg_err = BCM2835_I2C_S_LEN; - else - i2c_dev->msg_err = 0; -@@ -141,11 +141,16 @@ static irqreturn_t bcm2835_i2c_isr(int t - return IRQ_HANDLED; - } - -- if (val & BCM2835_I2C_S_TXD) { -+ if (val & BCM2835_I2C_S_TXW) { - bcm2835_fill_txfifo(i2c_dev); - return IRQ_HANDLED; - } - -+ if (val & BCM2835_I2C_S_RXR) { -+ bcm2835_drain_rxfifo(i2c_dev); -+ return IRQ_HANDLED; -+ } -+ - return IRQ_NONE; - } - -@@ -155,6 +160,7 @@ static int bcm2835_i2c_xfer_msg(struct b - u32 c; - unsigned long time_left; - -+ i2c_dev->curr_msg = msg; - i2c_dev->msg_buf = msg->buf; - i2c_dev->msg_buf_remaining = msg->len; - reinit_completion(&i2c_dev->completion); diff --git a/target/linux/generic/patches-4.9/012-usb-Make-sure-usb-phy-of-gets-built-in.patch b/target/linux/generic/patches-4.9/012-usb-Make-sure-usb-phy-of-gets-built-in.patch deleted file mode 100644 index 2ef6643..0000000 --- a/target/linux/generic/patches-4.9/012-usb-Make-sure-usb-phy-of-gets-built-in.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 3d6159640da9c9175d1ca42f151fc1a14caded59 Mon Sep 17 00:00:00 2001 -From: Alexey Brodkin <Alexey.Brodkin@synopsys.com> -Date: Thu, 13 Apr 2017 15:33:34 +0300 -Subject: [PATCH] usb: Make sure usb/phy/of gets built-in - -DWC3 driver uses of_usb_get_phy_mode() which is -implemented in drivers/usb/phy/of.c and in bare minimal -configuration it might not be pulled in kernel binary. - -In case of ARC or ARM this could be easily reproduced with -"allnodefconfig" +CONFIG_USB=m +CONFIG_USB_DWC3=m. - -On building all ends-up with: ----------------------->8------------------ - Kernel: arch/arm/boot/Image is ready - Kernel: arch/arm/boot/zImage is ready - Building modules, stage 2. - MODPOST 5 modules -ERROR: "of_usb_get_phy_mode" [drivers/usb/dwc3/dwc3.ko] undefined! -make[1]: *** [__modpost] Error 1 -make: *** [modules] Error 2 ----------------------->8------------------ - -Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> -Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Cc: Masahiro Yamada <yamada.masahiro@socionext.com> -Cc: Geert Uytterhoeven <geert+renesas@glider.be> -Cc: Nicolas Pitre <nicolas.pitre@linaro.org> -Cc: Thomas Gleixner <tglx@linutronix.de> -Cc: Felipe Balbi <balbi@kernel.org> -Cc: Felix Fietkau <nbd@nbd.name> -Cc: Jeremy Kerr <jk@ozlabs.org> -Cc: linux-snps-arc@lists.infradead.org -Cc: stable@vger.kernel.org -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/Makefile | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -101,6 +101,7 @@ obj-$(CONFIG_USB_PHY) += usb/ - obj-$(CONFIG_USB) += usb/ - obj-$(CONFIG_PCI) += usb/ - obj-$(CONFIG_USB_GADGET) += usb/ -+obj-$(CONFIG_OF) += usb/ - obj-$(CONFIG_SERIO) += input/serio/ - obj-$(CONFIG_GAMEPORT) += input/gameport/ - obj-$(CONFIG_INPUT) += input/ diff --git a/target/linux/generic/patches-4.9/031-ubifs-fix-RENAME_WHITEOUT-support.patch b/target/linux/generic/patches-4.9/031-ubifs-fix-RENAME_WHITEOUT-support.patch deleted file mode 100644 index 7b81afb..0000000 --- a/target/linux/generic/patches-4.9/031-ubifs-fix-RENAME_WHITEOUT-support.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Felix Fietkau <nbd@nbd.name> -Date: Mon, 6 Mar 2017 09:48:52 +0100 -Subject: [PATCH] ubifs: fix RENAME_WHITEOUT support - -Remove faulty leftover check in do_rename(), apparently introduced in a -merge that combined whiteout support changes with commit f03b8ad8d386 -("fs: support RENAME_NOREPLACE for local filesystems") - -Fixes: 9e0a1fff8db5 ("ubifs: Implement RENAME_WHITEOUT") -Cc: stable@vger.kernel.org -Signed-off-by: Felix Fietkau <nbd@nbd.name> ---- - ---- a/fs/ubifs/dir.c -+++ b/fs/ubifs/dir.c -@@ -1088,9 +1088,6 @@ static int do_rename(struct inode *old_d - struct timespec time; - unsigned int uninitialized_var(saved_nlink); - -- if (flags & ~RENAME_NOREPLACE) -- return -EINVAL; -- - /* - * Budget request settings: deletion direntry, new direntry, removing - * the old inode, and changing old and new parent directory inodes. diff --git a/target/linux/generic/patches-4.9/040-01-MIPS-Introduce-irq_stack.patch b/target/linux/generic/patches-4.9/040-01-MIPS-Introduce-irq_stack.patch deleted file mode 100644 index 1cdbcda..0000000 --- a/target/linux/generic/patches-4.9/040-01-MIPS-Introduce-irq_stack.patch +++ /dev/null @@ -1,70 +0,0 @@ -From: Matt Redfearn <matt.redfearn@imgtec.com> -Date: Mon, 19 Dec 2016 14:20:56 +0000 -Subject: [PATCH] MIPS: Introduce irq_stack - -Allocate a per-cpu irq stack for use within interrupt handlers. - -Also add a utility function on_irq_stack to determine if a given stack -pointer is within the irq stack for that cpu. - -Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> ---- - ---- a/arch/mips/include/asm/irq.h -+++ b/arch/mips/include/asm/irq.h -@@ -17,6 +17,18 @@ - - #include <irq.h> - -+#define IRQ_STACK_SIZE THREAD_SIZE -+ -+extern void *irq_stack[NR_CPUS]; -+ -+static inline bool on_irq_stack(int cpu, unsigned long sp) -+{ -+ unsigned long low = (unsigned long)irq_stack[cpu]; -+ unsigned long high = low + IRQ_STACK_SIZE; -+ -+ return (low <= sp && sp <= high); -+} -+ - #ifdef CONFIG_I8259 - static inline int irq_canonicalize(int irq) - { ---- a/arch/mips/kernel/asm-offsets.c -+++ b/arch/mips/kernel/asm-offsets.c -@@ -102,6 +102,7 @@ void output_thread_info_defines(void) - OFFSET(TI_REGS, thread_info, regs); - DEFINE(_THREAD_SIZE, THREAD_SIZE); - DEFINE(_THREAD_MASK, THREAD_MASK); -+ DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE); - BLANK(); - } - ---- a/arch/mips/kernel/irq.c -+++ b/arch/mips/kernel/irq.c -@@ -25,6 +25,8 @@ - #include <linux/atomic.h> - #include <asm/uaccess.h> - -+void *irq_stack[NR_CPUS]; -+ - /* - * 'what should we do if we get a hw irq event on an illegal vector'. - * each architecture has to answer this themselves. -@@ -58,6 +60,15 @@ void __init init_IRQ(void) - clear_c0_status(ST0_IM); - - arch_init_irq(); -+ -+ for_each_possible_cpu(i) { -+ int irq_pages = IRQ_STACK_SIZE / PAGE_SIZE; -+ void *s = (void *)__get_free_pages(GFP_KERNEL, irq_pages); -+ -+ irq_stack[i] = s; -+ pr_debug("CPU%d IRQ stack at 0x%p - 0x%p\n", i, -+ irq_stack[i], irq_stack[i] + IRQ_STACK_SIZE); -+ } - } - - #ifdef CONFIG_DEBUG_STACKOVERFLOW diff --git a/target/linux/generic/patches-4.9/040-02-MIPS-Stack-unwinding-while-on-IRQ-stack.patch b/target/linux/generic/patches-4.9/040-02-MIPS-Stack-unwinding-while-on-IRQ-stack.patch deleted file mode 100644 index b2e90c8..0000000 --- a/target/linux/generic/patches-4.9/040-02-MIPS-Stack-unwinding-while-on-IRQ-stack.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Matt Redfearn <matt.redfearn@imgtec.com> -Date: Mon, 19 Dec 2016 14:20:57 +0000 -Subject: [PATCH] MIPS: Stack unwinding while on IRQ stack - -Within unwind stack, check if the stack pointer being unwound is within -the CPU's irq_stack and if so use that page rather than the task's stack -page. - -Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> ---- - ---- a/arch/mips/kernel/process.c -+++ b/arch/mips/kernel/process.c -@@ -33,6 +33,7 @@ - #include <asm/dsemul.h> - #include <asm/dsp.h> - #include <asm/fpu.h> -+#include <asm/irq.h> - #include <asm/msa.h> - #include <asm/pgtable.h> - #include <asm/mipsregs.h> -@@ -556,7 +557,19 @@ EXPORT_SYMBOL(unwind_stack_by_address); - unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, - unsigned long pc, unsigned long *ra) - { -- unsigned long stack_page = (unsigned long)task_stack_page(task); -+ unsigned long stack_page = 0; -+ int cpu; -+ -+ for_each_possible_cpu(cpu) { -+ if (on_irq_stack(cpu, *sp)) { -+ stack_page = (unsigned long)irq_stack[cpu]; -+ break; -+ } -+ } -+ -+ if (!stack_page) -+ stack_page = (unsigned long)task_stack_page(task); -+ - return unwind_stack_by_address(stack_page, sp, pc, ra); - } - #endif diff --git a/target/linux/generic/patches-4.9/040-03-MIPS-Only-change-28-to-thread_info-if-coming-from-us.patch b/target/linux/generic/patches-4.9/040-03-MIPS-Only-change-28-to-thread_info-if-coming-from-us.patch deleted file mode 100644 index e13c67b..0000000 --- a/target/linux/generic/patches-4.9/040-03-MIPS-Only-change-28-to-thread_info-if-coming-from-us.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Matt Redfearn <matt.redfearn@imgtec.com> -Date: Mon, 19 Dec 2016 14:20:58 +0000 -Subject: [PATCH] MIPS: Only change $28 to thread_info if coming from user - mode - -The SAVE_SOME macro is used to save the execution context on all -exceptions. -If an exception occurs while executing user code, the stack is switched -to the kernel's stack for the current task, and register $28 is switched -to point to the current_thread_info, which is at the bottom of the stack -region. -If the exception occurs while executing kernel code, the stack is left, -and this change ensures that register $28 is not updated. This is the -correct behaviour when the kernel can be executing on the separate irq -stack, because the thread_info will not be at the base of it. - -With this change, register $28 is only switched to it's kernel -conventional usage of the currrent thread info pointer at the point at -which execution enters kernel space. Doing it on every exception was -redundant, but OK without an IRQ stack, but will be erroneous once that -is introduced. - -Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> -Reviewed-by: Maciej W. Rozycki <macro@imgtec.com> ---- - ---- a/arch/mips/include/asm/stackframe.h -+++ b/arch/mips/include/asm/stackframe.h -@@ -216,12 +216,19 @@ - LONG_S $25, PT_R25(sp) - LONG_S $28, PT_R28(sp) - LONG_S $31, PT_R31(sp) -+ -+ /* Set thread_info if we're coming from user mode */ -+ mfc0 k0, CP0_STATUS -+ sll k0, 3 /* extract cu0 bit */ -+ bltz k0, 9f -+ - ori $28, sp, _THREAD_MASK - xori $28, _THREAD_MASK - #ifdef CONFIG_CPU_CAVIUM_OCTEON - .set mips64 - pref 0, 0($28) /* Prefetch the current pointer */ - #endif -+9: - .set pop - .endm - diff --git a/target/linux/generic/patches-4.9/040-04-MIPS-Switch-to-the-irq_stack-in-interrupts.patch b/target/linux/generic/patches-4.9/040-04-MIPS-Switch-to-the-irq_stack-in-interrupts.patch deleted file mode 100644 index 0c7e45b..0000000 --- a/target/linux/generic/patches-4.9/040-04-MIPS-Switch-to-the-irq_stack-in-interrupts.patch +++ /dev/null @@ -1,116 +0,0 @@ -From: Matt Redfearn <matt.redfearn@imgtec.com> -Date: Mon, 19 Dec 2016 14:20:59 +0000 -Subject: [PATCH] MIPS: Switch to the irq_stack in interrupts - -When enterring interrupt context via handle_int or except_vec_vi, switch -to the irq_stack of the current CPU if it is not already in use. - -The current stack pointer is masked with the thread size and compared to -the base or the irq stack. If it does not match then the stack pointer -is set to the top of that stack, otherwise this is a nested irq being -handled on the irq stack so the stack pointer should be left as it was. - -The in-use stack pointer is placed in the callee saved register s1. It -will be saved to the stack when plat_irq_dispatch is invoked and can be -restored once control returns here. - -Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> ---- - ---- a/arch/mips/kernel/genex.S -+++ b/arch/mips/kernel/genex.S -@@ -187,9 +187,44 @@ NESTED(handle_int, PT_SIZE, sp) - - LONG_L s0, TI_REGS($28) - LONG_S sp, TI_REGS($28) -- PTR_LA ra, ret_from_irq -- PTR_LA v0, plat_irq_dispatch -- jr v0 -+ -+ /* -+ * SAVE_ALL ensures we are using a valid kernel stack for the thread. -+ * Check if we are already using the IRQ stack. -+ */ -+ move s1, sp # Preserve the sp -+ -+ /* Get IRQ stack for this CPU */ -+ ASM_CPUID_MFC0 k0, ASM_SMP_CPUID_REG -+#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32) -+ lui k1, %hi(irq_stack) -+#else -+ lui k1, %highest(irq_stack) -+ daddiu k1, %higher(irq_stack) -+ dsll k1, 16 -+ daddiu k1, %hi(irq_stack) -+ dsll k1, 16 -+#endif -+ LONG_SRL k0, SMP_CPUID_PTRSHIFT -+ LONG_ADDU k1, k0 -+ LONG_L t0, %lo(irq_stack)(k1) -+ -+ # Check if already on IRQ stack -+ PTR_LI t1, ~(_THREAD_SIZE-1) -+ and t1, t1, sp -+ beq t0, t1, 2f -+ -+ /* Switch to IRQ stack */ -+ li t1, _IRQ_STACK_SIZE -+ PTR_ADD sp, t0, t1 -+ -+2: -+ jal plat_irq_dispatch -+ -+ /* Restore sp */ -+ move sp, s1 -+ -+ j ret_from_irq - #ifdef CONFIG_CPU_MICROMIPS - nop - #endif -@@ -262,8 +297,44 @@ NESTED(except_vec_vi_handler, 0, sp) - - LONG_L s0, TI_REGS($28) - LONG_S sp, TI_REGS($28) -- PTR_LA ra, ret_from_irq -- jr v0 -+ -+ /* -+ * SAVE_ALL ensures we are using a valid kernel stack for the thread. -+ * Check if we are already using the IRQ stack. -+ */ -+ move s1, sp # Preserve the sp -+ -+ /* Get IRQ stack for this CPU */ -+ ASM_CPUID_MFC0 k0, ASM_SMP_CPUID_REG -+#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32) -+ lui k1, %hi(irq_stack) -+#else -+ lui k1, %highest(irq_stack) -+ daddiu k1, %higher(irq_stack) -+ dsll k1, 16 -+ daddiu k1, %hi(irq_stack) -+ dsll k1, 16 -+#endif -+ LONG_SRL k0, SMP_CPUID_PTRSHIFT -+ LONG_ADDU k1, k0 -+ LONG_L t0, %lo(irq_stack)(k1) -+ -+ # Check if already on IRQ stack -+ PTR_LI t1, ~(_THREAD_SIZE-1) -+ and t1, t1, sp -+ beq t0, t1, 2f -+ -+ /* Switch to IRQ stack */ -+ li t1, _IRQ_STACK_SIZE -+ PTR_ADD sp, t0, t1 -+ -+2: -+ jal plat_irq_dispatch -+ -+ /* Restore sp */ -+ move sp, s1 -+ -+ j ret_from_irq - END(except_vec_vi_handler) - - /* diff --git a/target/linux/generic/patches-4.9/040-05-MIPS-Select-HAVE_IRQ_EXIT_ON_IRQ_STACK.patch b/target/linux/generic/patches-4.9/040-05-MIPS-Select-HAVE_IRQ_EXIT_ON_IRQ_STACK.patch deleted file mode 100644 index a4942b8..0000000 --- a/target/linux/generic/patches-4.9/040-05-MIPS-Select-HAVE_IRQ_EXIT_ON_IRQ_STACK.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Matt Redfearn <matt.redfearn@imgtec.com> -Date: Mon, 19 Dec 2016 14:21:00 +0000 -Subject: [PATCH] MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK - -Since do_IRQ is now invoked on a separate IRQ stack, we select -HAVE_IRQ_EXIT_ON_IRQ_STACK so that softirq's may be invoked directly -from irq_exit(), rather than requiring do_softirq_own_stack. - -Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> ---- - ---- a/arch/mips/Kconfig -+++ b/arch/mips/Kconfig -@@ -9,6 +9,7 @@ config MIPS - select HAVE_CONTEXT_TRACKING - select HAVE_GENERIC_DMA_COHERENT - select HAVE_IDE -+ select HAVE_IRQ_EXIT_ON_IRQ_STACK - select HAVE_OPROFILE - select HAVE_PERF_EVENTS - select PERF_USE_VMALLOC diff --git a/target/linux/generic/patches-4.9/040-06-MIPS-IRQ-Stack-Fix-erroneous-jal-to-plat_irq_dispatc.patch b/target/linux/generic/patches-4.9/040-06-MIPS-IRQ-Stack-Fix-erroneous-jal-to-plat_irq_dispatc.patch deleted file mode 100644 index bb16bb1..0000000 --- a/target/linux/generic/patches-4.9/040-06-MIPS-IRQ-Stack-Fix-erroneous-jal-to-plat_irq_dispatc.patch +++ /dev/null @@ -1,35 +0,0 @@ -From de856416e7143e32afc4849625616554aa060f7a Mon Sep 17 00:00:00 2001 -From: Matt Redfearn <matt.redfearn@imgtec.com> -Date: Wed, 25 Jan 2017 17:00:25 +0000 -Subject: [PATCH] MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch - -Commit dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts") -changed both the normal and vectored interrupt handlers. Unfortunately -the vectored version, "except_vec_vi_handler", was incorrectly modified -to unconditionally jal to plat_irq_dispatch, rather than doing a jalr to -the vectored handler that has been set up. This is ok for many platforms -which set the vectored handler to plat_irq_dispatch anyway, but will -cause problems with platforms that use other handlers. - -Fixes: dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts") -Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> -Cc: Ralf Baechle <ralf@linux-mips.org> -Cc: Paul Burton <paul.burton@imgtec.com> -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/15110/ -Signed-off-by: James Hogan <james.hogan@imgtec.com> ---- - arch/mips/kernel/genex.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/kernel/genex.S -+++ b/arch/mips/kernel/genex.S -@@ -329,7 +329,7 @@ NESTED(except_vec_vi_handler, 0, sp) - PTR_ADD sp, t0, t1 - - 2: -- jal plat_irq_dispatch -+ jalr v0 - - /* Restore sp */ - move sp, s1 diff --git a/target/linux/generic/patches-4.9/060-0001-mtd-bcm47xxpart-fix-parsing-first-block-after-aligne.patch b/target/linux/generic/patches-4.9/060-0001-mtd-bcm47xxpart-fix-parsing-first-block-after-aligne.patch deleted file mode 100644 index 7eed777..0000000 --- a/target/linux/generic/patches-4.9/060-0001-mtd-bcm47xxpart-fix-parsing-first-block-after-aligne.patch +++ /dev/null @@ -1,40 +0,0 @@ -From bd5d21310133921021d78995ad6346f908483124 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> -Date: Sun, 20 Nov 2016 16:09:30 +0100 -Subject: [PATCH] mtd: bcm47xxpart: fix parsing first block after aligned TRX -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -After parsing TRX we should skip to the first block placed behind it. -Our code was working only with TRX with length not aligned to the -blocksize. In other cases (length aligned) it was missing the block -places right after TRX. - -This fixes calculation and simplifies the comment. - -Signed-off-by: Rafał Miłecki <rafal@milecki.pl> -Signed-off-by: Brian Norris <computersforpeace@gmail.com> ---- - drivers/mtd/bcm47xxpart.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - ---- a/drivers/mtd/bcm47xxpart.c -+++ b/drivers/mtd/bcm47xxpart.c -@@ -229,12 +229,10 @@ static int bcm47xxpart_parse(struct mtd_ - - last_trx_part = curr_part - 1; - -- /* -- * We have whole TRX scanned, skip to the next part. Use -- * roundown (not roundup), as the loop will increase -- * offset in next step. -- */ -- offset = rounddown(offset + trx->length, blocksize); -+ /* Jump to the end of TRX */ -+ offset = roundup(offset + trx->length, blocksize); -+ /* Next loop iteration will increase the offset */ -+ offset -= blocksize; - continue; - } - diff --git a/target/linux/generic/patches-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/patches-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index ffc1ae6..22ee360 100644 --- a/target/linux/generic/patches-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/patches-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -75,7 +75,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de> --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -5893,7 +5893,7 @@ static void __ref alloc_node_mem_map(str +@@ -5894,7 +5894,7 @@ static void __ref alloc_node_mem_map(str mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/patches-4.9/630-packet_socket_type.patch b/target/linux/generic/patches-4.9/630-packet_socket_type.patch index 4f093e4..00d78dc 100644 --- a/target/linux/generic/patches-4.9/630-packet_socket_type.patch +++ b/target/linux/generic/patches-4.9/630-packet_socket_type.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3813,6 +3816,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3815,6 +3818,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -108,7 +108,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> default: return -ENOPROTOOPT; } -@@ -3865,6 +3878,13 @@ static int packet_getsockopt(struct sock +@@ -3867,6 +3880,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 77ba222..a0a74077 100644 --- a/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/patches-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -302,7 +302,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1281,6 +1421,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1283,6 +1423,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str { struct ip6_tnl *t = netdev_priv(dev); struct ipv6hdr *ipv6h = ipv6_hdr(skb); @@ -310,7 +310,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> int encap_limit = -1; __u16 offset; struct flowi6 fl6; -@@ -1336,6 +1477,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1338,6 +1479,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_mark = skb->mark; } @@ -329,7 +329,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1461,6 +1614,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1463,6 +1616,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.flowinfo = p->flowinfo; t->parms.link = p->link; t->parms.proto = p->proto; @@ -344,7 +344,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1499,6 +1660,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1501,6 +1662,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -352,7 +352,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1876,6 +2038,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1878,6 +2040,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -368,7 +368,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1910,6 +2081,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1912,6 +2083,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_COLLECT_METADATA]) parms->collect_md = true; @@ -415,7 +415,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2019,6 +2230,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2021,6 +2232,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -428,7 +428,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2046,6 +2263,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2048,6 +2265,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(2) + /* IFLA_IPTUN_COLLECT_METADATA */ nla_total_size(0) + @@ -453,7 +453,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> 0; } -@@ -2053,6 +2288,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2055,6 +2290,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -463,7 +463,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2061,9 +2299,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2063,9 +2301,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) || nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || @@ -492,7 +492,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> 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) || -@@ -2101,6 +2357,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2103,6 +2359,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_SPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, diff --git a/target/linux/generic/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 7c5cb45..7e6dd49 100644 --- a/target/linux/generic/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/patches-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -143,7 +143,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -1953,6 +1970,11 @@ static struct rt6_info *ip6_route_info_c +@@ -1957,6 +1974,11 @@ static struct rt6_info *ip6_route_info_c rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -155,7 +155,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -2594,6 +2616,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -2600,6 +2622,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -173,7 +173,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2829,7 +2862,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2835,7 +2868,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 || @@ -183,7 +183,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3207,6 +3241,9 @@ static int rt6_fill_node(struct net *net +@@ -3213,6 +3247,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -193,7 +193,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3480,6 +3517,8 @@ static int ip6_route_dev_notify(struct n +@@ -3489,6 +3526,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); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3696,6 +3735,17 @@ static int __net_init ip6_route_net_init +@@ -3711,6 +3750,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); @@ -220,7 +220,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3714,6 +3764,8 @@ out: +@@ -3729,6 +3779,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -229,7 +229,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3731,6 +3783,7 @@ static void __net_exit ip6_route_net_exi +@@ -3746,6 +3798,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); @@ -237,7 +237,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3828,6 +3881,9 @@ int __init ip6_route_init(void) +@@ -3819,6 +3872,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); @@ -245,5 +245,5 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> + init_net.ipv6.ip6_policy_failed_entry->rt6i_idev = + in6_dev_get(init_net.loopback_dev); #endif - ret = fib6_init(); - if (ret) + } + diff --git a/target/linux/generic/patches-4.9/701-phy_extension.patch b/target/linux/generic/patches-4.9/701-phy_extension.patch index 6c49fb4..95e2c82 100644 --- a/target/linux/generic/patches-4.9/701-phy_extension.patch +++ b/target/linux/generic/patches-4.9/701-phy_extension.patch @@ -53,7 +53,7 @@ * @phydev: the phy_device struct --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -812,6 +812,7 @@ int phy_ethtool_ksettings_get(struct phy +@@ -813,6 +813,7 @@ int phy_ethtool_ksettings_get(struct phy struct ethtool_link_ksettings *cmd); int phy_ethtool_ksettings_set(struct phy_device *phydev, const struct ethtool_link_ksettings *cmd); diff --git a/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch b/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch index 32c2e32..08c094b 100644 --- a/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch +++ b/target/linux/generic/patches-4.9/710-phy-add-mdio_register_board_info.patch @@ -50,7 +50,7 @@ phy_device_free(phydev); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -855,6 +855,23 @@ void mdio_bus_exit(void); +@@ -856,6 +856,23 @@ void mdio_bus_exit(void); extern struct bus_type mdio_bus_type; diff --git a/target/linux/generic/patches-4.9/810-pci_disable_common_quirks.patch b/target/linux/generic/patches-4.9/810-pci_disable_common_quirks.patch index 99ffb5e..cb9fa19 100644 --- a/target/linux/generic/patches-4.9/810-pci_disable_common_quirks.patch +++ b/target/linux/generic/patches-4.9/810-pci_disable_common_quirks.patch @@ -23,7 +23,7 @@ /* The Mellanox Tavor device gives false positive parity errors * Mark this device with a broken_parity_status, to allow * PCI scanning code to "skip" this now blacklisted device. -@@ -3016,6 +3017,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I +@@ -3038,6 +3039,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); @@ -31,7 +31,7 @@ /* * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. To -@@ -3072,6 +3074,8 @@ static void fixup_debug_report(struct pc +@@ -3094,6 +3096,8 @@ static void fixup_debug_report(struct pc } } @@ -40,7 +40,7 @@ /* * Some BIOS implementations leave the Intel GPU interrupts enabled, * even though no one is handling them (f.e. i915 driver is never loaded). -@@ -3106,6 +3110,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN +@@ -3128,6 +3132,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); diff --git a/target/linux/generic/patches-4.9/904-debloat_dma_buf.patch b/target/linux/generic/patches-4.9/904-debloat_dma_buf.patch index 91a3870..25c9851 100644 --- a/target/linux/generic/patches-4.9/904-debloat_dma_buf.patch +++ b/target/linux/generic/patches-4.9/904-debloat_dma_buf.patch @@ -32,7 +32,7 @@ #include <uapi/linux/dma-buf.h> -@@ -974,4 +975,5 @@ static void __exit dma_buf_deinit(void) +@@ -977,4 +978,5 @@ static void __exit dma_buf_deinit(void) { dma_buf_uninit_debugfs(); } diff --git a/target/linux/imx6/patches-4.9/0003-mmc-sdhci-esdhc-imx-increase-the-pad-I-O-drive-stren.patch b/target/linux/imx6/patches-4.9/0003-mmc-sdhci-esdhc-imx-increase-the-pad-I-O-drive-stren.patch deleted file mode 100644 index f97e829..0000000 --- a/target/linux/imx6/patches-4.9/0003-mmc-sdhci-esdhc-imx-increase-the-pad-I-O-drive-stren.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 9f327845358d3dd0d8a5a7a5436b0aa5c432e757 Mon Sep 17 00:00:00 2001 -From: Haibo Chen <haibo.chen@nxp.com> -Date: Wed, 19 Apr 2017 10:53:51 +0800 -Subject: [PATCH] mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for - DDR50 card - -Currently for DDR50 card, it need tuning in default. We meet tuning fail -issue for DDR50 card and some data CRC error when DDR50 sd card works. - -This is because the default pad I/O drive strength can't make sure DDR50 -card work stable. So increase the pad I/O drive strength for DDR50 card, -and use pins_100mhz. - -This fixes DDR50 card support for IMX since DDR50 tuning was enabled from -commit 9faac7b95ea4 ("mmc: sdhci: enable tuning for DDR50") - -Tested-and-reported-by: Tim Harvey <tharvey@gateworks.com> -Signed-off-by: Haibo Chen <haibo.chen@nxp.com> -Cc: stable@vger.kernel.org # v4.4+ -Acked-by: Dong Aisheng <aisheng.dong@nxp.com> -Acked-by: Adrian Hunter <adrian.hunter@intel.com> -Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> -Signed-off-by: Tim Harvey <tharvey@gateworks.com> ---- - drivers/mmc/host/sdhci-esdhc-imx.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c -index 7123ef9..445fc47 100644 ---- a/drivers/mmc/host/sdhci-esdhc-imx.c -+++ b/drivers/mmc/host/sdhci-esdhc-imx.c -@@ -830,6 +830,7 @@ static int esdhc_change_pinstate(struct sdhci_host *host, - - switch (uhs) { - case MMC_TIMING_UHS_SDR50: -+ case MMC_TIMING_UHS_DDR50: - pinctrl = imx_data->pins_100mhz; - break; - case MMC_TIMING_UHS_SDR104: --- -2.7.4 - diff --git a/target/linux/ipq806x/patches-4.9/0032-phy-add-qcom-dwc3-phy.patch b/target/linux/ipq806x/patches-4.9/0032-phy-add-qcom-dwc3-phy.patch index 261836e..a15a0d3 100644 --- a/target/linux/ipq806x/patches-4.9/0032-phy-add-qcom-dwc3-phy.patch +++ b/target/linux/ipq806x/patches-4.9/0032-phy-add-qcom-dwc3-phy.patch @@ -13,7 +13,7 @@ Signed-off-by: Andy Gross <agross@codeaurora.org> --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig -@@ -489,4 +489,16 @@ config PHY_NS2_PCIE +@@ -490,4 +490,16 @@ config PHY_NS2_PCIE help Enable this to support the Broadcom Northstar2 PCIe PHY. If unsure, say N. diff --git a/target/linux/ipq806x/patches-4.9/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch b/target/linux/ipq806x/patches-4.9/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch index 40656d1..c6a0470 100644 --- a/target/linux/ipq806x/patches-4.9/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch +++ b/target/linux/ipq806x/patches-4.9/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch @@ -45,7 +45,7 @@ Signed-off-by: Ajay Kishore <akisho@codeaurora.org> + } --- a/drivers/firmware/qcom_scm-64.c +++ b/drivers/firmware/qcom_scm-64.c -@@ -358,3 +358,12 @@ int __qcom_scm_pas_mss_reset(struct devi +@@ -365,3 +365,12 @@ int __qcom_scm_pas_mss_reset(struct devi return ret ? : res.a1; } diff --git a/target/linux/lantiq/patches-4.9/0008-MIPS-lantiq-backport-old-timer-code.patch b/target/linux/lantiq/patches-4.9/0008-MIPS-lantiq-backport-old-timer-code.patch index 5525503..f36a79a 100644 --- a/target/linux/lantiq/patches-4.9/0008-MIPS-lantiq-backport-old-timer-code.patch +++ b/target/linux/lantiq/patches-4.9/0008-MIPS-lantiq-backport-old-timer-code.patch @@ -176,7 +176,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> -obj-y := prom.o sysctrl.o clk.o reset.o dma.o gptu.o dcdc.o +obj-y := prom.o sysctrl.o clk.o reset.o dma.o timer.o dcdc.o - obj-y += vmmc.o tffs.o + obj-y += vmmc.o --- /dev/null +++ b/arch/mips/lantiq/xway/timer.c 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 a25e87a..fbd5a04 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 <blogic@openwrt.org> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1000,7 +1000,8 @@ void phy_state_machine(struct work_struc +@@ -1032,7 +1032,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 <blogic@openwrt.org> phydev->adjust_link(phydev->attached_dev); break; } -@@ -1083,7 +1084,8 @@ void phy_state_machine(struct work_struc +@@ -1115,7 +1116,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 <blogic@openwrt.org> } phydev->adjust_link(phydev->attached_dev); -@@ -1095,7 +1097,8 @@ void phy_state_machine(struct work_struc +@@ -1127,7 +1129,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/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.9/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index d79b401..d875c55 100644 --- a/target/linux/lantiq/patches-4.9/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-4.9/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -29,7 +29,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +++ b/arch/mips/lantiq/xway/Makefile @@ -2,4 +2,7 @@ obj-y := prom.o sysctrl.o clk.o reset.o - obj-y += vmmc.o tffs.o + obj-y += vmmc.o +obj-y += eth_mac.o +obj-$(CONFIG_PCI) += ath5k_eep.o diff --git a/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch b/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch index 92ff5eb..e3347be 100644 --- a/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch +++ b/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1000,7 +1000,8 @@ void phy_state_machine(struct work_struc +@@ -1032,7 +1032,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 <blogic@openwrt.org> phydev->adjust_link(phydev->attached_dev); break; } -@@ -1083,7 +1084,8 @@ void phy_state_machine(struct work_struc +@@ -1115,7 +1116,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 <blogic@openwrt.org> } phydev->adjust_link(phydev->attached_dev); -@@ -1095,7 +1097,8 @@ void phy_state_machine(struct work_struc +@@ -1127,7 +1129,8 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch b/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch index 28b3d7f..ce38640 100644 --- a/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch +++ b/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch @@ -16,10 +16,8 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 include/dt-bindings/power/mt2701-power.h -Index: linux-4.9.14/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt -=================================================================== ---- linux-4.9.14.orig/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt -+++ linux-4.9.14/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt +--- a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt ++++ b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt @@ -9,17 +9,20 @@ domain control. The driver implements the Generic PM domain bindings described in @@ -46,10 +44,8 @@ Index: linux-4.9.14/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt Optional properties: - vdec-supply: Power supply for the vdec power domain -Index: linux-4.9.14/include/dt-bindings/power/mt2701-power.h -=================================================================== --- /dev/null -+++ linux-4.9.14/include/dt-bindings/power/mt2701-power.h ++++ b/include/dt-bindings/power/mt2701-power.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2015 MediaTek Inc. diff --git a/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch b/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch index 4c9e790..0786e52 100644 --- a/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch +++ b/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch @@ -12,8 +12,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> drivers/soc/mediatek/mtk-scpsys.c | 348 +++++++++++++++++++++++--------------- 1 file changed, 210 insertions(+), 138 deletions(-) -diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c -index 837effe19907..722aac80e611 100644 --- a/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -11,17 +11,15 @@ @@ -181,7 +179,7 @@ index 837effe19907..722aac80e611 100644 struct genpd_onecell_data pd_data; struct device *dev; void __iomem *base; -@@ -408,57 +324,55 @@ static bool scpsys_active_wakeup(struct device *dev) +@@ -408,57 +324,55 @@ static bool scpsys_active_wakeup(struct return scpd->data->active_wakeup; } @@ -262,7 +260,7 @@ index 837effe19907..722aac80e611 100644 struct scp_domain *scpd = &scp->domains[i]; const struct scp_domain_data *data = &scp_domain_data[i]; -@@ -467,13 +381,15 @@ static int scpsys_probe(struct platform_device *pdev) +@@ -467,13 +381,15 @@ static int scpsys_probe(struct platform_ if (PTR_ERR(scpd->supply) == -ENODEV) scpd->supply = NULL; else @@ -273,15 +271,15 @@ index 837effe19907..722aac80e611 100644 - pd_data->num_domains = NUM_DOMAINS; + pd_data->num_domains = num; ++ ++ init_clks(pdev, clk); - for (i = 0; i < NUM_DOMAINS; i++) { -+ init_clks(pdev, clk); -+ + for (i = 0; i < num; i++) { struct scp_domain *scpd = &scp->domains[i]; struct generic_pm_domain *genpd = &scpd->genpd; const struct scp_domain_data *data = &scp_domain_data[i]; -@@ -482,13 +398,37 @@ static int scpsys_probe(struct platform_device *pdev) +@@ -482,13 +398,37 @@ static int scpsys_probe(struct platform_ scpd->scp = scp; scpd->data = data; @@ -321,7 +319,7 @@ index 837effe19907..722aac80e611 100644 /* * Initially turn on all domains to make the domains usable -@@ -507,6 +447,123 @@ static int scpsys_probe(struct platform_device *pdev) +@@ -507,6 +447,123 @@ static int scpsys_probe(struct platform_ * valid. */ @@ -445,7 +443,7 @@ index 837effe19907..722aac80e611 100644 ret = pm_genpd_add_subdomain(pd_data->domains[MT8173_POWER_DOMAIN_MFG_ASYNC], pd_data->domains[MT8173_POWER_DOMAIN_MFG_2D]); if (ret && IS_ENABLED(CONFIG_PM)) -@@ -517,21 +574,36 @@ static int scpsys_probe(struct platform_device *pdev) +@@ -517,21 +574,36 @@ static int scpsys_probe(struct platform_ if (ret && IS_ENABLED(CONFIG_PM)) dev_err(&pdev->dev, "Failed to add subdomain: %d\n", ret); @@ -486,6 +484,3 @@ index 837effe19907..722aac80e611 100644 static struct platform_driver scpsys_drv = { .probe = scpsys_probe, .driver = { --- -2.11.0 - diff --git a/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch b/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch index c56a8a9..5147149 100644 --- a/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch +++ b/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch @@ -17,10 +17,8 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> drivers/soc/mediatek/mtk-scpsys.c | 117 +++++++++++++++++++++++++++++++++++++- 2 files changed, 117 insertions(+), 2 deletions(-) -Index: linux-4.9.14/drivers/soc/mediatek/Kconfig -=================================================================== ---- linux-4.9.14.orig/drivers/soc/mediatek/Kconfig -+++ linux-4.9.14/drivers/soc/mediatek/Kconfig +--- a/drivers/soc/mediatek/Kconfig ++++ b/drivers/soc/mediatek/Kconfig @@ -23,7 +23,7 @@ config MTK_PMIC_WRAP config MTK_SCPSYS bool "MediaTek SCPSYS Support" @@ -30,10 +28,8 @@ Index: linux-4.9.14/drivers/soc/mediatek/Kconfig select REGMAP select MTK_INFRACFG select PM_GENERIC_DOMAINS if PM -Index: linux-4.9.14/drivers/soc/mediatek/mtk-scpsys.c -=================================================================== ---- linux-4.9.14.orig/drivers/soc/mediatek/mtk-scpsys.c -+++ linux-4.9.14/drivers/soc/mediatek/mtk-scpsys.c +--- a/drivers/soc/mediatek/mtk-scpsys.c ++++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -20,6 +20,7 @@ #include <linux/regulator/consumer.h> #include <linux/soc/mediatek/infracfg.h> diff --git a/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch b/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch index cf604f4..19be772 100644 --- a/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch +++ b/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch @@ -13,10 +13,8 @@ Signed-off-by: John Crispin <john@phrozen.org> 5 files changed, 279 insertions(+) create mode 100644 drivers/pwm/pwm-mediatek.c -Index: linux-4.9.17/drivers/pwm/Kconfig -=================================================================== ---- linux-4.9.17.orig/drivers/pwm/Kconfig -+++ linux-4.9.17/drivers/pwm/Kconfig +--- a/drivers/pwm/Kconfig ++++ b/drivers/pwm/Kconfig @@ -282,6 +282,15 @@ config PWM_MTK_DISP To compile this driver as a module, choose M here: the module will be called pwm-mtk-disp. @@ -33,10 +31,8 @@ Index: linux-4.9.17/drivers/pwm/Kconfig config PWM_MXS tristate "Freescale MXS PWM support" depends on ARCH_MXS && OF -Index: linux-4.9.17/drivers/pwm/Makefile -=================================================================== ---- linux-4.9.17.orig/drivers/pwm/Makefile -+++ linux-4.9.17/drivers/pwm/Makefile +--- a/drivers/pwm/Makefile ++++ b/drivers/pwm/Makefile @@ -25,6 +25,7 @@ obj-$(CONFIG_PWM_LPSS) += pwm-lpss.o obj-$(CONFIG_PWM_LPSS_PCI) += pwm-lpss-pci.o obj-$(CONFIG_PWM_LPSS_PLATFORM) += pwm-lpss-platform.o @@ -45,10 +41,8 @@ Index: linux-4.9.17/drivers/pwm/Makefile obj-$(CONFIG_PWM_MTK_DISP) += pwm-mtk-disp.o obj-$(CONFIG_PWM_MXS) += pwm-mxs.o obj-$(CONFIG_PWM_OMAP_DMTIMER) += pwm-omap-dmtimer.o -Index: linux-4.9.17/drivers/pwm/pwm-mediatek.c -=================================================================== --- /dev/null -+++ linux-4.9.17/drivers/pwm/pwm-mediatek.c ++++ b/drivers/pwm/pwm-mediatek.c @@ -0,0 +1,230 @@ +/* + * Mediatek Pulse Width Modulator driver diff --git a/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch b/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch index a72da69..f743e10 100644 --- a/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch +++ b/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch @@ -26,11 +26,9 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com> drivers/mfd/mt6397-core.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c -index e14d8b0..8e601c8 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c -@@ -48,6 +48,10 @@ +@@ -48,6 +48,10 @@ static const struct mfd_cell mt6323_devs .name = "mt6323-regulator", .of_compatible = "mediatek,mt6323-regulator" }, diff --git a/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch b/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch index 96662dd..dee31cd 100644 --- a/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch +++ b/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch @@ -26,9 +26,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com> 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt -diff --git a/Documentation/devicetree/bindings/leds/leds-mt6323.txt b/Documentation/devicetree/bindings/leds/leds-mt6323.txt -new file mode 100644 -index 0000000..ac38472 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-mt6323.txt @@ -0,0 +1,60 @@ diff --git a/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch b/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch index 215b1b0..2edb4ba 100644 --- a/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch +++ b/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch @@ -26,11 +26,9 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com> Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + 1 file changed, 1 insertion(+) -diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt -index c568d52..522a3bb 100644 --- a/Documentation/devicetree/bindings/mfd/mt6397.txt +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt -@@ -6,6 +6,7 @@ MT6397/MT6323 is a multifunction device with the following sub modules: +@@ -6,6 +6,7 @@ MT6397/MT6323 is a multifunction device - Audio codec - GPIO - Clock diff --git a/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch b/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch index f3bc921..f0d706c 100644 --- a/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch +++ b/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch @@ -30,10 +30,8 @@ Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> 3 files changed, 511 insertions(+) create mode 100644 drivers/leds/leds-mt6323.c -Index: linux-4.9.17/drivers/leds/Kconfig -=================================================================== ---- linux-4.9.17.orig/drivers/leds/Kconfig -+++ linux-4.9.17/drivers/leds/Kconfig +--- a/drivers/leds/Kconfig ++++ b/drivers/leds/Kconfig @@ -117,6 +117,14 @@ config LEDS_MIKROTIK_RB532 This option enables support for the so called "User LED" of Mikrotik's Routerboard 532. @@ -49,10 +47,8 @@ Index: linux-4.9.17/drivers/leds/Kconfig config LEDS_S3C24XX tristate "LED Support for Samsung S3C24XX GPIO LEDs" depends on LEDS_CLASS -Index: linux-4.9.17/drivers/leds/leds-mt6323.c -=================================================================== --- /dev/null -+++ linux-4.9.17/drivers/leds/leds-mt6323.c ++++ b/drivers/leds/leds-mt6323.c @@ -0,0 +1,502 @@ +/* + * LED driver for Mediatek MT6323 PMIC diff --git a/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch b/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch index 701dcec..888218b 100644 --- a/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch +++ b/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch @@ -28,11 +28,9 @@ Acked-by: Lee Jones <lee.jones@linaro.org> drivers/mfd/mt6397-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c -index 8e601c8..04a601f 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c -@@ -47,8 +47,7 @@ +@@ -47,8 +47,7 @@ static const struct mfd_cell mt6323_devs { .name = "mt6323-regulator", .of_compatible = "mediatek,mt6323-regulator" diff --git a/target/linux/mediatek/patches-4.9/0091-dsa1.patch b/target/linux/mediatek/patches-4.9/0091-dsa1.patch index c9bad93..ffc63dc 100644 --- a/target/linux/mediatek/patches-4.9/0091-dsa1.patch +++ b/target/linux/mediatek/patches-4.9/0091-dsa1.patch @@ -27,9 +27,6 @@ Acked-by: Rob Herring <robh@kernel.org> 1 file changed, 92 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dsa/mt7530.txt -diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt -new file mode 100644 -index 0000000..a9bc27b --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt @@ -0,0 +1,92 @@ diff --git a/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch b/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch index 5ae90e3..6e65d27 100644 --- a/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch +++ b/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch @@ -16,10 +16,8 @@ Signed-off-by: John Crispin <john@phrozen.org> drivers/net/ethernet/mediatek/mtk_eth_soc.c | 33 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) -Index: linux-4.9.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c -=================================================================== ---- linux-4.9.14.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ linux-4.9.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -706,7 +706,16 @@ static int mtk_tx_map(struct sk_buff *sk WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) | (!nr_frags * TX_DMA_LS0))); diff --git a/target/linux/mediatek/patches-4.9/0092-dsa2.patch b/target/linux/mediatek/patches-4.9/0092-dsa2.patch index 84e5cb4..a5b4242 100644 --- a/target/linux/mediatek/patches-4.9/0092-dsa2.patch +++ b/target/linux/mediatek/patches-4.9/0092-dsa2.patch @@ -36,11 +36,9 @@ Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> 6 files changed, 127 insertions(+) create mode 100644 net/dsa/tag_mtk.c -diff --git a/include/net/dsa.h b/include/net/dsa.h -index 4e13e69..3276547 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h -@@ -31,6 +31,7 @@ enum dsa_tag_protocol { +@@ -27,6 +27,7 @@ enum dsa_tag_protocol { DSA_TAG_PROTO_EDSA, DSA_TAG_PROTO_BRCM, DSA_TAG_PROTO_QCA, @@ -48,31 +46,25 @@ index 4e13e69..3276547 100644 DSA_TAG_LAST, /* MUST BE LAST */ }; -diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig -index 9649238..d78789b 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig -@@ -31,4 +31,6 @@ config NET_DSA_TAG_TRAILER +@@ -41,4 +41,6 @@ config NET_DSA_TAG_TRAILER config NET_DSA_TAG_QCA bool +config NET_DSA_TAG_MTK + bool endif -diff --git a/net/dsa/Makefile b/net/dsa/Makefile -index 31d3437..9b1d478 100644 --- a/net/dsa/Makefile +++ b/net/dsa/Makefile -@@ -8,3 +8,4 @@ dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o +@@ -8,3 +8,4 @@ dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += ta dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o dsa_core-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o +dsa_core-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o -diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c -index b6d4f6a..617f736 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c -@@ -53,6 +53,9 @@ static struct sk_buff *dsa_slave_notag_xmit(struct sk_buff *skb, +@@ -57,6 +57,9 @@ const struct dsa_device_ops *dsa_device_ #ifdef CONFIG_NET_DSA_TAG_QCA [DSA_TAG_PROTO_QCA] = &qca_netdev_ops, #endif @@ -82,11 +74,9 @@ index b6d4f6a..617f736 100644 [DSA_TAG_PROTO_NONE] = &none_ops, }; -diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h -index 0706a51..2a31399 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h -@@ -85,4 +85,7 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent, +@@ -84,4 +84,7 @@ extern const struct dsa_device_ops brcm_ /* tag_qca.c */ extern const struct dsa_device_ops qca_netdev_ops; @@ -94,9 +84,6 @@ index 0706a51..2a31399 100644 +extern const struct dsa_device_ops mtk_netdev_ops; + #endif -diff --git a/net/dsa/tag_mtk.c b/net/dsa/tag_mtk.c -new file mode 100644 -index 0000000..833a9d6 --- /dev/null +++ b/net/dsa/tag_mtk.c @@ -0,0 +1,117 @@ diff --git a/target/linux/mediatek/patches-4.9/0092-dsa3.patch b/target/linux/mediatek/patches-4.9/0092-dsa3.patch index 7c4dc4f..385add1 100644 --- a/target/linux/mediatek/patches-4.9/0092-dsa3.patch +++ b/target/linux/mediatek/patches-4.9/0092-dsa3.patch @@ -33,11 +33,9 @@ Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++++ 2 files changed, 10 insertions(+) -diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -index 9e75768..c21ed99 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1846,6 +1846,12 @@ static int mtk_hw_init(struct mtk_eth *eth) +@@ -1855,6 +1855,12 @@ static int mtk_hw_init(struct mtk_eth *e /* GE2, Force 1000M/FD, FC ON */ mtk_w32(eth, MAC_MCR_FIXED_LINK, MTK_MAC_MCR(1)); @@ -50,8 +48,6 @@ index 9e75768..c21ed99 100644 /* Enable RX VLan Offloading */ mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); -diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -index 99b1c8e..996024d 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -70,6 +70,10 @@ diff --git a/target/linux/mediatek/patches-4.9/0092-dsa4.patch b/target/linux/mediatek/patches-4.9/0092-dsa4.patch index d67b4a9..4daebfb 100644 --- a/target/linux/mediatek/patches-4.9/0092-dsa4.patch +++ b/target/linux/mediatek/patches-4.9/0092-dsa4.patch @@ -31,11 +31,9 @@ Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -index c21ed99..84b09a4 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2323,6 +2323,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) +@@ -2333,6 +2333,8 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->ethtool_ops = &mtk_ethtool_ops; eth->netdev[id]->irq = eth->irq[0]; diff --git a/target/linux/mediatek/patches-4.9/0092-dsa5.patch b/target/linux/mediatek/patches-4.9/0092-dsa5.patch index 6c10137..63a40d0 100644 --- a/target/linux/mediatek/patches-4.9/0092-dsa5.patch +++ b/target/linux/mediatek/patches-4.9/0092-dsa5.patch @@ -49,8 +49,6 @@ Signed-off-by: Landen Chao <Landen.Chao@mediatek.com> create mode 100644 drivers/net/dsa/mt7530.c create mode 100644 drivers/net/dsa/mt7530.h -diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig -index 0659846..5b322b4 100644 --- a/drivers/net/dsa/Kconfig +++ b/drivers/net/dsa/Kconfig @@ -34,4 +34,12 @@ config NET_DSA_QCA8K @@ -66,21 +64,16 @@ index 0659846..5b322b4 100644 + chip. + endmenu -diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile -index a3c9416..8e629c1 100644 --- a/drivers/net/dsa/Makefile +++ b/drivers/net/dsa/Makefile -@@ -2,6 +2,6 @@ obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o - obj-$(CONFIG_NET_DSA_BCM_SF2) += bcm-sf2.o - bcm-sf2-objs := bcm_sf2.o bcm_sf2_cfp.o +@@ -1,6 +1,6 @@ + obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o + obj-$(CONFIG_NET_DSA_BCM_SF2) += bcm_sf2.o obj-$(CONFIG_NET_DSA_QCA8K) += qca8k.o - +obj-$(CONFIG_NET_DSA_MT7530) += mt7530.o obj-y += b53/ obj-y += mv88e6xxx/ -diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c -new file mode 100644 -index 0000000..ad2e6f8 --- /dev/null +++ b/drivers/net/dsa/mt7530.c @@ -0,0 +1,1126 @@ @@ -1210,9 +1203,6 @@ index 0000000..ad2e6f8 +MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mediatek-mt7530"); -diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h -new file mode 100644 -index 0000000..05a612f --- /dev/null +++ b/drivers/net/dsa/mt7530.h @@ -0,0 +1,390 @@ diff --git a/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch b/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch index ca36d4c..f69078c 100644 --- a/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch +++ b/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch @@ -1,7 +1,5 @@ -Index: linux-4.9.17/drivers/net/dsa/mt7530.c -=================================================================== ---- linux-4.9.17.orig/drivers/net/dsa/mt7530.c -+++ linux-4.9.17/drivers/net/dsa/mt7530.c +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c @@ -834,6 +834,7 @@ mt7530_port_bridge_join(struct dsa_switc int i; @@ -70,10 +68,8 @@ Index: linux-4.9.17/drivers/net/dsa/mt7530.c } static void -Index: linux-4.9.17/drivers/net/dsa/mt7530.h -=================================================================== ---- linux-4.9.17.orig/drivers/net/dsa/mt7530.h -+++ linux-4.9.17/drivers/net/dsa/mt7530.h +--- a/drivers/net/dsa/mt7530.h ++++ b/drivers/net/dsa/mt7530.h @@ -379,6 +379,8 @@ struct mt7530_priv { struct mt7530_port ports[MT7530_NUM_PORTS]; /* protect among processes for registers access*/ @@ -83,10 +79,8 @@ Index: linux-4.9.17/drivers/net/dsa/mt7530.h }; struct mt7530_hw_stats { -Index: linux-4.9.17/net/dsa/tag_mtk.c -=================================================================== ---- linux-4.9.17.orig/net/dsa/tag_mtk.c -+++ linux-4.9.17/net/dsa/tag_mtk.c +--- a/net/dsa/tag_mtk.c ++++ b/net/dsa/tag_mtk.c @@ -35,7 +35,7 @@ static struct sk_buff *mtk_tag_xmit(stru /* Build the tag after the MAC Source Address */ mtk_tag = skb->data + 2 * ETH_ALEN; diff --git a/target/linux/mediatek/patches-4.9/0094-net-affinity.patch b/target/linux/mediatek/patches-4.9/0094-net-affinity.patch index 8e51bdd..0c468fb 100644 --- a/target/linux/mediatek/patches-4.9/0094-net-affinity.patch +++ b/target/linux/mediatek/patches-4.9/0094-net-affinity.patch @@ -1,7 +1,5 @@ -Index: linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.c -=================================================================== ---- linux-4.9.17.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.c +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2459,15 +2459,23 @@ static int mtk_probe(struct platform_dev goto err_deinit_hw; } @@ -26,10 +24,8 @@ Index: linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.c err = mtk_mdio_init(eth); if (err) -Index: linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.h -=================================================================== ---- linux-4.9.17.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.h -+++ linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.h +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -539,6 +539,7 @@ struct mtk_eth { struct net_device *netdev[MTK_MAX_DEVS]; struct mtk_mac *mac[MTK_MAX_DEVS]; diff --git a/target/linux/mediatek/patches-4.9/0095-ephy.patch b/target/linux/mediatek/patches-4.9/0095-ephy.patch index 52d8299..dc88ca2 100644 --- a/target/linux/mediatek/patches-4.9/0095-ephy.patch +++ b/target/linux/mediatek/patches-4.9/0095-ephy.patch @@ -1,7 +1,5 @@ -Index: linux-4.9.20/drivers/net/dsa/mt7530.c -=================================================================== ---- linux-4.9.20.orig/drivers/net/dsa/mt7530.c -+++ linux-4.9.20/drivers/net/dsa/mt7530.c +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c @@ -629,6 +629,11 @@ mt7530_setup(struct dsa_switch *ds) val = mt7530_read(priv, MT7530_MHWTRAP); val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS; @@ -14,10 +12,8 @@ Index: linux-4.9.20/drivers/net/dsa/mt7530.c mt7530_write(priv, MT7530_MHWTRAP, val); /* Enable and reset MIB counters */ -Index: linux-4.9.20/drivers/net/ethernet/mediatek/mtk_eth_soc.c -=================================================================== ---- linux-4.9.20.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ linux-4.9.20/drivers/net/ethernet/mediatek/mtk_eth_soc.c +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -221,6 +221,9 @@ static void mtk_phy_link_adjust(struct n netif_carrier_on(dev); else diff --git a/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch b/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch index 2a562e1..1a74e63 100644 --- a/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch +++ b/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch @@ -1,7 +1,5 @@ -Index: linux-4.9.20/drivers/net/dsa/mt7530.c -=================================================================== ---- linux-4.9.20.orig/drivers/net/dsa/mt7530.c -+++ linux-4.9.20/drivers/net/dsa/mt7530.c +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c @@ -996,15 +996,7 @@ err: static enum dsa_tag_protocol mtk_get_tag_protocol(struct dsa_switch *ds) @@ -19,10 +17,8 @@ Index: linux-4.9.20/drivers/net/dsa/mt7530.c } static struct dsa_switch_ops mt7530_switch_ops = { -Index: linux-4.9.20/include/net/dsa.h -=================================================================== ---- linux-4.9.20.orig/include/net/dsa.h -+++ linux-4.9.20/include/net/dsa.h +--- a/include/net/dsa.h ++++ b/include/net/dsa.h @@ -145,6 +145,8 @@ struct dsa_port { struct device_node *dn; unsigned int ageing_time; @@ -72,10 +68,8 @@ Index: linux-4.9.20/include/net/dsa.h struct switchdev_trans; struct switchdev_obj; struct switchdev_obj_port_fdb; -Index: linux-4.9.20/net/dsa/dsa2.c -=================================================================== ---- linux-4.9.20.orig/net/dsa/dsa2.c -+++ linux-4.9.20/net/dsa/dsa2.c +--- a/net/dsa/dsa2.c ++++ b/net/dsa/dsa2.c @@ -248,8 +248,6 @@ static int dsa_cpu_port_apply(struct dev return err; } @@ -151,10 +145,8 @@ Index: linux-4.9.20/net/dsa/dsa2.c } pr_info("DSA: switch %d %d parsed\n", dst->tree, ds->index); -Index: linux-4.9.20/net/dsa/dsa_priv.h -=================================================================== ---- linux-4.9.20.orig/net/dsa/dsa_priv.h -+++ linux-4.9.20/net/dsa/dsa_priv.h +--- a/net/dsa/dsa_priv.h ++++ b/net/dsa/dsa_priv.h @@ -43,6 +43,7 @@ struct dsa_slave_priv { int old_duplex; @@ -163,10 +155,8 @@ Index: linux-4.9.20/net/dsa/dsa_priv.h #ifdef CONFIG_NET_POLL_CONTROLLER struct netpoll *netpoll; #endif -Index: linux-4.9.20/net/dsa/slave.c -=================================================================== ---- linux-4.9.20.orig/net/dsa/slave.c -+++ linux-4.9.20/net/dsa/slave.c +--- a/net/dsa/slave.c ++++ b/net/dsa/slave.c @@ -61,7 +61,7 @@ static int dsa_slave_get_iflink(const st { struct dsa_slave_priv *p = netdev_priv(dev); diff --git a/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch b/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch index 9f785dd..26eff60 100644 --- a/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch +++ b/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch @@ -1,7 +1,5 @@ -Index: linux-4.9.20/drivers/net/dsa/mt7530.c -=================================================================== ---- linux-4.9.20.orig/drivers/net/dsa/mt7530.c -+++ linux-4.9.20/drivers/net/dsa/mt7530.c +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c @@ -627,7 +627,7 @@ mt7530_setup(struct dsa_switch *ds) /* Enable Port 6 only; P5 as GMAC5 which currently is not supported */ diff --git a/target/linux/mpc85xx/patches-4.9/001-powerpc-85xx-add-gpio-keys-to-of-match-table.patch b/target/linux/mpc85xx/patches-4.9/001-powerpc-85xx-add-gpio-keys-to-of-match-table.patch index e65ac42..58c4be6 100644 --- a/target/linux/mpc85xx/patches-4.9/001-powerpc-85xx-add-gpio-keys-to-of-match-table.patch +++ b/target/linux/mpc85xx/patches-4.9/001-powerpc-85xx-add-gpio-keys-to-of-match-table.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/platforms/85xx/common.c +++ b/arch/powerpc/platforms/85xx/common.c -@@ -33,6 +33,7 @@ static const struct of_device_id mpc85xx_common_ids[] __initconst = { +@@ -33,6 +33,7 @@ static const struct of_device_id mpc85xx { .compatible = "fsl,mpc8548-guts", }, /* Probably unnecessary? */ { .compatible = "gpio-leds", }, diff --git a/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch b/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch index f11f4d6..bfe8100 100644 --- a/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch +++ b/target/linux/mpc85xx/patches-4.9/100-powerpc-85xx-tl-wdr4900-v1-support.patch @@ -17,7 +17,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile -@@ -137,6 +137,7 @@ src-plat-$(CONFIG_PPC_PSERIES) += pseries-head.S +@@ -137,6 +137,7 @@ src-plat-$(CONFIG_PPC_PSERIES) += pserie src-plat-$(CONFIG_PPC_POWERNV) += pseries-head.S src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c @@ -25,7 +25,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> src-wlib := $(sort $(src-wlib-y)) src-plat := $(sort $(src-plat-y)) -@@ -320,6 +321,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm8555 +@@ -320,6 +321,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm image-$(CONFIG_TQM8560) += cuImage.tqm8560 image-$(CONFIG_SBC8548) += cuImage.sbc8548 image-$(CONFIG_KSI8560) += cuImage.ksi8560 diff --git a/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch b/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch index 1f57cde..268243c 100644 --- a/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch +++ b/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -959,6 +959,16 @@ void phy_start(struct phy_device *phydev +@@ -991,6 +991,16 @@ void phy_start(struct phy_device *phydev } EXPORT_SYMBOL(phy_start); @@ -33,7 +33,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> /** * phy_state_machine - Handle the state machine * @work: work_struct that describes the work to be done -@@ -1000,8 +1010,7 @@ void phy_state_machine(struct work_struc +@@ -1032,8 +1042,7 @@ 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; @@ -43,7 +43,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> break; } -@@ -1013,9 +1022,7 @@ void phy_state_machine(struct work_struc +@@ -1045,9 +1054,7 @@ void phy_state_machine(struct work_struc /* If AN is done, we're running */ if (err > 0) { phydev->state = PHY_RUNNING; @@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> } else if (0 == phydev->link_timeout--) needs_aneg = true; break; -@@ -1040,8 +1047,7 @@ void phy_state_machine(struct work_struc +@@ -1072,8 +1079,7 @@ void phy_state_machine(struct work_struc } } phydev->state = PHY_RUNNING; @@ -64,7 +64,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> } break; case PHY_FORCING: -@@ -1051,13 +1057,12 @@ void phy_state_machine(struct work_struc +@@ -1083,13 +1089,12 @@ void phy_state_machine(struct work_struc if (phydev->link) { phydev->state = PHY_RUNNING; @@ -80,7 +80,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> break; case PHY_RUNNING: /* Only register a CHANGE if we are polling and link changed -@@ -1080,14 +1085,12 @@ void phy_state_machine(struct work_struc +@@ -1112,14 +1117,12 @@ void phy_state_machine(struct work_struc if (phydev->link) { phydev->state = PHY_RUNNING; @@ -97,7 +97,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> if (phy_interrupt_is_valid(phydev)) err = phy_config_interrupt(phydev, PHY_INTERRUPT_ENABLED); -@@ -1095,8 +1098,7 @@ void phy_state_machine(struct work_struc +@@ -1127,8 +1130,7 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; @@ -107,7 +107,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> do_suspend = true; } break; -@@ -1116,11 +1118,11 @@ void phy_state_machine(struct work_struc +@@ -1148,11 +1150,11 @@ void phy_state_machine(struct work_struc if (phydev->link) { phydev->state = PHY_RUNNING; @@ -121,7 +121,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> } else { phydev->state = PHY_AN; phydev->link_timeout = PHY_AN_TIMEOUT; -@@ -1132,11 +1134,11 @@ void phy_state_machine(struct work_struc +@@ -1164,11 +1166,11 @@ void phy_state_machine(struct work_struc if (phydev->link) { phydev->state = PHY_RUNNING; diff --git a/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch b/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch index 40d0afd..a0352e2 100644 --- a/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch +++ b/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch @@ -24,7 +24,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> obj-$(CONFIG_MDIO_BOARDINFO) += mdio-boardinfo.o --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1175,91 +1175,6 @@ void phy_mac_interrupt(struct phy_device +@@ -1207,91 +1207,6 @@ void phy_mac_interrupt(struct phy_device } EXPORT_SYMBOL(phy_mac_interrupt); diff --git a/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch b/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch index 421a308..ecf7a26 100644 --- a/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch +++ b/target/linux/mvebu/patches-4.9/403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch @@ -30,7 +30,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1311,11 +1311,16 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); +@@ -1343,11 +1343,16 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); */ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) { diff --git a/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch b/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch index 7c25c24..72951e8 100644 --- a/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch +++ b/target/linux/mvebu/patches-4.9/404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1311,16 +1311,33 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); +@@ -1343,16 +1343,33 @@ EXPORT_SYMBOL(phy_ethtool_get_eee); */ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) { diff --git a/target/linux/mvebu/patches-4.9/405-net-phy-allow-EEE-with-SGMII-interface-modes.patch b/target/linux/mvebu/patches-4.9/405-net-phy-allow-EEE-with-SGMII-interface-modes.patch index 51d6259..ec6571f 100644 --- a/target/linux/mvebu/patches-4.9/405-net-phy-allow-EEE-with-SGMII-interface-modes.patch +++ b/target/linux/mvebu/patches-4.9/405-net-phy-allow-EEE-with-SGMII-interface-modes.patch @@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1195,6 +1195,7 @@ int phy_init_eee(struct phy_device *phyd +@@ -1227,6 +1227,7 @@ int phy_init_eee(struct phy_device *phyd if ((phydev->duplex == DUPLEX_FULL) && ((phydev->interface == PHY_INTERFACE_MODE_MII) || (phydev->interface == PHY_INTERFACE_MODE_GMII) || diff --git a/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch b/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch index d3ee118..32922c1 100644 --- a/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch +++ b/target/linux/mvebu/patches-4.9/408-net-phy-hook-up-clause-45-autonegotiation-restart.patch @@ -37,7 +37,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> /** * phy_aneg_done - return auto-negotiation status -@@ -1407,3 +1425,14 @@ int phy_ethtool_set_link_ksettings(struc +@@ -1439,3 +1457,14 @@ int phy_ethtool_set_link_ksettings(struc return phy_ethtool_ksettings_set(phydev, cmd); } EXPORT_SYMBOL(phy_ethtool_set_link_ksettings); diff --git a/target/linux/mvebu/patches-4.9/413-phy-export-phy_start_machine-for-phylink.patch b/target/linux/mvebu/patches-4.9/413-phy-export-phy_start_machine-for-phylink.patch index 93f979a..44cf924 100644 --- a/target/linux/mvebu/patches-4.9/413-phy-export-phy_start_machine-for-phylink.patch +++ b/target/linux/mvebu/patches-4.9/413-phy-export-phy_start_machine-for-phylink.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -580,6 +580,7 @@ void phy_start_machine(struct phy_device +@@ -612,6 +612,7 @@ void phy_start_machine(struct phy_device { queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, HZ); } diff --git a/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch index 5c901f9..e11cc7a 100644 --- a/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch +++ b/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1000,7 +1000,8 @@ void phy_state_machine(struct work_struc +@@ -1032,7 +1032,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 <blogic@openwrt.org> phydev->adjust_link(phydev->attached_dev); break; } -@@ -1083,7 +1084,8 @@ void phy_state_machine(struct work_struc +@@ -1115,7 +1116,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 <blogic@openwrt.org> } phydev->adjust_link(phydev->attached_dev); -@@ -1095,7 +1097,8 @@ void phy_state_machine(struct work_struc +@@ -1127,7 +1129,8 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-4.9/200-rt3883-fix-pinctrl-typo.patch b/target/linux/ramips/patches-4.9/200-rt3883-fix-pinctrl-typo.patch deleted file mode 100644 index aa55fd9..0000000 --- a/target/linux/ramips/patches-4.9/200-rt3883-fix-pinctrl-typo.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 2583143af8111d430bdca0268b6cdb7ccc7c3f9d Mon Sep 17 00:00:00 2001 -From: Daniel Golle <daniel@makrotopia.org> -Date: Fri, 13 Jan 2017 05:40:04 +0100 -Subject: [PATCH] mips: ralink/rt3883: fix typo in pinctrl lna_g_func - -Signed-off-by: Daniel Golle <daniel@makrotopia.org> ---- - arch/mips/ralink/rt3883.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/ralink/rt3883.c -+++ b/arch/mips/ralink/rt3883.c -@@ -36,7 +36,7 @@ static struct rt2880_pmx_func uartlite_f - static struct rt2880_pmx_func jtag_func[] = { FUNC("jtag", 0, 17, 5) }; - static struct rt2880_pmx_func mdio_func[] = { FUNC("mdio", 0, 22, 2) }; - static struct rt2880_pmx_func lna_a_func[] = { FUNC("lna a", 0, 32, 3) }; --static struct rt2880_pmx_func lna_g_func[] = { FUNC("lna a", 0, 35, 3) }; -+static struct rt2880_pmx_func lna_g_func[] = { FUNC("lna g", 0, 35, 3) }; - static struct rt2880_pmx_func pci_func[] = { - FUNC("pci-dev", 0, 40, 32), - FUNC("pci-host2", 1, 40, 32), diff --git a/target/linux/x86/patches-4.9/800-hwmon-w83627ehf-dont-claim-nct677x.patch b/target/linux/x86/patches-4.9/800-hwmon-w83627ehf-dont-claim-nct677x.patch index a04a674..14e0ef9 100644 --- a/target/linux/x86/patches-4.9/800-hwmon-w83627ehf-dont-claim-nct677x.patch +++ b/target/linux/x86/patches-4.9/800-hwmon-w83627ehf-dont-claim-nct677x.patch @@ -1,8 +1,6 @@ -diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c -index 697007afb99c..4a4e0b4c077c 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c -@@ -2707,8 +2707,8 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr, +@@ -2707,8 +2707,8 @@ static int __init w83627ehf_find(int sio static const char sio_name_W83627UHG[] __initconst = "W83627UHG"; static const char sio_name_W83667HG[] __initconst = "W83667HG"; static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B"; @@ -13,7 +11,7 @@ index 697007afb99c..4a4e0b4c077c 100644 u16 val; const char *sio_name; -@@ -2749,14 +2749,14 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr, +@@ -2749,14 +2749,14 @@ static int __init w83627ehf_find(int sio sio_data->kind = w83667hg_b; sio_name = sio_name_W83667HG_B; break; |