From 5ea3ea154f9cc8a6f1d3425fa4763614e0e51f8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Wed, 29 Apr 2020 23:24:49 +0200 Subject: [PATCH] kernel: bump 5.4 to 5.4.36 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Refreshed patches, removed upstreamed patch: generic/hack: 551-loop-Better-discard-support-for-block-devices.patch Added generic config symbol `ARM64_ERRATUM_1542419` due to Fixes: f2791551cedb ("arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419"). Run tested: qemu-x86-64, apalis, nbg6617 Build tested: x86/64, imx6, ipq40xx, sunxi/a53 Signed-off-by: Petr Štetiar --- include/kernel-version.mk | 4 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- .../950-0037-Add-dwc_otg-driver.patch | 4 +- ...Better-coalescing-parameter-defaults.patch | 4 +- ...-for-updating-interrupt-endpoint-int.patch | 2 +- ...or-host-controllers-that-don-t-updat.patch | 4 +- ...t-Workaround-2-for-Pi4-Ethernet-fail.patch | 2 +- ...ma-direct-Temporary-DMA-fix-on-arm64.patch | 2 +- ...41-drm-v3d-The-third-IRQ-is-optional.patch | 2 +- ...n-ARCH_ZONE_DMA_BITS-into-a-variable.patch | 4 +- ...-inbound-resource-parsing-to-helpers.patch | 2 +- ...de-dma_direct_map_resource-from-the-.patch | 4 +- ...reat-dev-bus_dma_mask-as-a-DMA-limit.patch | 12 +-- ...support-for-performing-fake-doorbell.patch | 2 +- ...pport-for-clause-37-auto-negotiation.patch | 30 +++--- target/linux/generic/config-5.4 | 1 + .../550-loop-Report-EOPNOTSUPP-properly.patch | 4 +- ...er-discard-support-for-block-devices.patch | 101 ------------------ .../702-phy_add_aneg_done_function.patch | 2 +- .../generic/hack-5.4/902-debloat_proc.patch | 2 +- .../linux/ramips/patches-5.4/991-at803x.patch | 18 ++-- 21 files changed, 51 insertions(+), 157 deletions(-) delete mode 100644 target/linux/generic/hack-5.4/551-loop-Better-discard-support-for-block-devices.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 1d1c8f6bdf..5f364ec207 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.14 = .176 LINUX_VERSION-4.19 = .115 -LINUX_VERSION-5.4 = .35 +LINUX_VERSION-5.4 = .36 LINUX_KERNEL_HASH-4.14.176 = bcae0956baaeb55dab5bad0401873fbc5baaa7fbe957ea6d27a5ab241cec5ca2 LINUX_KERNEL_HASH-4.19.115 = 11b2d97c8ea5ceb40c5e1d0bb87ad5b2b8c84560181bc60c0d28ec3a3e3801c2 -LINUX_KERNEL_HASH-5.4.35 = e16bd5f7284a80a41328bf712e1136b0adf5b71cc0bd263efa7cac75539806d4 +LINUX_KERNEL_HASH-5.4.36 = b9faea98122e8316af8fb428c942e81797b5d28a8fc59a24a4e47959e3765b8d 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-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch index 55686a2fd8..7f09adf6a3 100644 --- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -43,7 +43,7 @@ produce a noisy warning. hcd->msi_enabled = 1; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1879,6 +1879,7 @@ struct xhci_hcd { +@@ -1880,6 +1880,7 @@ struct xhci_hcd { struct xhci_hub usb2_rhub; struct xhci_hub usb3_rhub; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch index 0823c01c53..a613aa6e60 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch @@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5306,7 +5306,7 @@ static void port_event(struct usb_hub *h +@@ -5318,7 +5318,7 @@ static void port_event(struct usb_hub *h port_dev->over_current_count++; port_over_current_notify(port_dev); @@ -1051,7 +1051,7 @@ Signed-off-by: Jonathan Bell USB_PORT_FEAT_C_OVER_CURRENT); --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c -@@ -1993,6 +1993,85 @@ free_interfaces: +@@ -2000,6 +2000,85 @@ free_interfaces: if (cp->string == NULL && !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) cp->string = usb_cache_string(dev, cp->desc.iConfiguration); diff --git a/target/linux/bcm27xx/patches-5.4/950-0212-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.4/950-0212-bcmgenet-Better-coalescing-parameter-defaults.patch index f2e829aec3..58418ce973 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0212-bcmgenet-Better-coalescing-parameter-defaults.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0212-bcmgenet-Better-coalescing-parameter-defaults.patch @@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -2145,7 +2145,7 @@ static void bcmgenet_init_tx_ring(struct +@@ -2147,7 +2147,7 @@ static void bcmgenet_init_tx_ring(struct bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX); bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX); @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell /* Disable rate control for now */ bcmgenet_tdma_ring_writel(priv, index, flow_period_val, TDMA_FLOW_PERIOD); -@@ -3567,9 +3567,12 @@ static int bcmgenet_probe(struct platfor +@@ -3570,9 +3570,12 @@ static int bcmgenet_probe(struct platfor netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1); /* Set default coalescing parameters */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0222-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-5.4/950-0222-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch index fe1d069c20..127e91cd24 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0222-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0222-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch @@ -46,7 +46,7 @@ Signed-off-by: Jonathan Bell * have been called previously. Use for set_configuration, set_interface, --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c -@@ -1113,6 +1113,21 @@ static void remove_intf_ep_devs(struct u +@@ -1120,6 +1120,21 @@ static void remove_intf_ep_devs(struct u intf->ep_devs_created = 0; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0268-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0268-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index afddaa9462..6dba6fbc5f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0268-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0268-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell dma_addr_t addr; u64 hw_dequeue; bool cycle_found = false; -@@ -548,7 +551,28 @@ void xhci_find_new_dequeue_state(struct +@@ -565,7 +568,28 @@ void xhci_find_new_dequeue_state(struct hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id); new_seg = ep_ring->deq_seg; new_deq = ep_ring->dequeue; @@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1872,6 +1872,7 @@ struct xhci_hcd { +@@ -1873,6 +1873,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/bcm27xx/patches-5.4/950-0296-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch b/target/linux/bcm27xx/patches-5.4/950-0296-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch index 73f92187f2..e52b4e9022 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0296-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0296-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch @@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell static inline void bcmgenet_writel(u32 value, void __iomem *offset) { /* MIPS chips strapped for BE will automagically configure the -@@ -1991,6 +1995,11 @@ static void reset_umac(struct bcmgenet_p +@@ -1993,6 +1997,11 @@ static void reset_umac(struct bcmgenet_p bcmgenet_rbuf_ctrl_set(priv, 0); udelay(10); diff --git a/target/linux/bcm27xx/patches-5.4/950-0318-dma-direct-Temporary-DMA-fix-on-arm64.patch b/target/linux/bcm27xx/patches-5.4/950-0318-dma-direct-Temporary-DMA-fix-on-arm64.patch index e368ae6cd9..327a77c424 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0318-dma-direct-Temporary-DMA-fix-on-arm64.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0318-dma-direct-Temporary-DMA-fix-on-arm64.patch @@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c -@@ -397,7 +397,7 @@ int dma_direct_supported(struct device * +@@ -398,7 +398,7 @@ int dma_direct_supported(struct device * if (IS_ENABLED(CONFIG_ZONE_DMA)) min_mask = DMA_BIT_MASK(ARCH_ZONE_DMA_BITS); else diff --git a/target/linux/bcm27xx/patches-5.4/950-0341-drm-v3d-The-third-IRQ-is-optional.patch b/target/linux/bcm27xx/patches-5.4/950-0341-drm-v3d-The-third-IRQ-is-optional.patch index ea583b105a..e58d8af2d0 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0341-drm-v3d-The-third-IRQ-is-optional.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0341-drm-v3d-The-third-IRQ-is-optional.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -3468,7 +3468,7 @@ static int bcmgenet_probe(struct platfor +@@ -3471,7 +3471,7 @@ static int bcmgenet_probe(struct platfor priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); priv->irq1 = platform_get_irq(pdev, 1); diff --git a/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch b/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch index 5de73d37f7..c3ae61c993 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-turn-ARCH_ZONE_DMA_BITS-into-a-variable.patch @@ -175,7 +175,7 @@ Signed-off-by: Catalin Marinas static void report_addr(struct device *dev, dma_addr_t dma_addr, size_t size) { -@@ -69,7 +68,7 @@ static gfp_t __dma_direct_optimal_gfp_ma +@@ -70,7 +69,7 @@ static gfp_t __dma_direct_optimal_gfp_ma * Note that GFP_DMA32 and GFP_DMA are no ops without the corresponding * zones. */ @@ -184,7 +184,7 @@ Signed-off-by: Catalin Marinas return GFP_DMA; if (*phys_mask <= DMA_BIT_MASK(32)) return GFP_DMA32; -@@ -395,7 +394,7 @@ int dma_direct_supported(struct device * +@@ -396,7 +395,7 @@ int dma_direct_supported(struct device * u64 min_mask; if (IS_ENABLED(CONFIG_ZONE_DMA)) diff --git a/target/linux/bcm27xx/patches-5.4/950-0452-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0452-PCI-of-Add-inbound-resource-parsing-to-helpers.patch index 0d74bc57ad..987351c1fc 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0452-PCI-of-Add-inbound-resource-parsing-to-helpers.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0452-PCI-of-Add-inbound-resource-parsing-to-helpers.patch @@ -382,7 +382,7 @@ Cc: linux-rockchip@lists.infradead.org --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h -@@ -636,11 +636,15 @@ static inline void pci_release_bus_of_no +@@ -637,11 +637,15 @@ static inline void pci_release_bus_of_no #if defined(CONFIG_OF_ADDRESS) int devm_of_pci_get_host_bridge_resources(struct device *dev, unsigned char busno, unsigned char bus_max, diff --git a/target/linux/bcm27xx/patches-5.4/950-0455-dma-direct-exclude-dma_direct_map_resource-from-the-.patch b/target/linux/bcm27xx/patches-5.4/950-0455-dma-direct-exclude-dma_direct_map_resource-from-the-.patch index 94a1329d84..dca3fbfb57 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0455-dma-direct-exclude-dma_direct_map_resource-from-the-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0455-dma-direct-exclude-dma_direct_map_resource-from-the-.patch @@ -84,7 +84,7 @@ Tested-by: Marek Szyprowski --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c -@@ -325,7 +325,7 @@ static inline bool dma_direct_possible(s +@@ -326,7 +326,7 @@ static inline bool dma_direct_possible(s size_t size) { return swiotlb_force != SWIOTLB_FORCE && @@ -93,7 +93,7 @@ Tested-by: Marek Szyprowski } dma_addr_t dma_direct_map_page(struct device *dev, struct page *page, -@@ -374,7 +374,7 @@ dma_addr_t dma_direct_map_resource(struc +@@ -375,7 +375,7 @@ dma_addr_t dma_direct_map_resource(struc { dma_addr_t dma_addr = paddr; diff --git a/target/linux/bcm27xx/patches-5.4/950-0456-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch b/target/linux/bcm27xx/patches-5.4/950-0456-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch index 155e18936a..162a91c530 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0456-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0456-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch @@ -296,7 +296,7 @@ Signed-off-by: Christoph Hellwig } WARN_ON_ONCE(1); } -@@ -50,15 +50,14 @@ u64 dma_direct_get_required_mask(struct +@@ -51,15 +51,14 @@ u64 dma_direct_get_required_mask(struct } static gfp_t __dma_direct_optimal_gfp_mask(struct device *dev, u64 dma_mask, @@ -316,7 +316,7 @@ Signed-off-by: Christoph Hellwig /* * Optimistically try the zone that the physical address mask falls -@@ -68,9 +67,9 @@ static gfp_t __dma_direct_optimal_gfp_ma +@@ -69,9 +68,9 @@ static gfp_t __dma_direct_optimal_gfp_ma * Note that GFP_DMA32 and GFP_DMA are no ops without the corresponding * zones. */ @@ -328,7 +328,7 @@ Signed-off-by: Christoph Hellwig return GFP_DMA32; return 0; } -@@ -78,7 +77,7 @@ static gfp_t __dma_direct_optimal_gfp_ma +@@ -79,7 +78,7 @@ static gfp_t __dma_direct_optimal_gfp_ma static bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size) { return phys_to_dma_direct(dev, phys) + size - 1 <= @@ -337,7 +337,7 @@ Signed-off-by: Christoph Hellwig } struct page *__dma_direct_alloc_pages(struct device *dev, size_t size, -@@ -87,7 +86,7 @@ struct page *__dma_direct_alloc_pages(st +@@ -88,7 +87,7 @@ struct page *__dma_direct_alloc_pages(st size_t alloc_size = PAGE_ALIGN(size); int node = dev_to_node(dev); struct page *page = NULL; @@ -346,7 +346,7 @@ Signed-off-by: Christoph Hellwig if (attrs & DMA_ATTR_NO_WARN) gfp |= __GFP_NOWARN; -@@ -95,7 +94,7 @@ struct page *__dma_direct_alloc_pages(st +@@ -96,7 +95,7 @@ struct page *__dma_direct_alloc_pages(st /* we always manually zero the memory once we are done: */ gfp &= ~__GFP_ZERO; gfp |= __dma_direct_optimal_gfp_mask(dev, dev->coherent_dma_mask, @@ -355,7 +355,7 @@ Signed-off-by: Christoph Hellwig page = dma_alloc_contiguous(dev, alloc_size, gfp); if (page && !dma_coherent_ok(dev, page_to_phys(page), size)) { dma_free_contiguous(dev, page, alloc_size); -@@ -109,7 +108,7 @@ again: +@@ -110,7 +109,7 @@ again: page = NULL; if (IS_ENABLED(CONFIG_ZONE_DMA32) && diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index d0ffcee460..4c4db76b01 100644 --- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -127,7 +127,7 @@ it on BCM4708 family. /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1872,6 +1872,7 @@ struct xhci_hcd { +@@ -1873,6 +1873,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch index da76523730..855c4d2aac 100644 --- a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch +++ b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch @@ -18,15 +18,12 @@ Signed-off-by: David S. Miller include/linux/phy.h | 4 + 2 files changed, 143 insertions(+) -diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c -index f1f60bd4865a..fa71998fea51 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1607,6 +1607,40 @@ static int genphy_config_advert(struct phy_device *phydev) - return changed; +@@ -1679,6 +1679,40 @@ static int genphy_config_advert(struct p } -+/** + /** + * genphy_c37_config_advert - sanitize and advertise auto-negotiation parameters + * @phydev: target phy_device struct + * @@ -60,14 +57,14 @@ index f1f60bd4865a..fa71998fea51 100644 + adv); +} + - /** ++/** * genphy_config_eee_advert - disable unwanted eee mode advertisement * @phydev: target phy_device struct -@@ -1715,6 +1749,54 @@ int __genphy_config_aneg(struct phy_device *phydev, bool changed) - } + * +@@ -1787,6 +1821,54 @@ int __genphy_config_aneg(struct phy_devi EXPORT_SYMBOL(__genphy_config_aneg); -+/** + /** + * genphy_c37_config_aneg - restart auto-negotiation or write BMCR + * @phydev: target phy_device struct + * @@ -115,14 +112,14 @@ index f1f60bd4865a..fa71998fea51 100644 +} +EXPORT_SYMBOL(genphy_c37_config_aneg); + - /** ++/** * genphy_aneg_done - return auto-negotiation status * @phydev: target phy_device struct -@@ -1886,6 +1968,63 @@ int genphy_read_status(struct phy_device *phydev) - } + * +@@ -1958,6 +2040,63 @@ int genphy_read_status(struct phy_device EXPORT_SYMBOL(genphy_read_status); -+/** + /** + * genphy_c37_read_status - check the link status and update current link state + * @phydev: target phy_device struct + * @@ -179,14 +176,13 @@ index f1f60bd4865a..fa71998fea51 100644 +} +EXPORT_SYMBOL(genphy_c37_read_status); + - /** ++/** * genphy_soft_reset - software reset the PHY via BMCR_RESET bit * @phydev: target phy_device struct -diff --git a/include/linux/phy.h b/include/linux/phy.h -index 9a0e981df502..78436d58ce7c 100644 + * --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -1106,6 +1106,10 @@ int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, +@@ -1120,6 +1120,10 @@ int genphy_read_mmd_unsupported(struct p int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum, u16 regnum, u16 val); diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 21dd447cdf..a4ff887aa1 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -306,6 +306,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_ERRATUM_843419 is not set # CONFIG_ARM64_ERRATUM_845719 is not set # CONFIG_ARM64_ERRATUM_858921 is not set +# CONFIG_ARM64_ERRATUM_1542419 is not set # CONFIG_ARM64_HW_AFDBM is not set # CONFIG_ARM64_LSE_ATOMICS is not set # CONFIG_ARM64_MODULE_PLTS is not set diff --git a/target/linux/generic/hack-5.4/550-loop-Report-EOPNOTSUPP-properly.patch b/target/linux/generic/hack-5.4/550-loop-Report-EOPNOTSUPP-properly.patch index 479513bf54..754c01be1b 100644 --- a/target/linux/generic/hack-5.4/550-loop-Report-EOPNOTSUPP-properly.patch +++ b/target/linux/generic/hack-5.4/550-loop-Report-EOPNOTSUPP-properly.patch @@ -18,7 +18,7 @@ Reviewed-by: Bart Van Assche --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -461,7 +461,7 @@ static void lo_complete_rq(struct reques +@@ -462,7 +462,7 @@ static void lo_complete_rq(struct reques if (!cmd->use_aio || cmd->ret < 0 || cmd->ret == blk_rq_bytes(rq) || req_op(rq) != REQ_OP_READ) { if (cmd->ret < 0) @@ -27,7 +27,7 @@ Reviewed-by: Bart Van Assche goto end_io; } -@@ -1950,7 +1950,10 @@ static void loop_handle_cmd(struct loop_ +@@ -1970,7 +1970,10 @@ static void loop_handle_cmd(struct loop_ failed: /* complete non-aio request */ if (!cmd->use_aio || ret) { diff --git a/target/linux/generic/hack-5.4/551-loop-Better-discard-support-for-block-devices.patch b/target/linux/generic/hack-5.4/551-loop-Better-discard-support-for-block-devices.patch deleted file mode 100644 index 38091290aa..0000000000 --- a/target/linux/generic/hack-5.4/551-loop-Better-discard-support-for-block-devices.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 3117c3f45edbcc269baaebd3d13f39b7bf884aa6 Mon Sep 17 00:00:00 2001 -From: Evan Green -Date: Thu, 14 Nov 2019 15:50:08 -0800 -Subject: loop: Better discard support for block devices - -If the backing device for a loop device is itself a block device, -then mirror the "write zeroes" capabilities of the underlying -block device into the loop device. Copy this capability into both -max_write_zeroes_sectors and max_discard_sectors of the loop device. - -The reason for this is that REQ_OP_DISCARD on a loop device translates -into blkdev_issue_zeroout(), rather than blkdev_issue_discard(). This -presents a consistent interface for loop devices (that discarded data -is zeroed), regardless of the backing device type of the loop device. -There should be no behavior change for loop devices backed by regular -files. - -This change fixes blktest block/003, and removes an extraneous -error print in block/013 when testing on a loop device backed -by a block device that does not support discard. - -Signed-off-by: Evan Green -Reviewed-by: Gwendal Grignou -Reviewed-by: Chaitanya Kulkarni ---- - drivers/block/loop.c | 40 +++++++++++++++++++++++++++++----------- - 1 file changed, 29 insertions(+), 11 deletions(-) - ---- a/drivers/block/loop.c -+++ b/drivers/block/loop.c -@@ -427,11 +427,12 @@ static int lo_fallocate(struct loop_devi - * information. - */ - struct file *file = lo->lo_backing_file; -+ struct request_queue *q = lo->lo_queue; - int ret; - - mode |= FALLOC_FL_KEEP_SIZE; - -- if ((!file->f_op->fallocate) || lo->lo_encrypt_key_size) { -+ if (!blk_queue_discard(q)) { - ret = -EOPNOTSUPP; - goto out; - } -@@ -862,6 +863,21 @@ static void loop_config_discard(struct l - struct file *file = lo->lo_backing_file; - struct inode *inode = file->f_mapping->host; - struct request_queue *q = lo->lo_queue; -+ struct request_queue *backingq; -+ -+ /* -+ * If the backing device is a block device, mirror its zeroing -+ * capability. REQ_OP_DISCARD translates to a zero-out even when backed -+ * by block devices to keep consistent behavior with file-backed loop -+ * devices. -+ */ -+ if (S_ISBLK(inode->i_mode) && !lo->lo_encrypt_key_size) { -+ backingq = bdev_get_queue(inode->i_bdev); -+ blk_queue_max_discard_sectors(q, -+ backingq->limits.max_write_zeroes_sectors); -+ -+ blk_queue_max_write_zeroes_sectors(q, -+ backingq->limits.max_write_zeroes_sectors); - - /* - * We use punch hole to reclaim the free space used by the -@@ -869,22 +885,24 @@ static void loop_config_discard(struct l - * encryption is enabled, because it may give an attacker - * useful information. - */ -- if ((!file->f_op->fallocate) || -- lo->lo_encrypt_key_size) { -+ } else if ((!file->f_op->fallocate) || lo->lo_encrypt_key_size) { - q->limits.discard_granularity = 0; - q->limits.discard_alignment = 0; - blk_queue_max_discard_sectors(q, 0); - blk_queue_max_write_zeroes_sectors(q, 0); -- blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q); -- return; -- } - -- q->limits.discard_granularity = inode->i_sb->s_blocksize; -- q->limits.discard_alignment = 0; -+ } else { -+ q->limits.discard_granularity = inode->i_sb->s_blocksize; -+ q->limits.discard_alignment = 0; - -- blk_queue_max_discard_sectors(q, UINT_MAX >> 9); -- blk_queue_max_write_zeroes_sectors(q, UINT_MAX >> 9); -- blk_queue_flag_set(QUEUE_FLAG_DISCARD, q); -+ blk_queue_max_discard_sectors(q, UINT_MAX >> 9); -+ blk_queue_max_write_zeroes_sectors(q, UINT_MAX >> 9); -+ } -+ -+ if (q->limits.max_write_zeroes_sectors) -+ blk_queue_flag_set(QUEUE_FLAG_DISCARD, q); -+ else -+ blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q); - } - - static void loop_unprepare_queue(struct loop_device *lo) diff --git a/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch index f82cef1f94..f58b190025 100644 --- a/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch @@ -15,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1827,6 +1827,9 @@ int genphy_update_link(struct phy_device +@@ -1909,6 +1909,9 @@ int genphy_update_link(struct phy_device if (bmcr & BMCR_ANRESTART) goto done; diff --git a/target/linux/generic/hack-5.4/902-debloat_proc.patch b/target/linux/generic/hack-5.4/902-debloat_proc.patch index f652751339..d2acd40e19 100644 --- a/target/linux/generic/hack-5.4/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.4/902-debloat_proc.patch @@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau if (!pe) --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -3552,6 +3552,8 @@ static const struct seq_operations vmall +@@ -3562,6 +3562,8 @@ static const struct seq_operations vmall static int __init proc_vmalloc_init(void) { diff --git a/target/linux/ramips/patches-5.4/991-at803x.patch b/target/linux/ramips/patches-5.4/991-at803x.patch index 60afe2a35f..dd1d2755ed 100644 --- a/target/linux/ramips/patches-5.4/991-at803x.patch +++ b/target/linux/ramips/patches-5.4/991-at803x.patch @@ -12,11 +12,9 @@ Signed-off-by: René van Dorst drivers/net/phy/at803x.c | 74 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) -diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c -index 481cf48c9b9e4..a6536ecf15db4 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c -@@ -19,6 +19,7 @@ +@@ -14,6 +14,7 @@ #include #include #include @@ -24,7 +22,7 @@ index 481cf48c9b9e4..a6536ecf15db4 100644 #define AT803X_SPECIFIC_STATUS 0x11 #define AT803X_SS_SPEED_MASK (3 << 14) -@@ -57,9 +58,18 @@ +@@ -53,9 +54,18 @@ #define AT803X_MODE_CFG_MASK 0x0F #define AT803X_MODE_CFG_SGMII 0x01 @@ -43,8 +41,8 @@ index 481cf48c9b9e4..a6536ecf15db4 100644 #define AT803X_DEBUG_REG_0 0x00 #define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15) -@@ -475,10 +485,56 @@ static int at803x_parse_dt(struct phy_device *phydev) - return 0; +@@ -243,10 +253,56 @@ static int at803x_resume(struct phy_devi + return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0); } +static int at803x_mode(struct phy_device *phydev) @@ -100,7 +98,7 @@ index 481cf48c9b9e4..a6536ecf15db4 100644 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) -@@ -658,6 +714,10 @@ static int at803x_read_status(struct phy_device *phydev) +@@ -394,6 +450,10 @@ static int at803x_read_status(struct phy { int ss, err, old_link = phydev->link; @@ -111,7 +109,7 @@ index 481cf48c9b9e4..a6536ecf15db4 100644 /* Update the link, but return if there was an error */ err = genphy_update_link(phydev); if (err) -@@ -712,6 +772,19 @@ static int at803x_read_status(struct phy_device *phydev) +@@ -448,6 +508,19 @@ static int at803x_read_status(struct phy return 0; } @@ -130,8 +128,8 @@ index 481cf48c9b9e4..a6536ecf15db4 100644 + static struct phy_driver at803x_driver[] = { { - /* Qualcomm Atheros AR8035 */ -@@ -758,6 +831,7 @@ static struct phy_driver at803x_driver[] = { + /* ATHEROS 8035 */ +@@ -491,6 +564,7 @@ static struct phy_driver at803x_driver[] .suspend = at803x_suspend, .resume = at803x_resume, /* PHY_GBIT_FEATURES */ -- 2.25.1