This is an automatically generated commit which aids following Kernel patch history, as git will see the move and copy as a rename thus defeating the purpose. For the original discussion see: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de> Link: https://github.com/openwrt/openwrt/pull/24031 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
25 lines
1,002 B
Diff
25 lines
1,002 B
Diff
From ce4d8b3c5e866a8c515608cf623990e1471a69c7 Mon Sep 17 00:00:00 2001
|
|
From: Ziyang Huang <hzyitc@outlook.com>
|
|
Date: Tue, 2 Dec 2025 22:02:30 +0800
|
|
Subject: [PATCH 1/2] mtd: rawnand: qpic only support max 4 bytes ID
|
|
|
|
QPIC use a reg (NAND_READ_ID) to transport the ID, so the max bytes of ID is a word (4Bytes).
|
|
|
|
https://github.com/torvalds/linux/blob/3a8660878839faadb4f1a6dd72c3179c1df56787/drivers/mtd/nand/raw/qcom_nandc.c#L1783
|
|
|
|
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|
---
|
|
drivers/mtd/nand/raw/nand_base.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/mtd/nand/raw/nand_base.c
|
|
+++ b/drivers/mtd/nand/raw/nand_base.c
|
|
@@ -4965,7 +4965,7 @@ static bool find_full_id_nand(struct nan
|
|
|
|
memorg = nanddev_get_memorg(&chip->base);
|
|
|
|
- if (!strncmp(type->id, id_data, type->id_len)) {
|
|
+ if (!strncmp(type->id, id_data, min(4, type->id_len))) {
|
|
memorg->pagesize = type->pagesize;
|
|
mtd->writesize = memorg->pagesize;
|
|
memorg->pages_per_eraseblock = type->erasesize /
|