소스 검색

kernel: bump 5.10 to 5.10.169

Manually rebased:
        backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch

Removed upstreamed:
        backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1]
	patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2]

Add fix:
	target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a19a0f67dbb89ad2bfc466f2003841acba645884
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a5c51e0c3202820192db3f3809e072f3ca2b1177
3. https://lore.kernel.org/stable/[email protected]

Signed-off-by: John Audia <[email protected]>
John Audia 2 년 전
부모
커밋
b88955aa22
22개의 변경된 파일166개의 추가작업 그리고 160개의 파일을 삭제
  1. 2 2
      include/kernel-5.10
  2. 1 1
      target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
  3. 0 46
      target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch
  4. 1 1
      target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
  5. 6 6
      target/linux/generic/backport-5.10/801-v5.11-0001-nvmem-core-Add-support-for-keepout-regions.patch
  6. 1 1
      target/linux/generic/backport-5.10/803-v5.13-0004-nvmem-core-Add-functions-to-make-number-reading-easy.patch
  7. 1 1
      target/linux/generic/backport-5.10/803-v5.13-0005-nvmem-core-Fix-unintentional-sign-extension-issue.patch
  8. 98 0
      target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch
  9. 1 1
      target/linux/generic/backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch
  10. 3 3
      target/linux/generic/backport-5.10/804-v5.14-0005-nvmem-core-constify-nvmem_cell_read_variable_common-.patch
  11. 1 1
      target/linux/generic/backport-5.10/805-v5.15-0003-nvmem-core-fix-error-handling-while-validating-keepo.patch
  12. 14 14
      target/linux/generic/backport-5.10/806-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch
  13. 2 2
      target/linux/generic/backport-5.10/806-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch
  14. 3 3
      target/linux/generic/backport-5.10/808-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch
  15. 2 2
      target/linux/generic/backport-5.10/808-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch
  16. 1 1
      target/linux/generic/backport-5.10/808-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch
  17. 15 14
      target/linux/generic/backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch
  18. 0 47
      target/linux/generic/backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch
  19. 1 1
      target/linux/generic/backport-5.10/812-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch
  20. 9 9
      target/linux/generic/backport-5.10/813-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch
  21. 2 2
      target/linux/generic/backport-5.10/813-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch
  22. 2 2
      target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch

+ 2 - 2
include/kernel-5.10

@@ -1,2 +1,2 @@
-LINUX_VERSION-5.10 = .168
-LINUX_KERNEL_HASH-5.10.168 = b67d2596ba8d30510f743f31899c94c43eaf006a254ff44d7fc6ea26e7ab359c
+LINUX_VERSION-5.10 = .169
+LINUX_KERNEL_HASH-5.10.169 = d9754f6eb55e88214c7aaa7c4831c215f88b48da1d9b40f871b055ff56ebafcf

+ 1 - 1
target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch

@@ -258,7 +258,7 @@ SVN-Revision: 35130
  #include <linux/uaccess.h>
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
  #include <linux/icmpv6.h>
