From 69acb2533ab3adc4136b151dc9a286dccf523142 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 23 Jul 2017 15:00:22 +0200 Subject: [PATCH] kernel: update kernel 4.4 to version 4.4.79 Signed-off-by: Hauke Mehrtens --- include/kernel-version.mk | 4 +- ...egression-in-PCI-window-initializati.patch | 37 ---- .../910-unaligned_access_hacks.patch | 12 +- ...ts-enable-clock-support-for-BCM5301X.patch | 4 +- ...301X-Correct-GIC_PPI-interrupt-flags.patch | 41 ----- ...ice_uevent_modalias-for-DRM_MIPI_DSI.patch | 21 --- .../patches-4.4/0551-kbuild-add-fno-PIE.patch | 8 +- ...al-gcc-s-pie-from-the-very-beginning.patch | 8 +- ...vert-to-spi_nor_-get-set-_flash_node.patch | 2 +- ...limit-scanned-flash-area-on-BCM47XX-.patch | 35 ---- ...part-don-t-fail-because-of-bit-flips.patch | 93 ---------- ...i-nor-backport-SPI_NOR_HAS_LOCK-flag.patch | 4 +- ...ac-fix-a-missing-check-for-build_skb.patch | 28 --- ...ersed-test-of-build_skb-return-value.patch | 22 --- ...-checking-for-BCM4707-BCM53018-chip-.patch | 12 +- ...port-Ethernet-device-on-BCM47094-SoC.patch | 2 +- ...enable-Ethernet-core-before-using-it.patch | 31 ---- ...device-with-backing-device-structure.patch | 2 +- ...c-Add-support-for-ethtool-statistics.patch | 4 +- ...gmac-Maintain-some-netdev-statistics.patch | 10 +- ...ac-use-phydev-from-struct-net_device.patch | 20 +-- ...-0001-net-bgmac-Fix-SOF-bit-checking.patch | 37 ---- ...c-Start-transmit-queue-in-bgmac_open.patch | 28 --- ...c-Remove-superflous-netif_carrier_on.patch | 28 --- ...of_scan_flat_dt-before-accessing-ini.patch | 30 ---- .../patches-4.4/201-extra_optimization.patch | 4 +- ...25p80-mx-disable-software-protection.patch | 2 +- .../662-use_fq_codel_by_default.patch | 8 +- ...ng-with-source-address-failed-policy.patch | 14 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 +- .../generic/patches-4.4/721-phy_packets.patch | 2 +- .../ipq806x/patches-4.4/400-dsa-add-qca.patch | 2 +- ...-mtd-nand-spi-nor-assign-MTD-of_node.patch | 2 +- ...vert-to-spi_nor_-get-set-_flash_node.patch | 2 +- ...78-mtd-spi-nor-drop-flash_node-field.patch | 2 +- ...ide-default-erase_sector-implementat.patch | 4 +- ...spi-nor-Add-SPI-NOR-layer-PM-support.patch | 6 +- ...r-Disable-Micron-flash-HW-protection.patch | 2 +- ...Support-R-W-for-S25FS-S-family-flash.patch | 2 +- ...td-spi-nor-add-DDR-quad-read-support.patch | 10 +- ...l-quad-add-flash-S25FS-extra-support.patch | 2 +- .../7018-devres-add-devm_alloc_percpu.patch | 2 +- ...layerscape-add-MSI-interrupt-support.patch | 2 +- ...tek-support-MTK-xHCI-host-controller.patch | 4 +- ...ackport-v4.7-0day-patches-from-Boris.patch | 10 +- ...-mvneta-consolidate-autoneg-enabling.patch | 2 +- ...ment-ethtool-autonegotiation-control.patch | 2 +- ...the-default-queue-related-for-each-p.patch | 2 +- ...034-net-mvneta-Add-naive-RSS-support.patch | 6 +- ...rivial-cut-off-issue-in-mvneta_ethto.patch | 2 +- ...vneta-Fix-for_each_present_cpu-usage.patch | 55 ------ ...ell-88E1512-add-flow-control-support.patch | 2 +- ...ackport-v4.7-0day-patches-from-Boris.patch | 10 +- ...MIPS-ralink-Add-a-few-missing-clocks.patch | 4 +- ...-ralink-Fix-vendor-string-for-mt7620.patch | 2 +- ...tek-support-MTK-xHCI-host-controller.patch | 4 +- ...54-mtd-add-chunked-read-io-to-m25p80.patch | 4 +- ...0065-MIPS-ralink-MT7688-pinmux-fixes.patch | 166 ------------------ ...IPS-ralink-fix-USB-frequency-scaling.patch | 28 --- ...k-Fix-invalid-assignment-of-SoC-type.patch | 25 --- ...-MIPS-ralink-fix-MT7628-pinmux-typos.patch | 32 ---- ...alink-fix-MT7628-wled_an-pinmux-gpio.patch | 35 ---- .../100-korina_fix_napi_disable.patch | 51 ------ 63 files changed, 112 insertions(+), 935 deletions(-) delete mode 100644 target/linux/ar71xx/patches-4.4/102-MIPS-ath79-fix-regression-in-PCI-window-initializati.patch delete mode 100644 target/linux/bcm53xx/patches-4.4/047-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch delete mode 100644 target/linux/brcm2708/patches-4.4/0446-of-Export-of_device_uevent_modalias-for-DRM_MIPI_DSI.patch delete mode 100644 target/linux/generic/patches-4.4/040-0001-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch delete mode 100644 target/linux/generic/patches-4.4/040-0002-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch delete mode 100644 target/linux/generic/patches-4.4/070-v4.5-0001-bgmac-fix-a-missing-check-for-build_skb.patch delete mode 100644 target/linux/generic/patches-4.4/070-v4.5-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch delete mode 100644 target/linux/generic/patches-4.4/070-v4.6-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch delete mode 100644 target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch delete mode 100644 target/linux/generic/patches-4.4/071-v4.7-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch delete mode 100644 target/linux/generic/patches-4.4/071-v4.7-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch delete mode 100644 target/linux/generic/patches-4.4/104-of-Add-check-to-of_scan_flat_dt-before-accessing-ini.patch delete mode 100644 target/linux/mvebu/patches-4.4/037-net-mvneta-Fix-for_each_present_cpu-usage.patch delete mode 100644 target/linux/ramips/patches-4.4/0065-MIPS-ralink-MT7688-pinmux-fixes.patch delete mode 100644 target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch delete mode 100644 target/linux/ramips/patches-4.4/0081-MIPS-ralink-Fix-invalid-assignment-of-SoC-type.patch delete mode 100644 target/linux/ramips/patches-4.4/0082-MIPS-ralink-fix-MT7628-pinmux-typos.patch delete mode 100644 target/linux/ramips/patches-4.4/0083-MIPS-ralink-fix-MT7628-wled_an-pinmux-gpio.patch delete mode 100644 target/linux/rb532/patches-4.4/100-korina_fix_napi_disable.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 345d51bb75..2a714e75bc 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -3,10 +3,10 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .43 -LINUX_VERSION-4.4 = .74 +LINUX_VERSION-4.4 = .79 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c -LINUX_KERNEL_HASH-4.4.74 = c319ad6150d112bd4f8c9d1427868eeafd3ab461becf9457f814e4ba7c57808e +LINUX_KERNEL_HASH-4.4.79 = 0dbda3b51e11957fdb96c46844a823a212d46d6db680d77422ddea1a65bebca8 ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/target/linux/ar71xx/patches-4.4/102-MIPS-ath79-fix-regression-in-PCI-window-initializati.patch b/target/linux/ar71xx/patches-4.4/102-MIPS-ath79-fix-regression-in-PCI-window-initializati.patch deleted file mode 100644 index e5226a5dc3..0000000000 --- a/target/linux/ar71xx/patches-4.4/102-MIPS-ath79-fix-regression-in-PCI-window-initializati.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Felix Fietkau -Date: Sun, 15 May 2016 13:09:20 +0200 -Subject: [PATCH] MIPS: ath79: fix regression in PCI window initialization - -ath79_ddr_pci_win_base has the type void __iomem *, so register offsets -need to be a multiple of 4. - -Cc: Alban Bedel -Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface") -Signed-off-by: Felix Fietkau ---- - ---- a/arch/mips/ath79/common.c -+++ b/arch/mips/ath79/common.c -@@ -76,14 +76,14 @@ void ath79_ddr_set_pci_windows(void) - { - BUG_ON(!ath79_ddr_pci_win_base); - -- __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0); -- __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 1); -- __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 2); -- __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 3); -- __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 4); -- __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 5); -- __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 6); -- __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 7); -+ __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0x0); -+ __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 0x4); -+ __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 0x8); -+ __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 0xc); -+ __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 0x10); -+ __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 0x14); -+ __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 0x18); -+ __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 0x1c); - } - EXPORT_SYMBOL_GPL(ath79_ddr_set_pci_windows); - diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch index 7e3ba4c8d5..487e896718 100644 --- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch @@ -214,7 +214,7 @@ #include #include #include -@@ -781,10 +782,10 @@ static void tcp_v6_send_response(const s +@@ -786,10 +787,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { @@ -241,7 +241,7 @@ */ --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c -@@ -429,7 +429,7 @@ int ipv6_recv_error(struct sock *sk, str +@@ -433,7 +433,7 @@ int ipv6_recv_error(struct sock *sk, str ipv6_iface_scope_id(&sin->sin6_addr, IP6CB(skb)->iif); } else { @@ -250,7 +250,7 @@ &sin->sin6_addr); sin->sin6_scope_id = 0; } -@@ -766,12 +766,12 @@ int ip6_datagram_send_ctl(struct net *ne +@@ -770,12 +770,12 @@ int ip6_datagram_send_ctl(struct net *ne } if (fl6->flowlabel&IPV6_FLOWINFO_MASK) { @@ -610,7 +610,7 @@ goto next_ht; --- a/net/ipv6/ip6_offload.c +++ b/net/ipv6/ip6_offload.c -@@ -222,7 +222,7 @@ static struct sk_buff **ipv6_gro_receive +@@ -225,7 +225,7 @@ static struct sk_buff **ipv6_gro_receive continue; iph2 = (struct ipv6hdr *)(p->data + off); @@ -711,7 +711,7 @@ if (xb) return i * 32 + 31 - __fls(ntohl(xb)); } -@@ -799,17 +803,18 @@ static inline int ip6_default_np_autolab +@@ -804,17 +808,18 @@ static inline int ip6_default_np_autolab static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, __be32 flowlabel) { @@ -838,7 +838,7 @@ --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -3818,14 +3818,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -3819,14 +3819,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/bcm53xx/patches-4.4/031-ARM-dts-enable-clock-support-for-BCM5301X.patch b/target/linux/bcm53xx/patches-4.4/031-ARM-dts-enable-clock-support-for-BCM5301X.patch index db47006218..165fe7c5cb 100644 --- a/target/linux/bcm53xx/patches-4.4/031-ARM-dts-enable-clock-support-for-BCM5301X.patch +++ b/target/linux/bcm53xx/patches-4.4/031-ARM-dts-enable-clock-support-for-BCM5301X.patch @@ -68,7 +68,7 @@ Signed-off-by: Florian Fainelli compatible = "arm,cortex-a9-global-timer"; - reg = <0x0200 0x100>; + reg = <0x20200 0x100>; - interrupts = ; + interrupts = ; - clocks = <&clk_periph>; + clocks = <&periph_clk>; }; @@ -78,7 +78,7 @@ Signed-off-by: Florian Fainelli compatible = "arm,cortex-a9-twd-timer"; - reg = <0x0600 0x100>; + reg = <0x20600 0x100>; - interrupts = ; + interrupts = ; - clocks = <&clk_periph>; + clocks = <&periph_clk>; }; diff --git a/target/linux/bcm53xx/patches-4.4/047-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch b/target/linux/bcm53xx/patches-4.4/047-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch deleted file mode 100644 index 70df2013cc..0000000000 --- a/target/linux/bcm53xx/patches-4.4/047-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 -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 -Signed-off-by: Jon Mason -Fixes: d27509f1 ("ARM: BCM5301X: add dts files for BCM4708 SoC") -Signed-off-by: Florian Fainelli ---- - 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 = ; -+ interrupts = ; - clocks = <&periph_clk>; - }; - - local-timer@20600 { - compatible = "arm,cortex-a9-twd-timer"; - reg = <0x20600 0x100>; -- interrupts = ; -+ interrupts = ; - clocks = <&periph_clk>; - }; - diff --git a/target/linux/brcm2708/patches-4.4/0446-of-Export-of_device_uevent_modalias-for-DRM_MIPI_DSI.patch b/target/linux/brcm2708/patches-4.4/0446-of-Export-of_device_uevent_modalias-for-DRM_MIPI_DSI.patch deleted file mode 100644 index 1f99c985e9..0000000000 --- a/target/linux/brcm2708/patches-4.4/0446-of-Export-of_device_uevent_modalias-for-DRM_MIPI_DSI.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 6245131c0c328d2ed876d87cc20b176e2f24a769 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Tue, 9 Aug 2016 15:12:06 -0700 -Subject: [PATCH] of: Export of_device_uevent_modalias for DRM_MIPI_DSI. - -In order to make DSI panel modules able to load automatically, we need -to emit the OF modalias uevent so that their MODULE_DEVICE_TABLE(of, -...) can match against it. - -Signed-off-by: Eric Anholt ---- - drivers/of/device.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/of/device.c -+++ b/drivers/of/device.c -@@ -287,3 +287,4 @@ int of_device_uevent_modalias(struct dev - - return 0; - } -+EXPORT_SYMBOL(of_device_uevent_modalias); diff --git a/target/linux/brcm2708/patches-4.4/0551-kbuild-add-fno-PIE.patch b/target/linux/brcm2708/patches-4.4/0551-kbuild-add-fno-PIE.patch index f76490befc..5bfbbf667c 100644 --- a/target/linux/brcm2708/patches-4.4/0551-kbuild-add-fno-PIE.patch +++ b/target/linux/brcm2708/patches-4.4/0551-kbuild-add-fno-PIE.patch @@ -29,10 +29,10 @@ Signed-off-by: Greg Kroah-Hartman --- a/Makefile +++ b/Makefile -@@ -619,6 +619,8 @@ include arch/$(SRCARCH)/Makefile - KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) - KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) - KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) +@@ -622,6 +622,8 @@ KBUILD_CFLAGS += $(call cc-disable-warni + KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) + KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) + KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) +KBUILD_CFLAGS += $(call cc-option,-fno-PIE) +KBUILD_AFLAGS += $(call cc-option,-fno-PIE) diff --git a/target/linux/brcm2708/patches-4.4/0552-kbuild-Steal-gcc-s-pie-from-the-very-beginning.patch b/target/linux/brcm2708/patches-4.4/0552-kbuild-Steal-gcc-s-pie-from-the-very-beginning.patch index ca8ff3d660..3e3d35a529 100644 --- a/target/linux/brcm2708/patches-4.4/0552-kbuild-Steal-gcc-s-pie-from-the-very-beginning.patch +++ b/target/linux/brcm2708/patches-4.4/0552-kbuild-Steal-gcc-s-pie-from-the-very-beginning.patch @@ -38,10 +38,10 @@ Signed-off-by: Greg Kroah-Hartman --- a/Makefile +++ b/Makefile -@@ -619,8 +619,6 @@ include arch/$(SRCARCH)/Makefile - KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) - KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) - KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) +@@ -622,8 +622,6 @@ KBUILD_CFLAGS += $(call cc-disable-warni + KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) + KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) + KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) -KBUILD_CFLAGS += $(call cc-option,-fno-PIE) -KBUILD_AFLAGS += $(call cc-option,-fno-PIE) diff --git a/target/linux/brcm63xx/patches-4.4/000-4.5-03-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch b/target/linux/brcm63xx/patches-4.4/000-4.5-03-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch index 74af24bbad..4056bafcff 100644 --- a/target/linux/brcm63xx/patches-4.4/000-4.5-03-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch +++ b/target/linux/brcm63xx/patches-4.4/000-4.5-03-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch @@ -68,7 +68,7 @@ Reviewed-by: Boris Brezillon spifi->nor.write = nxp_spifi_write; --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1113,7 +1113,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1120,7 +1120,7 @@ int spi_nor_scan(struct spi_nor *nor, co const struct flash_info *info = NULL; struct device *dev = nor->dev; struct mtd_info *mtd = &nor->mtd; diff --git a/target/linux/generic/patches-4.4/040-0001-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch b/target/linux/generic/patches-4.4/040-0001-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch deleted file mode 100644 index 2429b113d0..0000000000 --- a/target/linux/generic/patches-4.4/040-0001-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 2a36a5c30eab9cd1c9d2d08bd27cd763325d70c5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sat, 5 Dec 2015 02:09:43 +0100 -Subject: [PATCH] mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) - only -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We allowed using bcm47xxpart on BCM5301X arch with commit: -9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X") - -BCM5301X devices may contain some partitions in higher memory, e.g. -Netgear R8000 has board_data at 0x2600000. To detect them we should -use size limit on MIPS only. - -Signed-off-by: Rafał Miłecki -Signed-off-by: Brian Norris ---- - drivers/mtd/bcm47xxpart.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/mtd/bcm47xxpart.c -+++ b/drivers/mtd/bcm47xxpart.c -@@ -118,8 +118,8 @@ static int bcm47xxpart_parse(struct mtd_ - /* Parse block by block looking for magics */ - for (offset = 0; offset <= master->size - blocksize; - offset += blocksize) { -- /* Nothing more in higher memory */ -- if (offset >= 0x2000000) -+ /* Nothing more in higher memory on BCM47XX (MIPS) */ -+ if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000) - break; - - if (curr_part >= BCM47XXPART_MAX_PARTS) { diff --git a/target/linux/generic/patches-4.4/040-0002-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch b/target/linux/generic/patches-4.4/040-0002-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch deleted file mode 100644 index 4155a2a95e..0000000000 --- a/target/linux/generic/patches-4.4/040-0002-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 36bcc0c9c2bc8f56569cd735ba531a51358d7c2b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sun, 6 Dec 2015 11:31:38 +0100 -Subject: [PATCH] mtd: bcm47xxpart: don't fail because of bit-flips -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bit-flip errors may occur on NAND flashes and are harmless. Handle them -gracefully as read content is still reliable and can be parsed. - -Signed-off-by: Rafał Miłecki -Signed-off-by: Brian Norris ---- - drivers/mtd/bcm47xxpart.c | 38 ++++++++++++++++++++++---------------- - 1 file changed, 22 insertions(+), 16 deletions(-) - ---- a/drivers/mtd/bcm47xxpart.c -+++ b/drivers/mtd/bcm47xxpart.c -@@ -66,11 +66,13 @@ static const char *bcm47xxpart_trx_data_ - { - uint32_t buf; - size_t bytes_read; -+ int err; - -- if (mtd_read(master, offset, sizeof(buf), &bytes_read, -- (uint8_t *)&buf) < 0) { -- pr_err("mtd_read error while parsing (offset: 0x%X)!\n", -- offset); -+ err = mtd_read(master, offset, sizeof(buf), &bytes_read, -+ (uint8_t *)&buf); -+ if (err && !mtd_is_bitflip(err)) { -+ pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", -+ offset, err); - goto out_default; - } - -@@ -95,6 +97,7 @@ static int bcm47xxpart_parse(struct mtd_ - int trx_part = -1; - int last_trx_part = -1; - int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, }; -+ int err; - - /* - * Some really old flashes (like AT45DB*) had smaller erasesize-s, but -@@ -128,10 +131,11 @@ static int bcm47xxpart_parse(struct mtd_ - } - - /* Read beginning of the block */ -- if (mtd_read(master, offset, BCM47XXPART_BYTES_TO_READ, -- &bytes_read, (uint8_t *)buf) < 0) { -- pr_err("mtd_read error while parsing (offset: 0x%X)!\n", -- offset); -+ err = mtd_read(master, offset, BCM47XXPART_BYTES_TO_READ, -+ &bytes_read, (uint8_t *)buf); -+ if (err && !mtd_is_bitflip(err)) { -+ pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", -+ offset, err); - continue; - } - -@@ -252,10 +256,11 @@ static int bcm47xxpart_parse(struct mtd_ - } - - /* Read middle of the block */ -- if (mtd_read(master, offset + 0x8000, 0x4, -- &bytes_read, (uint8_t *)buf) < 0) { -- pr_err("mtd_read error while parsing (offset: 0x%X)!\n", -- offset); -+ err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read, -+ (uint8_t *)buf); -+ if (err && !mtd_is_bitflip(err)) { -+ pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", -+ offset, err); - continue; - } - -@@ -275,10 +280,11 @@ static int bcm47xxpart_parse(struct mtd_ - } - - offset = master->size - possible_nvram_sizes[i]; -- if (mtd_read(master, offset, 0x4, &bytes_read, -- (uint8_t *)buf) < 0) { -- pr_err("mtd_read error while reading at offset 0x%X!\n", -- offset); -+ err = mtd_read(master, offset, 0x4, &bytes_read, -+ (uint8_t *)buf); -+ if (err && !mtd_is_bitflip(err)) { -+ pr_err("mtd_read error while reading (offset 0x%X): %d\n", -+ offset, err); - continue; - } - diff --git a/target/linux/generic/patches-4.4/048-mtd-spi-nor-backport-SPI_NOR_HAS_LOCK-flag.patch b/target/linux/generic/patches-4.4/048-mtd-spi-nor-backport-SPI_NOR_HAS_LOCK-flag.patch index 5048bcca7d..69a5432fa7 100644 --- a/target/linux/generic/patches-4.4/048-mtd-spi-nor-backport-SPI_NOR_HAS_LOCK-flag.patch +++ b/target/linux/generic/patches-4.4/048-mtd-spi-nor-backport-SPI_NOR_HAS_LOCK-flag.patch @@ -25,7 +25,7 @@ Tested-by: Ezequiel Garcia }; #define JEDEC_MFR(info) ((info)->id[0]) -@@ -1156,7 +1157,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1163,7 +1164,8 @@ int spi_nor_scan(struct spi_nor *nor, co if (JEDEC_MFR(info) == SNOR_MFR_ATMEL || JEDEC_MFR(info) == SNOR_MFR_INTEL || @@ -35,7 +35,7 @@ Tested-by: Ezequiel Garcia write_enable(nor); write_sr(nor, 0); } -@@ -1172,7 +1174,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1179,7 +1181,8 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->_read = spi_nor_read; /* NOR protection support for STmicro/Micron chips and similar */ diff --git a/target/linux/generic/patches-4.4/070-v4.5-0001-bgmac-fix-a-missing-check-for-build_skb.patch b/target/linux/generic/patches-4.4/070-v4.5-0001-bgmac-fix-a-missing-check-for-build_skb.patch deleted file mode 100644 index 99f9de65a7..0000000000 --- a/target/linux/generic/patches-4.4/070-v4.5-0001-bgmac-fix-a-missing-check-for-build_skb.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f1640c3ddeec12804bc9a21feee85fc15aca95f6 Mon Sep 17 00:00:00 2001 -From: wangweidong -Date: Wed, 13 Jan 2016 11:06:41 +0800 -Subject: [PATCH] bgmac: fix a missing check for build_skb - -when build_skb failed, it may occure a NULL pointer. -So add a 'NULL check' for it. - -Signed-off-by: Weidong Wang -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -469,6 +469,11 @@ static int bgmac_dma_rx_read(struct bgma - len -= ETH_FCS_LEN; - - skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE); -+ if (unlikely(skb)) { -+ bgmac_err(bgmac, "build_skb failed\n"); -+ put_page(virt_to_head_page(buf)); -+ break; -+ } - skb_put(skb, BGMAC_RX_FRAME_OFFSET + - BGMAC_RX_BUF_OFFSET + len); - skb_pull(skb, BGMAC_RX_FRAME_OFFSET + diff --git a/target/linux/generic/patches-4.4/070-v4.5-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch b/target/linux/generic/patches-4.4/070-v4.5-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch deleted file mode 100644 index eebcded6fa..0000000000 --- a/target/linux/generic/patches-4.4/070-v4.5-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 750afbf8ee9c6a1c74a1fe5fc9852146b1d72687 Mon Sep 17 00:00:00 2001 -From: "David S. Miller" -Date: Fri, 15 Jan 2016 16:07:13 -0500 -Subject: [PATCH] bgmac: Fix reversed test of build_skb() return value. - -Fixes: f1640c3ddeec ("bgmac: fix a missing check for build_skb") -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -469,7 +469,7 @@ static int bgmac_dma_rx_read(struct bgma - len -= ETH_FCS_LEN; - - skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE); -- if (unlikely(skb)) { -+ if (unlikely(!skb)) { - bgmac_err(bgmac, "build_skb failed\n"); - put_page(virt_to_head_page(buf)); - break; diff --git a/target/linux/generic/patches-4.4/070-v4.6-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch b/target/linux/generic/patches-4.4/070-v4.6-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch index 0c007569fb..94a37d4437 100644 --- a/target/linux/generic/patches-4.4/070-v4.6-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch +++ b/target/linux/generic/patches-4.4/070-v4.6-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch @@ -36,7 +36,7 @@ Signed-off-by: David S. Miller static bool bgmac_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value, int timeout) { -@@ -990,11 +1001,9 @@ static void bgmac_mac_speed(struct bgmac +@@ -991,11 +1002,9 @@ static void bgmac_mac_speed(struct bgmac static void bgmac_miiconfig(struct bgmac *bgmac) { struct bcma_device *core = bgmac->core; @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller bcma_awrite32(core, BCMA_IOCTL, bcma_aread32(core, BCMA_IOCTL) | 0x40 | BGMAC_BCMA_IOCTL_SW_CLKEN); -@@ -1058,9 +1067,7 @@ static void bgmac_chip_reset(struct bgma +@@ -1059,9 +1068,7 @@ static void bgmac_chip_reset(struct bgma } /* Request Misc PLL for corerev > 2 */ @@ -60,7 +60,7 @@ Signed-off-by: David S. Miller bgmac_set(bgmac, BCMA_CLKCTLST, BGMAC_BCMA_CLKCTLST_MISC_PLL_REQ); bgmac_wait_value(bgmac->core, BCMA_CLKCTLST, -@@ -1196,8 +1203,7 @@ static void bgmac_enable(struct bgmac *b +@@ -1197,8 +1204,7 @@ static void bgmac_enable(struct bgmac *b break; } @@ -70,7 +70,7 @@ Signed-off-by: David S. Miller rxq_ctl = bgmac_read(bgmac, BGMAC_RXQ_CTL); rxq_ctl &= ~BGMAC_RXQ_CTL_MDP_MASK; bp_clk = bcma_pmu_get_bus_clock(&bgmac->core->bus->drv_cc) / -@@ -1475,14 +1481,12 @@ static int bgmac_fixed_phy_register(stru +@@ -1477,14 +1483,12 @@ static int bgmac_fixed_phy_register(stru static int bgmac_mii_register(struct bgmac *bgmac) { @@ -86,7 +86,7 @@ Signed-off-by: David S. Miller return bgmac_fixed_phy_register(bgmac); mii_bus = mdiobus_alloc(); -@@ -1553,7 +1557,6 @@ static void bgmac_mii_unregister(struct +@@ -1555,7 +1559,6 @@ static void bgmac_mii_unregister(struct /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */ static int bgmac_probe(struct bcma_device *core) { @@ -94,7 +94,7 @@ Signed-off-by: David S. Miller struct net_device *net_dev; struct bgmac *bgmac; struct ssb_sprom *sprom = &core->bus->sprom; -@@ -1634,8 +1637,7 @@ static int bgmac_probe(struct bcma_devic +@@ -1641,8 +1644,7 @@ static int bgmac_probe(struct bcma_devic bgmac_chip_reset(bgmac); /* For Northstar, we have to take all GMAC core out of reset */ diff --git a/target/linux/generic/patches-4.4/070-v4.6-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch b/target/linux/generic/patches-4.4/070-v4.6-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch index d00c2bd551..41e470b314 100644 --- a/target/linux/generic/patches-4.4/070-v4.6-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch +++ b/target/linux/generic/patches-4.4/070-v4.6-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch @@ -25,7 +25,7 @@ Signed-off-by: David S. Miller case BCMA_CHIP_ID_BCM53018: return true; default: -@@ -1055,8 +1056,9 @@ static void bgmac_chip_reset(struct bgma +@@ -1056,8 +1057,9 @@ static void bgmac_chip_reset(struct bgma (ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg == BCMA_PKG_ID_BCM47188)) iost &= ~BGMAC_BCMA_IOST_ATTACHED; diff --git a/target/linux/generic/patches-4.4/070-v4.6-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch b/target/linux/generic/patches-4.4/070-v4.6-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch deleted file mode 100644 index 021a5913aa..0000000000 --- a/target/linux/generic/patches-4.4/070-v4.6-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b4dfd8e92956b396d3438212bc9a0be6267b8b34 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Tue, 12 Apr 2016 13:30:45 +0200 -Subject: [PATCH] bgmac: reset & enable Ethernet core before using it -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This fixes Ethernet on D-Link DIR-885L with BCM47094 SoC. Felix reported -similar fix was needed for his BCM4709 device (Buffalo WXR-1900DHP?). -I tested this for regressions on BCM4706, BCM4708A0 and BCM47081A0. - -Cc: Felix Fietkau -Signed-off-by: Rafał Miłecki -Signed-off-by: David S. Miller ---- - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1586,6 +1586,11 @@ static int bgmac_probe(struct bcma_devic - dev_warn(&core->dev, "Using random MAC: %pM\n", mac); - } - -+ /* This (reset &) enable is not preset in specs or reference driver but -+ * Broadcom does it in arch PCI code when enabling fake PCI device. -+ */ -+ bcma_core_enable(core, 0); -+ - /* Allocation and references */ - net_dev = alloc_etherdev(sizeof(*bgmac)); - if (!net_dev) diff --git a/target/linux/generic/patches-4.4/070-v4.8-0001-bgmac-Bind-net_device-with-backing-device-structure.patch b/target/linux/generic/patches-4.4/070-v4.8-0001-bgmac-Bind-net_device-with-backing-device-structure.patch index 4d00094aa8..8f6d9a9ee7 100644 --- a/target/linux/generic/patches-4.4/070-v4.8-0001-bgmac-Bind-net_device-with-backing-device-structure.patch +++ b/target/linux/generic/patches-4.4/070-v4.8-0001-bgmac-Bind-net_device-with-backing-device-structure.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1602,6 +1602,7 @@ static int bgmac_probe(struct bcma_devic +@@ -1604,6 +1604,7 @@ static int bgmac_probe(struct bcma_devic bgmac->net_dev = net_dev; bgmac->core = core; bcma_set_drvdata(core, bgmac); diff --git a/target/linux/generic/patches-4.4/070-v4.8-0002-bgmac-Add-support-for-ethtool-statistics.patch b/target/linux/generic/patches-4.4/070-v4.8-0002-bgmac-Add-support-for-ethtool-statistics.patch index cff70802d2..585282b0aa 100644 --- a/target/linux/generic/patches-4.4/070-v4.8-0002-bgmac-Add-support-for-ethtool-statistics.patch +++ b/target/linux/generic/patches-4.4/070-v4.8-0002-bgmac-Add-support-for-ethtool-statistics.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1385,6 +1385,127 @@ static const struct net_device_ops bgmac +@@ -1387,6 +1387,127 @@ static const struct net_device_ops bgmac * ethtool_ops **************************************************/ @@ -143,7 +143,7 @@ Signed-off-by: David S. Miller static int bgmac_get_settings(struct net_device *net_dev, struct ethtool_cmd *cmd) { -@@ -1409,6 +1530,9 @@ static void bgmac_get_drvinfo(struct net +@@ -1411,6 +1532,9 @@ static void bgmac_get_drvinfo(struct net } static const struct ethtool_ops bgmac_ethtool_ops = { diff --git a/target/linux/generic/patches-4.4/070-v4.8-0003-bgmac-Maintain-some-netdev-statistics.patch b/target/linux/generic/patches-4.4/070-v4.8-0003-bgmac-Maintain-some-netdev-statistics.patch index 322851d026..1dbe1743df 100644 --- a/target/linux/generic/patches-4.4/070-v4.8-0003-bgmac-Maintain-some-netdev-statistics.patch +++ b/target/linux/generic/patches-4.4/070-v4.8-0003-bgmac-Maintain-some-netdev-statistics.patch @@ -23,7 +23,7 @@ Signed-off-by: David S. Miller return NETDEV_TX_OK; } -@@ -284,6 +286,8 @@ static void bgmac_dma_tx_free(struct bgm +@@ -285,6 +287,8 @@ static void bgmac_dma_tx_free(struct bgm DMA_TO_DEVICE); if (slot->skb) { @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller bytes_compl += slot->skb->len; pkts_compl++; -@@ -467,6 +471,7 @@ static int bgmac_dma_rx_read(struct bgma +@@ -468,6 +472,7 @@ static int bgmac_dma_rx_read(struct bgma bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n", ring->start); put_page(virt_to_head_page(buf)); @@ -40,7 +40,7 @@ Signed-off-by: David S. Miller break; } -@@ -474,6 +479,8 @@ static int bgmac_dma_rx_read(struct bgma +@@ -475,6 +480,8 @@ static int bgmac_dma_rx_read(struct bgma bgmac_err(bgmac, "Found oversized packet at slot %d, DMA issue!\n", ring->start); put_page(virt_to_head_page(buf)); @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller break; } -@@ -484,6 +491,7 @@ static int bgmac_dma_rx_read(struct bgma +@@ -485,6 +492,7 @@ static int bgmac_dma_rx_read(struct bgma if (unlikely(!skb)) { bgmac_err(bgmac, "build_skb failed\n"); put_page(virt_to_head_page(buf)); @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller break; } skb_put(skb, BGMAC_RX_FRAME_OFFSET + -@@ -493,6 +501,8 @@ static int bgmac_dma_rx_read(struct bgma +@@ -494,6 +502,8 @@ static int bgmac_dma_rx_read(struct bgma skb_checksum_none_assert(skb); skb->protocol = eth_type_trans(skb, bgmac->net_dev); diff --git a/target/linux/generic/patches-4.4/070-v4.8-0004-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch b/target/linux/generic/patches-4.4/070-v4.8-0004-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch index 8c97b09970..7ce6a09ec3 100644 --- a/target/linux/generic/patches-4.4/070-v4.8-0004-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch +++ b/target/linux/generic/patches-4.4/070-v4.8-0004-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch @@ -17,16 +17,16 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1323,7 +1323,7 @@ static int bgmac_open(struct net_device +@@ -1324,7 +1324,7 @@ static int bgmac_open(struct net_device } napi_enable(&bgmac->napi); - phy_start(bgmac->phy_dev); + phy_start(net_dev->phydev); - netif_carrier_on(net_dev); - return 0; -@@ -1335,7 +1335,7 @@ static int bgmac_stop(struct net_device + netif_start_queue(net_dev); + +@@ -1337,7 +1337,7 @@ static int bgmac_stop(struct net_device netif_carrier_off(net_dev); @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller napi_disable(&bgmac->napi); bgmac_chip_intrs_off(bgmac); -@@ -1373,12 +1373,10 @@ static int bgmac_set_mac_address(struct +@@ -1375,12 +1375,10 @@ static int bgmac_set_mac_address(struct static int bgmac_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd) { @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller } static const struct net_device_ops bgmac_netdev_ops = { -@@ -1521,7 +1519,7 @@ static int bgmac_get_settings(struct net +@@ -1523,7 +1521,7 @@ static int bgmac_get_settings(struct net { struct bgmac *bgmac = netdev_priv(net_dev); @@ -58,7 +58,7 @@ Signed-off-by: David S. Miller } static int bgmac_set_settings(struct net_device *net_dev, -@@ -1529,7 +1527,7 @@ static int bgmac_set_settings(struct net +@@ -1531,7 +1529,7 @@ static int bgmac_set_settings(struct net { struct bgmac *bgmac = netdev_priv(net_dev); @@ -67,7 +67,7 @@ Signed-off-by: David S. Miller } static void bgmac_get_drvinfo(struct net_device *net_dev, -@@ -1566,7 +1564,7 @@ static int bgmac_mii_write(struct mii_bu +@@ -1568,7 +1566,7 @@ static int bgmac_mii_write(struct mii_bu static void bgmac_adjust_link(struct net_device *net_dev) { struct bgmac *bgmac = netdev_priv(net_dev); @@ -76,7 +76,7 @@ Signed-off-by: David S. Miller bool update = false; if (phy_dev->link) { -@@ -1610,8 +1608,6 @@ static int bgmac_fixed_phy_register(stru +@@ -1612,8 +1610,6 @@ static int bgmac_fixed_phy_register(stru return err; } @@ -85,7 +85,7 @@ Signed-off-by: David S. Miller return err; } -@@ -1664,7 +1660,6 @@ static int bgmac_mii_register(struct bgm +@@ -1666,7 +1662,6 @@ static int bgmac_mii_register(struct bgm err = PTR_ERR(phy_dev); goto err_unregister_bus; } diff --git a/target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch b/target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch deleted file mode 100644 index ea73fda6ff..0000000000 --- a/target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch +++ /dev/null @@ -1,37 +0,0 @@ -From d2b13233879ca1268a1c027d4573109e5a777811 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Thu, 23 Jun 2016 14:23:12 -0700 -Subject: [PATCH 1/3] net: bgmac: Fix SOF bit checking - -We are checking for the Start of Frame bit in the ctl1 word, while this -bit is set in the ctl0 word instead. Read the ctl0 word and update the -check to verify that. - -Fixes: 9cde94506eac ("bgmac: implement scatter/gather support") -Signed-off-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -269,15 +269,16 @@ static void bgmac_dma_tx_free(struct bgm - while (ring->start != ring->end) { - int slot_idx = ring->start % BGMAC_TX_RING_SLOTS; - struct bgmac_slot_info *slot = &ring->slots[slot_idx]; -- u32 ctl1; -+ u32 ctl0, ctl1; - int len; - - if (slot_idx == empty_slot) - break; - -+ ctl0 = le32_to_cpu(ring->cpu_base[slot_idx].ctl0); - ctl1 = le32_to_cpu(ring->cpu_base[slot_idx].ctl1); - len = ctl1 & BGMAC_DESC_CTL1_LEN; -- if (ctl1 & BGMAC_DESC_CTL0_SOF) -+ if (ctl0 & BGMAC_DESC_CTL0_SOF) - /* Unmap no longer used buffer */ - dma_unmap_single(dma_dev, slot->dma_addr, len, - DMA_TO_DEVICE); diff --git a/target/linux/generic/patches-4.4/071-v4.7-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch b/target/linux/generic/patches-4.4/071-v4.7-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch deleted file mode 100644 index 6a866bccdb..0000000000 --- a/target/linux/generic/patches-4.4/071-v4.7-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c3897f2a69e54dd113fc9abd2daf872e5b495798 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Thu, 23 Jun 2016 14:25:32 -0700 -Subject: [PATCH 2/3] net: bgmac: Start transmit queue in bgmac_open - -The driver does not start the transmit queue in bgmac_open(). If the -queue was stopped prior to closing then re-opening the interface, we -would never be able to wake-up again. - -Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus") -Signed-off-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1327,6 +1327,9 @@ static int bgmac_open(struct net_device - phy_start(net_dev->phydev); - - netif_carrier_on(net_dev); -+ -+ netif_start_queue(net_dev); -+ - return 0; - } - diff --git a/target/linux/generic/patches-4.4/071-v4.7-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch b/target/linux/generic/patches-4.4/071-v4.7-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch deleted file mode 100644 index 0edf9ee9fa..0000000000 --- a/target/linux/generic/patches-4.4/071-v4.7-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3894396e64994f31c3ef5c7e6f63dded0593e567 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Thu, 23 Jun 2016 14:25:33 -0700 -Subject: [PATCH 3/3] net: bgmac: Remove superflous netif_carrier_on() - -bgmac_open() calls phy_start() to initialize the PHY state machine, -which will set the interface's carrier state accordingly, no need to -force that as this could be conflicting with the PHY state determined by -PHYLIB. - -Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus") -Signed-off-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 2 -- - 1 file changed, 2 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1326,8 +1326,6 @@ static int bgmac_open(struct net_device - - phy_start(net_dev->phydev); - -- netif_carrier_on(net_dev); -- - netif_start_queue(net_dev); - - return 0; diff --git a/target/linux/generic/patches-4.4/104-of-Add-check-to-of_scan_flat_dt-before-accessing-ini.patch b/target/linux/generic/patches-4.4/104-of-Add-check-to-of_scan_flat_dt-before-accessing-ini.patch deleted file mode 100644 index e7c125d8ec..0000000000 --- a/target/linux/generic/patches-4.4/104-of-Add-check-to-of_scan_flat_dt-before-accessing-ini.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Tobias Wolf -Date: Wed, 23 Nov 2016 10:40:07 +0100 -Subject: [PATCH] of: Add check to of_scan_flat_dt() before accessing - initial_boot_params - -An empty __dtb_start to __dtb_end section might result in initial_boot_params -being null for arch/mips/ralink. This showed that the boot process hangs -indefinitely in of_scan_flat_dt(). - -Signed-off-by: Tobias Wolf ---- - ---- a/drivers/of/fdt.c -+++ b/drivers/of/fdt.c -@@ -632,9 +632,12 @@ int __init of_scan_flat_dt(int (*it)(uns - const char *pathp; - int offset, rc = 0, depth = -1; - -- for (offset = fdt_next_node(blob, -1, &depth); -- offset >= 0 && depth >= 0 && !rc; -- offset = fdt_next_node(blob, offset, &depth)) { -+ if (!blob) -+ return 0; -+ -+ for (offset = fdt_next_node(blob, -1, &depth); -+ offset >= 0 && depth >= 0 && !rc; -+ offset = fdt_next_node(blob, offset, &depth)) { - - pathp = fdt_get_name(blob, offset, NULL); - if (*pathp == '/') diff --git a/target/linux/generic/patches-4.4/201-extra_optimization.patch b/target/linux/generic/patches-4.4/201-extra_optimization.patch index 04192727c0..2f834422cb 100644 --- a/target/linux/generic/patches-4.4/201-extra_optimization.patch +++ b/target/linux/generic/patches-4.4/201-extra_optimization.patch @@ -1,7 +1,7 @@ --- a/Makefile +++ b/Makefile -@@ -621,12 +621,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni - KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) +@@ -624,12 +624,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni + KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os diff --git a/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch index 89bafa8387..e81ebbb3fa 100644 --- a/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch +++ b/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch @@ -4,7 +4,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1159,6 +1159,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1166,6 +1166,7 @@ int spi_nor_scan(struct spi_nor *nor, co if (JEDEC_MFR(info) == SNOR_MFR_ATMEL || JEDEC_MFR(info) == SNOR_MFR_INTEL || diff --git a/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch b/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch index 8952ab4e20..9d1962caa9 100644 --- a/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch +++ b/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch @@ -70,10 +70,10 @@ + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops, TC_H_MAKE(TC_H_MAJ(sch->handle), TC_H_MIN(ntx + 1))); - if (qdisc == NULL) + if (!qdisc) --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c -@@ -124,7 +124,7 @@ static int mqprio_init(struct Qdisc *sch +@@ -122,7 +122,7 @@ static int mqprio_init(struct Qdisc *sch for (i = 0; i < dev->num_tx_queues; i++) { dev_queue = netdev_get_tx_queue(dev, i); @@ -81,10 +81,10 @@ + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops, TC_H_MAKE(TC_H_MAJ(sch->handle), TC_H_MIN(i + 1))); - if (qdisc == NULL) { + if (!qdisc) --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -1948,7 +1948,7 @@ static int __init pktsched_init(void) +@@ -1951,7 +1951,7 @@ static int __init pktsched_init(void) return err; } diff --git a/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 1ec2b81e1a..c6c65d9f39 100644 --- a/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -88,7 +88,7 @@ Signed-off-by: Jonas Gorski default: --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c -@@ -84,6 +84,10 @@ static int fib6_rule_action(struct fib_r +@@ -73,6 +73,10 @@ static int fib6_rule_action(struct fib_r err = -EACCES; rt = net->ipv6.ip6_prohibit_entry; goto discard_pkt; @@ -183,7 +183,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3093,6 +3127,9 @@ static int rt6_fill_node(struct net *net +@@ -3087,6 +3121,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 case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3372,6 +3409,8 @@ static int ip6_route_dev_notify(struct n +@@ -3366,6 +3403,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 net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3594,6 +3633,17 @@ static int __net_init ip6_route_net_init +@@ -3588,6 +3627,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 #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3612,6 +3662,8 @@ out: +@@ -3606,6 +3656,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -229,7 +229,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3629,6 +3681,7 @@ static void __net_exit ip6_route_net_exi +@@ -3623,6 +3675,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 #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3702,6 +3755,9 @@ void __init ip6_route_init_special_entri +@@ -3696,6 +3749,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 4ef11ed17e..0c5871048b 100644 --- a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4248,6 +4248,9 @@ static enum gro_result dev_gro_receive(s +@@ -4249,6 +4249,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau if (!(skb->dev->features & NETIF_F_GRO)) goto normal; -@@ -5404,6 +5407,48 @@ static void __netdev_adjacent_dev_unlink +@@ -5415,6 +5418,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *private) -@@ -5475,6 +5520,7 @@ static int __netdev_upper_dev_link(struc +@@ -5486,6 +5531,7 @@ static int __netdev_upper_dev_link(struc goto rollback_lower_mesh; } @@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); return 0; -@@ -5601,6 +5647,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -5612,6 +5658,7 @@ void netdev_upper_dev_unlink(struct net_ list_for_each_entry(i, &upper_dev->all_adj_list.upper, list) __netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr); @@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6141,6 +6188,7 @@ int dev_set_mac_address(struct net_devic +@@ -6152,6 +6199,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/patches-4.4/721-phy_packets.patch b/target/linux/generic/patches-4.4/721-phy_packets.patch index 7dac46a4db..b163684c69 100644 --- a/target/linux/generic/patches-4.4/721-phy_packets.patch +++ b/target/linux/generic/patches-4.4/721-phy_packets.patch @@ -86,7 +86,7 @@ help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2735,10 +2735,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -2736,10 +2736,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/ipq806x/patches-4.4/400-dsa-add-qca.patch b/target/linux/ipq806x/patches-4.4/400-dsa-add-qca.patch index 1cadba2009..c369ab914a 100644 --- a/target/linux/ipq806x/patches-4.4/400-dsa-add-qca.patch +++ b/target/linux/ipq806x/patches-4.4/400-dsa-add-qca.patch @@ -820,7 +820,7 @@ Signed-off-by: Mathieu Olivari #endif --- a/net/dsa/slave.c +++ b/net/dsa/slave.c -@@ -1182,6 +1182,11 @@ int dsa_slave_create(struct dsa_switch * +@@ -1180,6 +1180,11 @@ int dsa_slave_create(struct dsa_switch * p->xmit = brcm_netdev_ops.xmit; break; #endif diff --git a/target/linux/layerscape/patches-4.4/1074-mtd-nand-spi-nor-assign-MTD-of_node.patch b/target/linux/layerscape/patches-4.4/1074-mtd-nand-spi-nor-assign-MTD-of_node.patch index e383347895..358b51245f 100644 --- a/target/linux/layerscape/patches-4.4/1074-mtd-nand-spi-nor-assign-MTD-of_node.patch +++ b/target/linux/layerscape/patches-4.4/1074-mtd-nand-spi-nor-assign-MTD-of_node.patch @@ -21,7 +21,7 @@ Signed-off-by: Yuan Yao --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1221,6 +1221,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1228,6 +1228,7 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->flags |= MTD_NO_ERASE; mtd->dev.parent = dev; diff --git a/target/linux/layerscape/patches-4.4/1075-mtd-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch b/target/linux/layerscape/patches-4.4/1075-mtd-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch index 596cc6fcb7..bbe29b612a 100644 --- a/target/linux/layerscape/patches-4.4/1075-mtd-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch +++ b/target/linux/layerscape/patches-4.4/1075-mtd-spi-nor-convert-to-spi_nor_-get-set-_flash_node.patch @@ -69,7 +69,7 @@ Reviewed-by: Boris Brezillon spifi->nor.write = nxp_spifi_write; --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1113,7 +1113,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1120,7 +1120,7 @@ int spi_nor_scan(struct spi_nor *nor, co const struct flash_info *info = NULL; struct device *dev = nor->dev; struct mtd_info *mtd = &nor->mtd; diff --git a/target/linux/layerscape/patches-4.4/1078-mtd-spi-nor-drop-flash_node-field.patch b/target/linux/layerscape/patches-4.4/1078-mtd-spi-nor-drop-flash_node-field.patch index 45c69a85cd..dc551dfabb 100644 --- a/target/linux/layerscape/patches-4.4/1078-mtd-spi-nor-drop-flash_node-field.patch +++ b/target/linux/layerscape/patches-4.4/1078-mtd-spi-nor-drop-flash_node-field.patch @@ -14,7 +14,7 @@ Reviewed-by: Boris Brezillon --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1221,7 +1221,6 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1228,7 +1228,6 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->flags |= MTD_NO_ERASE; mtd->dev.parent = dev; diff --git a/target/linux/layerscape/patches-4.4/1081-mtd-spi-nor-provide-default-erase_sector-implementat.patch b/target/linux/layerscape/patches-4.4/1081-mtd-spi-nor-provide-default-erase_sector-implementat.patch index c5029b87a2..e966cafce6 100644 --- a/target/linux/layerscape/patches-4.4/1081-mtd-spi-nor-provide-default-erase_sector-implementat.patch +++ b/target/linux/layerscape/patches-4.4/1081-mtd-spi-nor-provide-default-erase_sector-implementat.patch @@ -69,7 +69,7 @@ Signed-off-by: Brian Norris addr += mtd->erasesize; len -= mtd->erasesize; -@@ -1100,7 +1123,7 @@ static int set_quad_mode(struct spi_nor +@@ -1107,7 +1130,7 @@ static int set_quad_mode(struct spi_nor static int spi_nor_check(struct spi_nor *nor) { if (!nor->dev || !nor->read || !nor->write || @@ -78,7 +78,7 @@ Signed-off-by: Brian Norris pr_err("spi-nor: please fill all the necessary fields!\n"); return -EINVAL; } -@@ -1303,6 +1326,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1310,6 +1333,12 @@ int spi_nor_scan(struct spi_nor *nor, co nor->addr_width = 3; } diff --git a/target/linux/layerscape/patches-4.4/1090-mtd-spi-nor-Add-SPI-NOR-layer-PM-support.patch b/target/linux/layerscape/patches-4.4/1090-mtd-spi-nor-Add-SPI-NOR-layer-PM-support.patch index 65a6633453..de3d2d5456 100644 --- a/target/linux/layerscape/patches-4.4/1090-mtd-spi-nor-Add-SPI-NOR-layer-PM-support.patch +++ b/target/linux/layerscape/patches-4.4/1090-mtd-spi-nor-Add-SPI-NOR-layer-PM-support.patch @@ -24,7 +24,7 @@ Integrated-by: Jiang Yutang --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1141,6 +1141,26 @@ static int spi_nor_check(struct spi_nor +@@ -1148,6 +1148,26 @@ static int spi_nor_check(struct spi_nor return 0; } @@ -51,7 +51,7 @@ Integrated-by: Jiang Yutang int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) { const struct flash_info *info = NULL; -@@ -1188,19 +1208,9 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1195,19 +1215,9 @@ int spi_nor_scan(struct spi_nor *nor, co mutex_init(&nor->lock); @@ -74,7 +74,7 @@ Integrated-by: Jiang Yutang if (!mtd->name) mtd->name = dev_name(dev); -@@ -1367,6 +1377,45 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1374,6 +1384,45 @@ int spi_nor_scan(struct spi_nor *nor, co } EXPORT_SYMBOL_GPL(spi_nor_scan); diff --git a/target/linux/layerscape/patches-4.4/1100-mtd-spi_nor-Disable-Micron-flash-HW-protection.patch b/target/linux/layerscape/patches-4.4/1100-mtd-spi_nor-Disable-Micron-flash-HW-protection.patch index a5495616e9..47fef5cd0c 100644 --- a/target/linux/layerscape/patches-4.4/1100-mtd-spi_nor-Disable-Micron-flash-HW-protection.patch +++ b/target/linux/layerscape/patches-4.4/1100-mtd-spi_nor-Disable-Micron-flash-HW-protection.patch @@ -24,7 +24,7 @@ Signed-off-by: Yunhui Cui struct flash_info { char *name; -@@ -1239,6 +1240,14 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1246,6 +1247,14 @@ int spi_nor_scan(struct spi_nor *nor, co if (ret) return ret; diff --git a/target/linux/layerscape/patches-4.4/1103-mtd-spi-nor-Support-R-W-for-S25FS-S-family-flash.patch b/target/linux/layerscape/patches-4.4/1103-mtd-spi-nor-Support-R-W-for-S25FS-S-family-flash.patch index 9cfa2697a8..7b954dd5c8 100644 --- a/target/linux/layerscape/patches-4.4/1103-mtd-spi-nor-Support-R-W-for-S25FS-S-family-flash.patch +++ b/target/linux/layerscape/patches-4.4/1103-mtd-spi-nor-Support-R-W-for-S25FS-S-family-flash.patch @@ -95,7 +95,7 @@ Signed-off-by: Yunhui Cui static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) { -@@ -1248,6 +1302,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1255,6 +1309,12 @@ int spi_nor_scan(struct spi_nor *nor, co write_sr(nor, ret); } diff --git a/target/linux/layerscape/patches-4.4/1105-mtd-spi-nor-add-DDR-quad-read-support.patch b/target/linux/layerscape/patches-4.4/1105-mtd-spi-nor-add-DDR-quad-read-support.patch index bad120e7be..df7e0d82f8 100644 --- a/target/linux/layerscape/patches-4.4/1105-mtd-spi-nor-add-DDR-quad-read-support.patch +++ b/target/linux/layerscape/patches-4.4/1105-mtd-spi-nor-add-DDR-quad-read-support.patch @@ -63,7 +63,7 @@ Signed-off-by: Yunhui Cui { "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) }, -@@ -1188,6 +1194,23 @@ static int spansion_quad_enable(struct s +@@ -1195,6 +1201,23 @@ static int spansion_quad_enable(struct s return 0; } @@ -87,7 +87,7 @@ Signed-off-by: Yunhui Cui static int set_quad_mode(struct spi_nor *nor, const struct flash_info *info) { int status; -@@ -1378,8 +1401,15 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1385,8 +1408,15 @@ int spi_nor_scan(struct spi_nor *nor, co if (info->flags & SPI_NOR_NO_FR) nor->flash_read = SPI_NOR_NORMAL; @@ -105,7 +105,7 @@ Signed-off-by: Yunhui Cui ret = set_quad_mode(nor, info); if (ret) { dev_err(dev, "quad mode not supported\n"); -@@ -1392,6 +1422,14 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1399,6 +1429,14 @@ int spi_nor_scan(struct spi_nor *nor, co /* Default commands */ switch (nor->flash_read) { @@ -120,7 +120,7 @@ Signed-off-by: Yunhui Cui case SPI_NOR_QUAD: nor->read_opcode = SPINOR_OP_READ_1_1_4; break; -@@ -1419,6 +1457,9 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1426,6 +1464,9 @@ int spi_nor_scan(struct spi_nor *nor, co if (JEDEC_MFR(info) == SNOR_MFR_SPANSION) { /* Dedicated 4-byte command set */ switch (nor->flash_read) { @@ -130,7 +130,7 @@ Signed-off-by: Yunhui Cui case SPI_NOR_QUAD: nor->read_opcode = SPINOR_OP_READ4_1_1_4; break; -@@ -1448,7 +1489,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1455,7 +1496,7 @@ int spi_nor_scan(struct spi_nor *nor, co return -EINVAL; } diff --git a/target/linux/layerscape/patches-4.4/1110-mtd-spi-nor-fsl-quad-add-flash-S25FS-extra-support.patch b/target/linux/layerscape/patches-4.4/1110-mtd-spi-nor-fsl-quad-add-flash-S25FS-extra-support.patch index 8dab548550..c018a33fb0 100644 --- a/target/linux/layerscape/patches-4.4/1110-mtd-spi-nor-fsl-quad-add-flash-S25FS-extra-support.patch +++ b/target/linux/layerscape/patches-4.4/1110-mtd-spi-nor-fsl-quad-add-flash-S25FS-extra-support.patch @@ -136,7 +136,7 @@ Integrated-by: Jiang Yutang return 0; } -@@ -1336,6 +1333,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1343,6 +1340,8 @@ int spi_nor_scan(struct spi_nor *nor, co if (!mtd->name) mtd->name = dev_name(dev); diff --git a/target/linux/layerscape/patches-4.4/7018-devres-add-devm_alloc_percpu.patch b/target/linux/layerscape/patches-4.4/7018-devres-add-devm_alloc_percpu.patch index 4962d4bada..835403e582 100644 --- a/target/linux/layerscape/patches-4.4/7018-devres-add-devm_alloc_percpu.patch +++ b/target/linux/layerscape/patches-4.4/7018-devres-add-devm_alloc_percpu.patch @@ -110,7 +110,7 @@ Conflicts: +EXPORT_SYMBOL_GPL(devm_free_percpu); --- a/include/linux/device.h +++ b/include/linux/device.h -@@ -681,6 +681,25 @@ void __iomem *devm_ioremap_resource(stru +@@ -683,6 +683,25 @@ void __iomem *devm_ioremap_resource(stru int devm_add_action(struct device *dev, void (*action)(void *), void *data); void devm_remove_action(struct device *dev, void (*action)(void *), void *data); diff --git a/target/linux/layerscape/patches-4.4/8138-pci-layerscape-add-MSI-interrupt-support.patch b/target/linux/layerscape/patches-4.4/8138-pci-layerscape-add-MSI-interrupt-support.patch index 0db0a6b6d3..cbfa86c1e2 100644 --- a/target/linux/layerscape/patches-4.4/8138-pci-layerscape-add-MSI-interrupt-support.patch +++ b/target/linux/layerscape/patches-4.4/8138-pci-layerscape-add-MSI-interrupt-support.patch @@ -69,7 +69,7 @@ Signed-off-by: Zhao Qiang if (IS_ERR(group)) --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c -@@ -686,10 +686,10 @@ static struct iommu_group *get_pci_alias +@@ -697,10 +697,10 @@ static struct iommu_group *get_pci_alias continue; /* We alias them or they alias us */ diff --git a/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch b/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch index f081439f6e..3e39b0601f 100644 --- a/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch +++ b/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch @@ -1428,7 +1428,7 @@ Reviewed-by: Daniel Thompson /* * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA -@@ -3110,17 +3111,22 @@ static u32 xhci_td_remainder(struct xhci +@@ -3113,17 +3114,22 @@ static u32 xhci_td_remainder(struct xhci { u32 maxp, total_packet_count; @@ -1455,7 +1455,7 @@ Reviewed-by: Daniel Thompson /* Queueing functions don't count the current TRB into transferred */ return (total_packet_count - ((transferred + trb_buff_len) / maxp)); } -@@ -3508,7 +3514,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3511,7 +3517,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * field |= 0x1; /* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */ diff --git a/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch b/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch index 4b25d18f96..48fda9b020 100644 --- a/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch +++ b/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch @@ -4370,7 +4370,7 @@ Signed-off-by: John Crispin write_enable(nor); write_sr(nor, val | SR_QUAD_EN_MX); -@@ -1100,7 +1247,7 @@ static int set_quad_mode(struct spi_nor +@@ -1107,7 +1254,7 @@ static int set_quad_mode(struct spi_nor static int spi_nor_check(struct spi_nor *nor) { if (!nor->dev || !nor->read || !nor->write || @@ -4379,7 +4379,7 @@ Signed-off-by: John Crispin pr_err("spi-nor: please fill all the necessary fields!\n"); return -EINVAL; } -@@ -1113,7 +1260,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1120,7 +1267,7 @@ int spi_nor_scan(struct spi_nor *nor, co const struct flash_info *info = NULL; struct device *dev = nor->dev; struct mtd_info *mtd = &nor->mtd; @@ -4388,7 +4388,7 @@ Signed-off-by: John Crispin int ret; int i; -@@ -1167,6 +1314,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1174,6 +1321,7 @@ int spi_nor_scan(struct spi_nor *nor, co info->flags & SPI_NOR_HAS_LOCK) { write_enable(nor); write_sr(nor, 0); @@ -4396,7 +4396,7 @@ Signed-off-by: John Crispin } if (!mtd->name) -@@ -1201,6 +1349,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1208,6 +1356,8 @@ int spi_nor_scan(struct spi_nor *nor, co if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; @@ -4405,7 +4405,7 @@ Signed-off-by: John Crispin #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ -@@ -1303,6 +1453,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1310,6 +1460,12 @@ int spi_nor_scan(struct spi_nor *nor, co nor->addr_width = 3; } diff --git a/target/linux/mvebu/patches-4.4/030-mvneta-consolidate-autoneg-enabling.patch b/target/linux/mvebu/patches-4.4/030-mvneta-consolidate-autoneg-enabling.patch index 1d98c7decc..c398a47341 100644 --- a/target/linux/mvebu/patches-4.4/030-mvneta-consolidate-autoneg-enabling.patch +++ b/target/linux/mvebu/patches-4.4/030-mvneta-consolidate-autoneg-enabling.patch @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller } mvneta_set_ucast_table(pp, -1); -@@ -3230,9 +3243,6 @@ static int mvneta_port_power_up(struct m +@@ -3228,9 +3241,6 @@ static int mvneta_port_power_up(struct m return -EINVAL; } diff --git a/target/linux/mvebu/patches-4.4/031-mvneta-implement-ethtool-autonegotiation-control.patch b/target/linux/mvebu/patches-4.4/031-mvneta-implement-ethtool-autonegotiation-control.patch index 626b511c45..dc4a224b74 100644 --- a/target/linux/mvebu/patches-4.4/031-mvneta-implement-ethtool-autonegotiation-control.patch +++ b/target/linux/mvebu/patches-4.4/031-mvneta-implement-ethtool-autonegotiation-control.patch @@ -118,7 +118,7 @@ Signed-off-by: David S. Miller mvneta_set_ucast_table(pp, -1); mvneta_set_special_mcast_table(pp, -1); mvneta_set_other_mcast_table(pp, -1); -@@ -2956,10 +2962,43 @@ int mvneta_ethtool_get_settings(struct n +@@ -2954,10 +2960,43 @@ int mvneta_ethtool_get_settings(struct n int mvneta_ethtool_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct mvneta_port *pp = netdev_priv(dev); diff --git a/target/linux/mvebu/patches-4.4/032-net-mvneta-Make-the-default-queue-related-for-each-p.patch b/target/linux/mvebu/patches-4.4/032-net-mvneta-Make-the-default-queue-related-for-each-p.patch index 54c93998f6..83782a0b4f 100644 --- a/target/linux/mvebu/patches-4.4/032-net-mvneta-Make-the-default-queue-related-for-each-p.patch +++ b/target/linux/mvebu/patches-4.4/032-net-mvneta-Make-the-default-queue-related-for-each-p.patch @@ -120,7 +120,7 @@ Signed-off-by: David S. Miller for_each_online_cpu(cpu) { if (i == online_cpu_idx) -@@ -3363,6 +3364,8 @@ static int mvneta_probe(struct platform_ +@@ -3361,6 +3362,8 @@ static int mvneta_probe(struct platform_ strcmp(managed, "in-band-status") == 0); pp->cpu_notifier.notifier_call = mvneta_percpu_notifier; diff --git a/target/linux/mvebu/patches-4.4/034-net-mvneta-Add-naive-RSS-support.patch b/target/linux/mvebu/patches-4.4/034-net-mvneta-Add-naive-RSS-support.patch index 629c44c8a1..9d729b50bb 100644 --- a/target/linux/mvebu/patches-4.4/034-net-mvneta-Add-naive-RSS-support.patch +++ b/target/linux/mvebu/patches-4.4/034-net-mvneta-Add-naive-RSS-support.patch @@ -62,7 +62,7 @@ Signed-off-by: David S. Miller static void mvneta_start_dev(struct mvneta_port *pp) { unsigned int cpu; -@@ -3231,6 +3250,106 @@ static int mvneta_ethtool_get_sset_count +@@ -3229,6 +3248,106 @@ static int mvneta_ethtool_get_sset_count return -EOPNOTSUPP; } @@ -169,7 +169,7 @@ Signed-off-by: David S. Miller static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -3255,6 +3374,10 @@ const struct ethtool_ops mvneta_eth_tool +@@ -3253,6 +3372,10 @@ const struct ethtool_ops mvneta_eth_tool .get_strings = mvneta_ethtool_get_strings, .get_ethtool_stats = mvneta_ethtool_get_stats, .get_sset_count = mvneta_ethtool_get_sset_count, @@ -180,7 +180,7 @@ Signed-off-by: David S. Miller }; /* Initialize hw */ -@@ -3446,6 +3569,8 @@ static int mvneta_probe(struct platform_ +@@ -3444,6 +3567,8 @@ static int mvneta_probe(struct platform_ pp->rxq_def = rxq_def; diff --git a/target/linux/mvebu/patches-4.4/036-net-mvneta-fix-trivial-cut-off-issue-in-mvneta_ethto.patch b/target/linux/mvebu/patches-4.4/036-net-mvneta-fix-trivial-cut-off-issue-in-mvneta_ethto.patch index 2bd7a88032..d88336701d 100644 --- a/target/linux/mvebu/patches-4.4/036-net-mvneta-fix-trivial-cut-off-issue-in-mvneta_ethto.patch +++ b/target/linux/mvebu/patches-4.4/036-net-mvneta-fix-trivial-cut-off-issue-in-mvneta_ethto.patch @@ -13,7 +13,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3242,26 +3242,25 @@ static void mvneta_ethtool_update_stats( +@@ -3240,26 +3240,25 @@ static void mvneta_ethtool_update_stats( const struct mvneta_statistic *s; void __iomem *base = pp->base; u32 high, low, val; diff --git a/target/linux/mvebu/patches-4.4/037-net-mvneta-Fix-for_each_present_cpu-usage.patch b/target/linux/mvebu/patches-4.4/037-net-mvneta-Fix-for_each_present_cpu-usage.patch deleted file mode 100644 index 9ded5b71fe..0000000000 --- a/target/linux/mvebu/patches-4.4/037-net-mvneta-Fix-for_each_present_cpu-usage.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Gregory CLEMENT -Date: Thu, 4 Feb 2016 22:09:23 +0100 -Subject: [PATCH] net: mvneta: Fix for_each_present_cpu usage - -This patch convert the for_each_present in on_each_cpu, instead of -applying on the present cpus it will be applied only on the online cpus. -This fix a bug reported on -http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173. - -Using the macro on_each_cpu (instead of a for_each_* loop) also ensures -that all the calls will be done all at once. - -Fixes: f86428854480 ("net: mvneta: Statically assign queues to CPUs") -Reported-by: Stefan Roese -Suggested-by: Jisheng Zhang -Suggested-by: Russell King -Signed-off-by: Gregory CLEMENT -Signed-off-by: David S. Miller ---- - ---- a/drivers/net/ethernet/marvell/mvneta.c -+++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -2562,7 +2562,7 @@ static void mvneta_start_dev(struct mvne - mvneta_port_enable(pp); - - /* Enable polling on the port */ -- for_each_present_cpu(cpu) { -+ for_each_online_cpu(cpu) { - struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); - - napi_enable(&port->napi); -@@ -2587,7 +2587,7 @@ static void mvneta_stop_dev(struct mvnet - - phy_stop(pp->phy_dev); - -- for_each_present_cpu(cpu) { -+ for_each_online_cpu(cpu) { - struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); - - napi_disable(&port->napi); -@@ -3055,13 +3055,11 @@ err_cleanup_rxqs: - static int mvneta_stop(struct net_device *dev) - { - struct mvneta_port *pp = netdev_priv(dev); -- int cpu; - - mvneta_stop_dev(pp); - mvneta_mdio_remove(pp); - unregister_cpu_notifier(&pp->cpu_notifier); -- for_each_present_cpu(cpu) -- smp_call_function_single(cpu, mvneta_percpu_disable, pp, true); -+ on_each_cpu(mvneta_percpu_disable, pp, true); - free_percpu_irq(dev->irq, pp->ports); - mvneta_cleanup_rxqs(pp); - mvneta_cleanup_txqs(pp); diff --git a/target/linux/mvebu/patches-4.4/126-phy-marvell-88E1512-add-flow-control-support.patch b/target/linux/mvebu/patches-4.4/126-phy-marvell-88E1512-add-flow-control-support.patch index e731c4ddf5..cfb0202196 100644 --- a/target/linux/mvebu/patches-4.4/126-phy-marvell-88E1512-add-flow-control-support.patch +++ b/target/linux/mvebu/patches-4.4/126-phy-marvell-88E1512-add-flow-control-support.patch @@ -15,7 +15,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c -@@ -1142,7 +1142,7 @@ static struct phy_driver marvell_drivers +@@ -1148,7 +1148,7 @@ static struct phy_driver marvell_drivers .phy_id = MARVELL_PHY_ID_88E1510, .phy_id_mask = MARVELL_PHY_ID_MASK, .name = "Marvell 88E1510", diff --git a/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch b/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch index 4b25d18f96..48fda9b020 100644 --- a/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch +++ b/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch @@ -4370,7 +4370,7 @@ Signed-off-by: John Crispin write_enable(nor); write_sr(nor, val | SR_QUAD_EN_MX); -@@ -1100,7 +1247,7 @@ static int set_quad_mode(struct spi_nor +@@ -1107,7 +1254,7 @@ static int set_quad_mode(struct spi_nor static int spi_nor_check(struct spi_nor *nor) { if (!nor->dev || !nor->read || !nor->write || @@ -4379,7 +4379,7 @@ Signed-off-by: John Crispin pr_err("spi-nor: please fill all the necessary fields!\n"); return -EINVAL; } -@@ -1113,7 +1260,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1120,7 +1267,7 @@ int spi_nor_scan(struct spi_nor *nor, co const struct flash_info *info = NULL; struct device *dev = nor->dev; struct mtd_info *mtd = &nor->mtd; @@ -4388,7 +4388,7 @@ Signed-off-by: John Crispin int ret; int i; -@@ -1167,6 +1314,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1174,6 +1321,7 @@ int spi_nor_scan(struct spi_nor *nor, co info->flags & SPI_NOR_HAS_LOCK) { write_enable(nor); write_sr(nor, 0); @@ -4396,7 +4396,7 @@ Signed-off-by: John Crispin } if (!mtd->name) -@@ -1201,6 +1349,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1208,6 +1356,8 @@ int spi_nor_scan(struct spi_nor *nor, co if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; @@ -4405,7 +4405,7 @@ Signed-off-by: John Crispin #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ -@@ -1303,6 +1453,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1310,6 +1460,12 @@ int spi_nor_scan(struct spi_nor *nor, co nor->addr_width = 3; } diff --git a/target/linux/ramips/patches-4.4/0010-MIPS-ralink-Add-a-few-missing-clocks.patch b/target/linux/ramips/patches-4.4/0010-MIPS-ralink-Add-a-few-missing-clocks.patch index a3f267704d..1b679442a9 100644 --- a/target/linux/ramips/patches-4.4/0010-MIPS-ralink-Add-a-few-missing-clocks.patch +++ b/target/linux/ramips/patches-4.4/0010-MIPS-ralink-Add-a-few-missing-clocks.patch @@ -15,7 +15,7 @@ Signed-off-by: Ralf Baechle --- a/arch/mips/ralink/mt7620.c +++ b/arch/mips/ralink/mt7620.c -@@ -436,7 +436,10 @@ void __init ralink_clk_init(void) +@@ -456,7 +456,10 @@ void __init ralink_clk_init(void) ralink_clk_add("10000100.timer", periph_rate); ralink_clk_add("10000120.watchdog", periph_rate); ralink_clk_add("10000b00.spi", sys_rate); @@ -25,7 +25,7 @@ Signed-off-by: Ralf Baechle + ralink_clk_add("10000e00.uart2", periph_rate); ralink_clk_add("10180000.wmac", xtal_rate); - if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) { + if (IS_ENABLED(CONFIG_USB) && !is_mt76x8()) { --- a/arch/mips/ralink/rt305x.c +++ b/arch/mips/ralink/rt305x.c @@ -190,6 +190,7 @@ void __init ralink_clk_init(void) diff --git a/target/linux/ramips/patches-4.4/0022-MIPS-ralink-Fix-vendor-string-for-mt7620.patch b/target/linux/ramips/patches-4.4/0022-MIPS-ralink-Fix-vendor-string-for-mt7620.patch index 05017b1bff..977bab88f9 100644 --- a/target/linux/ramips/patches-4.4/0022-MIPS-ralink-Fix-vendor-string-for-mt7620.patch +++ b/target/linux/ramips/patches-4.4/0022-MIPS-ralink-Fix-vendor-string-for-mt7620.patch @@ -16,7 +16,7 @@ Signed-off-by: Ralf Baechle --- a/arch/mips/ralink/mt7620.c +++ b/arch/mips/ralink/mt7620.c -@@ -555,7 +555,7 @@ void prom_soc_init(struct ralink_soc_inf +@@ -575,7 +575,7 @@ void prom_soc_init(struct ralink_soc_inf } snprintf(soc_info->sys_type, RAMIPS_SYS_TYPE_LEN, diff --git a/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch b/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch index 6dfb53ea3e..316e5d8fd4 100644 --- a/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch +++ b/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch @@ -1420,7 +1420,7 @@ Signed-off-by: Greg Kroah-Hartman /* * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA -@@ -3110,17 +3111,22 @@ static u32 xhci_td_remainder(struct xhci +@@ -3113,17 +3114,22 @@ static u32 xhci_td_remainder(struct xhci { u32 maxp, total_packet_count; @@ -1447,7 +1447,7 @@ Signed-off-by: Greg Kroah-Hartman /* Queueing functions don't count the current TRB into transferred */ return (total_packet_count - ((transferred + trb_buff_len) / maxp)); } -@@ -3508,7 +3514,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3511,7 +3517,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * field |= 0x1; /* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */ diff --git a/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch b/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch index 8eef3affed..7a01846ae1 100644 --- a/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch +++ b/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch @@ -67,7 +67,7 @@ static int macronix_quad_enable(struct spi_nor *nor) { int ret, val; -@@ -1194,10 +1254,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1201,10 +1261,12 @@ int spi_nor_scan(struct spi_nor *nor, co } /* sst nor chips use AAI word program */ @@ -82,7 +82,7 @@ if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; -@@ -1225,11 +1287,20 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1232,11 +1294,20 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->writebufsize = nor->page_size; if (np) { diff --git a/target/linux/ramips/patches-4.4/0065-MIPS-ralink-MT7688-pinmux-fixes.patch b/target/linux/ramips/patches-4.4/0065-MIPS-ralink-MT7688-pinmux-fixes.patch deleted file mode 100644 index 18571e6928..0000000000 --- a/target/linux/ramips/patches-4.4/0065-MIPS-ralink-MT7688-pinmux-fixes.patch +++ /dev/null @@ -1,166 +0,0 @@ -From e906a5f67e5a3337d696ec848e9c28fc68b39aa3 Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Mon, 4 Jan 2016 20:23:56 +0100 -Subject: [PATCH] MIPS: ralink: MT7688 pinmux fixes - -A few fixes to the pinmux data, 2 new muxes and a minor whitespace -cleanup. - -Signed-off-by: John Crispin -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/11991/ -Signed-off-by: Ralf Baechle ---- - arch/mips/ralink/mt7620.c | 80 +++++++++++++++++++++++++++++------------------ - 1 file changed, 50 insertions(+), 30 deletions(-) - ---- a/arch/mips/ralink/mt7620.c -+++ b/arch/mips/ralink/mt7620.c -@@ -107,31 +107,31 @@ static struct rt2880_pmx_group mt7620a_p - }; - - static struct rt2880_pmx_func pwm1_grp_mt7628[] = { -- FUNC("sdcx", 3, 19, 1), -+ FUNC("sdxc d6", 3, 19, 1), - FUNC("utif", 2, 19, 1), - FUNC("gpio", 1, 19, 1), -- FUNC("pwm", 0, 19, 1), -+ FUNC("pwm1", 0, 19, 1), - }; - - static struct rt2880_pmx_func pwm0_grp_mt7628[] = { -- FUNC("sdcx", 3, 18, 1), -+ FUNC("sdxc d7", 3, 18, 1), - FUNC("utif", 2, 18, 1), - FUNC("gpio", 1, 18, 1), -- FUNC("pwm", 0, 18, 1), -+ FUNC("pwm0", 0, 18, 1), - }; - - static struct rt2880_pmx_func uart2_grp_mt7628[] = { -- FUNC("sdcx", 3, 20, 2), -+ FUNC("sdxc d5 d4", 3, 20, 2), - FUNC("pwm", 2, 20, 2), - FUNC("gpio", 1, 20, 2), -- FUNC("uart", 0, 20, 2), -+ FUNC("uart2", 0, 20, 2), - }; - - static struct rt2880_pmx_func uart1_grp_mt7628[] = { -- FUNC("sdcx", 3, 45, 2), -+ FUNC("sw_r", 3, 45, 2), - FUNC("pwm", 2, 45, 2), - FUNC("gpio", 1, 45, 2), -- FUNC("uart", 0, 45, 2), -+ FUNC("uart1", 0, 45, 2), - }; - - static struct rt2880_pmx_func i2c_grp_mt7628[] = { -@@ -143,21 +143,21 @@ static struct rt2880_pmx_func i2c_grp_mt - - static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 36, 1) }; - static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 37, 1) }; --static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 15, 38) }; -+static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) }; - static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) }; - - static struct rt2880_pmx_func sd_mode_grp_mt7628[] = { - FUNC("jtag", 3, 22, 8), - FUNC("utif", 2, 22, 8), - FUNC("gpio", 1, 22, 8), -- FUNC("sdcx", 0, 22, 8), -+ FUNC("sdxc", 0, 22, 8), - }; - - static struct rt2880_pmx_func uart0_grp_mt7628[] = { - FUNC("-", 3, 12, 2), - FUNC("-", 2, 12, 2), - FUNC("gpio", 1, 12, 2), -- FUNC("uart", 0, 12, 2), -+ FUNC("uart0", 0, 12, 2), - }; - - static struct rt2880_pmx_func i2s_grp_mt7628[] = { -@@ -171,7 +171,7 @@ static struct rt2880_pmx_func spi_cs1_gr - FUNC("-", 3, 6, 1), - FUNC("refclk", 2, 6, 1), - FUNC("gpio", 1, 6, 1), -- FUNC("spi", 0, 6, 1), -+ FUNC("spi cs1", 0, 6, 1), - }; - - static struct rt2880_pmx_func spis_grp_mt7628[] = { -@@ -188,28 +188,44 @@ static struct rt2880_pmx_func gpio_grp_m - FUNC("gpio", 0, 11, 1), - }; - --#define MT7628_GPIO_MODE_MASK 0x3 -- --#define MT7628_GPIO_MODE_PWM1 30 --#define MT7628_GPIO_MODE_PWM0 28 --#define MT7628_GPIO_MODE_UART2 26 --#define MT7628_GPIO_MODE_UART1 24 --#define MT7628_GPIO_MODE_I2C 20 --#define MT7628_GPIO_MODE_REFCLK 18 --#define MT7628_GPIO_MODE_PERST 16 --#define MT7628_GPIO_MODE_WDT 14 --#define MT7628_GPIO_MODE_SPI 12 --#define MT7628_GPIO_MODE_SDMODE 10 --#define MT7628_GPIO_MODE_UART0 8 --#define MT7628_GPIO_MODE_I2S 6 --#define MT7628_GPIO_MODE_CS1 4 --#define MT7628_GPIO_MODE_SPIS 2 --#define MT7628_GPIO_MODE_GPIO 0 -+static struct rt2880_pmx_func wled_kn_grp_mt7628[] = { -+ FUNC("rsvd", 3, 35, 1), -+ FUNC("rsvd", 2, 35, 1), -+ FUNC("gpio", 1, 35, 1), -+ FUNC("wled_kn", 0, 35, 1), -+}; -+ -+static struct rt2880_pmx_func wled_an_grp_mt7628[] = { -+ FUNC("rsvd", 3, 35, 1), -+ FUNC("rsvd", 2, 35, 1), -+ FUNC("gpio", 1, 35, 1), -+ FUNC("wled_an", 0, 35, 1), -+}; -+ -+#define MT7628_GPIO_MODE_MASK 0x3 -+ -+#define MT7628_GPIO_MODE_WLED_KN 48 -+#define MT7628_GPIO_MODE_WLED_AN 32 -+#define MT7628_GPIO_MODE_PWM1 30 -+#define MT7628_GPIO_MODE_PWM0 28 -+#define MT7628_GPIO_MODE_UART2 26 -+#define MT7628_GPIO_MODE_UART1 24 -+#define MT7628_GPIO_MODE_I2C 20 -+#define MT7628_GPIO_MODE_REFCLK 18 -+#define MT7628_GPIO_MODE_PERST 16 -+#define MT7628_GPIO_MODE_WDT 14 -+#define MT7628_GPIO_MODE_SPI 12 -+#define MT7628_GPIO_MODE_SDMODE 10 -+#define MT7628_GPIO_MODE_UART0 8 -+#define MT7628_GPIO_MODE_I2S 6 -+#define MT7628_GPIO_MODE_CS1 4 -+#define MT7628_GPIO_MODE_SPIS 2 -+#define MT7628_GPIO_MODE_GPIO 0 - - static struct rt2880_pmx_group mt7628an_pinmux_data[] = { - GRP_G("pmw1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, - 1, MT7628_GPIO_MODE_PWM1), -- GRP_G("pmw1", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, -+ GRP_G("pmw0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, - 1, MT7628_GPIO_MODE_PWM0), - GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK, - 1, MT7628_GPIO_MODE_UART2), -@@ -233,6 +249,10 @@ static struct rt2880_pmx_group mt7628an_ - 1, MT7628_GPIO_MODE_SPIS), - GRP_G("gpio", gpio_grp_mt7628, MT7628_GPIO_MODE_MASK, - 1, MT7628_GPIO_MODE_GPIO), -+ GRP_G("wled_an", wled_an_grp_mt7628, MT7628_GPIO_MODE_MASK, -+ 1, MT7628_GPIO_MODE_WLED_AN), -+ GRP_G("wled_kn", wled_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, -+ 1, MT7628_GPIO_MODE_WLED_KN), - { 0 } - }; - diff --git a/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch b/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch deleted file mode 100644 index c7eec6ecf2..0000000000 --- a/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ae28413b3b8901ea00af3571e1c90d0228976e16 Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Mon, 4 Jan 2016 20:23:57 +0100 -Subject: [PATCH 80/81] MIPS: ralink: fix USB frequency scaling - -Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") was not fully -correct. The logic for the SoC check got inverted. We need to check if it -is not a MT76x8. - -Signed-off-by: John Crispin -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/11992/ -Signed-off-by: Ralf Baechle ---- - arch/mips/ralink/mt7620.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/ralink/mt7620.c -+++ b/arch/mips/ralink/mt7620.c -@@ -462,7 +462,7 @@ void __init ralink_clk_init(void) - ralink_clk_add("10000e00.uart2", periph_rate); - ralink_clk_add("10180000.wmac", xtal_rate); - -- if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) { -+ if (IS_ENABLED(CONFIG_USB) && !is_mt76x8()) { - /* - * When the CPU goes into sleep mode, the BUS clock will be - * too low for USB to function properly. Adjust the busses diff --git a/target/linux/ramips/patches-4.4/0081-MIPS-ralink-Fix-invalid-assignment-of-SoC-type.patch b/target/linux/ramips/patches-4.4/0081-MIPS-ralink-Fix-invalid-assignment-of-SoC-type.patch deleted file mode 100644 index 35065f589b..0000000000 --- a/target/linux/ramips/patches-4.4/0081-MIPS-ralink-Fix-invalid-assignment-of-SoC-type.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0af3a40f09a2a85089037a0b5b51471fa48b229e Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Mon, 4 Jan 2016 20:23:58 +0100 -Subject: [PATCH] MIPS: ralink: Fix invalid assignment of SoC type - -Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") introduced -broken code. We obviously need to assign the value. - -Signed-off-by: John Crispin -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/11993/ -Signed-off-by: Ralf Baechle ---- - arch/mips/ralink/rt288x.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/ralink/rt288x.c -+++ b/arch/mips/ralink/rt288x.c -@@ -109,5 +109,5 @@ void prom_soc_init(struct ralink_soc_inf - soc_info->mem_size_max = RT2880_MEM_SIZE_MAX; - - rt2880_pinmux_data = rt2880_pinmux_data_act; -- ralink_soc == RT2880_SOC; -+ ralink_soc = RT2880_SOC; - } diff --git a/target/linux/ramips/patches-4.4/0082-MIPS-ralink-fix-MT7628-pinmux-typos.patch b/target/linux/ramips/patches-4.4/0082-MIPS-ralink-fix-MT7628-pinmux-typos.patch deleted file mode 100644 index 12bd1ea851..0000000000 --- a/target/linux/ramips/patches-4.4/0082-MIPS-ralink-fix-MT7628-pinmux-typos.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d7146829c9da24e285cb1b1f2156b5b3e2d40c07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Thu, 19 May 2016 22:07:34 +0200 -Subject: [PATCH] MIPS: ralink: fix MT7628 pinmux typos -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Álvaro Fernández Rojas -Cc: john@phrozen.org -Cc: linux-mips@linux-mips.org -Cc: linux-kernel@vger.kernel.org -Patchwork: https://patchwork.linux-mips.org/patch/13306/ -Signed-off-by: Ralf Baechle ---- - arch/mips/ralink/mt7620.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/arch/mips/ralink/mt7620.c -+++ b/arch/mips/ralink/mt7620.c -@@ -223,9 +223,9 @@ static struct rt2880_pmx_func wled_an_gr - #define MT7628_GPIO_MODE_GPIO 0 - - static struct rt2880_pmx_group mt7628an_pinmux_data[] = { -- GRP_G("pmw1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, -+ GRP_G("pwm1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, - 1, MT7628_GPIO_MODE_PWM1), -- GRP_G("pmw0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, -+ GRP_G("pwm0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, - 1, MT7628_GPIO_MODE_PWM0), - GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK, - 1, MT7628_GPIO_MODE_UART2), diff --git a/target/linux/ramips/patches-4.4/0083-MIPS-ralink-fix-MT7628-wled_an-pinmux-gpio.patch b/target/linux/ramips/patches-4.4/0083-MIPS-ralink-fix-MT7628-wled_an-pinmux-gpio.patch deleted file mode 100644 index 544ac75d50..0000000000 --- a/target/linux/ramips/patches-4.4/0083-MIPS-ralink-fix-MT7628-wled_an-pinmux-gpio.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 07b50db6e685172a41b9978aebffb2438166d9b6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Thu, 19 May 2016 22:07:35 +0200 -Subject: [PATCH] MIPS: ralink: fix MT7628 wled_an pinmux gpio -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Álvaro Fernández Rojas -Cc: john@phrozen.org -Cc: linux-mips@linux-mips.org -Cc: linux-kernel@vger.kernel.org -Patchwork: https://patchwork.linux-mips.org/patch/13307/ -Signed-off-by: Ralf Baechle ---- - arch/mips/ralink/mt7620.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/arch/mips/ralink/mt7620.c -+++ b/arch/mips/ralink/mt7620.c -@@ -196,10 +196,10 @@ static struct rt2880_pmx_func wled_kn_gr - }; - - static struct rt2880_pmx_func wled_an_grp_mt7628[] = { -- FUNC("rsvd", 3, 35, 1), -- FUNC("rsvd", 2, 35, 1), -- FUNC("gpio", 1, 35, 1), -- FUNC("wled_an", 0, 35, 1), -+ FUNC("rsvd", 3, 44, 1), -+ FUNC("rsvd", 2, 44, 1), -+ FUNC("gpio", 1, 44, 1), -+ FUNC("wled_an", 0, 44, 1), - }; - - #define MT7628_GPIO_MODE_MASK 0x3 diff --git a/target/linux/rb532/patches-4.4/100-korina_fix_napi_disable.patch b/target/linux/rb532/patches-4.4/100-korina_fix_napi_disable.patch deleted file mode 100644 index 3a67297df0..0000000000 --- a/target/linux/rb532/patches-4.4/100-korina_fix_napi_disable.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 5833532b49820aa221248f296c207cc50d20ca2d Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Fri, 23 Dec 2016 19:36:31 -0800 -Subject: [PATCH net] net: korina: Fix NAPI versus resources freeing - -Commit beb0babfb77e ("korina: disable napi on close and restart") -introduced calls to napi_disable() that were missing before, -unfortunately this leaves a small window during which NAPI has a chance -to run, yet we just freed resources since korina_free_ring() has been -called: - -Fix this by disabling NAPI first then freeing resource, and make sure -that we also cancel the restart taks before doing the resource freeing. - -Fixes: beb0babfb77e ("korina: disable napi on close and restart") -Reported-by: Alexandros C. Couloumbis -Signed-off-by: Florian Fainelli ---- - drivers/net/ethernet/korina.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -900,10 +900,10 @@ static void korina_restart_task(struct w - DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR, - &lp->rx_dma_regs->dmasm); - -- korina_free_ring(dev); -- - napi_disable(&lp->napi); - -+ korina_free_ring(dev); -+ - if (korina_init(dev) < 0) { - printk(KERN_ERR "%s: cannot restart device\n", dev->name); - return; -@@ -1064,12 +1064,12 @@ static int korina_close(struct net_devic - tmp = tmp | DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR; - writel(tmp, &lp->rx_dma_regs->dmasm); - -- korina_free_ring(dev); -- - napi_disable(&lp->napi); - - cancel_work_sync(&lp->restart_task); - -+ korina_free_ring(dev); -+ - free_irq(lp->rx_irq, dev); - free_irq(lp->tx_irq, dev); - free_irq(lp->ovr_irq, dev); -- 2.25.1