mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-03 14:54:11 +08:00
kernel: bump 5.4 to 5.4.36
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 <ynezz@true.cz>
This commit is contained in:
parent
493eef5b27
commit
5ea3ea154f
@ -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)))))))
|
||||
|
@ -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 */
|
||||
|
@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
}
|
||||
--- 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 <jonathan@raspberrypi.org>
|
||||
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);
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- 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 <phil@raspberrypi.org>
|
||||
/* 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 */
|
||||
|
@ -46,7 +46,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
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 <jonathan@raspberrypi.org>
|
||||
/*
|
||||
--- 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)
|
||||
|
@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
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);
|
||||
|
||||
|
@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- 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
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- 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);
|
||||
|
@ -175,7 +175,7 @@ Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
|
||||
|
||||
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 <catalin.marinas@arm.com>
|
||||
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))
|
||||
|
@ -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,
|
||||
|
@ -84,7 +84,7 @@ Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
|
||||
--- 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 <m.szyprowski@samsung.com>
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -296,7 +296,7 @@ Signed-off-by: Christoph Hellwig <hch@lst.de>
|
||||
}
|
||||
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 <hch@lst.de>
|
||||
|
||||
/*
|
||||
* 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 <hch@lst.de>
|
||||
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 <hch@lst.de>
|
||||
}
|
||||
|
||||
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 <hch@lst.de>
|
||||
|
||||
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 <hch@lst.de>
|
||||
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) &&
|
||||
|
@ -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)
|
||||
|
@ -18,15 +18,12 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -18,7 +18,7 @@ Reviewed-by: Bart Van Assche <bvanassche@acm.org>
|
||||
|
||||
--- 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 <bvanassche@acm.org>
|
||||
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) {
|
||||
|
@ -1,101 +0,0 @@
|
||||
From 3117c3f45edbcc269baaebd3d13f39b7bf884aa6 Mon Sep 17 00:00:00 2001
|
||||
From: Evan Green <evgreen@chromium.org>
|
||||
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 <evgreen@chromium.org>
|
||||
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
||||
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
|
||||
---
|
||||
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)
|
@ -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;
|
||||
|
||||
|
@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
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)
|
||||
{
|
||||
|
@ -12,11 +12,9 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
||||
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 <linux/etherdevice.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user