From 0232f57e1af6580542c0ed1ce1d76c7cd4084613 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Wed, 15 Apr 2020 14:55:36 +0200 Subject: [PATCH] kernel: bump 4.14 to 4.14.176 Refreshed all patches. Remove upstreamed: - 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch - 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch - 003-ARM-dts-oxnas-Fix-clear-mask-property.patch Fixes: - CVE-2020-8647 - CVE-2020-8648 (potentially) - CVE-2020-8649 Compile-tested on: cns3xxx, octeontx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 +- ...mware-loader-for-uPD720201-and-uPD72.patch | 6 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- .../910-unaligned_access_hacks.patch | 2 +- .../910-unaligned_access_hacks.patch | 2 +- .../950-0037-Add-dwc_otg-driver.patch | 2 +- ...o_user-and-__copy_from_user-performa.patch | 2 +- ...oup-Disable-cgroup-memory-by-default.patch | 6 +- ...-0294-net-phy-add-unlocked-accessors.patch | 4 +- ...phy-add-paged-phy-register-accessors.patch | 4 +- ...tcp-allow-drivers-to-tweak-TSQ-logic.patch | 2 +- ...ption-fix-dwm-158-3g-modem-interface.patch | 2 +- ...-adv-Convert-packet.h-to-uapi-header.patch | 16 +-- ...conntrack-add-IPS_OFFLOAD-status-bit.patch | 6 +- ...w_table-fix-offloaded-connection-tim.patch | 4 +- ...ll-ipv6_mc_up-for-non-Ethernet-inter.patch | 71 ----------- ...y-serial-exar-generalize-rs485-setup.patch | 4 +- .../702-phy_add_aneg_done_function.patch | 4 +- .../hack-4.14/901-debloat_sock_diag.patch | 2 +- .../generic/hack-4.14/902-debloat_proc.patch | 8 +- .../pending-4.14/630-packet_socket_type.patch | 10 +- ...ng-with-source-address-failed-policy.patch | 16 +-- ...detach-callback-to-struct-phy_driver.patch | 4 +- ...707-dpaa-ethernet-support-layerscape.patch | 48 ++++---- .../806-rtc-support-layerscape.patch | 2 +- .../807-usb-support-layerscape.patch | 6 +- .../816-pcie-support-layerscape.patch | 2 +- .../patches-4.14/0052-net-phy-add-FC.patch | 2 +- ...tek-add-driver-for-RTC-on-MT7622-SoC.patch | 2 +- ...ance-the-description-for-MediaTek-PM.patch | 2 +- ...low-imod-interval-to-be-configurable.patch | 2 +- .../300-mvneta-tx-queue-workaround.patch | 4 +- .../403-net-mvneta-convert-to-phylink.patch | 40 +++---- ...04-net-mvneta-hack-fix-phy_interface.patch | 2 +- ...le-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch | 6 +- ...ta-add-module-EEPROM-reading-support.patch | 4 +- ...eeprom-ethtool-access-into-netdev-co.patch | 4 +- ...-support-for-rgmii-internal-delay-mo.patch | 14 +-- ...rx-workaround-BGX-TX-Underflow-issue.patch | 110 ------------------ ...satile-fpga-Apply-clear-mask-earlier.patch | 6 +- ...RM-dts-oxnas-Fix-clear-mask-property.patch | 55 --------- .../0034-NET-multi-phy-support.patch | 4 +- 42 files changed, 130 insertions(+), 368 deletions(-) delete mode 100644 target/linux/generic/backport-4.14/600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch delete mode 100644 target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch delete mode 100644 target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3aa07411e6..93464d4593 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.14 = .172 +LINUX_VERSION-4.14 = .176 -LINUX_KERNEL_HASH-4.14.172 = 2318a1ab937580a079351ed20557c336a3d95b664f667b14e3ba49e3271b217a +LINUX_KERNEL_HASH-4.14.176 = bcae0956baaeb55dab5bad0401873fbc5baaa7fbe957ea6d27a5ab241cec5ca2 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index 892cdaef33..f95fdf3d7f 100644 --- a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter #include "xhci.h" #include "xhci-trace.h" -@@ -268,6 +270,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -269,6 +271,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -306,6 +760,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -307,6 +761,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter driver = (struct hc_driver *)id->driver_data; /* For some HW implementation, a XHCI reset is just not enough... */ -@@ -367,6 +837,16 @@ static void xhci_pci_remove(struct pci_d +@@ -368,6 +838,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch index c7315f9b8b..1fe94e8c6f 100644 --- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -221,7 +221,7 @@ static void xhci_pci_quirks(struct devic +@@ -222,7 +222,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) diff --git a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch index 6c216712b1..2585bb10c1 100644 --- a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch @@ -223,7 +223,7 @@ #include #include #include -@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s +@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch index cff52e5add..5622f0662a 100644 --- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch @@ -214,7 +214,7 @@ #include #include #include -@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s +@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { diff --git a/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch index fc86e81902..5cb3fffcc0 100644 --- a/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch @@ -841,7 +841,7 @@ Signed-off-by: Malik Olivier Boussejra } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5112,7 +5112,7 @@ static void port_event(struct usb_hub *h +@@ -5116,7 +5116,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.14/950-0061-Improve-__copy_to_user-and-__copy_from_user-performa.patch b/target/linux/brcm2708/patches-4.14/950-0061-Improve-__copy_to_user-and-__copy_from_user-performa.patch index b8f7de202d..1045733b63 100644 --- a/target/linux/brcm2708/patches-4.14/950-0061-Improve-__copy_to_user-and-__copy_from_user-performa.patch +++ b/target/linux/brcm2708/patches-4.14/950-0061-Improve-__copy_to_user-and-__copy_from_user-performa.patch @@ -279,7 +279,7 @@ Signed-off-by: Phil Elwell ENDPROC(arm_copy_from_user) +ENDPROC(__copy_from_user_std) - .pushsection .fixup,"ax" + .pushsection .text.fixup,"ax" .align 0 --- /dev/null +++ b/arch/arm/lib/exports_rpi.c diff --git a/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch b/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch index 6aefcb5052..ec964531cb 100644 --- a/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch +++ b/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch @@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c -@@ -5207,6 +5207,8 @@ int __init cgroup_init_early(void) +@@ -5220,6 +5220,8 @@ int __init cgroup_init_early(void) } static u16 cgroup_disable_mask __initdata; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell /** * cgroup_init - cgroup initialization -@@ -5245,6 +5247,12 @@ int __init cgroup_init(void) +@@ -5258,6 +5260,12 @@ int __init cgroup_init(void) mutex_unlock(&cgroup_mutex); @@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell for_each_subsys(ss, ssid) { if (ss->early_init) { struct cgroup_subsys_state *css = -@@ -5636,6 +5644,28 @@ static int __init cgroup_disable(char *s +@@ -5649,6 +5657,28 @@ static int __init cgroup_disable(char *s } __setup("cgroup_disable=", cgroup_disable); diff --git a/target/linux/brcm2708/patches-4.14/950-0294-net-phy-add-unlocked-accessors.patch b/target/linux/brcm2708/patches-4.14/950-0294-net-phy-add-unlocked-accessors.patch index f0b916e86c..9a6dc179e9 100644 --- a/target/linux/brcm2708/patches-4.14/950-0294-net-phy-add-unlocked-accessors.patch +++ b/target/linux/brcm2708/patches-4.14/950-0294-net-phy-add-unlocked-accessors.patch @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller +EXPORT_SYMBOL_GPL(__phy_modify); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -726,6 +726,18 @@ static inline int phy_read(struct phy_de +@@ -728,6 +728,18 @@ static inline int phy_read(struct phy_de } /** @@ -72,7 +72,7 @@ Signed-off-by: David S. Miller * phy_write - Convenience function for writing a given PHY register * @phydev: the phy_device struct * @regnum: register number to write -@@ -741,6 +753,22 @@ static inline int phy_write(struct phy_d +@@ -743,6 +755,22 @@ static inline int phy_write(struct phy_d } /** diff --git a/target/linux/brcm2708/patches-4.14/950-0295-net-phy-add-paged-phy-register-accessors.patch b/target/linux/brcm2708/patches-4.14/950-0295-net-phy-add-paged-phy-register-accessors.patch index 51866b4485..b1da67fea2 100644 --- a/target/linux/brcm2708/patches-4.14/950-0295-net-phy-add-paged-phy-register-accessors.patch +++ b/target/linux/brcm2708/patches-4.14/950-0295-net-phy-add-paged-phy-register-accessors.patch @@ -181,7 +181,7 @@ Signed-off-by: David S. Miller +EXPORT_SYMBOL(phy_modify_paged); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -644,6 +644,9 @@ struct phy_driver { +@@ -646,6 +646,9 @@ struct phy_driver { int (*write_mmd)(struct phy_device *dev, int devnum, u16 regnum, u16 val); @@ -191,7 +191,7 @@ Signed-off-by: David S. Miller /* Get the size and type of the eeprom contained within a plug-in * module */ int (*module_info)(struct phy_device *dev, -@@ -832,6 +835,14 @@ static inline bool phy_is_pseudo_fixed_l +@@ -834,6 +837,14 @@ static inline bool phy_is_pseudo_fixed_l */ int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val); diff --git a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch index b851799824..7939ee46b0 100644 --- a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch +++ b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch @@ -55,7 +55,7 @@ Cc: Kir Kolyshkin rwlock_t sk_callback_lock; --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -2745,6 +2745,7 @@ void sock_init_data(struct socket *sock, +@@ -2748,6 +2748,7 @@ void sock_init_data(struct socket *sock, sk->sk_max_pacing_rate = ~0U; sk->sk_pacing_rate = ~0U; diff --git a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch index c09a5e47f8..6d6c575ae7 100644 --- a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch +++ b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch @@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -1981,7 +1981,8 @@ static const struct usb_device_id option +@@ -1983,7 +1983,8 @@ static const struct usb_device_id option { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, diff --git a/target/linux/generic/backport-4.14/273-batman-adv-Convert-packet.h-to-uapi-header.patch b/target/linux/generic/backport-4.14/273-batman-adv-Convert-packet.h-to-uapi-header.patch index 0435803f51..a9f744fd13 100644 --- a/target/linux/generic/backport-4.14/273-batman-adv-Convert-packet.h-to-uapi-header.patch +++ b/target/linux/generic/backport-4.14/273-batman-adv-Convert-packet.h-to-uapi-header.patch @@ -27,7 +27,7 @@ Signed-off-by: David S. Miller --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c -@@ -51,6 +51,7 @@ +@@ -52,6 +52,7 @@ #include #include #include @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller #include #include "bat_algo.h" -@@ -62,7 +63,6 @@ +@@ -63,7 +64,6 @@ #include "netlink.h" #include "network-coding.h" #include "originator.h" @@ -45,7 +45,7 @@ Signed-off-by: David S. Miller #include "translation-table.h" --- a/net/batman-adv/bat_v.c +++ b/net/batman-adv/bat_v.c -@@ -37,6 +37,7 @@ +@@ -36,6 +36,7 @@ #include #include #include @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller #include #include "bat_algo.h" -@@ -49,7 +50,6 @@ +@@ -48,7 +49,6 @@ #include "log.h" #include "netlink.h" #include "originator.h" @@ -80,7 +80,7 @@ Signed-off-by: David S. Miller --- a/net/batman-adv/bat_v_ogm.c +++ b/net/batman-adv/bat_v_ogm.c -@@ -38,13 +38,13 @@ +@@ -40,13 +40,13 @@ #include #include #include @@ -174,7 +174,7 @@ Signed-off-by: David S. Miller /** --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c -@@ -36,6 +36,7 @@ +@@ -37,6 +37,7 @@ #include #include #include @@ -182,7 +182,7 @@ Signed-off-by: David S. Miller #include "bat_v.h" #include "bridge_loop_avoidance.h" -@@ -44,7 +45,6 @@ +@@ -45,7 +46,6 @@ #include "gateway_client.h" #include "log.h" #include "originator.h" @@ -1025,7 +1025,7 @@ Signed-off-by: David S. Miller --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h -@@ -34,10 +34,9 @@ +@@ -35,10 +35,9 @@ #include #include #include diff --git a/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch b/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch index de88825802..885d632d22 100644 --- a/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch +++ b/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch @@ -47,7 +47,7 @@ Signed-off-by: Pablo Neira Ayuso }; --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -960,6 +960,9 @@ static unsigned int early_drop_list(stru +@@ -974,6 +974,9 @@ static unsigned int early_drop_list(stru hlist_nulls_for_each_entry_rcu(h, n, head, hnnode) { tmp = nf_ct_tuplehash_to_ctrack(h); @@ -57,7 +57,7 @@ Signed-off-by: Pablo Neira Ayuso if (nf_ct_is_expired(tmp)) { nf_ct_gc_expired(tmp); continue; -@@ -1037,6 +1040,18 @@ static bool gc_worker_can_early_drop(con +@@ -1051,6 +1054,18 @@ static bool gc_worker_can_early_drop(con return false; } @@ -76,7 +76,7 @@ Signed-off-by: Pablo Neira Ayuso static void gc_worker(struct work_struct *work) { unsigned int min_interval = max(HZ / GC_MAX_BUCKETS_DIV, 1u); -@@ -1073,6 +1088,11 @@ static void gc_worker(struct work_struct +@@ -1087,6 +1102,11 @@ static void gc_worker(struct work_struct tmp = nf_ct_tuplehash_to_ctrack(h); scanned++; diff --git a/target/linux/generic/backport-4.14/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch b/target/linux/generic/backport-4.14/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch index 286f1f659c..d82854908f 100644 --- a/target/linux/generic/backport-4.14/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch +++ b/target/linux/generic/backport-4.14/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -1040,18 +1040,6 @@ static bool gc_worker_can_early_drop(con +@@ -1054,18 +1054,6 @@ static bool gc_worker_can_early_drop(con return false; } @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau static void gc_worker(struct work_struct *work) { unsigned int min_interval = max(HZ / GC_MAX_BUCKETS_DIV, 1u); -@@ -1088,10 +1076,8 @@ static void gc_worker(struct work_struct +@@ -1102,10 +1090,8 @@ static void gc_worker(struct work_struct tmp = nf_ct_tuplehash_to_ctrack(h); scanned++; diff --git a/target/linux/generic/backport-4.14/600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch b/target/linux/generic/backport-4.14/600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch deleted file mode 100644 index ba0d137096..0000000000 --- a/target/linux/generic/backport-4.14/600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 82afdcd4ec3c8ca6551cbf7c43c09e2fd240487a Mon Sep 17 00:00:00 2001 -From: Hangbin Liu -Date: Tue, 10 Mar 2020 15:27:37 +0800 -Subject: [PATCH] ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Rafał found an issue that for non-Ethernet interface, if we down and up -frequently, the memory will be consumed slowly. - -The reason is we add allnodes/allrouters addressed in multicast list in -ipv6_add_dev(). When link down, we call ipv6_mc_down(), store all multicast -addresses via mld_add_delrec(). But when link up, we don't call ipv6_mc_up() -for non-Ethernet interface to remove the addresses. This makes idev->mc_tomb -getting bigger and bigger. The call stack looks like: - -addrconf_notify(NETDEV_REGISTER) - ipv6_add_dev - ipv6_dev_mc_inc(ff01::1) - ipv6_dev_mc_inc(ff02::1) - ipv6_dev_mc_inc(ff02::2) - -addrconf_notify(NETDEV_UP) - addrconf_dev_config - /* Alas, we support only Ethernet autoconfiguration. */ - return; - -addrconf_notify(NETDEV_DOWN) - addrconf_ifdown - ipv6_mc_down - igmp6_group_dropped(ff02::2) - mld_add_delrec(ff02::2) - igmp6_group_dropped(ff02::1) - igmp6_group_dropped(ff01::1) - -After investigating, I can't found a rule to disable multicast on -non-Ethernet interface. In RFC2460, the link could be Ethernet, PPP, ATM, -tunnels, etc. In IPv4, it doesn't check the dev type when calls ip_mc_up() -in inetdev_event(). Even for IPv6, we don't check the dev type and call -ipv6_add_dev(), ipv6_dev_mc_inc() after register device. - -So I think it's OK to fix this memory consumer by calling ipv6_mc_up() for -non-Ethernet interface. - -v2: Also check IFF_MULTICAST flag to make sure the interface supports - multicast - -Reported-by: Rafał Miłecki -Tested-by: Rafał Miłecki -Fixes: 74235a25c673 ("[IPV6] addrconf: Fix IPv6 on tuntap tunnels") -Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down") -Signed-off-by: Hangbin Liu -Signed-off-by: David S. Miller ---- - net/ipv6/addrconf.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/net/ipv6/addrconf.c -+++ b/net/ipv6/addrconf.c -@@ -3223,6 +3223,10 @@ static void addrconf_dev_config(struct n - (dev->type != ARPHRD_TUNNEL) && - (dev->type != ARPHRD_NONE)) { - /* Alas, we support only Ethernet autoconfiguration. */ -+ idev = __in6_dev_get(dev); -+ if (!IS_ERR_OR_NULL(idev) && dev->flags & IFF_UP && -+ dev->flags & IFF_MULTICAST) -+ ipv6_mc_up(idev); - return; - } - diff --git a/target/linux/generic/backport-4.14/950-tty-serial-exar-generalize-rs485-setup.patch b/target/linux/generic/backport-4.14/950-tty-serial-exar-generalize-rs485-setup.patch index 42c4705e51..353dc14949 100644 --- a/target/linux/generic/backport-4.14/950-tty-serial-exar-generalize-rs485-setup.patch +++ b/target/linux/generic/backport-4.14/950-tty-serial-exar-generalize-rs485-setup.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c -@@ -275,8 +275,32 @@ static int xr17v35x_register_gpio(struct +@@ -283,8 +283,32 @@ static int xr17v35x_register_gpio(struct return 0; } @@ -52,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman }; static int iot2040_rs485_config(struct uart_port *port, -@@ -309,19 +333,7 @@ static int iot2040_rs485_config(struct u +@@ -317,19 +341,7 @@ static int iot2040_rs485_config(struct u value |= mode; writeb(value, p + UART_EXAR_MPIOLVL_7_0); diff --git a/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch index cc84311ef9..5885c8fae6 100644 --- a/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch @@ -1,6 +1,6 @@ --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -547,6 +547,12 @@ struct phy_driver { +@@ -549,6 +549,12 @@ struct phy_driver { /* Determines the negotiated speed and duplex */ int (*read_status)(struct phy_device *phydev); @@ -15,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1462,6 +1462,9 @@ int genphy_update_link(struct phy_device +@@ -1466,6 +1466,9 @@ int genphy_update_link(struct phy_device { int status; diff --git a/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch b/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch index 5945aee556..a4ca573569 100644 --- a/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau u64 res; --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig -@@ -420,6 +420,7 @@ config INET_XFRM_MODE_BEET +@@ -421,6 +421,7 @@ config INET_XFRM_MODE_BEET config INET_DIAG tristate "INET: socket monitoring interface" diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch index 478a3ac632..30328b87d7 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau return -ENOMEM; --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -2783,6 +2783,8 @@ static const struct file_operations proc +@@ -2786,6 +2786,8 @@ static const struct file_operations proc static int __init proc_vmalloc_init(void) { @@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3384,6 +3384,8 @@ static __net_initdata struct pernet_oper +@@ -3387,6 +3387,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { @@ -338,7 +338,7 @@ Signed-off-by: Felix Fietkau --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c -@@ -2740,10 +2740,12 @@ static const struct file_operations fib_ +@@ -2743,10 +2743,12 @@ static const struct file_operations fib_ int __net_init fib_proc_init(struct net *net) { @@ -353,7 +353,7 @@ Signed-off-by: Felix Fietkau &fib_triestat_fops)) goto out2; -@@ -2753,17 +2755,21 @@ int __net_init fib_proc_init(struct net +@@ -2756,17 +2758,21 @@ int __net_init fib_proc_init(struct net return 0; out3: diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch index a4737b23ef..c4bd5fdaba 100644 --- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2213,12 +2215,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2214,12 +2216,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3301,6 +3303,7 @@ static int packet_create(struct net *net +@@ -3313,6 +3315,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3923,6 +3926,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3935,6 +3938,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3975,6 +3988,13 @@ static int packet_getsockopt(struct sock +@@ -3987,6 +4000,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; @@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau break; --- a/net/packet/internal.h +++ b/net/packet/internal.h -@@ -132,6 +132,7 @@ struct packet_sock { +@@ -135,6 +135,7 @@ struct packet_sock { struct net_device __rcu *cached_dev; int (*xmit)(struct sk_buff *skb); struct packet_type prot_hook ____cacheline_aligned_in_smp; diff --git a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index e6b0940a0b..57ba68f4b6 100644 --- a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski static void rt_fibinfo_free(struct rtable __rcu **rtp) --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c -@@ -2469,6 +2469,7 @@ static const char *const rtn_type_names[ +@@ -2472,6 +2472,7 @@ static const char *const rtn_type_names[ [RTN_THROW] = "THROW", [RTN_NAT] = "NAT", [RTN_XRESOLVE] = "XRESOLVE", @@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3514,6 +3548,9 @@ static int rt6_fill_node(struct net *net +@@ -3515,6 +3549,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3832,6 +3869,8 @@ static int ip6_route_dev_notify(struct n +@@ -3833,6 +3870,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3843,6 +3882,7 @@ static int ip6_route_dev_notify(struct n +@@ -3844,6 +3883,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -4059,6 +4099,17 @@ static int __net_init ip6_route_net_init +@@ -4060,6 +4100,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); @@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -4077,6 +4128,8 @@ out: +@@ -4078,6 +4129,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -4094,6 +4147,7 @@ static void __net_exit ip6_route_net_exi +@@ -4095,6 +4148,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); @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -4167,6 +4221,9 @@ void __init ip6_route_init_special_entri +@@ -4168,6 +4222,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch index d49fdc77ab..03579657ee 100644 --- a/target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1106,6 +1106,9 @@ void phy_detach(struct phy_device *phyde +@@ -1110,6 +1110,9 @@ void phy_detach(struct phy_device *phyde struct module *ndev_owner = dev->dev.parent->driver->owner; struct mii_bus *bus; @@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev"); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -559,6 +559,12 @@ struct phy_driver { +@@ -561,6 +561,12 @@ struct phy_driver { */ int (*did_interrupt)(struct phy_device *phydev); diff --git a/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch b/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch index 6d39a85eae..30f2ea720f 100644 --- a/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch @@ -1306,7 +1306,7 @@ Signed-off-by: Zhao Qiang } static const struct net_device_ops dpaa_ops = { -@@ -2654,7 +2938,6 @@ static inline u16 dpaa_get_headroom(stru +@@ -2652,7 +2936,6 @@ static inline u16 dpaa_get_headroom(stru static int dpaa_eth_probe(struct platform_device *pdev) { struct dpaa_bp *dpaa_bps[DPAA_BPS_NUM] = {NULL}; @@ -1314,7 +1314,7 @@ Signed-off-by: Zhao Qiang struct net_device *net_dev = NULL; struct dpaa_fq *dpaa_fq, *tmp; struct dpaa_priv *priv = NULL; -@@ -2663,7 +2946,51 @@ static int dpaa_eth_probe(struct platfor +@@ -2661,7 +2944,51 @@ static int dpaa_eth_probe(struct platfor int err = 0, i, channel; struct device *dev; @@ -1367,7 +1367,7 @@ Signed-off-by: Zhao Qiang /* Allocate this early, so we can store relevant information in * the private area -@@ -2671,7 +2998,7 @@ static int dpaa_eth_probe(struct platfor +@@ -2669,7 +2996,7 @@ static int dpaa_eth_probe(struct platfor net_dev = alloc_etherdev_mq(sizeof(*priv), DPAA_ETH_TXQ_NUM); if (!net_dev) { dev_err(dev, "alloc_etherdev_mq() failed\n"); @@ -1376,7 +1376,7 @@ Signed-off-by: Zhao Qiang } /* Do this here, so we can be verbose early */ -@@ -2683,13 +3010,6 @@ static int dpaa_eth_probe(struct platfor +@@ -2681,13 +3008,6 @@ static int dpaa_eth_probe(struct platfor priv->msg_enable = netif_msg_init(debug, DPAA_MSG_DEFAULT); @@ -1390,7 +1390,7 @@ Signed-off-by: Zhao Qiang /* If fsl_fm_max_frm is set to a higher value than the all-common 1500, * we choose conservatively and let the user explicitly set a higher * MTU via ifconfig. Otherwise, the user may end up with different MTUs -@@ -2705,21 +3025,13 @@ static int dpaa_eth_probe(struct platfor +@@ -2703,21 +3023,13 @@ static int dpaa_eth_probe(struct platfor priv->buf_layout[RX].priv_data_size = DPAA_RX_PRIV_DATA_SIZE; /* Rx */ priv->buf_layout[TX].priv_data_size = DPAA_TX_PRIV_DATA_SIZE; /* Tx */ @@ -1416,7 +1416,7 @@ Signed-off-by: Zhao Qiang /* the raw size of the buffers used for reception */ dpaa_bps[i]->raw_size = bpool_buffer_raw_size(i, DPAA_BPS_NUM); /* avoid runtime computations by keeping the usable size here */ -@@ -2727,11 +3039,8 @@ static int dpaa_eth_probe(struct platfor +@@ -2725,11 +3037,8 @@ static int dpaa_eth_probe(struct platfor dpaa_bps[i]->dev = dev; err = dpaa_bp_alloc_pool(dpaa_bps[i]); @@ -1430,7 +1430,7 @@ Signed-off-by: Zhao Qiang priv->dpaa_bps[i] = dpaa_bps[i]; } -@@ -2742,7 +3051,7 @@ static int dpaa_eth_probe(struct platfor +@@ -2740,7 +3049,7 @@ static int dpaa_eth_probe(struct platfor err = dpaa_alloc_all_fqs(dev, &priv->dpaa_fq_list, &port_fqs); if (err < 0) { dev_err(dev, "dpaa_alloc_all_fqs() failed\n"); @@ -1439,7 +1439,7 @@ Signed-off-by: Zhao Qiang } priv->mac_dev = mac_dev; -@@ -2751,12 +3060,12 @@ static int dpaa_eth_probe(struct platfor +@@ -2749,12 +3058,12 @@ static int dpaa_eth_probe(struct platfor if (channel < 0) { dev_err(dev, "dpaa_get_channel() failed\n"); err = channel; @@ -1454,7 +1454,7 @@ Signed-off-by: Zhao Qiang * and add this pool channel to each's dequeue mask. */ dpaa_eth_add_channel(priv->channel); -@@ -2771,20 +3080,20 @@ static int dpaa_eth_probe(struct platfor +@@ -2769,20 +3078,20 @@ static int dpaa_eth_probe(struct platfor err = dpaa_eth_cgr_init(priv); if (err < 0) { dev_err(dev, "Error initializing CGR\n"); @@ -1478,7 +1478,7 @@ Signed-off-by: Zhao Qiang } priv->tx_headroom = dpaa_get_headroom(&priv->buf_layout[TX]); -@@ -2794,7 +3103,7 @@ static int dpaa_eth_probe(struct platfor +@@ -2792,7 +3101,7 @@ static int dpaa_eth_probe(struct platfor err = dpaa_eth_init_ports(mac_dev, dpaa_bps, DPAA_BPS_NUM, &port_fqs, &priv->buf_layout[0], dev); if (err) @@ -1487,7 +1487,7 @@ Signed-off-by: Zhao Qiang /* Rx traffic distribution based on keygen hashing defaults to on */ priv->keygen_in_use = true; -@@ -2803,11 +3112,7 @@ static int dpaa_eth_probe(struct platfor +@@ -2801,11 +3110,7 @@ static int dpaa_eth_probe(struct platfor if (!priv->percpu_priv) { dev_err(dev, "devm_alloc_percpu() failed\n"); err = -ENOMEM; @@ -1500,7 +1500,7 @@ Signed-off-by: Zhao Qiang } priv->num_tc = 1; -@@ -2816,11 +3121,11 @@ static int dpaa_eth_probe(struct platfor +@@ -2814,11 +3119,11 @@ static int dpaa_eth_probe(struct platfor /* Initialize NAPI */ err = dpaa_napi_add(net_dev); if (err < 0) @@ -1514,7 +1514,7 @@ Signed-off-by: Zhao Qiang dpaa_eth_sysfs_init(&net_dev->dev); -@@ -2829,32 +3134,21 @@ static int dpaa_eth_probe(struct platfor +@@ -2827,32 +3132,21 @@ static int dpaa_eth_probe(struct platfor return 0; @@ -1553,7 +1553,7 @@ Signed-off-by: Zhao Qiang return err; } -@@ -2891,6 +3185,23 @@ static int dpaa_remove(struct platform_d +@@ -2889,6 +3183,23 @@ static int dpaa_remove(struct platform_d return err; } @@ -1577,7 +1577,7 @@ Signed-off-by: Zhao Qiang static const struct platform_device_id dpaa_devtype[] = { { .name = "dpaa-ethernet", -@@ -2915,6 +3226,10 @@ static int __init dpaa_load(void) +@@ -2913,6 +3224,10 @@ static int __init dpaa_load(void) pr_debug("FSL DPAA Ethernet driver\n"); @@ -1700,7 +1700,7 @@ Signed-off-by: Zhao Qiang +fsl_dpaa_mac-objs:= mac.o fman_dtsec.o fman_memac.o fman_tgec.o --- a/drivers/net/ethernet/freescale/fman/fman.c +++ b/drivers/net/ethernet/freescale/fman/fman.c -@@ -629,6 +629,7 @@ static void set_port_order_restoration(s +@@ -634,6 +634,7 @@ static void set_port_order_restoration(s iowrite32be(tmp, &fpm_rg->fmfp_prc); } @@ -1708,7 +1708,7 @@ Signed-off-by: Zhao Qiang static void set_port_liodn(struct fman *fman, u8 port_id, u32 liodn_base, u32 liodn_ofst) { -@@ -646,6 +647,27 @@ static void set_port_liodn(struct fman * +@@ -651,6 +652,27 @@ static void set_port_liodn(struct fman * iowrite32be(tmp, &fman->dma_regs->fmdmplr[port_id / 2]); iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]); } @@ -1736,7 +1736,7 @@ Signed-off-by: Zhao Qiang static void enable_rams_ecc(struct fman_fpm_regs __iomem *fpm_rg) { -@@ -1914,7 +1936,10 @@ _return: +@@ -1919,7 +1941,10 @@ _return: static int fman_init(struct fman *fman) { struct fman_cfg *cfg = NULL; @@ -1748,7 +1748,7 @@ Signed-off-by: Zhao Qiang if (is_init_done(fman->cfg)) return -EINVAL; -@@ -1934,6 +1959,7 @@ static int fman_init(struct fman *fman) +@@ -1939,6 +1964,7 @@ static int fman_init(struct fman *fman) memset_io((void __iomem *)(fman->base_addr + CGP_OFFSET), 0, fman->state->fm_port_num_of_cg); @@ -1756,7 +1756,7 @@ Signed-off-by: Zhao Qiang /* Save LIODN info before FMan reset * Skipping non-existent port 0 (i = 1) */ -@@ -1953,6 +1979,9 @@ static int fman_init(struct fman *fman) +@@ -1958,6 +1984,9 @@ static int fman_init(struct fman *fman) } fman->liodn_base[i] = liodn_base; } @@ -1766,7 +1766,7 @@ Signed-off-by: Zhao Qiang err = fman_reset(fman); if (err) -@@ -2181,8 +2210,12 @@ int fman_set_port_params(struct fman *fm +@@ -2186,8 +2215,12 @@ int fman_set_port_params(struct fman *fm if (err) goto return_err; @@ -1779,7 +1779,7 @@ Signed-off-by: Zhao Qiang if (fman->state->rev_info.major < 6) set_port_order_restoration(fman->fpm_regs, port_id); -@@ -2800,7 +2833,8 @@ static struct fman *read_dts_node(struct +@@ -2813,7 +2846,8 @@ static struct fman *read_dts_node(struct of_node_put(muram_node); @@ -1791,7 +1791,7 @@ Signed-off-by: Zhao Qiang __func__, irq, err); --- a/drivers/net/ethernet/freescale/fman/fman.h +++ b/drivers/net/ethernet/freescale/fman/fman.h -@@ -41,6 +41,7 @@ +@@ -42,6 +42,7 @@ /* Frame queue Context Override */ #define FM_FD_CMD_FCO 0x80000000 #define FM_FD_CMD_RPD 0x40000000 /* Read Prepended Data */ @@ -1799,7 +1799,7 @@ Signed-off-by: Zhao Qiang #define FM_FD_CMD_DTC 0x10000000 /* Do L4 Checksum */ /* TX-Port: Unsupported Format */ -@@ -345,8 +346,12 @@ struct fman { +@@ -346,8 +347,12 @@ struct fman { unsigned long fifo_offset; size_t fifo_size; diff --git a/target/linux/layerscape/patches-4.14/806-rtc-support-layerscape.patch b/target/linux/layerscape/patches-4.14/806-rtc-support-layerscape.patch index b7535100bd..5e4aac047a 100644 --- a/target/linux/layerscape/patches-4.14/806-rtc-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/806-rtc-support-layerscape.patch @@ -65,7 +65,7 @@ Signed-off-by: Biwen Li +}; --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig -@@ -433,6 +433,14 @@ config RTC_DRV_PCF85063 +@@ -434,6 +434,14 @@ config RTC_DRV_PCF85063 This driver can also be built as a module. If so, the module will be called rtc-pcf85063. diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index 2aa77f1a30..47481cfa99 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -536,7 +536,7 @@ Signed-off-by: Zhao Chenhui irq = dwc3_gadget_get_irq(dwc); if (irq < 0) { -@@ -3299,6 +3300,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3298,6 +3299,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed); @@ -1289,7 +1289,7 @@ Signed-off-by: Zhao Chenhui xhci->quirks |= XHCI_BROKEN_PORT_PED; --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -1972,10 +1972,12 @@ static int finish_td(struct xhci_hcd *xh +@@ -1978,10 +1978,12 @@ static int finish_td(struct xhci_hcd *xh union xhci_trb *ep_trb, struct xhci_transfer_event *event, struct xhci_virt_ep *ep, int *status) { @@ -1302,7 +1302,7 @@ Signed-off-by: Zhao Chenhui u32 trb_comp_code; int ep_index; -@@ -1998,14 +2000,30 @@ static int finish_td(struct xhci_hcd *xh +@@ -2004,14 +2006,30 @@ static int finish_td(struct xhci_hcd *xh if (trb_comp_code == COMP_STALL_ERROR || xhci_requires_manual_halt_cleanup(xhci, ep_ctx, trb_comp_code)) { diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch index 6cfc43423a..6077f979cf 100644 --- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch @@ -610,7 +610,7 @@ Signed-off-by: Yangbo Lu int err; - int irq = 0; int id; - char name[20]; + char name[24]; enum pci_barno bar; @@ -486,12 +665,15 @@ static int pci_endpoint_test_probe(struc test->alignment = 0; diff --git a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch index bb49ee75e8..46427a1d03 100644 --- a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch +++ b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1944,7 +1944,7 @@ static struct phy_driver genphy_driver = +@@ -1948,7 +1948,7 @@ static struct phy_driver genphy_driver = .config_init = genphy_config_init, .features = PHY_GBIT_FEATURES | SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE | diff --git a/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch index 8cf900d143..374d4d3997 100644 --- a/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch +++ b/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch @@ -17,7 +17,7 @@ Signed-off-by: Alexandre Belloni --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig -@@ -1715,6 +1715,16 @@ config RTC_DRV_MT6397 +@@ -1716,6 +1716,16 @@ config RTC_DRV_MT6397 If you want to use Mediatek(R) RTC interface, select Y or M here. diff --git a/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch b/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch index 0513a085ac..f8840f930d 100644 --- a/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch +++ b/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch @@ -18,7 +18,7 @@ Signed-off-by: Alexandre Belloni --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig -@@ -1706,14 +1706,14 @@ config RTC_DRV_MOXART +@@ -1707,14 +1707,14 @@ config RTC_DRV_MOXART will be called rtc-moxart config RTC_DRV_MT6397 diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch index 0f79fa4fd1..df099ea3f3 100644 --- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch +++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch @@ -86,7 +86,7 @@ Signed-off-by: Greg Kroah-Hartman if (!xhci->shared_hcd) { --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -279,6 +279,9 @@ static int xhci_pci_setup(struct usb_hcd +@@ -280,6 +280,9 @@ static int xhci_pci_setup(struct usb_hcd if (!xhci->sbrn) pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn); diff --git a/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch index f21f8083ee..6c21fa30be 100644 --- a/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch +++ b/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3961,6 +3961,15 @@ static int mvneta_ethtool_set_wol(struct +@@ -3960,6 +3960,15 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -3971,6 +3980,7 @@ static const struct net_device_ops mvnet +@@ -3970,6 +3979,7 @@ static const struct net_device_ops mvnet .ndo_fix_features = mvneta_fix_features, .ndo_get_stats64 = mvneta_get_stats64, .ndo_do_ioctl = mvneta_ioctl, diff --git a/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch b/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch index 34a2d342db..8cefb1db26 100644 --- a/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch +++ b/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch @@ -251,7 +251,7 @@ Signed-off-by: Russell King } /* Release Tx descriptors */ -@@ -3061,7 +3020,6 @@ static int mvneta_setup_txqs(struct mvne +@@ -3060,7 +3019,6 @@ static int mvneta_setup_txqs(struct mvne static void mvneta_start_dev(struct mvneta_port *pp) { int cpu; @@ -259,7 +259,7 @@ Signed-off-by: Russell King mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_txq_max_tx_size_set(pp, pp->pkt_size); -@@ -3089,16 +3047,15 @@ static void mvneta_start_dev(struct mvne +@@ -3088,16 +3046,15 @@ static void mvneta_start_dev(struct mvne MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_PSC_SYNC_CHANGE); @@ -278,7 +278,7 @@ Signed-off-by: Russell King if (!pp->neta_armada3700) { for_each_online_cpu(cpu) { -@@ -3251,103 +3208,232 @@ static int mvneta_set_mac_addr(struct ne +@@ -3250,103 +3207,232 @@ static int mvneta_set_mac_addr(struct ne return 0; } @@ -585,7 +585,7 @@ Signed-off-by: Russell King } /* Electing a CPU must be done in an atomic way: it should be done -@@ -3626,10 +3712,9 @@ static int mvneta_stop(struct net_device +@@ -3625,10 +3711,9 @@ static int mvneta_stop(struct net_device static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { @@ -598,7 +598,7 @@ Signed-off-by: Russell King } /* Ethtool methods */ -@@ -3640,44 +3725,25 @@ mvneta_ethtool_set_link_ksettings(struct +@@ -3639,44 +3724,25 @@ mvneta_ethtool_set_link_ksettings(struct const struct ethtool_link_ksettings *cmd) { struct mvneta_port *pp = netdev_priv(ndev); @@ -657,7 +657,7 @@ Signed-off-by: Russell King } /* Set interrupt coalescing for ethtools */ -@@ -3769,6 +3835,22 @@ static int mvneta_ethtool_set_ringparam( +@@ -3768,6 +3834,22 @@ static int mvneta_ethtool_set_ringparam( return 0; } @@ -680,7 +680,7 @@ Signed-off-by: Russell King static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset, u8 *data) { -@@ -3785,26 +3867,35 @@ static void mvneta_ethtool_update_stats( +@@ -3784,26 +3866,35 @@ static void mvneta_ethtool_update_stats( { const struct mvneta_statistic *s; void __iomem *base = pp->base; @@ -721,7 +721,7 @@ Signed-off-by: Russell King } } -@@ -3939,28 +4030,65 @@ static int mvneta_ethtool_get_rxfh(struc +@@ -3938,28 +4029,65 @@ static int mvneta_ethtool_get_rxfh(struc static void mvneta_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { @@ -795,7 +795,7 @@ Signed-off-by: Russell King static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb, void *accel_priv, select_queue_fallback_t fallback) -@@ -3984,13 +4112,15 @@ static const struct net_device_ops mvnet +@@ -3983,13 +4111,15 @@ static const struct net_device_ops mvnet }; static const struct ethtool_ops mvneta_eth_tool_ops = { @@ -812,7 +812,7 @@ Signed-off-by: Russell King .get_strings = mvneta_ethtool_get_strings, .get_ethtool_stats = mvneta_ethtool_get_stats, .get_sset_count = mvneta_ethtool_get_sset_count, -@@ -3998,10 +4128,12 @@ static const struct ethtool_ops mvneta_e +@@ -3997,10 +4127,12 @@ static const struct ethtool_ops mvneta_e .get_rxnfc = mvneta_ethtool_get_rxnfc, .get_rxfh = mvneta_ethtool_get_rxfh, .set_rxfh = mvneta_ethtool_set_rxfh, @@ -826,7 +826,7 @@ Signed-off-by: Russell King }; /* Initialize hw */ -@@ -4146,14 +4278,13 @@ static int mvneta_probe(struct platform_ +@@ -4145,14 +4277,13 @@ static int mvneta_probe(struct platform_ { struct resource *res; struct device_node *dn = pdev->dev.of_node; @@ -842,7 +842,7 @@ Signed-off-by: Russell King int tx_csum_limit; int phy_mode; int err; -@@ -4169,31 +4300,11 @@ static int mvneta_probe(struct platform_ +@@ -4168,31 +4299,11 @@ static int mvneta_probe(struct platform_ goto err_free_netdev; } @@ -875,7 +875,7 @@ Signed-off-by: Russell King } dev->tx_queue_len = MVNETA_MAX_TXD; -@@ -4204,12 +4315,7 @@ static int mvneta_probe(struct platform_ +@@ -4203,12 +4314,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); @@ -889,7 +889,7 @@ Signed-off-by: Russell King pp->rxq_def = rxq_def; -@@ -4231,7 +4337,7 @@ static int mvneta_probe(struct platform_ +@@ -4230,7 +4336,7 @@ static int mvneta_probe(struct platform_ pp->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(pp->clk)) { err = PTR_ERR(pp->clk); @@ -898,7 +898,7 @@ Signed-off-by: Russell King } clk_prepare_enable(pp->clk); -@@ -4357,6 +4463,14 @@ static int mvneta_probe(struct platform_ +@@ -4356,6 +4462,14 @@ static int mvneta_probe(struct platform_ /* 9676 == 9700 - 20 and rounding to 8 */ dev->max_mtu = 9676; @@ -913,7 +913,7 @@ Signed-off-by: Russell King err = register_netdev(dev); if (err < 0) { dev_err(&pdev->dev, "failed to register\n"); -@@ -4368,14 +4482,6 @@ static int mvneta_probe(struct platform_ +@@ -4367,14 +4481,6 @@ static int mvneta_probe(struct platform_ platform_set_drvdata(pdev, pp->dev); @@ -928,7 +928,7 @@ Signed-off-by: Russell King return 0; err_netdev: -@@ -4384,16 +4490,14 @@ err_netdev: +@@ -4383,16 +4489,14 @@ err_netdev: mvneta_bm_pool_destroy(pp->bm_priv, pp->pool_short, 1 << pp->id); } @@ -947,7 +947,7 @@ Signed-off-by: Russell King err_free_irq: irq_dispose_mapping(dev->irq); err_free_netdev: -@@ -4405,7 +4509,6 @@ err_free_netdev: +@@ -4404,7 +4508,6 @@ err_free_netdev: static int mvneta_remove(struct platform_device *pdev) { struct net_device *dev = platform_get_drvdata(pdev); @@ -955,7 +955,7 @@ Signed-off-by: Russell King struct mvneta_port *pp = netdev_priv(dev); unregister_netdev(dev); -@@ -4413,10 +4516,8 @@ static int mvneta_remove(struct platform +@@ -4412,10 +4515,8 @@ static int mvneta_remove(struct platform clk_disable_unprepare(pp->clk); free_percpu(pp->ports); free_percpu(pp->stats); @@ -967,7 +967,7 @@ Signed-off-by: Russell King free_netdev(dev); if (pp->bm_priv) { -@@ -4468,9 +4569,6 @@ static int mvneta_resume(struct device * +@@ -4467,9 +4568,6 @@ static int mvneta_resume(struct device * return err; } diff --git a/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch b/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch index 906c163ac9..584e6381b4 100644 --- a/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch +++ b/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King struct device_node *dn; unsigned int tx_csum_limit; struct phylink *phylink; -@@ -4315,6 +4316,7 @@ static int mvneta_probe(struct platform_ +@@ -4314,6 +4315,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); diff --git a/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch b/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch index 7d02b0a93b..0889aff969 100644 --- a/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch +++ b/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch @@ -24,7 +24,7 @@ Signed-off-by: Russell King mvneta_link_change(pp); } -@@ -3045,8 +3044,7 @@ static void mvneta_start_dev(struct mvne +@@ -3044,8 +3043,7 @@ static void mvneta_start_dev(struct mvne mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -34,7 +34,7 @@ Signed-off-by: Russell King phylink_start(pp->phylink); netif_tx_start_all_queues(pp->dev); -@@ -3542,8 +3540,7 @@ static int mvneta_cpu_online(unsigned in +@@ -3541,8 +3539,7 @@ static int mvneta_cpu_online(unsigned in on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -44,7 +44,7 @@ Signed-off-by: Russell King netif_tx_start_all_queues(pp->dev); spin_unlock(&pp->lock); return 0; -@@ -3584,8 +3581,7 @@ static int mvneta_cpu_dead(unsigned int +@@ -3583,8 +3580,7 @@ static int mvneta_cpu_dead(unsigned int on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | diff --git a/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch b/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch index 39eb33ac2c..7b0323b1a7 100644 --- a/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch +++ b/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch @@ -10,7 +10,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4045,6 +4045,22 @@ static int mvneta_ethtool_set_wol(struct +@@ -4044,6 +4044,22 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -33,7 +33,7 @@ Signed-off-by: Russell King static int mvneta_ethtool_get_eee(struct net_device *dev, struct ethtool_eee *eee) { -@@ -4129,6 +4145,8 @@ static const struct ethtool_ops mvneta_e +@@ -4128,6 +4144,8 @@ static const struct ethtool_ops mvneta_e .set_link_ksettings = mvneta_ethtool_set_link_ksettings, .get_wol = mvneta_ethtool_get_wol, .set_wol = mvneta_ethtool_set_wol, diff --git a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch index 19f8f1e632..539b816b66 100644 --- a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch +++ b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch @@ -15,7 +15,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4045,22 +4045,6 @@ static int mvneta_ethtool_set_wol(struct +@@ -4044,22 +4044,6 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -38,7 +38,7 @@ Signed-off-by: Russell King static int mvneta_ethtool_get_eee(struct net_device *dev, struct ethtool_eee *eee) { -@@ -4145,8 +4129,6 @@ static const struct ethtool_ops mvneta_e +@@ -4144,8 +4128,6 @@ static const struct ethtool_ops mvneta_e .set_link_ksettings = mvneta_ethtool_set_link_ksettings, .get_wol = mvneta_ethtool_get_wol, .set_wol = mvneta_ethtool_set_wol, diff --git a/target/linux/octeontx/patches-4.14/0001-net-thunderx-add-support-for-rgmii-internal-delay-mo.patch b/target/linux/octeontx/patches-4.14/0001-net-thunderx-add-support-for-rgmii-internal-delay-mo.patch index cf0f96dce3..212b6ddd80 100644 --- a/target/linux/octeontx/patches-4.14/0001-net-thunderx-add-support-for-rgmii-internal-delay-mo.patch +++ b/target/linux/octeontx/patches-4.14/0001-net-thunderx-add-support-for-rgmii-internal-delay-mo.patch @@ -27,7 +27,7 @@ Signed-off-by: Tim Harvey }; static struct bgx *bgx_vnic[MAX_BGX_THUNDER]; -@@ -841,12 +842,12 @@ static void bgx_poll_for_link(struct wor +@@ -850,12 +851,12 @@ static void bgx_poll_for_link(struct wor queue_delayed_work(lmac->check_link, &lmac->dwork, HZ * 2); } @@ -42,7 +42,7 @@ Signed-off-by: Tim Harvey return PHY_INTERFACE_MODE_SGMII; } -@@ -912,7 +913,8 @@ static int bgx_lmac_enable(struct bgx *b +@@ -921,7 +922,8 @@ static int bgx_lmac_enable(struct bgx *b if (phy_connect_direct(&lmac->netdev, lmac->phydev, bgx_lmac_handler, @@ -52,7 +52,7 @@ Signed-off-by: Tim Harvey return -ENODEV; phy_start(lmac->phydev); -@@ -1287,6 +1289,8 @@ static int bgx_init_of_phy(struct bgx *b +@@ -1296,6 +1298,8 @@ static int bgx_init_of_phy(struct bgx *b bgx->lmac[lmac].lmacid = lmac; phy_np = of_parse_phandle(node, "phy-handle", 0); @@ -61,7 +61,7 @@ Signed-off-by: Tim Harvey /* If there is no phy or defective firmware presents * this cortina phy, for which there is no driver * support, ignore it. -@@ -1390,7 +1394,6 @@ static int bgx_probe(struct pci_dev *pde +@@ -1441,7 +1445,6 @@ static int bgx_probe(struct pci_dev *pde bgx->max_lmac = 1; bgx->bgx_id = MAX_BGX_PER_CN81XX - 1; bgx_vnic[bgx->bgx_id] = bgx; @@ -69,7 +69,7 @@ Signed-off-by: Tim Harvey } /* On 81xx all are DLMs and on 83xx there are 3 BGX QLMs and one -@@ -1407,6 +1410,8 @@ static int bgx_probe(struct pci_dev *pde +@@ -1458,6 +1461,8 @@ static int bgx_probe(struct pci_dev *pde if (err) goto err_enable; @@ -77,10 +77,10 @@ Signed-off-by: Tim Harvey + xcv_init_hw(bgx->phy_mode); bgx_init_hw(bgx); - /* Enable all LMACs */ + bgx_register_intr(pdev); --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h -@@ -226,7 +226,7 @@ void bgx_lmac_internal_loopback(int node +@@ -235,7 +235,7 @@ void bgx_lmac_internal_loopback(int node void bgx_lmac_get_pfc(int node, int bgx_idx, int lmacid, void *pause); void bgx_lmac_set_pfc(int node, int bgx_idx, int lmacid, void *pause); diff --git a/target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch b/target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch deleted file mode 100644 index ef7aef3a8a..0000000000 --- a/target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch +++ /dev/null @@ -1,110 +0,0 @@ -From b1e7791e688620c9bb8476ac2d0bc99abeb7f825 Mon Sep 17 00:00:00 2001 -From: Tim Harvey -Date: Fri, 29 Dec 2017 16:48:04 -0800 -Subject: [PATCH] net: thunderx: workaround BGX TX Underflow issue - -While it is not yet understood why a TX underflow can easily occur -for SGMII interfaces resulting in a TX wedge. It has been found that -disabling/re-enabling the LMAC resolves the issue. - -Signed-off-by: Tim Harvey ---- - drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 54 +++++++++++++++++++++++ - drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 9 ++++ - 2 files changed, 63 insertions(+) - ---- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c -+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c -@@ -1344,6 +1344,54 @@ static int bgx_init_phy(struct bgx *bgx) - return bgx_init_of_phy(bgx); - } - -+static irqreturn_t bgx_intr_handler(int irq, void *data) -+{ -+ struct bgx *bgx = (struct bgx *)data; -+ struct device *dev = &bgx->pdev->dev; -+ u64 status, val; -+ int lmac; -+ -+ for (lmac = 0; lmac < bgx->lmac_count; lmac++) { -+ status = bgx_reg_read(bgx, lmac, BGX_GMP_GMI_TXX_INT); -+ if (status & GMI_TXX_INT_UNDFLW) { -+ dev_err(dev, "BGX%d lmac%d UNDFLW\n", bgx->bgx_id, -+ lmac); -+ val = bgx_reg_read(bgx, lmac, BGX_CMRX_CFG); -+ val &= ~CMR_EN; -+ bgx_reg_write(bgx, lmac, BGX_CMRX_CFG, val); -+ val |= CMR_EN; -+ bgx_reg_write(bgx, lmac, BGX_CMRX_CFG, val); -+ } -+ /* clear interrupts */ -+ bgx_reg_write(bgx, lmac, BGX_GMP_GMI_TXX_INT, status); -+ } -+ -+ return IRQ_HANDLED; -+} -+ -+static int bgx_register_intr(struct pci_dev *pdev) -+{ -+ struct bgx *bgx = pci_get_drvdata(pdev); -+ struct device *dev = &pdev->dev; -+ int num_vec, ret; -+ char irq_name[32]; -+ -+ /* Enable MSI-X */ -+ num_vec = pci_msix_vec_count(pdev); -+ ret = pci_alloc_irq_vectors(pdev, num_vec, num_vec, PCI_IRQ_MSIX); -+ if (ret < 0) { -+ dev_err(dev, "Req for #%d msix vectors failed\n", num_vec); -+ return 1; -+ } -+ sprintf(irq_name, "BGX%d", bgx->bgx_id); -+ ret = request_irq(pci_irq_vector(pdev, GMPX_GMI_TX_INT), -+ bgx_intr_handler, 0, irq_name, bgx); -+ if (ret) -+ return 1; -+ -+ return 0; -+} -+ - static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - { - int err; -@@ -1414,6 +1462,8 @@ static int bgx_probe(struct pci_dev *pde - xcv_init_hw(bgx->phy_mode); - bgx_init_hw(bgx); - -+ bgx_register_intr(pdev); -+ - /* Enable all LMACs */ - for (lmac = 0; lmac < bgx->lmac_count; lmac++) { - err = bgx_lmac_enable(bgx, lmac); -@@ -1424,6 +1474,10 @@ static int bgx_probe(struct pci_dev *pde - bgx_lmac_disable(bgx, --lmac); - goto err_enable; - } -+ -+ /* enable TX FIFO Underflow interrupt */ -+ bgx_reg_modify(bgx, lmac, BGX_GMP_GMI_TXX_INT_ENA_W1S, -+ GMI_TXX_INT_UNDFLW); - } - - return 0; ---- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h -+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h -@@ -179,6 +179,15 @@ - #define BGX_GMP_GMI_TXX_BURST 0x38228 - #define BGX_GMP_GMI_TXX_MIN_PKT 0x38240 - #define BGX_GMP_GMI_TXX_SGMII_CTL 0x38300 -+#define BGX_GMP_GMI_TXX_INT 0x38500 -+#define BGX_GMP_GMI_TXX_INT_W1S 0x38508 -+#define BGX_GMP_GMI_TXX_INT_ENA_W1C 0x38510 -+#define BGX_GMP_GMI_TXX_INT_ENA_W1S 0x38518 -+#define GMI_TXX_INT_PTP_LOST BIT_ULL(4) -+#define GMI_TXX_INT_LATE_COL BIT_ULL(3) -+#define GMI_TXX_INT_XSDEF BIT_ULL(2) -+#define GMI_TXX_INT_XSCOL BIT_ULL(1) -+#define GMI_TXX_INT_UNDFLW BIT_ULL(0) - - #define BGX_MSIX_VEC_0_29_ADDR 0x400000 /* +(0..29) << 4 */ - #define BGX_MSIX_VEC_0_29_CTL 0x400008 diff --git a/target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch b/target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch index eef2c4624f..7a82b5a7cc 100644 --- a/target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch +++ b/target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch @@ -32,11 +32,9 @@ Cc: Daniel Golle drivers/irqchip/irq-versatile-fpga.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c -index 70e2cfff8175..f1386733d3bc 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c -@@ -212,6 +212,9 @@ int __init fpga_irq_of_init(struct device_node *node, +@@ -212,6 +212,9 @@ int __init fpga_irq_of_init(struct devic if (of_property_read_u32(node, "valid-mask", &valid_mask)) valid_mask = 0; @@ -46,7 +44,7 @@ index 70e2cfff8175..f1386733d3bc 100644 /* Some chips are cascaded from a parent IRQ */ parent_irq = irq_of_parse_and_map(node, 0); if (!parent_irq) { -@@ -221,9 +224,6 @@ int __init fpga_irq_of_init(struct device_node *node, +@@ -221,9 +224,6 @@ int __init fpga_irq_of_init(struct devic fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node); diff --git a/target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch b/target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch deleted file mode 100644 index cac125e7b3..0000000000 --- a/target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch +++ /dev/null @@ -1,55 +0,0 @@ -From patchwork Sat Mar 21 14:36:53 2020 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Sungbo Eo -X-Patchwork-Id: 11451187 -From: Sungbo Eo -To: Neil Armstrong , - Rob Herring , - Mark Rutland , linux-arm-kernel@lists.infradead.org, - linux-oxnas@groups.io, devicetree@vger.kernel.org, - linux-kernel@vger.kernel.org -Subject: [PATCH] ARM: dts: oxnas: Fix clear-mask property -Date: Sat, 21 Mar 2020 23:36:53 +0900 -Message-Id: <20200321143653.2412823-1-mans0n@gorani.run> -Sender: "linux-arm-kernel" - -Disable all rps-irq interrupts during driver initialization to prevent -an accidental interrupt on GIC. - -Fixes: 84316f4ef141 ("ARM: boot: dts: Add Oxford Semiconductor OX810SE dtsi") -Fixes: 38d4a53733f5 ("ARM: dts: Add support for OX820 and Pogoplug V3") -Signed-off-by: Sungbo Eo -Acked-by: Neil Armstrong ---- - arch/arm/boot/dts/ox810se.dtsi | 4 ++-- - arch/arm/boot/dts/ox820.dtsi | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - ---- a/arch/arm/boot/dts/ox810se.dtsi -+++ b/arch/arm/boot/dts/ox810se.dtsi -@@ -323,8 +323,8 @@ - interrupt-controller; - reg = <0 0x200>; - #interrupt-cells = <1>; -- valid-mask = <0xFFFFFFFF>; -- clear-mask = <0>; -+ valid-mask = <0xffffffff>; -+ clear-mask = <0xffffffff>; - }; - - timer0: timer@200 { ---- a/arch/arm/boot/dts/ox820.dtsi -+++ b/arch/arm/boot/dts/ox820.dtsi -@@ -240,8 +240,8 @@ - reg = <0 0x200>; - interrupts = ; - #interrupt-cells = <1>; -- valid-mask = <0xFFFFFFFF>; -- clear-mask = <0>; -+ valid-mask = <0xffffffff>; -+ clear-mask = <0xffffffff>; - }; - - timer0: timer@200 { diff --git a/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch index 5536e3f61c..98ea5f557c 100644 --- a/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch +++ b/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch @@ -49,8 +49,8 @@ Signed-off-by: John Crispin break; --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -412,6 +412,7 @@ struct phy_device { - bool suspended; +@@ -414,6 +414,7 @@ struct phy_device { + bool suspended_by_mdio_bus; bool sysfs_links; bool loopback_enabled; + bool no_auto_carrier_off;