Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  kernel: bump 6.1 to 6.1.57
  kernel: bump 5.15 to 5.15.135
  generic: backport fix for Winbond SPI NAND
  generic: 6.1: re-add two Winbond nand fixes
  arm-trusted-firmware-rockchip-vendor: update PKG_MIRROR_HASH
  base-files: create empty coremark file
  base-files: fix OpenWrt with Docker will cause NAT loopback (coolsnowwolf#11588)
  mbedtls: Update to version 2.28.5
  config-6.1: disable CONFIG_ARM64_ERRATUM_2966298
  • Loading branch information
github-actions[bot] committed Oct 20, 2023
2 parents 6da77d8 + 05fae03 commit fb227f1
Show file tree
Hide file tree
Showing 21 changed files with 273 additions and 47 deletions.
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .133
LINUX_KERNEL_HASH-5.15.133 = ef845e7934897b88e4448378ea9daacac19e07f156fe904844fab0a7d8ff5ddd
LINUX_VERSION-5.15 = .135
LINUX_KERNEL_HASH-5.15.135 = 14835e629e237f136cfed484fdb533c95242429809bdcdb2a2d66dfcb7447170
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .56
LINUX_KERNEL_HASH-6.1.56 = 9edefdde32c2298389dcd19566402332b3c2016f5ada17e5820f500b908d478c
LINUX_VERSION-6.1 = .57
LINUX_KERNEL_HASH-6.1.57 = f9ebfe3ddc5152d87b37e33be30e31875d137433be10a57ce29d2eae7b6e91b1
4 changes: 4 additions & 0 deletions package/base-files/files/etc/sysctl.conf
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Defaults are configured in /etc/sysctl.d/* and can be customized in this file

net.bridge.bridge-nf-call-arptables = 0
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
5 changes: 1 addition & 4 deletions package/base-files/files/lib/preinit/80_mount_root
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ missing_lines() {
do_mount_root() {
mount_root
boot_run_hook preinit_mount_root
have_ro_ext4=$(/bin/cat /proc/mounts |/bin/grep ' / ext4'|/bin/grep 'ro'|/usr/bin/wc -l)
if [ "$have_ro_ext4" != "0" ]; then
/usr/bin/mount -o remount,rw,noatime /
fi
[ ! -f /etc/bench.log ] && touch /etc/bench.log
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
echo "- config restore -"
cp /etc/passwd /etc/group /etc/shadow /tmp
Expand Down
2 changes: 1 addition & 1 deletion package/boot/arm-trusted-firmware-rockchip-vendor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git
PKG_SOURCE_DATE:=2023-07-26
PKG_SOURCE_VERSION:=b4558da0860ca48bf1a571dd33ccba580b9abe23
PKG_MIRROR_HASH:=50e904a9d53466449155ff8f80522ffdfe7fb36a2ff13055416259e1468c07bf
PKG_MIRROR_HASH:=039f0f72d0dd179487b5d4b135d13684b220f3d81fa7308a34431a86701f69c6

PKG_MAINTAINER:=Tianling Shen <[email protected]>

Expand Down
4 changes: 2 additions & 2 deletions package/libs/mbedtls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=mbedtls
PKG_VERSION:=2.28.4
PKG_VERSION:=2.28.5
PKG_RELEASE:=1
PKG_USE_MIPS16:=0

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=578c4dcd15bbff3f5cd56aa07cd4f850fc733634e3d5947be4f7157d5bfd81ac
PKG_HASH:=849e86b626e42ded6bf67197b64aa771daa54e2a7e2868dc67e1e4711959e5e3

PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=gpl-2.0.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Signed-off-by: Glenn Strauss <[email protected]>
#include <windows.h>
#else
#include <time.h>
@@ -3001,6 +3005,61 @@ find_parent:
@@ -3002,6 +3006,61 @@ find_parent:
}
}

Expand Down Expand Up @@ -95,7 +95,7 @@ Signed-off-by: Glenn Strauss <[email protected]>
/*
* Check for CN match
*/
@@ -3021,24 +3080,51 @@ static int x509_crt_check_cn(const mbedt
@@ -3022,24 +3081,51 @@ static int x509_crt_check_cn(const mbedt
return -1;
}

Expand Down Expand Up @@ -158,7 +158,7 @@ Signed-off-by: Glenn Strauss <[email protected]>
}

/*
@@ -3049,31 +3135,23 @@ static void x509_crt_verify_name(const m
@@ -3050,31 +3136,23 @@ static void x509_crt_verify_name(const m
uint32_t *flags)
{
const mbedtls_x509_name *name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Signed-off-by: Andrew Morton <[email protected]>
extern spinlock_t css_set_lock;
#define task_css_set_check(task, __c) \
rcu_dereference_check((task)->cgroups, \
@@ -708,6 +719,8 @@ struct cgroup;
@@ -709,6 +720,8 @@ struct cgroup;
static inline u64 cgroup_id(const struct cgroup *cgrp) { return 1; }
static inline void css_get(struct cgroup_subsys_state *css) {}
static inline void css_put(struct cgroup_subsys_state *css) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From f5a05060670a4d8d6523afc7963eb559c2e3615f Mon Sep 17 00:00:00 2001
From: Olivier Maignial <[email protected]>
Date: Fri, 23 Jun 2023 17:33:37 +0200
Subject: [PATCH] mtd: spinand: winbond: Fix ecc_get_status

Reading ECC status is failing.

w25n02kv_ecc_get_status() is using on-stack buffer for
SPINAND_GET_FEATURE_OP() output. It is not suitable for
DMA needs of spi-mem.

Fix this by using the spi-mem operations dedicated buffer
spinand->scratchbuf.

See
spinand->scratchbuf:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mtd/spinand.h?h=v6.3#n418
spi_mem_check_op():
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-mem.c?h=v6.3#n199

Fixes: 6154c7a58348 ("mtd: spinand: winbond: add Winbond W25N02KV flash support")
Cc: [email protected]
Signed-off-by: Olivier Maignial <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/DB4P250MB1032EDB9E36B764A33769039FE23A@DB4P250MB1032.EURP250.PROD.OUTLOOK.COM
---
drivers/mtd/nand/spi/winbond.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -108,7 +108,7 @@ static int w25n02kv_ecc_get_status(struc
{
struct nand_device *nand = spinand_to_nand(spinand);
u8 mbf = 0;
- struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf);
+ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf);

switch (status & STATUS_ECC_MASK) {
case STATUS_ECC_NO_BITFLIPS:
@@ -126,7 +126,7 @@ static int w25n02kv_ecc_get_status(struc
if (spi_mem_exec_op(spinand->spimem, &op))
return nanddev_get_ecc_conf(nand)->strength;

- mbf >>= 4;
+ mbf = *(spinand->scratchbuf) >> 4;

if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf))
return nanddev_get_ecc_conf(nand)->strength;
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Signed-off-by: T.J. Mercier <[email protected]>
static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7957,6 +7957,7 @@ static void __init free_area_init_node(i
@@ -7943,6 +7943,7 @@ static void __init free_area_init_node(i
pgdat_set_deferred_range(pgdat);

free_area_init_core(pgdat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Signed-off-by: T.J. Mercier <[email protected]>
#endif
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1435,8 +1435,7 @@ again:
@@ -1445,8 +1445,7 @@ again:
force_flush = 1;
set_page_dirty(page);
}
Expand All @@ -87,7 +87,7 @@ Signed-off-by: T.J. Mercier <[email protected]>
mark_page_accessed(page);
}
rss[mm_counter(page)]--;
@@ -5189,8 +5188,8 @@ static inline void mm_account_fault(stru
@@ -5199,8 +5198,8 @@ static inline void mm_account_fault(stru
#ifdef CONFIG_LRU_GEN
static void lru_gen_enter_fault(struct vm_area_struct *vma)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From dbf70fc204d2fbb0d8ad8f42038a60846502efda Mon Sep 17 00:00:00 2001
From: Mikhail Kshevetskiy <[email protected]>
Date: Mon, 10 Oct 2022 13:51:09 +0300
Subject: [PATCH] mtd: spinand: winbond: fix flash identification

Winbond uses 3 bytes to identify flash: vendor_id, dev_id_0, dev_id_1,
but current driver uses only first 2 bytes of it for devices
identification. As result Winbond W25N02KV flash (id_bytes: EF, AA, 22)
is identified as W25N01GV (id_bytes: EF, AA, 21).

Fix this by adding missed identification bytes.

Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
---
drivers/mtd/nand/spi/winbond.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -76,7 +76,7 @@ static int w25m02gv_select_target(struct

static const struct spinand_info winbond_spinand_table[] = {
SPINAND_INFO("W25M02GV",
- SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xab),
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xab, 0x21),
NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 2),
NAND_ECCREQ(1, 512),
SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
@@ -86,7 +86,7 @@ static const struct spinand_info winbond
SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL),
SPINAND_SELECT_TARGET(w25m02gv_select_target)),
SPINAND_INFO("W25N01GV",
- SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa),
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa, 0x21),
NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
NAND_ECCREQ(1, 512),
SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
From 6154c7a583483d7b69f53bea868efdc369edd563 Mon Sep 17 00:00:00 2001
From: Mikhail Kshevetskiy <[email protected]>
Date: Mon, 10 Oct 2022 13:51:10 +0300
Subject: [PATCH] mtd: spinand: winbond: add Winbond W25N02KV flash support

Add support of Winbond W25N02KV flash

Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
---
drivers/mtd/nand/spi/winbond.c | 75 ++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)

--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -74,6 +74,72 @@ static int w25m02gv_select_target(struct
return spi_mem_exec_op(spinand->spimem, &op);
}

+static int w25n02kv_ooblayout_ecc(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ if (section > 3)
+ return -ERANGE;
+
+ region->offset = 64 + (16 * section);
+ region->length = 13;
+
+ return 0;
+}
+
+static int w25n02kv_ooblayout_free(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ if (section > 3)
+ return -ERANGE;
+
+ region->offset = (16 * section) + 2;
+ region->length = 14;
+
+ return 0;
+}
+
+static const struct mtd_ooblayout_ops w25n02kv_ooblayout = {
+ .ecc = w25n02kv_ooblayout_ecc,
+ .free = w25n02kv_ooblayout_free,
+};
+
+static int w25n02kv_ecc_get_status(struct spinand_device *spinand,
+ u8 status)
+{
+ struct nand_device *nand = spinand_to_nand(spinand);
+ u8 mbf = 0;
+ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf);
+
+ switch (status & STATUS_ECC_MASK) {
+ case STATUS_ECC_NO_BITFLIPS:
+ return 0;
+
+ case STATUS_ECC_UNCOR_ERROR:
+ return -EBADMSG;
+
+ case STATUS_ECC_HAS_BITFLIPS:
+ /*
+ * Let's try to retrieve the real maximum number of bitflips
+ * in order to avoid forcing the wear-leveling layer to move
+ * data around if it's not necessary.
+ */
+ if (spi_mem_exec_op(spinand->spimem, &op))
+ return nanddev_get_ecc_conf(nand)->strength;
+
+ mbf >>= 4;
+
+ if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf))
+ return nanddev_get_ecc_conf(nand)->strength;
+
+ return mbf;
+
+ default:
+ break;
+ }
+
+ return -EINVAL;
+}
+
static const struct spinand_info winbond_spinand_table[] = {
SPINAND_INFO("W25M02GV",
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xab, 0x21),
@@ -94,6 +160,15 @@ static const struct spinand_info winbond
&update_cache_variants),
0,
SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)),
+ SPINAND_INFO("W25N02KV",
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa, 0x22),
+ NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
+ NAND_ECCREQ(8, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+ &write_cache_variants,
+ &update_cache_variants),
+ 0,
+ SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
};

