]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
generic: 6.12: disable cont read for MX35LFxGE4AD 19115/head
authorChukun Pan <amadeus@jmu.edu.cn>
Tue, 10 Jun 2025 15:15:02 +0000 (23:15 +0800)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 13 Jun 2025 09:15:08 +0000 (11:15 +0200)
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@jmu.edu.cn>
target/linux/generic/pending-6.12/417-mtd-spi-nand-macronix-disable-continuous-read-for-MX.patch [new file with mode: 0644]

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 (file)
index 0000000..65531e0
--- /dev/null
@@ -0,0 +1,39 @@
+From 435afd182e8f5997033da1d69e56094ecb112cad Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus@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@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),