[openwrt/openwrt] generic: 6.12: disable cont read for MX35LFxGE4AD

LEDE Commits lede-commits at lists.infradead.org
Fri Jun 13 02:15:37 PDT 2025


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/323bbce6002db909100f22fca47a41fb71ce793e

commit 323bbce6002db909100f22fca47a41fb71ce793e
Author: Chukun Pan <amadeus at jmu.edu.cn>
AuthorDate: Tue Jun 10 23:15:02 2025 +0800

    generic: 6.12: disable cont read for MX35LFxGE4AD
    
    Continuous read does not work properly in on-die ECC mode.
    Disable it to fix ubi io error on the GL.iNet GL-MT3000.
    
    Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
---
 ...d-macronix-disable-continuous-read-for-MX.patch | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/target/linux/generic/pending-6.12/417-mtd-spi-nand-macronix-disable-continuous-read-for-MX.patch b/target/linux/generic/pending-6.12/417-mtd-spi-nand-macronix-disable-continuous-read-for-MX.patch
new file mode 100644
index 0000000000..65531e099d
--- /dev/null
+++ b/target/linux/generic/pending-6.12/417-mtd-spi-nand-macronix-disable-continuous-read-for-MX.patch
@@ -0,0 +1,39 @@
+From 435afd182e8f5997033da1d69e56094ecb112cad Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus at jmu.edu.cn>
+Date: Thu, 10 Jun 2025 23:10:16 +0800
+Subject: [PATCH] mtd: spi-nand: macronix: disable continuous read for
+ MX35LFxGE4AD
+
+In on-die ECC mode, enabling continuous read will cause ubi_io_read error.
+[    7.852000] ubi0 warning: ubi_io_read: error -5 while reading ...
+
+So disable it first. Tested on GL.iNet GL-MT3000 with MX35LF2GE4AD flash.
+
+Fixes: 11813857864f ("mtd: spi-nand: macronix: Continuous read support")
+Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
+---
+ drivers/mtd/nand/spi/macronix.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/mtd/nand/spi/macronix.c
++++ b/drivers/mtd/nand/spi/macronix.c
+@@ -167,8 +167,7 @@ static const struct spinand_info macroni
+ 					      &update_cache_variants),
+ 		     SPINAND_HAS_QE_BIT,
+ 		     SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
+-				     macronix_ecc_get_status),
+-		     SPINAND_CONT_READ(macronix_set_cont_read)),
++				     macronix_ecc_get_status)),
+ 	SPINAND_INFO("MX35LF4GE4AD",
+ 		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x37, 0x03),
+ 		     NAND_MEMORG(1, 4096, 128, 64, 2048, 40, 1, 1, 1),
+@@ -178,8 +177,7 @@ static const struct spinand_info macroni
+ 					      &update_cache_variants),
+ 		     SPINAND_HAS_QE_BIT,
+ 		     SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
+-				     macronix_ecc_get_status),
+-		     SPINAND_CONT_READ(macronix_set_cont_read)),
++				     macronix_ecc_get_status)),
+ 	SPINAND_INFO("MX35LF1G24AD",
+ 		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x14, 0x03),
+ 		     NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),




More information about the lede-commits mailing list