mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-14 03:03:52 +02:00
kernel: bump 5.10 to 5.10.168
Manually rebased: backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch Removed upstreamed: generic-backport/807-v5.17-0003-nvmem-core-Fix-a-conflict-between-MTD-and-NVMEM-on-w.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.168&id=34ec4c7831c416ac56619477f1701986634a7efc Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
This commit is contained in:
parent
80d61c41d5
commit
461072fc7b
|
@ -1,2 +1,2 @@
|
||||||
LINUX_VERSION-5.10 = .167
|
LINUX_VERSION-5.10 = .168
|
||||||
LINUX_KERNEL_HASH-5.10.167 = d807f97812e566410cd13b3170009e0d7552748d4f22d608ffd4dbd7f85bf9c6
|
LINUX_KERNEL_HASH-5.10.168 = b67d2596ba8d30510f743f31899c94c43eaf006a254ff44d7fc6ea26e7ab359c
|
||||||
|
|
|
@ -162,7 +162,7 @@ SVN-Revision: 35130
|
||||||
|
|
||||||
--- a/include/uapi/linux/ip.h
|
--- a/include/uapi/linux/ip.h
|
||||||
+++ b/include/uapi/linux/ip.h
|
+++ b/include/uapi/linux/ip.h
|
||||||
@@ -105,7 +105,7 @@ struct iphdr {
|
@@ -106,7 +106,7 @@ struct iphdr {
|
||||||
__be32 daddr;
|
__be32 daddr;
|
||||||
);
|
);
|
||||||
/*The options start here. */
|
/*The options start here. */
|
||||||
|
@ -173,7 +173,7 @@ SVN-Revision: 35130
|
||||||
struct ip_auth_hdr {
|
struct ip_auth_hdr {
|
||||||
--- a/include/uapi/linux/ipv6.h
|
--- a/include/uapi/linux/ipv6.h
|
||||||
+++ b/include/uapi/linux/ipv6.h
|
+++ b/include/uapi/linux/ipv6.h
|
||||||
@@ -134,7 +134,7 @@ struct ipv6hdr {
|
@@ -135,7 +135,7 @@ struct ipv6hdr {
|
||||||
struct in6_addr saddr;
|
struct in6_addr saddr;
|
||||||
struct in6_addr daddr;
|
struct in6_addr daddr;
|
||||||
);
|
);
|
||||||
|
|
|
@ -203,7 +203,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
static int nvmem_add_cells_from_of(struct nvmem_device *nvmem)
|
static int nvmem_add_cells_from_of(struct nvmem_device *nvmem)
|
||||||
{
|
{
|
||||||
struct device_node *parent, *child;
|
struct device_node *parent, *child;
|
||||||
@@ -655,6 +792,8 @@ struct nvmem_device *nvmem_register(cons
|
@@ -656,6 +793,8 @@ struct nvmem_device *nvmem_register(cons
|
||||||
nvmem->type = config->type;
|
nvmem->type = config->type;
|
||||||
nvmem->reg_read = config->reg_read;
|
nvmem->reg_read = config->reg_read;
|
||||||
nvmem->reg_write = config->reg_write;
|
nvmem->reg_write = config->reg_write;
|
||||||
|
@ -212,7 +212,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
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;
|
||||||
|
|
||||||
@@ -679,6 +818,12 @@ struct nvmem_device *nvmem_register(cons
|
@@ -680,6 +819,12 @@ struct nvmem_device *nvmem_register(cons
|
||||||
nvmem->dev.groups = nvmem_dev_groups;
|
nvmem->dev.groups = nvmem_dev_groups;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
* @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.
|
||||||
@@ -66,6 +81,8 @@ struct nvmem_config {
|
@@ -67,6 +82,8 @@ struct nvmem_config {
|
||||||
struct gpio_desc *wp_gpio;
|
struct gpio_desc *wp_gpio;
|
||||||
const struct nvmem_cell_info *cells;
|
const struct nvmem_cell_info *cells;
|
||||||
int ncells;
|
int ncells;
|
||||||
|
|
|
@ -49,7 +49,7 @@ Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-2-michael@walle.cc
|
||||||
|
|
||||||
--- a/drivers/nvmem/core.c
|
--- a/drivers/nvmem/core.c
|
||||||
+++ b/drivers/nvmem/core.c
|
+++ b/drivers/nvmem/core.c
|
||||||
@@ -794,7 +794,9 @@ struct nvmem_device *nvmem_register(cons
|
@@ -795,7 +795,9 @@ struct nvmem_device *nvmem_register(cons
|
||||||
nvmem->reg_write = config->reg_write;
|
nvmem->reg_write = config->reg_write;
|
||||||
nvmem->keepout = config->keepout;
|
nvmem->keepout = config->keepout;
|
||||||
nvmem->nkeepout = config->nkeepout;
|
nvmem->nkeepout = config->nkeepout;
|
||||||
|
@ -70,11 +70,11 @@ Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-2-michael@walle.cc
|
||||||
* @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.
|
||||||
@@ -86,6 +87,7 @@ struct nvmem_config {
|
@@ -87,6 +88,7 @@ struct nvmem_config {
|
||||||
enum nvmem_type type;
|
enum nvmem_type type;
|
||||||
bool read_only;
|
bool read_only;
|
||||||
bool root_only;
|
bool root_only;
|
||||||
+ struct device_node *of_node;
|
+ struct device_node *of_node;
|
||||||
|
bool ignore_wp;
|
||||||
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;
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
|
||||||
--- a/drivers/nvmem/core.c
|
--- a/drivers/nvmem/core.c
|
||||||
+++ b/drivers/nvmem/core.c
|
+++ b/drivers/nvmem/core.c
|
||||||
@@ -826,8 +826,11 @@ struct nvmem_device *nvmem_register(cons
|
@@ -827,8 +827,11 @@ struct nvmem_device *nvmem_register(cons
|
||||||
|
|
||||||
if (nvmem->nkeepout) {
|
if (nvmem->nkeepout) {
|
||||||
rval = nvmem_validate_keepouts(nvmem);
|
rval = nvmem_validate_keepouts(nvmem);
|
||||||
|
|
|
@ -30,7 +30,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
struct gpio_desc *wp_gpio;
|
struct gpio_desc *wp_gpio;
|
||||||
void *priv;
|
void *priv;
|
||||||
};
|
};
|
||||||
@@ -798,6 +799,7 @@ struct nvmem_device *nvmem_register(cons
|
@@ -799,6 +800,7 @@ struct nvmem_device *nvmem_register(cons
|
||||||
nvmem->type = config->type;
|
nvmem->type = config->type;
|
||||||
nvmem->reg_read = config->reg_read;
|
nvmem->reg_read = config->reg_read;
|
||||||
nvmem->reg_write = config->reg_write;
|
nvmem->reg_write = config->reg_write;
|
||||||
|
@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
* @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.
|
||||||
@@ -92,6 +96,7 @@ struct nvmem_config {
|
@@ -94,6 +98,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;
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
From f6c052afe6f802d87c74153b7a57c43b2e9faf07 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christophe Kerello <christophe.kerello@foss.st.com>
|
|
||||||
Date: Sun, 20 Feb 2022 15:14:31 +0000
|
|
||||||
Subject: [PATCH] nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios
|
|
||||||
property
|
|
||||||
|
|
||||||
Wp-gpios property can be used on NVMEM nodes and the same property can
|
|
||||||
be also used on MTD NAND nodes. In case of the wp-gpios property is
|
|
||||||
defined at NAND level node, the GPIO management is done at NAND driver
|
|
||||||
level. Write protect is disabled when the driver is probed or resumed
|
|
||||||
and is enabled when the driver is released or suspended.
|
|
||||||
|
|
||||||
When no partitions are defined in the NAND DT node, then the NAND DT node
|
|
||||||
will be passed to NVMEM framework. If wp-gpios property is defined in
|
|
||||||
this node, the GPIO resource is taken twice and the NAND controller
|
|
||||||
driver fails to probe.
|
|
||||||
|
|
||||||
It would be possible to set config->wp_gpio at MTD level before calling
|
|
||||||
nvmem_register function but NVMEM framework will toggle this GPIO on
|
|
||||||
each write when this GPIO should only be controlled at NAND level driver
|
|
||||||
to ensure that the Write Protect has not been enabled.
|
|
||||||
|
|
||||||
A way to fix this conflict is to add a new boolean flag in nvmem_config
|
|
||||||
named ignore_wp. In case ignore_wp is set, the GPIO resource will
|
|
||||||
be managed by the provider.
|
|
||||||
|
|
||||||
Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
|
|
||||||
Cc: stable@vger.kernel.org
|
|
||||||
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
|
|
||||||
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
|
||||||
Link: https://lore.kernel.org/r/20220220151432.16605-2-srinivas.kandagatla@linaro.org
|
|
||||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
||||||
---
|
|
||||||
drivers/nvmem/core.c | 2 +-
|
|
||||||
include/linux/nvmem-provider.h | 4 +++-
|
|
||||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/nvmem/core.c
|
|
||||||
+++ b/drivers/nvmem/core.c
|
|
||||||
@@ -771,7 +771,7 @@ struct nvmem_device *nvmem_register(cons
|
|
||||||
|
|
||||||
if (config->wp_gpio)
|
|
||||||
nvmem->wp_gpio = config->wp_gpio;
|
|
||||||
- else
|
|
||||||
+ else if (!config->ignore_wp)
|
|
||||||
nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
|
|
||||||
GPIOD_OUT_HIGH);
|
|
||||||
if (IS_ERR(nvmem->wp_gpio)) {
|
|
||||||
--- a/include/linux/nvmem-provider.h
|
|
||||||
+++ b/include/linux/nvmem-provider.h
|
|
||||||
@@ -70,7 +70,8 @@ struct nvmem_keepout {
|
|
||||||
* @word_size: Minimum read/write access granularity.
|
|
||||||
* @stride: Minimum read/write access stride.
|
|
||||||
* @priv: User context passed to read/write callbacks.
|
|
||||||
- * @wp-gpio: Write protect pin
|
|
||||||
+ * @wp-gpio: Write protect pin
|
|
||||||
+ * @ignore_wp: Write Protect pin is managed by the provider.
|
|
||||||
*
|
|
||||||
* Note: A default "nvmem<id>" name will be assigned to the device if
|
|
||||||
* no name is specified in its configuration. In such case "<id>" is
|
|
||||||
@@ -92,6 +93,7 @@ struct nvmem_config {
|
|
||||||
enum nvmem_type type;
|
|
||||||
bool read_only;
|
|
||||||
bool root_only;
|
|
||||||
+ bool ignore_wp;
|
|
||||||
struct device_node *of_node;
|
|
||||||
bool no_of_node;
|
|
||||||
nvmem_reg_read_t reg_read;
|
|
|
@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
|
||||||
--- a/drivers/nvmem/core.c
|
--- a/drivers/nvmem/core.c
|
||||||
+++ b/drivers/nvmem/core.c
|
+++ b/drivers/nvmem/core.c
|
||||||
@@ -829,21 +829,18 @@ struct nvmem_device *nvmem_register(cons
|
@@ -830,21 +830,18 @@ struct nvmem_device *nvmem_register(cons
|
||||||
nvmem->dev.groups = nvmem_dev_groups;
|
nvmem->dev.groups = nvmem_dev_groups;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
|
||||||
--- a/drivers/nvmem/core.c
|
--- a/drivers/nvmem/core.c
|
||||||
+++ b/drivers/nvmem/core.c
|
+++ b/drivers/nvmem/core.c
|
||||||
@@ -810,18 +810,24 @@ struct nvmem_device *nvmem_register(cons
|
@@ -811,18 +811,24 @@ struct nvmem_device *nvmem_register(cons
|
||||||
|
|
||||||
switch (config->id) {
|
switch (config->id) {
|
||||||
case NVMEM_DEVID_NONE:
|
case NVMEM_DEVID_NONE:
|
||||||
|
|
|
@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
|
||||||
|
|
||||||
--- a/mm/page_alloc.c
|
--- a/mm/page_alloc.c
|
||||||
+++ b/mm/page_alloc.c
|
+++ b/mm/page_alloc.c
|
||||||
@@ -7104,7 +7104,7 @@ static void __ref alloc_node_mem_map(str
|
@@ -7107,7 +7107,7 @@ static void __ref alloc_node_mem_map(str
|
||||||
if (pgdat == NODE_DATA(0)) {
|
if (pgdat == NODE_DATA(0)) {
|
||||||
mem_map = NODE_DATA(0)->node_mem_map;
|
mem_map = NODE_DATA(0)->node_mem_map;
|
||||||
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user