static int winbond_spinand_init(struct spinand_device *spinand)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From f5a05060670a4d8d6523afc7963eb559c2e3615f Mon Sep 17 00:00:00 2001
From: Olivier Maignial <[email protected]>
Date: Fri, 23 Jun 2023 17:33:37 +0200
Subject: [PATCH] mtd: spinand: winbond: Fix ecc_get_status

Reading ECC status is failing.

w25n02kv_ecc_get_status() is using on-stack buffer for
SPINAND_GET_FEATURE_OP() output. It is not suitable for
DMA needs of spi-mem.

Fix this by using the spi-mem operations dedicated buffer
spinand->scratchbuf.

See
spinand->scratchbuf:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mtd/spinand.h?h=v6.3#n418
spi_mem_check_op():
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-mem.c?h=v6.3#n199

Fixes: 6154c7a58348 ("mtd: spinand: winbond: add Winbond W25N02KV flash support")
Cc: [email protected]
Signed-off-by: Olivier Maignial <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/DB4P250MB1032EDB9E36B764A33769039FE23A@DB4P250MB1032.EURP250.PROD.OUTLOOK.COM
---
drivers/mtd/nand/spi/winbond.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -108,7 +108,7 @@ static int w25n02kv_ecc_get_status(struc
{
struct nand_device *nand = spinand_to_nand(spinand);
u8 mbf = 0;
- struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf);
+ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf);