-@@ -926,10 +927,10 @@ static void tcp_v6_send_response(const s
+@@ -927,10 +928,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  	topt = (__be32 *)(t1 + 1);
  
  
  	if (tsecr) {
  	if (tsecr) {

+ 0 - 46
target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch

@@ -1,46 +0,0 @@
-From d61615c366a489646a1bfe5b33455f916762d5f4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
-Date: Wed, 8 Feb 2023 10:16:37 +0100
-Subject: [PATCH] net: bgmac: fix BCM5358 support by setting correct flags
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Code blocks handling BCMA_CHIP_ID_BCM5357 and BCMA_CHIP_ID_BCM53572 were
-incorrectly unified. Chip package values are not unique and cannot be
-checked independently. They are meaningful only in a context of a given
-chip.
-
-Packages BCM5358 and BCM47188 share the same value but then belong to
-different chips. Code unification resulted in treating BCM5358 as
-BCM47188 and broke its initialization.
-
-Link: https://github.com/openwrt/openwrt/issues/8278
-Fixes: cb1b0f90acfe ("net: ethernet: bgmac: unify code of the same family")
-Cc: Jon Mason <[email protected]>
-Signed-off-by: Rafał Miłecki <[email protected]>
-Reviewed-by: Florian Fainelli <[email protected]>
-Link: https://lore.kernel.org/r/[email protected]
-Signed-off-by: Jakub Kicinski <[email protected]>
----
- drivers/net/ethernet/broadcom/bgmac-bcma.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
-+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
-@@ -240,12 +240,12 @@ static int bgmac_probe(struct bcma_devic
- 		bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST;
- 		bgmac->feature_flags |= BGMAC_FEAT_FLW_CTRL1;
- 		bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_PHY;
--		if (ci->pkg == BCMA_PKG_ID_BCM47188 ||
--		    ci->pkg == BCMA_PKG_ID_BCM47186) {
-+		if ((ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM47186) ||
-+		    (ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg == BCMA_PKG_ID_BCM47188)) {
- 			bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_RGMII;
- 			bgmac->feature_flags |= BGMAC_FEAT_IOST_ATTACHED;
- 		}
--		if (ci->pkg == BCMA_PKG_ID_BCM5358)
-+		if (ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM5358)
- 			bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_EPHYRMII;
- 		break;
- 	case BCMA_CHIP_ID_BCM53573:

+ 1 - 1
target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch

@@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller <[email protected]>
  	int irq;
  	int irq;
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5013,7 +5013,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5014,7 +5014,7 @@ int stmmac_dvr_probe(struct device *devi
  	priv->wol_irq = res->wol_irq;
  	priv->wol_irq = res->wol_irq;
  	priv->lpi_irq = res->lpi_irq;
  	priv->lpi_irq = res->lpi_irq;
  
  

+ 6 - 6
target/linux/generic/backport-5.10/801-v5.11-0001-nvmem-core-Add-support-for-keepout-regions.patch

@@ -212,9 +212,9 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	if (!config->no_of_node)
  	if (!config->no_of_node)
  		nvmem->dev.of_node = config->dev->of_node;
  		nvmem->dev.of_node = config->dev->of_node;
  
  
-@@ -680,6 +819,12 @@ struct nvmem_device *nvmem_register(cons
- 	nvmem->dev.groups = nvmem_dev_groups;
- #endif
+@@ -703,6 +842,12 @@ struct nvmem_device *nvmem_register(cons
+ 	if (rval)
+ 		goto err_remove_cells;
  
  
 +	if (nvmem->nkeepout) {
 +	if (nvmem->nkeepout) {
 +		rval = nvmem_validate_keepouts(nvmem);
 +		rval = nvmem_validate_keepouts(nvmem);
@@ -224,7 +224,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 +
 +
  	dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
  	dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
  
  
- 	rval = device_register(&nvmem->dev);
+ 	rval = device_add(&nvmem->dev);
 --- a/include/linux/nvmem-provider.h
 --- a/include/linux/nvmem-provider.h
 +++ b/include/linux/nvmem-provider.h
 +++ b/include/linux/nvmem-provider.h
 @@ -31,6 +31,19 @@ enum nvmem_type {
 @@ -31,6 +31,19 @@ enum nvmem_type {
@@ -256,8 +256,8 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
   * @type:	Type of the nvmem storage
   * @type:	Type of the nvmem storage
   * @read_only:	Device is read-only.
   * @read_only:	Device is read-only.
   * @root_only:	Device is accessibly to root only.
   * @root_only:	Device is accessibly to root only.
-@@ -67,6 +82,8 @@ struct nvmem_config {
- 	struct gpio_desc	*wp_gpio;
+@@ -65,6 +80,8 @@ struct nvmem_config {
+ 	struct module		*owner;
  	const struct nvmem_cell_info	*cells;
  	const struct nvmem_cell_info	*cells;
  	int			ncells;
  	int			ncells;
 +	const struct nvmem_keepout *keepout;
 +	const struct nvmem_keepout *keepout;

+ 1 - 1
target/linux/generic/backport-5.10/803-v5.13-0004-nvmem-core-Add-functions-to-make-number-reading-easy.patch

@@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -1612,6 +1612,101 @@ int nvmem_cell_read_u64(struct device *d
+@@ -1613,6 +1613,101 @@ int nvmem_cell_read_u64(struct device *d
  }
  }
  EXPORT_SYMBOL_GPL(nvmem_cell_read_u64);
  EXPORT_SYMBOL_GPL(nvmem_cell_read_u64);
  
  

+ 1 - 1
target/linux/generic/backport-5.10/803-v5.13-0005-nvmem-core-Fix-unintentional-sign-extension-issue.patch

@@ -23,7 +23,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -1699,7 +1699,7 @@ int nvmem_cell_read_variable_le_u64(stru
+@@ -1700,7 +1700,7 @@ int nvmem_cell_read_variable_le_u64(stru
  	/* Copy w/ implicit endian conversion */
  	/* Copy w/ implicit endian conversion */
  	*val = 0;
  	*val = 0;
  	for (i = 0; i < len; i++)
  	for (i = 0; i < len; i++)

+ 98 - 0
target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch

@@ -0,0 +1,98 @@
+From 35cd2598c910ad6a1cc8bd3f731429b1901abc63 Mon Sep 17 00:00:00 2001
+From: Kuniyuki Iwashima <[email protected]>
+Date: Mon, 27 Feb 2023 13:15:48 -0800
+Subject: [PATCH] net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from
+ sk_stream_kill_queues().
+
+commit 62ec33b44e0f7168ff2886520fec6fb62d03b5a3 upstream.
+
+Christoph Paasch reported that commit b5fc29233d28 ("inet6: Remove
+inet6_destroy_sock() in sk->sk_prot->destroy().") started triggering
+WARN_ON_ONCE(sk->sk_forward_alloc) in sk_stream_kill_queues().  [0 - 2]
+Also, we can reproduce it by a program in [3].
+
+In the commit, we delay freeing ipv6_pinfo.pktoptions from sk->destroy()
+to sk->sk_destruct(), so sk->sk_forward_alloc is no longer zero in
+inet_csk_destroy_sock().
+
+The same check has been in inet_sock_destruct() from at least v2.6,
+we can just remove the WARN_ON_ONCE().  However, among the users of
+sk_stream_kill_queues(), only CAIF is not calling inet_sock_destruct().
+Thus, we add the same WARN_ON_ONCE() to caif_sock_destructor().
+
+[0]: https://lore.kernel.org/netdev/[email protected]/
+[1]: https://github.com/multipath-tcp/mptcp_net-next/issues/341
+[2]:
+WARNING: CPU: 0 PID: 3232 at net/core/stream.c:212 sk_stream_kill_queues+0x2f9/0x3e0
+Modules linked in:
+CPU: 0 PID: 3232 Comm: syz-executor.0 Not tainted 6.2.0-rc5ab24eb4698afbe147b424149c529e2a43ec24eb5 #2
+Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
+RIP: 0010:sk_stream_kill_queues+0x2f9/0x3e0
+Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 08 01 00 00 e9 60 ff ff ff e8 d0 5f b6 fe 0f 0b eb 97 e8 c7 5f b6 fe <0f> 0b eb a0 e8 be 5f b6 fe 0f 0b e9 6a fe ff ff e8 02 07 e3 fe e9
+RSP: 0018:ffff88810570fc68 EFLAGS: 00010293
+RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
+RDX: ffff888101f38f40 RSI: ffffffff8285e529 RDI: 0000000000000005
+RBP: 0000000000000ce0 R08: 0000000000000005 R09: 0000000000000000
+R10: 0000000000000ce0 R11: 0000000000000001 R12: ffff8881009e9488
+R13: ffffffff84af2cc0 R14: 0000000000000000 R15: ffff8881009e9458
+FS:  00007f7fdfbd5800(0000) GS:ffff88811b600000(0000) knlGS:0000000000000000
+CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+CR2: 0000001b32923000 CR3: 00000001062fc006 CR4: 0000000000170ef0
+Call Trace:
+ <TASK>
+ inet_csk_destroy_sock+0x1a1/0x320
+ __tcp_close+0xab6/0xe90
+ tcp_close+0x30/0xc0
+ inet_release+0xe9/0x1f0
+ inet6_release+0x4c/0x70
+ __sock_release+0xd2/0x280
+ sock_close+0x15/0x20
+ __fput+0x252/0xa20
+ task_work_run+0x169/0x250
+ exit_to_user_mode_prepare+0x113/0x120
+ syscall_exit_to_user_mode+0x1d/0x40
+ do_syscall_64+0x48/0x90
+ entry_SYSCALL_64_after_hwframe+0x72/0xdc
+RIP: 0033:0x7f7fdf7ae28d
+Code: c1 20 00 00 75 10 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 37 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
+RSP: 002b:00000000007dfbb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
+RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7fdf7ae28d
+RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003
+RBP: 0000000000000000 R08: 000000007f338e0f R09: 0000000000000e0f
+R10: 000000007f338e13 R11: 0000000000000293 R12: 00007f7fdefff000
+R13: 00007f7fdefffcd8 R14: 00007f7fdefffce0 R15: 00007f7fdefffcd8
+ </TASK>
+
+[3]: https://lore.kernel.org/netdev/[email protected]/
+
+Fixes: b5fc29233d28 ("inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().")
+Reported-by: syzbot <[email protected]>
+Reported-by: Christoph Paasch <[email protected]>
+Signed-off-by: Kuniyuki Iwashima <[email protected]>
+Reviewed-by: Eric Dumazet <[email protected]>
+Signed-off-by: Jakub Kicinski <[email protected]>
+---
+ net/caif/caif_socket.c | 1 +
+ net/core/stream.c      | 1 -
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/caif/caif_socket.c
++++ b/net/caif/caif_socket.c
+@@ -1020,6 +1020,7 @@ static void caif_sock_destructor(struct
+ 		return;
+ 	}
+ 	sk_stream_kill_queues(&cf_sk->sk);
++	WARN_ON(sk->sk_forward_alloc);
+ 	caif_free_client(&cf_sk->layer);
+ }
+ 
+--- a/net/core/stream.c
++++ b/net/core/stream.c
+@@ -209,7 +209,6 @@ void sk_stream_kill_queues(struct sock *
+ 	sk_mem_reclaim(sk);
+ 
+ 	WARN_ON(sk->sk_wmem_queued);
+-	WARN_ON(sk->sk_forward_alloc);
+ 
+ 	/* It is _impossible_ for the backlog to contain anything
+ 	 * when we get here.  All user references to this socket

+ 1 - 1
target/linux/generic/backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch

@@ -70,7 +70,7 @@ Link: https://lore.kernel.org/linux-mtd/[email protected]
   * @no_of_node:	Device should not use the parent's of_node even if it's !NULL.
   * @no_of_node:	Device should not use the parent's of_node even if it's !NULL.
   * @reg_read:	Callback to read data.
   * @reg_read:	Callback to read data.
   * @reg_write:	Callback to write data.
   * @reg_write:	Callback to write data.
-@@ -87,6 +88,7 @@ struct nvmem_config {
+@@ -85,6 +86,7 @@ struct nvmem_config {
  	enum nvmem_type		type;
  	enum nvmem_type		type;
  	bool			read_only;
  	bool			read_only;
  	bool			root_only;
  	bool			root_only;

+ 3 - 3
target/linux/generic/backport-5.10/804-v5.14-0005-nvmem-core-constify-nvmem_cell_read_variable_common-.patch

@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -1614,9 +1614,9 @@ int nvmem_cell_read_u64(struct device *d
+@@ -1615,9 +1615,9 @@ int nvmem_cell_read_u64(struct device *d
  }
  }
  EXPORT_SYMBOL_GPL(nvmem_cell_read_u64);
  EXPORT_SYMBOL_GPL(nvmem_cell_read_u64);
  
  
@@ -32,7 +32,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  {
  {
  	struct nvmem_cell *cell;
  	struct nvmem_cell *cell;
  	int nbits;
  	int nbits;
-@@ -1660,7 +1660,7 @@ int nvmem_cell_read_variable_le_u32(stru
+@@ -1661,7 +1661,7 @@ int nvmem_cell_read_variable_le_u32(stru
  				    u32 *val)
  				    u32 *val)
  {
  {
  	size_t len;
  	size_t len;
@@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	int i;
  	int i;
  
  
  	buf = nvmem_cell_read_variable_common(dev, cell_id, sizeof(*val), &len);
  	buf = nvmem_cell_read_variable_common(dev, cell_id, sizeof(*val), &len);
-@@ -1691,7 +1691,7 @@ int nvmem_cell_read_variable_le_u64(stru
+@@ -1692,7 +1692,7 @@ int nvmem_cell_read_variable_le_u64(stru
  				    u64 *val)
  				    u64 *val)
  {
  {
  	size_t len;
  	size_t len;

+ 1 - 1
target/linux/generic/backport-5.10/805-v5.15-0003-nvmem-core-fix-error-handling-while-validating-keepo.patch

@@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -827,8 +827,11 @@ struct nvmem_device *nvmem_register(cons
+@@ -850,8 +850,11 @@ struct nvmem_device *nvmem_register(cons
  
  
  	if (nvmem->nkeepout) {
  	if (nvmem->nkeepout) {
  		rval = nvmem_validate_keepouts(nvmem);
  		rval = nvmem_validate_keepouts(nvmem);

+ 14 - 14
target/linux/generic/backport-5.10/806-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch

@@ -206,7 +206,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	}
  	}
  
  
  	return 0;
  	return 0;
-@@ -1144,9 +1146,33 @@ struct nvmem_device *devm_nvmem_device_g
+@@ -1145,9 +1147,33 @@ struct nvmem_device *devm_nvmem_device_g
  }
  }
  EXPORT_SYMBOL_GPL(devm_nvmem_device_get);
  EXPORT_SYMBOL_GPL(devm_nvmem_device_get);
  
  
@@ -240,7 +240,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	struct nvmem_cell *cell = ERR_PTR(-ENOENT);
  	struct nvmem_cell *cell = ERR_PTR(-ENOENT);
  	struct nvmem_cell_lookup *lookup;
  	struct nvmem_cell_lookup *lookup;
  	struct nvmem_device *nvmem;
  	struct nvmem_device *nvmem;
-@@ -1171,11 +1197,15 @@ nvmem_cell_get_from_lookup(struct device
+@@ -1172,11 +1198,15 @@ nvmem_cell_get_from_lookup(struct device
  				break;
  				break;
  			}
  			}
  
  
@@ -259,7 +259,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  			}
  			}
  			break;
  			break;
  		}
  		}
-@@ -1186,10 +1216,10 @@ nvmem_cell_get_from_lookup(struct device
+@@ -1187,10 +1217,10 @@ nvmem_cell_get_from_lookup(struct device
  }
  }
  
  
  #if IS_ENABLED(CONFIG_OF)
  #if IS_ENABLED(CONFIG_OF)
@@ -273,7 +273,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  
  
  	mutex_lock(&nvmem_mutex);
  	mutex_lock(&nvmem_mutex);
  	list_for_each_entry(iter, &nvmem->cells, node) {
  	list_for_each_entry(iter, &nvmem->cells, node) {
-@@ -1219,6 +1249,7 @@ struct nvmem_cell *of_nvmem_cell_get(str
+@@ -1220,6 +1250,7 @@ struct nvmem_cell *of_nvmem_cell_get(str
  {
  {
  	struct device_node *cell_np, *nvmem_np;
  	struct device_node *cell_np, *nvmem_np;
  	struct nvmem_device *nvmem;
  	struct nvmem_device *nvmem;
@@ -281,7 +281,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	struct nvmem_cell *cell;
  	struct nvmem_cell *cell;
  	int index = 0;
  	int index = 0;
  
  
-@@ -1239,12 +1270,16 @@ struct nvmem_cell *of_nvmem_cell_get(str
+@@ -1240,12 +1271,16 @@ struct nvmem_cell *of_nvmem_cell_get(str
  	if (IS_ERR(nvmem))
  	if (IS_ERR(nvmem))
  		return ERR_CAST(nvmem);
  		return ERR_CAST(nvmem);
  
  
@@ -300,7 +300,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	return cell;
  	return cell;
  }
  }
  EXPORT_SYMBOL_GPL(of_nvmem_cell_get);
  EXPORT_SYMBOL_GPL(of_nvmem_cell_get);
-@@ -1350,13 +1385,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put);
+@@ -1351,13 +1386,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put);
   */
   */
  void nvmem_cell_put(struct nvmem_cell *cell)
  void nvmem_cell_put(struct nvmem_cell *cell)
  {
  {
@@ -320,7 +320,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  {
  {
  	u8 *p, *b;
  	u8 *p, *b;
  	int i, extra, bit_offset = cell->bit_offset;
  	int i, extra, bit_offset = cell->bit_offset;
-@@ -1390,8 +1429,8 @@ static void nvmem_shift_read_buffer_in_p
+@@ -1391,8 +1430,8 @@ static void nvmem_shift_read_buffer_in_p
  }
  }
  
  
  static int __nvmem_cell_read(struct nvmem_device *nvmem,
  static int __nvmem_cell_read(struct nvmem_device *nvmem,
@@ -331,7 +331,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  {
  {
  	int rc;
  	int rc;
  
  
-@@ -1422,18 +1461,18 @@ static int __nvmem_cell_read(struct nvme
+@@ -1423,18 +1462,18 @@ static int __nvmem_cell_read(struct nvme
   */
   */
  void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
  void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
  {
  {
@@ -353,7 +353,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	if (rc) {
  	if (rc) {
  		kfree(buf);
  		kfree(buf);
  		return ERR_PTR(rc);
  		return ERR_PTR(rc);
-@@ -1443,7 +1482,7 @@ void *nvmem_cell_read(struct nvmem_cell
+@@ -1444,7 +1483,7 @@ void *nvmem_cell_read(struct nvmem_cell
  }
  }
  EXPORT_SYMBOL_GPL(nvmem_cell_read);
  EXPORT_SYMBOL_GPL(nvmem_cell_read);
  
  
@@ -362,7 +362,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  					     u8 *_buf, int len)
  					     u8 *_buf, int len)
  {
  {
  	struct nvmem_device *nvmem = cell->nvmem;
  	struct nvmem_device *nvmem = cell->nvmem;
-@@ -1496,16 +1535,7 @@ err:
+@@ -1497,16 +1536,7 @@ err:
  	return ERR_PTR(rc);
  	return ERR_PTR(rc);
  }
  }
  
  
@@ -380,7 +380,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  {
  {
  	struct nvmem_device *nvmem = cell->nvmem;
  	struct nvmem_device *nvmem = cell->nvmem;
  	int rc;
  	int rc;
-@@ -1531,6 +1561,21 @@ int nvmem_cell_write(struct nvmem_cell *
+@@ -1532,6 +1562,21 @@ int nvmem_cell_write(struct nvmem_cell *
  
  
  	return len;
  	return len;
  }
  }
@@ -402,7 +402,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  EXPORT_SYMBOL_GPL(nvmem_cell_write);
  EXPORT_SYMBOL_GPL(nvmem_cell_write);
  
  
  static int nvmem_cell_read_common(struct device *dev, const char *cell_id,
  static int nvmem_cell_read_common(struct device *dev, const char *cell_id,
-@@ -1633,7 +1678,7 @@ static const void *nvmem_cell_read_varia
+@@ -1634,7 +1679,7 @@ static const void *nvmem_cell_read_varia
  	if (IS_ERR(cell))
  	if (IS_ERR(cell))
  		return cell;
  		return cell;
  
  
@@ -411,7 +411,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	buf = nvmem_cell_read(cell, len);
  	buf = nvmem_cell_read(cell, len);
  	nvmem_cell_put(cell);
  	nvmem_cell_put(cell);
  	if (IS_ERR(buf))
  	if (IS_ERR(buf))
-@@ -1729,18 +1774,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab
+@@ -1730,18 +1775,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab
  ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
  ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
  			   struct nvmem_cell_info *info, void *buf)
  			   struct nvmem_cell_info *info, void *buf)
  {
  {
@@ -433,7 +433,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	if (rc)
  	if (rc)
  		return rc;
  		return rc;
  
  
-@@ -1760,17 +1805,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read
+@@ -1761,17 +1806,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read
  int nvmem_device_cell_write(struct nvmem_device *nvmem,
  int nvmem_device_cell_write(struct nvmem_device *nvmem,
  			    struct nvmem_cell_info *info, void *buf)
  			    struct nvmem_cell_info *info, void *buf)
  {
  {

+ 2 - 2
target/linux/generic/backport-5.10/806-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch

@@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	nvmem->keepout = config->keepout;
  	nvmem->keepout = config->keepout;
  	nvmem->nkeepout = config->nkeepout;
  	nvmem->nkeepout = config->nkeepout;
  	if (config->of_node)
  	if (config->of_node)
-@@ -1443,6 +1445,13 @@ static int __nvmem_cell_read(struct nvme
+@@ -1444,6 +1446,13 @@ static int __nvmem_cell_read(struct nvme
  	if (cell->bit_offset || cell->nbits)
  	if (cell->bit_offset || cell->nbits)
  		nvmem_shift_read_buffer_in_place(cell, buf);
  		nvmem_shift_read_buffer_in_place(cell, buf);
  
  
@@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
   * @size:	Device size.
   * @size:	Device size.
   * @word_size:	Minimum read/write access granularity.
   * @word_size:	Minimum read/write access granularity.
   * @stride:	Minimum read/write access stride.
   * @stride:	Minimum read/write access stride.
-@@ -94,6 +98,7 @@ struct nvmem_config {
+@@ -92,6 +96,7 @@ struct nvmem_config {
  	bool			no_of_node;
  	bool			no_of_node;
  	nvmem_reg_read_t	reg_read;
  	nvmem_reg_read_t	reg_read;
  	nvmem_reg_write_t	reg_write;
  	nvmem_reg_write_t	reg_write;

+ 3 - 3
target/linux/generic/backport-5.10/808-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch

@@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -945,28 +945,6 @@ struct nvmem_device *devm_nvmem_register
+@@ -946,28 +946,6 @@ struct nvmem_device *devm_nvmem_register
  }
  }
  EXPORT_SYMBOL_GPL(devm_nvmem_register);
  EXPORT_SYMBOL_GPL(devm_nvmem_register);
  
  
@@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  {
  {
 --- a/include/linux/nvmem-provider.h
 --- a/include/linux/nvmem-provider.h
 +++ b/include/linux/nvmem-provider.h
 +++ b/include/linux/nvmem-provider.h
-@@ -135,8 +135,6 @@ void nvmem_unregister(struct nvmem_devic
+@@ -133,8 +133,6 @@ void nvmem_unregister(struct nvmem_devic
  struct nvmem_device *devm_nvmem_register(struct device *dev,
  struct nvmem_device *devm_nvmem_register(struct device *dev,
  					 const struct nvmem_config *cfg);
  					 const struct nvmem_config *cfg);
  
  
@@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  void nvmem_add_cell_table(struct nvmem_cell_table *table);
  void nvmem_add_cell_table(struct nvmem_cell_table *table);
  void nvmem_del_cell_table(struct nvmem_cell_table *table);
  void nvmem_del_cell_table(struct nvmem_cell_table *table);
  
  
-@@ -155,12 +153,6 @@ devm_nvmem_register(struct device *dev,
+@@ -153,12 +151,6 @@ devm_nvmem_register(struct device *dev,
  	return nvmem_register(c);
  	return nvmem_register(c);
  }
  }
  
  

+ 2 - 2
target/linux/generic/backport-5.10/808-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch

@@ -16,7 +16,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -907,9 +907,9 @@ void nvmem_unregister(struct nvmem_devic
+@@ -908,9 +908,9 @@ void nvmem_unregister(struct nvmem_devic
  }
  }
  EXPORT_SYMBOL_GPL(nvmem_unregister);
  EXPORT_SYMBOL_GPL(nvmem_unregister);
  
  
@@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  }
  }
  
  
  /**
  /**
-@@ -926,20 +926,16 @@ static void devm_nvmem_release(struct de
+@@ -927,20 +927,16 @@ static void devm_nvmem_release(struct de
  struct nvmem_device *devm_nvmem_register(struct device *dev,
  struct nvmem_device *devm_nvmem_register(struct device *dev,
  					 const struct nvmem_config *config)
  					 const struct nvmem_config *config)
  {
  {

+ 1 - 1
target/linux/generic/backport-5.10/808-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch

@@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -903,7 +903,8 @@ static void nvmem_device_release(struct
+@@ -904,7 +904,8 @@ static void nvmem_device_release(struct
   */
   */
  void nvmem_unregister(struct nvmem_device *nvmem)
  void nvmem_unregister(struct nvmem_device *nvmem)
  {
  {

+ 15 - 14
target/linux/generic/backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch

@@ -22,10 +22,23 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -830,21 +830,18 @@ struct nvmem_device *nvmem_register(cons
+@@ -833,6 +833,12 @@ struct nvmem_device *nvmem_register(cons
  	nvmem->dev.groups = nvmem_dev_groups;
  	nvmem->dev.groups = nvmem_dev_groups;
  #endif
  #endif
  
  
++	if (nvmem->nkeepout) {
++		rval = nvmem_validate_keepouts(nvmem);
++		if (rval)
++			goto err_put_device;
++	}
++
+ 	if (config->compat) {
+ 		rval = nvmem_sysfs_setup_compat(nvmem, config);
+ 		if (rval)
+@@ -853,15 +859,6 @@ struct nvmem_device *nvmem_register(cons
+ 	if (rval)
+ 		goto err_remove_cells;
+ 
 -	if (nvmem->nkeepout) {
 -	if (nvmem->nkeepout) {
 -		rval = nvmem_validate_keepouts(nvmem);
 -		rval = nvmem_validate_keepouts(nvmem);
 -		if (rval) {
 -		if (rval) {
@@ -37,16 +50,4 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 -
 -
  	dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
  	dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
  
  
- 	rval = device_register(&nvmem->dev);
- 	if (rval)
- 		goto err_put_device;
- 
-+	if (nvmem->nkeepout) {
-+		rval = nvmem_validate_keepouts(nvmem);
-+		if (rval)
-+			goto err_device_del;
-+	}
-+
- 	if (config->compat) {
- 		rval = nvmem_sysfs_setup_compat(nvmem, config);
- 		if (rval)
+ 	rval = device_add(&nvmem->dev);

+ 0 - 47
target/linux/generic/backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch

@@ -1,47 +0,0 @@
-From 5544e90c81261e82e02bbf7c6015a4b9c8c825ef Mon Sep 17 00:00:00 2001
-From: Gaosheng Cui <[email protected]>
-Date: Fri, 16 Sep 2022 13:20:50 +0100
-Subject: [PATCH] nvmem: core: add error handling for dev_set_name
-
-The type of return value of dev_set_name is int, which may return
-wrong result, so we add error handling for it to reclaim memory
-of nvmem resource, and return early when an error occurs.
-
-Signed-off-by: Gaosheng Cui <[email protected]>
-Signed-off-by: Srinivas Kandagatla <[email protected]>
-Link: https://lore.kernel.org/r/[email protected]
-Signed-off-by: Greg Kroah-Hartman <[email protected]>
----
- drivers/nvmem/core.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
---- a/drivers/nvmem/core.c
-+++ b/drivers/nvmem/core.c
-@@ -811,18 +811,24 @@ struct nvmem_device *nvmem_register(cons
- 
- 	switch (config->id) {
- 	case NVMEM_DEVID_NONE:
--		dev_set_name(&nvmem->dev, "%s", config->name);
-+		rval = dev_set_name(&nvmem->dev, "%s", config->name);
- 		break;
- 	case NVMEM_DEVID_AUTO:
--		dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id);
-+		rval = dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id);
- 		break;
- 	default:
--		dev_set_name(&nvmem->dev, "%s%d",
-+		rval = dev_set_name(&nvmem->dev, "%s%d",
- 			     config->name ? : "nvmem",
- 			     config->name ? config->id : nvmem->id);
- 		break;
- 	}
- 
-+	if (rval) {
-+		ida_free(&nvmem_ida, nvmem->id);
-+		kfree(nvmem);
-+		return ERR_PTR(rval);
-+	}
-+
- 	nvmem->read_only = device_property_present(config->dev, "read-only") ||
- 			   config->read_only || !nvmem->reg_write;
- 

+ 1 - 1
target/linux/generic/backport-5.10/812-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch

@@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
 
 --- a/drivers/nvmem/core.c
 --- a/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
 +++ b/drivers/nvmem/core.c
-@@ -1242,16 +1242,21 @@ struct nvmem_cell *of_nvmem_cell_get(str
+@@ -1237,16 +1237,21 @@ struct nvmem_cell *of_nvmem_cell_get(str
  	if (!cell_np)
  	if (!cell_np)
  		return ERR_PTR(-ENOENT);
  		return ERR_PTR(-ENOENT);
  
  

+ 9 - 9
target/linux/generic/backport-5.10/813-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch

@@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  };
  };
  
  
  static DEFINE_MUTEX(nvmem_mutex);
  static DEFINE_MUTEX(nvmem_mutex);
-@@ -1127,7 +1128,8 @@ struct nvmem_device *devm_nvmem_device_g
+@@ -1122,7 +1123,8 @@ struct nvmem_device *devm_nvmem_device_g
  }
  }
  EXPORT_SYMBOL_GPL(devm_nvmem_device_get);
  EXPORT_SYMBOL_GPL(devm_nvmem_device_get);
  
  
@@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  {
  {
  	struct nvmem_cell *cell;
  	struct nvmem_cell *cell;
  	const char *name = NULL;
  	const char *name = NULL;
-@@ -1146,6 +1148,7 @@ static struct nvmem_cell *nvmem_create_c
+@@ -1141,6 +1143,7 @@ static struct nvmem_cell *nvmem_create_c
  
  
  	cell->id = name;
  	cell->id = name;
  	cell->entry = entry;
  	cell->entry = entry;
@@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  
  
  	return cell;
  	return cell;
  }
  }
-@@ -1184,7 +1187,7 @@ nvmem_cell_get_from_lookup(struct device
+@@ -1179,7 +1182,7 @@ nvmem_cell_get_from_lookup(struct device
  				__nvmem_device_put(nvmem);
  				__nvmem_device_put(nvmem);
  				cell = ERR_PTR(-ENOENT);
  				cell = ERR_PTR(-ENOENT);
  			} else {
  			} else {
@@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  				if (IS_ERR(cell))
  				if (IS_ERR(cell))
  					__nvmem_device_put(nvmem);
  					__nvmem_device_put(nvmem);
  			}
  			}
-@@ -1232,15 +1235,27 @@ struct nvmem_cell *of_nvmem_cell_get(str
+@@ -1227,15 +1230,27 @@ struct nvmem_cell *of_nvmem_cell_get(str
  	struct nvmem_device *nvmem;
  	struct nvmem_device *nvmem;
  	struct nvmem_cell_entry *cell_entry;
  	struct nvmem_cell_entry *cell_entry;
  	struct nvmem_cell *cell;
  	struct nvmem_cell *cell;
@@ -105,7 +105,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  
  
  	nvmem_np = of_get_parent(cell_np);
  	nvmem_np = of_get_parent(cell_np);
  	if (!nvmem_np) {
  	if (!nvmem_np) {
-@@ -1262,7 +1277,7 @@ struct nvmem_cell *of_nvmem_cell_get(str
+@@ -1257,7 +1272,7 @@ struct nvmem_cell *of_nvmem_cell_get(str
  		return ERR_PTR(-ENOENT);
  		return ERR_PTR(-ENOENT);
  	}
  	}
  
  
@@ -114,7 +114,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	if (IS_ERR(cell))
  	if (IS_ERR(cell))
  		__nvmem_device_put(nvmem);
  		__nvmem_device_put(nvmem);
  
  
-@@ -1415,8 +1430,8 @@ static void nvmem_shift_read_buffer_in_p
+@@ -1410,8 +1425,8 @@ static void nvmem_shift_read_buffer_in_p
  }
  }
  
  
  static int __nvmem_cell_read(struct nvmem_device *nvmem,
  static int __nvmem_cell_read(struct nvmem_device *nvmem,
@@ -125,7 +125,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  {
  {
  	int rc;
  	int rc;
  
  
-@@ -1430,7 +1445,7 @@ static int __nvmem_cell_read(struct nvme
+@@ -1425,7 +1440,7 @@ static int __nvmem_cell_read(struct nvme
  		nvmem_shift_read_buffer_in_place(cell, buf);
  		nvmem_shift_read_buffer_in_place(cell, buf);
  
  
  	if (nvmem->cell_post_process) {
  	if (nvmem->cell_post_process) {
@@ -134,7 +134,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  					      cell->offset, buf, cell->bytes);
  					      cell->offset, buf, cell->bytes);
  		if (rc)
  		if (rc)
  			return rc;
  			return rc;
-@@ -1465,7 +1480,7 @@ void *nvmem_cell_read(struct nvmem_cell
+@@ -1460,7 +1475,7 @@ void *nvmem_cell_read(struct nvmem_cell
  	if (!buf)
  	if (!buf)
  		return ERR_PTR(-ENOMEM);
  		return ERR_PTR(-ENOMEM);
  
  
@@ -143,7 +143,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  	if (rc) {
  	if (rc) {
  		kfree(buf);
  		kfree(buf);
  		return ERR_PTR(rc);
  		return ERR_PTR(rc);
-@@ -1778,7 +1793,7 @@ ssize_t nvmem_device_cell_read(struct nv
+@@ -1773,7 +1788,7 @@ ssize_t nvmem_device_cell_read(struct nv
  	if (rc)
  	if (rc)
  		return rc;
  		return rc;
  
  

+ 2 - 2
target/linux/generic/backport-5.10/813-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch

@@ -98,7 +98,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  /**
  /**
 --- a/include/linux/nvmem-provider.h
 --- a/include/linux/nvmem-provider.h
 +++ b/include/linux/nvmem-provider.h
 +++ b/include/linux/nvmem-provider.h
-@@ -155,6 +155,9 @@ struct nvmem_device *devm_nvmem_register
+@@ -153,6 +153,9 @@ struct nvmem_device *devm_nvmem_register
  void nvmem_add_cell_table(struct nvmem_cell_table *table);
  void nvmem_add_cell_table(struct nvmem_cell_table *table);
  void nvmem_del_cell_table(struct nvmem_cell_table *table);
  void nvmem_del_cell_table(struct nvmem_cell_table *table);
  
  
@@ -108,7 +108,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
  #else
  #else
  
  
  static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c)
  static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c)
-@@ -172,6 +175,11 @@ devm_nvmem_register(struct device *dev,
+@@ -170,6 +173,11 @@ devm_nvmem_register(struct device *dev,
  
  
  static inline void nvmem_add_cell_table(struct nvmem_cell_table *table) {}
  static inline void nvmem_add_cell_table(struct nvmem_cell_table *table) {}
  static inline void nvmem_del_cell_table(struct nvmem_cell_table *table) {}
  static inline void nvmem_del_cell_table(struct nvmem_cell_table *table) {}

+ 2 - 2
target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch

@@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <[email protected]>
 
 
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5046,6 +5046,10 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5047,6 +5047,10 @@ int stmmac_dvr_probe(struct device *devi
  			reset_control_reset(priv->plat->stmmac_rst);
  			reset_control_reset(priv->plat->stmmac_rst);
  	}
  	}
  
  
@@ -40,7 +40,7 @@ Signed-off-by: David S. Miller <[email protected]>
  	/* Init MAC and get the capabilities */
  	/* Init MAC and get the capabilities */
  	ret = stmmac_hw_init(priv);
  	ret = stmmac_hw_init(priv);
  	if (ret)
  	if (ret)
-@@ -5260,6 +5264,7 @@ int stmmac_dvr_remove(struct device *dev
+@@ -5261,6 +5265,7 @@ int stmmac_dvr_remove(struct device *dev
  	phylink_destroy(priv->phylink);
  	phylink_destroy(priv->phylink);
  	if (priv->plat->stmmac_rst)
  	if (priv->plat->stmmac_rst)
  		reset_control_assert(priv->plat->stmmac_rst);
  		reset_control_assert(priv->plat->stmmac_rst);