switch (status & STATUS_ECC_MASK) {
case STATUS_ECC_NO_BITFLIPS:
@@ -126,7 +126,7 @@ static int w25n02kv_ecc_get_status(struc
if (spi_mem_exec_op(spinand->spimem, &op))
return nanddev_get_ecc_conf(nand)->strength;

- mbf >>= 4;
+ mbf = *(spinand->scratchbuf) >> 4;

if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf))
return nanddev_get_ecc_conf(nand)->strength;
1 change: 1 addition & 0 deletions target/linux/generic/config-6.1
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,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_2966298 is not set
# CONFIG_ARM64_HW_AFDBM is not set
# CONFIG_ARM64_LSE_ATOMICS is not set
CONFIG_ARM64_MODULE_PLTS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <[email protected]>

--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1200,6 +1200,73 @@ static struct mtd_info * __init open_mtd
@@ -1207,6 +1207,73 @@ static struct mtd_info * __init open_mtd
return mtd;
}

Expand Down Expand Up @@ -82,7 +82,7 @@ Signed-off-by: Daniel Golle <[email protected]>
static int __init ubi_init(void)
{
int err, i, k;
@@ -1283,6 +1350,12 @@ static int __init ubi_init(void)
@@ -1290,6 +1357,12 @@ static int __init ubi_init(void)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Signed-off-by: Daniel Golle <[email protected]>

--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -14,6 +14,7 @@
@@ -11,6 +11,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mbus.h>
Expand Down
Loading

0 comments on commit fb227f1

Please sign in to comment.